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

Commit 4f5de340 authored by Fyodor Kupolov's avatar Fyodor Kupolov
Browse files

Renamed primaryUserOnly to systemUserOnly

In the split mode, broadcast receivers and activities marked as
systemUserOnly will be running as system. This is a non-functional change for
non-split system user mode.

Bug: 22958572
Change-Id: I0f7d4f4a81275bc326bf630a776c695e8b5291a6
parent e4f04a1a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -273,10 +273,10 @@ public class ActivityInfo extends ComponentInfo
    public static final int FLAG_RESUME_WHILE_PAUSING = 0x4000;
    /**
     * @hide Bit in {@link #flags}: If set, this component will only be seen
     * by the primary user.  Only works with broadcast receivers.  Set from the
     * android.R.attr#primaryUserOnly attribute.
     * by the system user.  Only works with broadcast receivers.  Set from the
     * android.R.attr#systemUserOnly attribute.
     */
    public static final int FLAG_PRIMARY_USER_ONLY = 0x20000000;
    public static final int FLAG_SYSTEM_USER_ONLY = 0x20000000;
    /**
     * Bit in {@link #flags}: If set, a single instance of the receiver will
     * run for all users on the device.  Set from the
+2 −2
Original line number Diff line number Diff line
@@ -3138,8 +3138,8 @@ public class PackageParser {
            a.info.flags |= ActivityInfo.FLAG_IMMERSIVE;
        }

        if (sa.getBoolean(R.styleable.AndroidManifestActivity_primaryUserOnly, false)) {
            a.info.flags |= ActivityInfo.FLAG_PRIMARY_USER_ONLY;
        if (sa.getBoolean(R.styleable.AndroidManifestActivity_systemUserOnly, false)) {
            a.info.flags |= ActivityInfo.FLAG_SYSTEM_USER_ONLY;
        }

        if (!receiver) {
+1 −1
Original line number Diff line number Diff line
@@ -2804,7 +2804,7 @@
        </activity>

        <receiver android:name="com.android.server.BootReceiver"
                android:primaryUserOnly="true">
                android:systemUserOnly="true">
            <intent-filter android:priority="1000">
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
+3 −3
Original line number Diff line number Diff line
@@ -1816,9 +1816,9 @@
        <attr name="uiOptions" />
        <attr name="parentActivityName" />
        <attr name="singleUser" />
        <!-- @hide This broacast receiver will only receive broadcasts for the
             primary user.  Can only be used with receivers. -->
        <attr name="primaryUserOnly" format="boolean" />
        <!-- @hide This broadcast receiver or activity will only receive broadcasts for the
             system user-->
        <attr name="systemUserOnly" format="boolean" />
        <attr name="persistableMode" />
        <attr name="allowEmbedded" />
        <attr name="documentLaunchMode" />
+2 −2
Original line number Diff line number Diff line
@@ -168,14 +168,14 @@
                android:permission="android.permission.BIND_WALLPAPER"
                android:exported="true" />

        <receiver android:name=".BootReceiver" androidprv:primaryUserOnly="true">
        <receiver android:name=".BootReceiver" androidprv:systemUserOnly="true">
            <intent-filter android:priority="1000">
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>

        <receiver android:name=".qs.tiles.HotspotTile$APChangedReceiver"
                androidprv:primaryUserOnly="true">
                androidprv:systemUserOnly="true">
            <intent-filter>
                <action android:name="android.net.wifi.WIFI_AP_STATE_CHANGED" />
            </intent-filter>
Loading