Merge "Rename PlatformCompat#setOverridesOnReleaseBuilds to putOverridesOnReleaseBuilds." into sc-dev
This commit is contained in:
@@ -119,7 +119,7 @@ public final class CompatChanges {
|
||||
ServiceManager.getService(Context.PLATFORM_COMPAT_SERVICE));
|
||||
CompatibilityOverrideConfig config = new CompatibilityOverrideConfig(overrides);
|
||||
try {
|
||||
platformCompat.setOverridesOnReleaseBuilds(config, packageName);
|
||||
platformCompat.putOverridesOnReleaseBuilds(config, packageName);
|
||||
} catch (RemoteException e) {
|
||||
e.rethrowFromSystemServer();
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ interface IPlatformCompat {
|
||||
* @param packageName the package name of the app whose changes will be overridden
|
||||
* @throws SecurityException if overriding changes is not permitted
|
||||
*/
|
||||
void setOverridesOnReleaseBuilds(in CompatibilityOverrideConfig overrides, in String packageName);
|
||||
void putOverridesOnReleaseBuilds(in CompatibilityOverrideConfig overrides, in String packageName);
|
||||
|
||||
/**
|
||||
* Adds overrides to compatibility changes.
|
||||
|
||||
@@ -647,9 +647,9 @@ public final class GameManagerService extends IGameManagerService.Stub {
|
||||
final CompatibilityOverrideConfig changeConfig = new CompatibilityOverrideConfig(
|
||||
overrides);
|
||||
try {
|
||||
mPlatformCompat.setOverridesOnReleaseBuilds(changeConfig, packageName);
|
||||
mPlatformCompat.putOverridesOnReleaseBuilds(changeConfig, packageName);
|
||||
} catch (RemoteException e) {
|
||||
Slog.e(TAG, "Failed to call IPlatformCompat#setOverridesOnReleaseBuilds", e);
|
||||
Slog.e(TAG, "Failed to call IPlatformCompat#putOverridesOnReleaseBuilds", e);
|
||||
}
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(uid);
|
||||
@@ -671,9 +671,9 @@ public final class GameManagerService extends IGameManagerService.Stub {
|
||||
final CompatibilityOverrideConfig changeConfig = new CompatibilityOverrideConfig(
|
||||
overrides);
|
||||
try {
|
||||
mPlatformCompat.setOverridesOnReleaseBuilds(changeConfig, packageName);
|
||||
mPlatformCompat.putOverridesOnReleaseBuilds(changeConfig, packageName);
|
||||
} catch (RemoteException e) {
|
||||
Slog.e(TAG, "Failed to call IPlatformCompat#setOverridesOnReleaseBuilds", e);
|
||||
Slog.e(TAG, "Failed to call IPlatformCompat#putOverridesOnReleaseBuilds", e);
|
||||
}
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(uid);
|
||||
|
||||
@@ -206,15 +206,6 @@ public class PlatformCompat extends IPlatformCompat.Stub {
|
||||
killPackage(packageName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOverridesOnReleaseBuilds(CompatibilityOverrideConfig overrides,
|
||||
String packageName) {
|
||||
// TODO(b/183630314): Unify the permission enforcement with the other setOverrides* methods.
|
||||
checkCompatChangeOverrideOverridablePermission();
|
||||
checkAllCompatOverridesAreOverridable(overrides.overrides.keySet());
|
||||
mCompatConfig.addOverrides(overrides, packageName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOverridesForTest(CompatibilityChangeConfig overrides, String packageName) {
|
||||
checkCompatChangeOverridePermission();
|
||||
@@ -229,6 +220,15 @@ public class PlatformCompat extends IPlatformCompat.Stub {
|
||||
mCompatConfig.addOverrides(new CompatibilityOverrideConfig(overridesMap), packageName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putOverridesOnReleaseBuilds(CompatibilityOverrideConfig overrides,
|
||||
String packageName) {
|
||||
// TODO(b/183630314): Unify the permission enforcement with the other setOverrides* methods.
|
||||
checkCompatChangeOverrideOverridablePermission();
|
||||
checkAllCompatOverridesAreOverridable(overrides.overrides.keySet());
|
||||
mCompatConfig.addOverrides(overrides, packageName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int enableTargetSdkChanges(String packageName, int targetSdkVersion) {
|
||||
checkCompatChangeOverridePermission();
|
||||
|
||||
Reference in New Issue
Block a user