From: Todd Kennedy Date: Thu, 18 Apr 2019 20:13:17 +0000 (-0700) Subject: deprecate sharedUserId attribute X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=6372435f0e83655aa7710ca482faa064f2bb418f;p=android-x86%2Fframeworks-base.git 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 --- diff --git a/api/current.txt b/api/current.txt index 44b11e15f3b8..d2f63fa81dcf 100644 --- a/api/current.txt +++ b/api/current.txt @@ -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 diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml index bbc784a10db3..26a9f570a6d2 100644 --- a/core/res/res/values/attrs_manifest.xml +++ b/core/res/res/values/attrs_manifest.xml @@ -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. --> + string. + @deprecated There is no replacement for this attribute. + {@link android.R.attr#sharedUserId} has been deprecated making + this attribute unnecessary. -->