统一 API,规范代码格式

- setDebugMode
- clearLocalNotifications
This commit is contained in:
Hevin Lau
2017-01-17 22:59:13 +08:00
parent 7b65a1f469
commit 42790c71f3
4 changed files with 171 additions and 159 deletions
+1 -2
View File
@@ -479,6 +479,7 @@ public class JPushPlugin extends CordovaPlugin {
} catch (JSONException e) {
e.printStackTrace();
callbackContext.error("error reading id json");
return;
}
if (notificationId != -1) {
JPushInterface.clearNotificationById(this.cordova.getActivity(), notificationId);
@@ -617,7 +618,6 @@ public class JPushPlugin extends CordovaPlugin {
Field opValue = appOpsClazz.getDeclaredField(appOpsServiceId);
int value = opValue.getInt(Integer.class);
Object result = checkOpNoThrowMethod.invoke(mAppOps, value, uid, pkg);
return Integer.parseInt(result.toString()) == AppOpsManager.MODE_ALLOWED;
} catch (InvocationTargetException e) {
e.printStackTrace();
@@ -632,5 +632,4 @@ public class JPushPlugin extends CordovaPlugin {
}
return true;
}
}