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

Commit 172da621 authored by yuemingw's avatar yuemingw Committed by Yueming Wang
Browse files

Add userRestriction attribute in Location settings injector.

We would like to disable location accuracy ui in Settings when DISALLOW_CONFIG_LOCATION is set.
As disable location accuracy preference in Settings is injected from GmsCore, we would like a way to identify which injected settings is location accuracy.
So we want to add an additional field here: https://cs.corp.google.com/piper///depot/google3/java/com/google/android/gmscore/integ/container/proxies/location/base/res/xml/location_accuracy_injected_settings.xml?q=SettingInjectorService+file:%5E//depot/google3/java/com/google/android/gmscore/integ/+package:%5Epiper$&dr=C
Thus we need to update attributes in framework

Bug: 72633181
Test: manually by replacing userRestriction in attrs.xml with an existing
attribute "id", change location_accuracy_injected_settings.xml in gmscore to
include user restriction value, and tested Settings UI via TestDPC
Change-Id: Idd568dc549c68097f31368b1dd567f24922bdc4b
parent 6ccc053d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -201,6 +201,7 @@ 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 userRestriction = 16844165; // 0x1010585
  }

  public static final class R.raw {
+2 −0
Original line number Diff line number Diff line
@@ -8000,6 +8000,8 @@
        <attr name="icon"/>
        <!-- The activity to launch when the setting is clicked on. -->
        <attr name="settingsActivity"/>
        <!-- The user restriction for this preference. -->
        <attr name="userRestriction"/>
    </declare-styleable>

    <!-- =============================== -->
+2 −0
Original line number Diff line number Diff line
@@ -2870,6 +2870,8 @@
      <public name="outlineAmbientShadowColor" />
      <public name="maxLongVersionCode" />
      <public name="urlBarResourceId" />
      <!-- @hide @SystemApi -->
      <public name="userRestriction" />
    </public-group>

    <public-group type="style" first-id="0x010302e0">