Skip to content
Snippets Groups Projects
Commit 9aed0ced authored by Andrei-Valentin Onea's avatar Andrei-Valentin Onea Committed by Gerrit Code Review
Browse files

Merge "Migrate CTS_SYSTEM_API_CHANGEID to @EnabledSince"

parents 3c3baf16 58d18786
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ package com.android.server.compat;
import android.annotation.Nullable;
import android.compat.annotation.ChangeId;
import android.compat.annotation.EnabledAfter;
import android.compat.annotation.EnabledSince;
import android.content.pm.ApplicationInfo;
import com.android.internal.compat.CompatibilityChangeInfo;
......@@ -43,8 +43,8 @@ public final class CompatChange extends CompatibilityChangeInfo {
* A change ID to be used only in the CTS test for this SystemApi
*/
@ChangeId
@EnabledAfter(targetSdkVersion = 1234) // Needs to be > test APK targetSdkVersion.
private static final long CTS_SYSTEM_API_CHANGEID = 149391281; // This is a bug id.
@EnabledSince(targetSdkVersion = 1235) // Needs to be > test APK targetSdkVersion.
static final long CTS_SYSTEM_API_CHANGEID = 149391281; // This is a bug id.
/**
* Callback listener for when compat changes are updated for a package.
......
......@@ -375,6 +375,9 @@ public class PlatformCompat extends IPlatformCompat.Stub {
if (change.getLoggingOnly()) {
return false;
}
if (change.getId() == CompatChange.CTS_SYSTEM_API_CHANGEID) {
return false;
}
if (change.getEnableSinceTargetSdk() > 0) {
if (change.getEnableSinceTargetSdk() < sMinTargetSdk
|| change.getEnableSinceTargetSdk() > sMaxTargetSdk) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment