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

Commit 5b0ffac9 authored by Jiyong Park's avatar Jiyong Park
Browse files

Remove @SystemApi from the fields of R.styleable

R.styleable class is marked as @doconly which hide the class from the
API stub libraries. Therefore, it does not make sense to mark a field in
R.styleable class as @SystemApi since it can't be used from any app.

Having this annotation has been harmless though, but it will trigger an
CTS failure when we do the exact match for SystemAPIs; a runtime entity
annotated as @SystemApi have to exist in the documented Api. So removing
the bogus annotations.

Note for searchKeyphrase* attributes and reason for updating
system-current.txt:

The attributes are listed in public.xml *and* marked as @SystemApi in
attrs.xml. The former made it possible for clients to reference these
attributes via 'android:searchKeyphrase*' in their xml files and the
latter made it possible for clients to reference them via
android.R.attr.searchKeyphrase*. However, the former was the only use
case intended (and in fact the latter wasn't used at all.)

Since marking them as @SystemApi has been effectively no-op and will
even cause CTS failure when we do the exact match for SystemAPIs, the
markers are now removed.

Bug: 67891551
Test: m -j checkapi does not report an error

Change-Id: Ica8cdcc7bbb40b4476c39db247d744f5e870cd06
parent ea713a38
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -188,10 +188,6 @@ package android {
    field public static final int isVrOnly = 16844152; // 0x1010578
    field public static final int requiredSystemPropertyName = 16844133; // 0x1010565
    field public static final int requiredSystemPropertyValue = 16844134; // 0x1010566
    field public static final int searchKeyphrase = 16843871; // 0x101045f
    field public static final int searchKeyphraseId = 16843870; // 0x101045e
    field public static final int searchKeyphraseRecognitionFlags = 16843942; // 0x10104a6
    field public static final int searchKeyphraseSupportedLocales = 16843872; // 0x1010460
  }

  public static final class R.raw {
+10 −10
Original line number Diff line number Diff line
@@ -7748,21 +7748,21 @@
        <attr name="settingsActivity" />
    </declare-styleable>

    <!-- @SystemApi Use <code>trust-agent</code> as the root tag of the XML resource that
    <!--  Use <code>trust-agent</code> as the root tag of the XML resource that
         describes an {@link android.service.trust.TrustAgentService}, which is
         referenced from its {@link android.service.trust.TrustAgentService#TRUST_AGENT_META_DATA}
         meta-data entry.  Described here are the attributes that can be included in that tag.
         @hide -->
    <declare-styleable name="TrustAgent">
        <!-- @SystemApi Component name of an activity that allows the user to modify
        <!--  Component name of an activity that allows the user to modify
             the settings for this trust agent. @hide -->
        <attr name="settingsActivity" />
        <!-- @SystemApi Title for a preference that allows that user to launch the
        <!--  Title for a preference that allows that user to launch the
             activity to modify trust agent settings. @hide -->
        <attr name="title" />
        <!-- @SystemApi Summary for the same preference as the title. @hide -->
        <!--  Summary for the same preference as the title. @hide -->
        <attr name="summary" />
        <!-- @SystemApi Whether trust agent can unlock a user profile @hide -->
        <!--  Whether trust agent can unlock a user profile @hide -->
        <attr name="unlockProfile" format="boolean"/>
    </declare-styleable>

@@ -7972,16 +7972,16 @@
         by the enrollment application.
         Described here are the attributes that can be included in that tag.
         @hide
         @SystemApi -->
          -->
    <declare-styleable name="VoiceEnrollmentApplication">
        <!-- A globally unique ID for the keyphrase. @hide @SystemApi -->
        <!-- A globally unique ID for the keyphrase. @hide  -->
        <attr name="searchKeyphraseId" format="integer" />
        <!-- The actual keyphrase/hint text, or empty if not keyphrase dependent. @hide @SystemApi -->
        <!-- The actual keyphrase/hint text, or empty if not keyphrase dependent. @hide  -->
        <attr name="searchKeyphrase" format="string" />
        <!-- A comma separated list of BCP-47 language tag for locales that are supported
             for this keyphrase, or empty if not locale dependent. @hide @SystemApi -->
             for this keyphrase, or empty if not locale dependent. @hide  -->
        <attr name="searchKeyphraseSupportedLocales" format="string" />
        <!-- Flags for supported recognition modes. @hide @SystemApi -->
        <!-- Flags for supported recognition modes. @hide  -->
        <attr name="searchKeyphraseRecognitionFlags">
            <flag name="none" value="0" />
            <flag name="voiceTrigger" value="0x1" />