Loading core/java/android/provider/Settings.java +4 −6 Original line number Original line Diff line number Diff line Loading @@ -1569,9 +1569,8 @@ public final class Settings { * @return true if the calling app can draw on top of other apps, false otherwise. * @return true if the calling app can draw on top of other apps, false otherwise. */ */ public static boolean canDrawOverlays(Context context) { public static boolean canDrawOverlays(Context context) { int uid = Binder.getCallingUid(); return Settings.isCallingPackageAllowedToDrawOverlays(context, Process.myUid(), return Settings.isCallingPackageAllowedToDrawOverlays(context, uid, Settings context.getOpPackageName(), false); .getPackageNameForUid(context, uid), false); } } /** /** Loading Loading @@ -3885,9 +3884,8 @@ public final class Settings { * @return true if the calling app can write to system settings, false otherwise * @return true if the calling app can write to system settings, false otherwise */ */ public static boolean canWrite(Context context) { public static boolean canWrite(Context context) { int uid = Binder.getCallingUid(); return isCallingPackageAllowedToWriteSettings(context, Process.myUid(), return isCallingPackageAllowedToWriteSettings(context, uid, getPackageNameForUid( context.getOpPackageName(), false); context, uid), false); } } } } Loading Loading
core/java/android/provider/Settings.java +4 −6 Original line number Original line Diff line number Diff line Loading @@ -1569,9 +1569,8 @@ public final class Settings { * @return true if the calling app can draw on top of other apps, false otherwise. * @return true if the calling app can draw on top of other apps, false otherwise. */ */ public static boolean canDrawOverlays(Context context) { public static boolean canDrawOverlays(Context context) { int uid = Binder.getCallingUid(); return Settings.isCallingPackageAllowedToDrawOverlays(context, Process.myUid(), return Settings.isCallingPackageAllowedToDrawOverlays(context, uid, Settings context.getOpPackageName(), false); .getPackageNameForUid(context, uid), false); } } /** /** Loading Loading @@ -3885,9 +3884,8 @@ public final class Settings { * @return true if the calling app can write to system settings, false otherwise * @return true if the calling app can write to system settings, false otherwise */ */ public static boolean canWrite(Context context) { public static boolean canWrite(Context context) { int uid = Binder.getCallingUid(); return isCallingPackageAllowedToWriteSettings(context, Process.myUid(), return isCallingPackageAllowedToWriteSettings(context, uid, getPackageNameForUid( context.getOpPackageName(), false); context, uid), false); } } } } Loading