Merge "Consistent reporting of failure conditions" into sc-dev am: e833132601
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15273601 Change-Id: I9794b1650339bc89c454f89d140e6405e62d65ac
This commit is contained in:
@@ -2603,7 +2603,7 @@ public class AlarmManagerService extends SystemService {
|
|||||||
final int uid = mPackageManagerInternal.getPackageUid(packageName, 0, userId);
|
final int uid = mPackageManagerInternal.getPackageUid(packageName, 0, userId);
|
||||||
if (callingUid != uid && !UserHandle.isCore(callingUid)) {
|
if (callingUid != uid && !UserHandle.isCore(callingUid)) {
|
||||||
throw new SecurityException("Uid " + callingUid
|
throw new SecurityException("Uid " + callingUid
|
||||||
+ " cannot query hasScheduleExactAlarm for uid " + uid);
|
+ " cannot query hasScheduleExactAlarm for package " + packageName);
|
||||||
}
|
}
|
||||||
return (uid > 0) ? hasScheduleExactAlarmInternal(packageName, uid) : false;
|
return (uid > 0) ? hasScheduleExactAlarmInternal(packageName, uid) : false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user