Skip to content

Commit

Permalink
fix(core): fix permssion check
Browse files Browse the repository at this point in the history
Signed-off-by: Teclib <skita@teclib.com>
  • Loading branch information
stonebuzz committed Oct 22, 2019
1 parent 42b64d5 commit 427addd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inventory/src/main/java/org/flyve/inventory/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ protected static String createJSON(Context context, ArrayList<Categories> catego
jsonQuery.put("deviceId", getDeviceId());
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
if (telephonyManager != null &&
(context.checkPermission(android.Manifest.permission.READ_PHONE_STATE, android.os.Process.myPid(), android.os.Process.myUid())) == PackageManager.PERMISSION_GRANTED) {
(context.checkPermission(android.Manifest.permission.READ_PHONE_STATE, android.os.Process.myPid(), android.os.Process.myUid()) == PackageManager.PERMISSION_GRANTED)) {
jsonQuery.put("IMEI", telephonyManager.getDeviceId());
}
jsonQuery.put("content", content);
Expand Down

0 comments on commit 427addd

Please sign in to comment.