Home
last modified time | relevance | path

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

12

/frameworks/base/services/core/java/com/android/server/compat/
DCompatConfig.java174 boolean isChangeEnabled(long changeId, ApplicationInfo app) { in isChangeEnabled() argument
175 CompatChange c = mChanges.get(changeId); in isChangeEnabled()
191 boolean willChangeBeEnabled(long changeId, String packageName) { in willChangeBeEnabled() argument
192 CompatChange c = mChanges.get(changeId); in willChangeBeEnabled()
216 synchronized boolean addOverride(long changeId, String packageName, boolean enabled) { in addOverride() argument
217 boolean alreadyKnown = addOverrideUnsafe(changeId, packageName, in addOverride()
266 for (Long changeId : overrides.overrides.keySet()) { in addPackageOverridesWithoutSaving()
267 if (skipUnknownChangeIds && !isKnownChangeId(changeId)) { in addPackageOverridesWithoutSaving()
268 Slog.w(TAG, "Trying to add overrides for unknown Change ID " + changeId + ". " in addPackageOverridesWithoutSaving()
272 addOverrideUnsafe(changeId, packageName, overrides.overrides.get(changeId)); in addPackageOverridesWithoutSaving()
[all …]
DPlatformCompat.java96 public void reportChange(long changeId, ApplicationInfo appInfo) { in reportChange() argument
98 reportChangeInternal(changeId, appInfo.uid, ChangeReporter.STATE_LOGGED); in reportChange()
102 public void reportChangeByPackageName(long changeId, String packageName, in reportChangeByPackageName() argument
107 reportChangeInternal(changeId, appInfo.uid, ChangeReporter.STATE_LOGGED); in reportChangeByPackageName()
112 public void reportChangeByUid(long changeId, int uid) { in reportChangeByUid() argument
114 reportChangeInternal(changeId, uid, ChangeReporter.STATE_LOGGED); in reportChangeByUid()
117 private void reportChangeInternal(long changeId, int uid, int state) { in reportChangeInternal() argument
118 mChangeReporter.reportChange(uid, changeId, state); in reportChangeInternal()
122 public boolean isChangeEnabled(long changeId, ApplicationInfo appInfo) { in isChangeEnabled() argument
124 return isChangeEnabledInternal(changeId, appInfo); in isChangeEnabled()
[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()
DOverrideValidatorImpl.java84 OverrideAllowedState getOverrideAllowedStateForRecheck(long changeId, in getOverrideAllowedStateForRecheck() argument
86 return getOverrideAllowedStateInternal(changeId, packageName, true); in getOverrideAllowedStateForRecheck()
90 public OverrideAllowedState getOverrideAllowedState(long changeId, String packageName) { in getOverrideAllowedState() argument
91 return getOverrideAllowedStateInternal(changeId, packageName, false); in getOverrideAllowedState()
94 private OverrideAllowedState getOverrideAllowedStateInternal(long changeId, String packageName, in getOverrideAllowedStateInternal() argument
96 if (mCompatConfig.isLoggingOnly(changeId)) { in getOverrideAllowedStateInternal()
104 int maxTargetSdk = mCompatConfig.maxTargetSdkForChangeIdOptIn(changeId); in getOverrideAllowedStateInternal()
105 boolean disabled = mCompatConfig.isDisabled(changeId); in getOverrideAllowedStateInternal()
127 if (mCompatConfig.isOverridable(changeId) in getOverrideAllowedStateInternal()
DCompatChange.java88 public CompatChange(long changeId) { in CompatChange() argument
89 this(changeId, null, -1, -1, false, false, null, false); in CompatChange()
110 public CompatChange(long changeId, @Nullable String name, int enableAfterTargetSdk, in CompatChange() argument
113 super(changeId, name, enableAfterTargetSdk, enableSinceTargetSdk, disabled, loggingOnly, in CompatChange()
/frameworks/base/core/java/android/app/compat/
DChangeIdStateQuery.java47 public long changeId; field in ChangeIdStateQuery
52 private ChangeIdStateQuery(@QueryType int type, long changeId, String packageName, in ChangeIdStateQuery() argument
55 this.changeId = changeId; in ChangeIdStateQuery()
61 static ChangeIdStateQuery byPackageName(long changeId, @NonNull String packageName, in byPackageName() argument
63 return new ChangeIdStateQuery(QUERY_BY_PACKAGE_NAME, changeId, packageName, 0, userId); in byPackageName()
66 static ChangeIdStateQuery byUid(long changeId, int uid) { in byUid() argument
67 return new ChangeIdStateQuery(QUERY_BY_UID, changeId, null, uid, 0); in byUid()
80 && this.changeId == that.changeId in equals()
90 result = 31 * result + (int) (changeId ^ (changeId >>> 32)); in hashCode()
DCompatChanges.java58 public static boolean isChangeEnabled(long changeId) { in isChangeEnabled() argument
59 return Compatibility.isChangeEnabled(changeId); in isChangeEnabled()
76 public static boolean isChangeEnabled(long changeId, @NonNull String packageName, in isChangeEnabled() argument
78 return QUERY_CACHE.query(ChangeIdStateQuery.byPackageName(changeId, packageName, in isChangeEnabled()
99 public static boolean isChangeEnabled(long changeId, int uid) { in isChangeEnabled() argument
100 return QUERY_CACHE.query(ChangeIdStateQuery.byUid(changeId, uid)); in isChangeEnabled()
DChangeIdStateCache.java91 return getPlatformCompatService().isChangeEnabledByPackageName(query.changeId, in recompute()
95 return getPlatformCompatService().isChangeEnabledByUid(query.changeId, query.uid); in recompute()
/frameworks/base/core/java/android/app/
DAppCompatCallbacks.java51 public void onChangeReported(long changeId) { in onChangeReported() argument
52 reportChange(changeId, ChangeReporter.STATE_LOGGED); in onChangeReported()
55 public 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.java50 ChangeReport(long changeId, @State int state) { in ChangeReport() argument
51 mChangeId = changeId; in ChangeReport()
91 public void reportChange(int uid, long changeId, int state) { in reportChange() argument
92 if (shouldWriteToStatsLog(uid, changeId, state)) { in reportChange()
94 changeId, state, mSource); in reportChange()
96 if (shouldWriteToDebug(uid, changeId, state)) { in reportChange()
97 debugLog(uid, changeId, state); in reportChange()
99 markAsReported(uid, new ChangeReport(changeId, state)); in reportChange()
126 public boolean shouldWriteToStatsLog(int uid, long changeId, int state) { in shouldWriteToStatsLog() argument
127 return !isAlreadyReported(uid, new ChangeReport(changeId, state)); in shouldWriteToStatsLog()
[all …]
DIPlatformCompat.aidl50 void reportChange(long changeId, in ApplicationInfo appInfo); in reportChange() argument
63 void reportChangeByPackageName(long changeId, in String packageName, int userId); in reportChangeByPackageName() argument
75 void reportChangeByUid(long changeId, int uid); in reportChangeByUid() argument
93 boolean isChangeEnabled(long changeId, in ApplicationInfo appInfo); in isChangeEnabled() argument
118 boolean isChangeEnabledByPackageName(long changeId, in String packageName, int userId); in isChangeEnabledByPackageName() argument
143 boolean isChangeEnabledByUid(long changeId, int uid); in isChangeEnabledByUid() argument
216 boolean clearOverride(long changeId, String packageName); in clearOverride() argument
228 boolean clearOverrideForTest(long changeId, String packageName); in clearOverrideForTest() 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.java110 public void enforce(long changeId, String packageName) in enforce() argument
126 changeId, packageName, appTargetSdk, changeIdTargetSdk)); in enforce()
130 changeId)); in enforce()
135 changeId, packageName, changeIdTargetSdk)); in enforce()
DCompatibilityOverridesToRemoveConfig.java56 for (Long changeId : changeIds) { in writeToParcel()
57 dest.writeLong(changeId); in writeToParcel()
DIOverrideValidator.aidl37 OverrideAllowedState getOverrideAllowedState(long changeId, String packageName); in getOverrideAllowedState() argument
DCompatibilityChangeInfo.java67 Long changeId, String name, int enableAfterTargetSdk, int enableSinceTargetSdk, in CompatibilityChangeInfo() argument
69 this.mChangeId = changeId; in CompatibilityChangeInfo()
/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/services/core/java/com/android/server/am/
DPlatformCompatCache.java82 for (long changeId: compatChanges) { in PlatformCompatCache()
83 mCaches.put(changeId, new CacheItem(mPlatformCompat, changeId)); in PlatformCompatCache()
106 private boolean isChangeEnabled(long changeId, ApplicationInfo app, boolean defaultValue) { in isChangeEnabled() argument
108 return mCacheEnabled ? mCaches.get(changeId).isChangeEnabled(app) in isChangeEnabled()
109 : mIPlatformCompatProxy.isChangeEnabled(changeId, app); in isChangeEnabled()
111 Slog.w(TAG, "Error reading platform compat change " + changeId, e); in isChangeEnabled()
151 CacheItem(PlatformCompat platformCompat, long changeId) { in CacheItem() argument
153 mChangeId = changeId; in CacheItem()
154 mPlatformCompat.registerListener(changeId, this); in CacheItem()
/frameworks/base/core/java/android/content/pm/parsing/result/
DParseInput.java91 public static int getTargetSdkForChange(long changeId) { in getTargetSdkForChange() argument
92 if (changeId == MISSING_APP_TAG in getTargetSdkForChange()
93 || changeId == EMPTY_INTENT_ACTION_CATEGORY in getTargetSdkForChange()
94 || changeId == RESOURCES_ARSC_COMPRESSED) { in getTargetSdkForChange()
98 if (changeId == MISSING_EXPORTED_FLAG) { in getTargetSdkForChange()
173 boolean isChangeEnabled(long changeId, @NonNull String packageName, int targetSdkVersion); in isChangeEnabled() argument
DParseTypeImpl.java72 return new ParseTypeImpl((changeId, packageName, targetSdkVersion) -> { in forParsingWithoutPlatformCompat()
73 int gateSdkVersion = DeferredError.getTargetSdkForChange(changeId); in forParsingWithoutPlatformCompat()
89 return new ParseTypeImpl((changeId, packageName, targetSdkVersion) -> { in forDefaultParsing()
94 return platformCompat.isChangeEnabled(changeId, appInfo); in forDefaultParsing()
176 long changeId = mDeferredErrors.keyAt(index);
178 if (mCallback.isChangeEnabled(changeId, mPackageName, mTargetSdkVersion)) {
/frameworks/base/services/core/java/com/android/server/compat/overrides/
DAppCompatOverridesParser.java141 long changeId = Long.parseLong(changeIdStr); in parseRemoveOverrides() local
142 result.computeIfAbsent(packageName, k -> new ArraySet<>()).add(changeId); in parseRemoveOverrides()
223 long changeId; in parsePackageOverrides() local
225 changeId = Long.parseLong(changeIdAndVersions.get(0)); in parsePackageOverrides()
231 if (changeIdsToSkip.contains(changeId)) { in parsePackageOverrides()
262 if (!overridesToAdd.containsKey(changeId) in parsePackageOverrides()
263 || comparator.compare(override, overridesToAdd.get(changeId)) < 0) { in parsePackageOverrides()
264 overridesToAdd.put(changeId, override); in parsePackageOverrides()
/frameworks/base/services/core/java/com/android/server/pm/parsing/
DPackageParser2.java71 public boolean isChangeEnabled(long changeId, @NonNull ApplicationInfo appInfo) { in forParsingFileWithDefaults()
73 return platformCompat.isChangeEnabled(changeId, appInfo); in forParsingFileWithDefaults()
133 ParseInput.Callback enforcementCallback = (changeId, packageName, targetSdkVersion) -> {
138 return callback.isChangeEnabled(changeId, appInfo);
225 public abstract boolean isChangeEnabled(long changeId, @NonNull ApplicationInfo appInfo);
/frameworks/base/services/core/java/com/android/server/pm/verify/domain/
DDomainVerificationUtils.java93 long changeId) { in isChangeEnabled() argument
94 return platformCompat.isChangeEnabledInternalNoLogging(changeId, buildMockAppInfo(pkg)); in isChangeEnabled()
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/parsing/
DTestPackageParser2.kt23 override fun isChangeEnabled(changeId: Long, appInfo: ApplicationInfo): Boolean { in isChangeEnabled()
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/
DDevicePolicyManagerServiceTestable.java469 long changeId, boolean enabled, String packageName, int userId) { in setChangeEnabledForPackage() argument
471 mEnabledChanges.put(changeId, Pair.create(packageName, userId)); in setChangeEnabledForPackage()
473 mEnabledChanges.remove(changeId); in setChangeEnabledForPackage()
482 public boolean isChangeEnabled(long changeId, String packageName, int userId) { in isChangeEnabled() argument
483 Pair<String, Integer> packageAndUser = mEnabledChanges.get(changeId); in isChangeEnabled()

12