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

Commit 6372435f authored by Todd Kennedy's avatar Todd Kennedy
Browse files

deprecate sharedUserId attribute

Shared user ids have caused numerous issues, inconsistencies,
and other random behaviours. They are generally not needed as
proper methodologies -- such as providers and services -- exist
and should be used for cross-package interaction.

We are deprecating the sharedUserId and sharedUserLabel
attributes in Q with the eventual goal of entirely removing them
in a future Android release.

Fixes: 129297713
Test: none. doc only change
Change-Id: Id84e8e22918010b2a42531c0b94aff75689d419b
parent 43541017
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1223,8 +1223,8 @@ package android {
    field public static final int shadowRadius = 16843108; // 0x1010164
    field public static final int shape = 16843162; // 0x101019a
    field public static final int shareInterpolator = 16843195; // 0x10101bb
    field public static final int sharedUserId = 16842763; // 0x101000b
    field public static final int sharedUserLabel = 16843361; // 0x1010261
    field @Deprecated public static final int sharedUserId = 16842763; // 0x101000b
    field @Deprecated public static final int sharedUserLabel = 16843361; // 0x1010261
    field public static final int shell = 16844180; // 0x1010594
    field public static final int shortcutDisabledMessage = 16844075; // 0x101052b
    field public static final int shortcutId = 16844072; // 0x1010528
+10 −2
Original line number Diff line number Diff line
@@ -346,13 +346,21 @@
         By setting this value on two or more packages, each of these packages
         will be given a single shared user ID, so they can for example run
         in the same process.  Note that for them to actually get the same
         user ID, they must also be signed with the same signature. -->
         user ID, they must also be signed with the same signature.
         @deprecated Shared user id's cause non-deterministic behaviour within the
         package manager. As such, it's use is discouraged, deprecated, and will
         be removed altogether in a future version of Android. Instead, proper
         communication mechanisms such as services and providers should be used
         to facilitate interoperability between shared components. -->
    <attr name="sharedUserId" format="string" />

    <!-- Specify a label for the shared user UID of this package.  This is
         only used if you have also used android:sharedUserId.  This must
         be a reference to a string resource; it can not be an explicit
         string. -->
         string.
         @deprecated There is no replacement for this attribute.
         {@link android.R.attr#sharedUserId} has been deprecated making
         this attribute unnecessary. -->
    <attr name="sharedUserLabel" format="reference" />

    <!-- Internal version code.  This is the number used to determine whether