Merge "Rethrow SecurityExceptions in UsageStatsManager" into pi-dev

am: c1eddaed6e

Change-Id: I3a8bdfe2858c88854ab15aba6a619aac1fd66945
This commit is contained in:
Amith Yamasani
2018-05-15 11:00:25 -07:00
committed by android-build-merger

View File

@@ -513,7 +513,7 @@ public final class UsageStatsManager {
try { try {
mService.setAppStandbyBucket(packageName, bucket, mContext.getUserId()); mService.setAppStandbyBucket(packageName, bucket, mContext.getUserId());
} catch (RemoteException e) { } catch (RemoteException e) {
// Nothing to do throw e.rethrowFromSystemServer();
} }
} }
@@ -539,8 +539,8 @@ public final class UsageStatsManager {
} }
return bucketMap; return bucketMap;
} catch (RemoteException e) { } catch (RemoteException e) {
throw e.rethrowFromSystemServer();
} }
return Collections.EMPTY_MAP;
} }
/** /**
@@ -563,6 +563,7 @@ public final class UsageStatsManager {
try { try {
mService.setAppStandbyBuckets(slice, mContext.getUserId()); mService.setAppStandbyBuckets(slice, mContext.getUserId());
} catch (RemoteException e) { } catch (RemoteException e) {
throw e.rethrowFromSystemServer();
} }
} }
@@ -596,6 +597,7 @@ public final class UsageStatsManager {
mService.registerAppUsageObserver(observerId, packages, timeUnit.toMillis(timeLimit), mService.registerAppUsageObserver(observerId, packages, timeUnit.toMillis(timeLimit),
callbackIntent, mContext.getOpPackageName()); callbackIntent, mContext.getOpPackageName());
} catch (RemoteException e) { } catch (RemoteException e) {
throw e.rethrowFromSystemServer();
} }
} }
@@ -614,6 +616,7 @@ public final class UsageStatsManager {
try { try {
mService.unregisterAppUsageObserver(observerId, mContext.getOpPackageName()); mService.unregisterAppUsageObserver(observerId, mContext.getOpPackageName());
} catch (RemoteException e) { } catch (RemoteException e) {
throw e.rethrowFromSystemServer();
} }
} }
@@ -698,6 +701,7 @@ public final class UsageStatsManager {
try { try {
mService.whitelistAppTemporarily(packageName, duration, user.getIdentifier()); mService.whitelistAppTemporarily(packageName, duration, user.getIdentifier());
} catch (RemoteException re) { } catch (RemoteException re) {
throw re.rethrowFromSystemServer();
} }
} }
@@ -709,6 +713,7 @@ public final class UsageStatsManager {
try { try {
mService.onCarrierPrivilegedAppsChanged(); mService.onCarrierPrivilegedAppsChanged();
} catch (RemoteException re) { } catch (RemoteException re) {
throw re.rethrowFromSystemServer();
} }
} }