Back to project page HexNanoController_Android.
The source code is released under:
Code license GNU GPL v2 http://www.gnu.org/licenses/gpl.html Content license CC BY-NC-SA 4.0 http://creativecommons.org/licenses/by-nc-sa/4.0/
If you think the Android project HexNanoController_Android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.hexairbot.hexmini.util; //from w ww. ja va2 s .co m import java.text.SimpleDateFormat; import java.util.Date; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.util.Log; public class SystemUtil { private final static String TAG = "SystemUtil"; public static String getCurrentFormatTime() { SimpleDateFormat format = new SimpleDateFormat("HH:mm"); String nowTime = format.format(new Date()); return nowTime; } public static boolean isDebugModel(Context context) { PackageManager mgr = context.getPackageManager(); try { ApplicationInfo info = mgr.getApplicationInfo( context.getPackageName(), 0); return (info.flags & ApplicationInfo.FLAG_DEBUGGABLE) == ApplicationInfo.FLAG_DEBUGGABLE; } catch (NameNotFoundException e) { Log.e(TAG, e.getMessage(), e); } return false; } }