|
2 | 2 |
|
3 | 3 | import android.app.NotificationManager; |
4 | 4 | import android.content.Context; |
| 5 | +import android.content.pm.ApplicationInfo; |
5 | 6 | import android.graphics.Color; |
6 | 7 | import android.location.LocationProvider; |
7 | 8 | import android.os.Environment; |
@@ -108,6 +109,9 @@ public static void init(Context context, Class mainActivityClass, @DrawableRes i |
108 | 109 |
|
109 | 110 | } |
110 | 111 |
|
| 112 | + public static void setDebugAble(boolean debugAble){ |
| 113 | + LogUtil.setDebugAble(debugAble); |
| 114 | + } |
111 | 115 | private static Observer<CustomNotification> notificationObserver = new Observer<CustomNotification>() { |
112 | 116 | @Override |
113 | 117 | public void onEvent(CustomNotification customNotification) { |
@@ -207,6 +211,7 @@ private static void initStatusBarNotificationConfig(SDKOptions options, Context |
207 | 211 | // APP默认 StatusBarNotificationConfig 配置修改后,使其生效 |
208 | 212 | userConfig.notificationEntrance = config.notificationEntrance; |
209 | 213 | userConfig.notificationFolded = config.notificationFolded; |
| 214 | +// userConfig.notificationColor = Color.parseColor("#3a9efb"); |
210 | 215 | } |
211 | 216 | // 持久化生效 |
212 | 217 | // UserPreferences.setStatusConfig(config); |
@@ -256,8 +261,16 @@ public static void initKit() { |
256 | 261 | // init log |
257 | 262 | String path = StorageUtil.getDirectoryByDirType(StorageType.TYPE_LOG); |
258 | 263 | LogUtil.init(path, Log.DEBUG); |
| 264 | + } |
259 | 265 |
|
260 | | - |
| 266 | + public static boolean isApkDebugable(Context context) { |
| 267 | + try { |
| 268 | + ApplicationInfo info = context.getApplicationInfo(); |
| 269 | + return (info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0; |
| 270 | + } catch (Exception e) { |
| 271 | + e.printStackTrace(); |
| 272 | + } |
| 273 | + return false; |
261 | 274 | } |
262 | 275 |
|
263 | 276 | private static void registerMsgRevokeObserver() { |
|
0 commit comments