Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 440f3cf2 authored by Adrian Roos's avatar Adrian Roos Committed by Anton Hansson
Browse files

FlaggedApi: enable enforcement for all non-updatable APIs

(cherry pick of 7da1d255
 and 38dd161e)

Bug: 297362755
Test: make checkapi
Merged-In: If7333ead86d9028ab0a1cc8f25fc534cb13a1858
Merged-In: I4d384efac8a8d3b183d9b207b195ad5489db9e55
Change-Id: I4d384efac8a8d3b183d9b207b195ad5489db9e55
parent 7d0b6b0e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -568,6 +568,7 @@ metalava_framework_docs_args = "" +
    "--api-lint-ignore-prefix org. " +
    "--error NoSettingsProvider " +
    "--error UnhiddenSystemApi " +
    "--error UnflaggedApi " +
    "--force-convert-to-warning-nullability-annotations +*:-android.*:+android.icu.*:-dalvik.* " +
    "--hide BroadcastBehavior " +
    "--hide CallbackInterface " +
+2 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ droidstubs {
        api_lint: {
            enabled: true,
            new_since: ":android.api.public.latest",
            baseline_file: ":non-updatable-lint-baseline.txt",
        },
    },
    dists: [
@@ -143,6 +144,7 @@ droidstubs {
        },
        api_lint: {
            enabled: true,
            new_since: ":android.api.test.latest",
            baseline_file: ":non-updatable-test-lint-baseline.txt",
        },
    },
+5 −0
Original line number Diff line number Diff line
@@ -37,6 +37,11 @@ filegroup {
    srcs: ["removed.txt"],
}

filegroup {
    name: "non-updatable-lint-baseline.txt",
    srcs: ["lint-baseline.txt"],
}

filegroup {
    name: "non-updatable-system-current.txt",
    srcs: ["system-current.txt"],
+7 −0
Original line number Diff line number Diff line
// Baseline format: 1.0
UnflaggedApi: android.content.pm.PackageManager#FEATURE_THREAD_NETWORK:
    New API must be flagged with @FlaggedApi: field android.content.pm.PackageManager.FEATURE_THREAD_NETWORK
UnflaggedApi: android.os.Build.VERSION_CODES#VANILLA_ICE_CREAM:
    New API must be flagged with @FlaggedApi: field android.os.Build.VERSION_CODES.VANILLA_ICE_CREAM
UnflaggedApi: android.os.UserManager#DISALLOW_NEAR_FIELD_COMMUNICATION_RADIO:
    New API must be flagged with @FlaggedApi: field android.os.UserManager.DISALLOW_NEAR_FIELD_COMMUNICATION_RADIO
+8 −0
Original line number Diff line number Diff line
@@ -57,3 +57,11 @@ SamShouldBeLast: android.os.IBinder#linkToDeath(android.os.IBinder.DeathRecipien
    SAM-compatible parameters (such as parameter 1, "recipient", in android.os.IBinder.linkToDeath) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
SamShouldBeLast: android.os.IBinder#unlinkToDeath(android.os.IBinder.DeathRecipient, int):
    SAM-compatible parameters (such as parameter 1, "recipient", in android.os.IBinder.unlinkToDeath) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions


UnflaggedApi: android.app.Activity#isResumed():
    New API must be flagged with @FlaggedApi: method android.app.Activity.isResumed()
UnflaggedApi: android.content.Context#REMOTE_AUTH_SERVICE:
    New API must be flagged with @FlaggedApi: field android.content.Context.REMOTE_AUTH_SERVICE
UnflaggedApi: android.os.IpcDataCache#MODULE_TELEPHONY:
    New API must be flagged with @FlaggedApi: field android.os.IpcDataCache.MODULE_TELEPHONY
Loading