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

Commit 6ea2a8b0 authored by Mårten Kongstad's avatar Mårten Kongstad
Browse files

Baseline Lint FlaggedApi violations

The Lint FlaggedApi checks are currently configured as warnings. Add
existing violations to baselines files to prepare for turning the
FlaggedApi checks into errors.

Bug: 303434307
Test: treehugger
Flag: EXEMPT not possible to flag baseline changes
Change-Id: I990ce57cd5cdac44ee8b93565b45aa15790ad697
parent 8d9d7e2a
Loading
Loading
Loading
Loading
+10703 −0

File changed.

Preview size limit exceeded, changes collapsed.

+3 −0
Original line number Original line Diff line number Diff line
@@ -39,6 +39,9 @@ java_sdk_library {
            "frameworks/base/core/java",
            "frameworks/base/core/java",
        ],
        ],
    },
    },
    lint: {
        baseline_filename: "lint-baseline.xml",
    },
}
}


platform_compat_config {
platform_compat_config {
+81 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 8.4.0-alpha08" type="baseline" client="" dependencies="true" name="" variant="all" version="8.4.0-alpha08">

    <issue
        id="FlaggedApi"
        message="Method `Builder()` is a flagged API and should be inside an `if (Flags.newGeocoder())` check (or annotate the surrounding method `getFromLocation` with `@FlaggedApi(Flags.FLAG_NEW_GEOCODER) to transfer requirement to caller`)"
        errorLine1="                new ReverseGeocodeRequest.Builder("
        errorLine2="                ^">
        <location
            file="frameworks/base/location/java/android/location/Geocoder.java"
            line="170"
            column="17"/>
    </issue>

    <issue
        id="FlaggedApi"
        message="Method `setCallingAttributionTag()` is a flagged API and should be inside an `if (Flags.newGeocoder())` check (or annotate the surrounding method `getFromLocation` with `@FlaggedApi(Flags.FLAG_NEW_GEOCODER) to transfer requirement to caller`)"
        errorLine1="            b.setCallingAttributionTag(mContext.getAttributionTag());"
        errorLine2="            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="frameworks/base/location/java/android/location/Geocoder.java"
            line="178"
            column="13"/>
    </issue>

    <issue
        id="FlaggedApi"
        message="Method `build()` is a flagged API and should be inside an `if (Flags.newGeocoder())` check (or annotate the surrounding method `getFromLocation` with `@FlaggedApi(Flags.FLAG_NEW_GEOCODER) to transfer requirement to caller`)"
        errorLine1="            mService.reverseGeocode(b.build(), new GeocodeCallbackImpl(listener));"
        errorLine2="                                    ~~~~~~~~~">
        <location
            file="frameworks/base/location/java/android/location/Geocoder.java"
            line="181"
            column="37"/>
    </issue>

    <issue
        id="FlaggedApi"
        message="Method `Builder()` is a flagged API and should be inside an `if (Flags.newGeocoder())` check (or annotate the surrounding method `getFromLocationName` with `@FlaggedApi(Flags.FLAG_NEW_GEOCODER) to transfer requirement to caller`)"
        errorLine1="                new ForwardGeocodeRequest.Builder("
        errorLine2="                ^">
        <location
            file="frameworks/base/location/java/android/location/Geocoder.java"
            line="322"
            column="17"/>
    </issue>

    <issue
        id="FlaggedApi"
        message="Method `setCallingAttributionTag()` is a flagged API and should be inside an `if (Flags.newGeocoder())` check (or annotate the surrounding method `getFromLocationName` with `@FlaggedApi(Flags.FLAG_NEW_GEOCODER) to transfer requirement to caller`)"
        errorLine1="            b.setCallingAttributionTag(mContext.getAttributionTag());"
        errorLine2="            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="frameworks/base/location/java/android/location/Geocoder.java"
            line="333"
            column="13"/>
    </issue>

    <issue
        id="FlaggedApi"
        message="Method `build()` is a flagged API and should be inside an `if (Flags.newGeocoder())` check (or annotate the surrounding method `getFromLocationName` with `@FlaggedApi(Flags.FLAG_NEW_GEOCODER) to transfer requirement to caller`)"
        errorLine1="            mService.forwardGeocode(b.build(), new GeocodeCallbackImpl(listener));"
        errorLine2="                                    ~~~~~~~~~">
        <location
            file="frameworks/base/location/java/android/location/Geocoder.java"
            line="336"
            column="37"/>
    </issue>

    <issue
        id="FlaggedApi"
        message="Method `getWorkSource()` is a flagged API and should be inside an `if (Flags.gnssApiMeasurementRequestWorkSource())` check (or annotate the surrounding method `Builder` with `@FlaggedApi(Flags.FLAG_GNSS_API_MEASUREMENT_REQUEST_WORK_SOURCE) to transfer requirement to caller`)"
        errorLine1="            mWorkSource = request.getWorkSource();"
        errorLine2="                          ~~~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="frameworks/base/location/java/android/location/GnssMeasurementRequest.java"
            line="234"
            column="27"/>
    </issue>

</issues>
+77 −0
Original line number Original line Diff line number Diff line
@@ -210,4 +210,81 @@
            column="23"/>
            column="23"/>
    </issue>
    </issue>


    <issue
        id="FlaggedApi"
        message="Method `NfcOemExtension()` is a flagged API and should be inside an `if (Flags.nfcOemExtension())` check (or annotate the surrounding method `NfcAdapter` with `@FlaggedApi(Flags.FLAG_NFC_OEM_EXTENSION) to transfer requirement to caller`)"
        errorLine1="        mNfcOemExtension = new NfcOemExtension(mContext, this);"
        errorLine2="                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="frameworks/base/nfc/java/android/nfc/NfcAdapter.java"
            line="909"
            column="28"/>
    </issue>

    <issue
        id="FlaggedApi"
        message="Field `FLAG_SET_DEFAULT_TECH` is a flagged API and should be inside an `if (Flags.nfcSetDefaultDiscTech())` check (or annotate the surrounding method `setDiscoveryTechnology` with `@FlaggedApi(Flags.FLAG_NFC_SET_DEFAULT_DISC_TECH) to transfer requirement to caller`)"
        errorLine1="                &amp;&amp; ((pollTechnology &amp; FLAG_SET_DEFAULT_TECH) == FLAG_SET_DEFAULT_TECH"
        errorLine2="                                      ~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="frameworks/base/nfc/java/android/nfc/NfcAdapter.java"
            line="1917"
            column="39"/>
    </issue>

    <issue
        id="FlaggedApi"
        message="Field `FLAG_SET_DEFAULT_TECH` is a flagged API and should be inside an `if (Flags.nfcSetDefaultDiscTech())` check (or annotate the surrounding method `setDiscoveryTechnology` with `@FlaggedApi(Flags.FLAG_NFC_SET_DEFAULT_DISC_TECH) to transfer requirement to caller`)"
        errorLine1="                &amp;&amp; ((pollTechnology &amp; FLAG_SET_DEFAULT_TECH) == FLAG_SET_DEFAULT_TECH"
        errorLine2="                                                                ~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="frameworks/base/nfc/java/android/nfc/NfcAdapter.java"
            line="1917"
            column="65"/>
    </issue>

    <issue
        id="FlaggedApi"
        message="Field `FLAG_SET_DEFAULT_TECH` is a flagged API and should be inside an `if (Flags.nfcSetDefaultDiscTech())` check (or annotate the surrounding method `setDiscoveryTechnology` with `@FlaggedApi(Flags.FLAG_NFC_SET_DEFAULT_DISC_TECH) to transfer requirement to caller`)"
        errorLine1="                || (listenTechnology &amp; FLAG_SET_DEFAULT_TECH) == FLAG_SET_DEFAULT_TECH)) {"
        errorLine2="                                       ~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="frameworks/base/nfc/java/android/nfc/NfcAdapter.java"
            line="1918"
            column="40"/>
    </issue>

    <issue
        id="FlaggedApi"
        message="Field `FLAG_SET_DEFAULT_TECH` is a flagged API and should be inside an `if (Flags.nfcSetDefaultDiscTech())` check (or annotate the surrounding method `setDiscoveryTechnology` with `@FlaggedApi(Flags.FLAG_NFC_SET_DEFAULT_DISC_TECH) to transfer requirement to caller`)"
        errorLine1="                || (listenTechnology &amp; FLAG_SET_DEFAULT_TECH) == FLAG_SET_DEFAULT_TECH)) {"
        errorLine2="                                                                 ~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="frameworks/base/nfc/java/android/nfc/NfcAdapter.java"
            line="1918"
            column="66"/>
    </issue>

    <issue
        id="FlaggedApi"
        message="Method `onVendorNciResponse()` is a flagged API and should be inside an `if (Flags.nfcVendorCmd())` check (or annotate the surrounding method `onVendorResponseReceived` with `@FlaggedApi(Flags.FLAG_NFC_VENDOR_CMD) to transfer requirement to caller`)"
        errorLine1="                    executor.execute(() -> callback.onVendorNciResponse(gid, oid, payload));"
        errorLine2="                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="frameworks/base/nfc/java/android/nfc/NfcVendorNciCallbackListener.java"
            line="88"
            column="44"/>
    </issue>

    <issue
        id="FlaggedApi"
        message="Method `onVendorNciNotification()` is a flagged API and should be inside an `if (Flags.nfcVendorCmd())` check (or annotate the surrounding method `onVendorNotificationReceived` with `@FlaggedApi(Flags.FLAG_NFC_VENDOR_CMD) to transfer requirement to caller`)"
        errorLine1="                    executor.execute(() -> callback.onVendorNciNotification(gid, oid, payload));"
        errorLine2="                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="frameworks/base/nfc/java/android/nfc/NfcVendorNciCallbackListener.java"
            line="106"
            column="44"/>
    </issue>

</issues>
</issues>
 No newline at end of file
+33 −0
Original line number Original line Diff line number Diff line
@@ -145,4 +145,37 @@
            line="7158"/>
            line="7158"/>
    </issue>
    </issue>


    <issue
        id="FlaggedApi"
        message="Method `recordSmartReplied()` is a flagged API and should be inside an `if (Flags.lifetimeExtensionRefactor())` check (or annotate the surrounding method `onNotificationSmartReplySent` with `@FlaggedApi(Flags.FLAG_LIFETIME_EXTENSION_REFACTOR) to transfer requirement to caller`)"
        errorLine1="                    r.recordSmartReplied();"
        errorLine2="                    ~~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="frameworks/base/services/core/java/com/android/server/notification/NotificationManagerService.java"
            line="1591"
            column="21"/>
    </issue>

    <issue
        id="FlaggedApi"
        message="Method `getPackageImportanceWithIdentity()` is a flagged API and should be inside an `if (Flags.lifetimeExtensionRefactor())` check (or annotate the surrounding method `enqueueNotificationInternal` with `@FlaggedApi(Flags.FLAG_LIFETIME_EXTENSION_REFACTOR) to transfer requirement to caller`)"
        errorLine1="        final int packageImportance = getPackageImportanceWithIdentity(pkg);"
        errorLine2="                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="frameworks/base/services/core/java/com/android/server/notification/NotificationManagerService.java"
            line="7546"
            column="39"/>
    </issue>

    <issue
        id="FlaggedApi"
        message="Method `getPackageImportanceWithIdentity()` is a flagged API and should be inside an `if (Flags.lifetimeExtensionRefactor())` check (or annotate the surrounding method `onShortcutRemoved` with `@FlaggedApi(Flags.FLAG_LIFETIME_EXTENSION_REFACTOR) to transfer requirement to caller`)"
        errorLine1="                    final int packageImportance = getPackageImportanceWithIdentity(packageName);"
        errorLine2="                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="frameworks/base/services/core/java/com/android/server/notification/NotificationManagerService.java"
            line="7916"
            column="51"/>
    </issue>

</issues>
</issues>
 No newline at end of file