Home
last modified time | relevance | path

Searched refs:changeId (Results 1 – 17 of 17) sorted by relevance

/frameworks/base/services/core/java/com/android/server/compat/
DCompatConfig.java133 boolean isChangeEnabled(long changeId, ApplicationInfo app) { in isChangeEnabled() argument
135 CompatChange c = mChanges.get(changeId); in isChangeEnabled()
159 boolean addOverride(long changeId, String packageName, boolean enabled) in addOverride() argument
163 mOverrideValidator.getOverrideAllowedState(changeId, packageName); in addOverride()
164 allowedState.enforce(changeId, packageName); in addOverride()
166 CompatChange c = mChanges.get(changeId); in addOverride()
169 c = new CompatChange(changeId); in addOverride()
182 boolean isKnownChangeId(long changeId) { in isKnownChangeId() argument
184 CompatChange c = mChanges.get(changeId); in isKnownChangeId()
193 int minTargetSdkForChangeId(long changeId) { in minTargetSdkForChangeId() argument
[all …]
DPlatformCompatNative.java34 public void reportChangeByPackageName(long changeId, String packageName, int userId) { in reportChangeByPackageName() argument
35 mPlatformCompat.reportChangeByPackageName(changeId, packageName, userId); in reportChangeByPackageName()
39 public void reportChangeByUid(long changeId, int uid) { in reportChangeByUid() argument
40 mPlatformCompat.reportChangeByUid(changeId, uid); in reportChangeByUid()
44 public boolean isChangeEnabledByPackageName(long changeId, String packageName, in isChangeEnabledByPackageName() argument
46 return mPlatformCompat.isChangeEnabledByPackageName(changeId, packageName, userId); in isChangeEnabledByPackageName()
50 public boolean isChangeEnabledByUid(long changeId, int uid) { in isChangeEnabledByUid() argument
51 return mPlatformCompat.isChangeEnabledByUid(changeId, uid); in isChangeEnabledByUid()
DPlatformCompat.java80 public void reportChange(long changeId, ApplicationInfo appInfo) { in reportChange() argument
82 reportChange(changeId, appInfo.uid, in reportChange()
87 public void reportChangeByPackageName(long changeId, String packageName, int userId) { in reportChangeByPackageName() argument
93 reportChange(changeId, appInfo); in reportChangeByPackageName()
97 public void reportChangeByUid(long changeId, int uid) { in reportChangeByUid() argument
99 reportChange(changeId, uid, ChangeReporter.STATE_LOGGED); in reportChangeByUid()
103 public boolean isChangeEnabled(long changeId, ApplicationInfo appInfo) { in isChangeEnabled() argument
105 if (mCompatConfig.isChangeEnabled(changeId, appInfo)) { in isChangeEnabled()
106 reportChange(changeId, appInfo.uid, in isChangeEnabled()
110 reportChange(changeId, appInfo.uid, in isChangeEnabled()
[all …]
DOverrideValidatorImpl.java54 public OverrideAllowedState getOverrideAllowedState(long changeId, String packageName) { in getOverrideAllowedState() argument
55 if (mCompatConfig.isLoggingOnly(changeId)) { in getOverrideAllowedState()
61 int minTargetSdk = mCompatConfig.minTargetSdkForChangeId(changeId); in getOverrideAllowedState()
62 boolean disabled = mCompatConfig.isDisabled(changeId); in getOverrideAllowedState()
DCompatChange.java65 public CompatChange(long changeId) { in CompatChange() argument
66 this(changeId, null, -1, false, false, null); in CompatChange()
76 public CompatChange(long changeId, @Nullable String name, int enableAfterTargetSdk, in CompatChange() argument
78 super(changeId, name, enableAfterTargetSdk, disabled, loggingOnly, description); in CompatChange()
/frameworks/base/core/java/android/app/
DAppCompatCallbacks.java51 protected void reportChange(long changeId) { in reportChange() argument
52 reportChange(changeId, ChangeReporter.STATE_LOGGED); in reportChange()
55 protected boolean isChangeEnabled(long changeId) { in isChangeEnabled() argument
56 if (Arrays.binarySearch(mDisabledChanges, changeId) < 0) { in isChangeEnabled()
58 reportChange(changeId, ChangeReporter.STATE_ENABLED); in isChangeEnabled()
61 reportChange(changeId, ChangeReporter.STATE_DISABLED); in isChangeEnabled()
65 private void reportChange(long changeId, int state) { in reportChange() argument
67 mChangeReporter.reportChange(uid, changeId, state); in reportChange()
/frameworks/base/core/java/com/android/internal/compat/
DChangeReporter.java48 ChangeReport(long changeId, @State int state) { in ChangeReport() argument
49 mChangeId = changeId; in ChangeReport()
89 public void reportChange(int uid, long changeId, int state) { in reportChange() argument
90 if (shouldWriteToStatsLog(uid, changeId, state)) { in reportChange()
91 StatsLog.write(StatsLog.APP_COMPATIBILITY_CHANGE_REPORTED, uid, changeId, in reportChange()
94 if (shouldWriteToDebug(uid, changeId, state)) { in reportChange()
95 debugLog(uid, changeId, state); in reportChange()
97 markAsReported(uid, new ChangeReport(changeId, state)); in reportChange()
124 public boolean shouldWriteToStatsLog(int uid, long changeId, int state) { in shouldWriteToStatsLog() argument
125 return !isAlreadyReported(uid, new ChangeReport(changeId, state)); in shouldWriteToStatsLog()
[all …]
DIPlatformCompat.aidl46 void reportChange(long changeId, in ApplicationInfo appInfo); in reportChange() argument
58 void reportChangeByPackageName(long changeId, in String packageName, int userId); in reportChangeByPackageName() argument
69 void reportChangeByUid(long changeId, int uid); in reportChangeByUid() argument
86 boolean isChangeEnabled(long changeId, in ApplicationInfo appInfo); in isChangeEnabled() argument
110 boolean isChangeEnabledByPackageName(long changeId, in String packageName, int userId); in isChangeEnabledByPackageName() argument
134 boolean isChangeEnabledByUid(long changeId, int uid); in isChangeEnabledByUid() argument
164 boolean clearOverride(long changeId, String packageName); in clearOverride() argument
DCompatibilityChangeConfig.java55 public boolean isChangeEnabled(long changeId) { in isChangeEnabled() argument
56 if (mChangeConfig.isForceEnabled(changeId)) { in isChangeEnabled()
58 } else if (mChangeConfig.isForceDisabled(changeId)) { in isChangeEnabled()
61 throw new IllegalStateException("Change " + changeId + " is not defined."); in isChangeEnabled()
DOverrideAllowedState.java105 public void enforce(long changeId, String packageName) in enforce() argument
120 changeId, packageName, appTargetSdk, changeIdTargetSdk)); in enforce()
125 changeId, packageName)); in enforce()
129 changeId)); in enforce()
DCompatibilityChangeInfo.java62 Long changeId, String name, int enableAfterTargetSdk, boolean disabled, in CompatibilityChangeInfo() argument
64 this.mChangeId = changeId; in CompatibilityChangeInfo()
DIOverrideValidator.aidl37 OverrideAllowedState getOverrideAllowedState(long changeId, String packageName); in getOverrideAllowedState() argument
/frameworks/base/core/java/android/app/compat/
DCompatChanges.java52 public static boolean isChangeEnabled(long changeId) { in isChangeEnabled() argument
53 return Compatibility.isChangeEnabled(changeId); in isChangeEnabled()
70 public static boolean isChangeEnabled(long changeId, @NonNull String packageName, in isChangeEnabled() argument
76 return platformCompat.isChangeEnabledByPackageName(changeId, packageName, in isChangeEnabled()
102 public static boolean isChangeEnabled(long changeId, int uid) { in isChangeEnabled() argument
107 return platformCompat.isChangeEnabledByUid(changeId, uid); in isChangeEnabled()
/frameworks/base/native/android/aidl/com/android/internal/compat/
DIPlatformCompatNative.aidl39 void reportChangeByPackageName(long changeId, @utf8InCpp String packageName, int userId); in reportChangeByPackageName() argument
50 void reportChangeByUid(long changeId, int uid); in reportChangeByUid() argument
71 boolean isChangeEnabledByPackageName(long changeId, @utf8InCpp String packageName, int userId); in isChangeEnabledByPackageName() argument
92 boolean isChangeEnabledByUid(long changeId, int uid); in isChangeEnabledByUid() argument
/frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/
DSettingsProviderTest.java623 public void onChange(boolean selfChange, Uri changeUri, int changeId) { in setSettingAndAssertSuccessfulChange()
624 Log.i(LOG_TAG, "onChange(" + selfChange + ", " + changeUri + ", " + changeId + ")"); in setSettingAndAssertSuccessfulChange()
626 assertEquals("Wrong user id", userId, changeId); in setSettingAndAssertSuccessfulChange()
/frameworks/base/services/core/java/com/android/server/am/
DActivityManagerShellCommand.java2938 long changeId = -1;
2954 changeId = Long.parseLong(changeIdString);
2956 changeId = platformCompat.lookupChangeId(changeIdString);
2958 if (changeId == -1) {
2964 if (!toggleAll && !platformCompat.isKnownChangeId(changeId)) {
2965 pw.println("Warning! Change " + changeId + " is not known yet. Enabling/disabling it"
2983 enabled.add(changeId);
2988 pw.println("Enabled change " + changeId + " for " + packageName + ".");
3002 disabled.add(changeId);
3007 pw.println("Disabled change " + changeId + " for " + packageName + ".");
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/compat/
DCompatConfigTest.java192 final long changeId = 1234L; in testPreventAddOverride() local