diff options
| author | Philip P. Moltmann <moltmann@google.com> | 2020-03-05 15:01:29 -0800 |
|---|---|---|
| committer | Philip P. Moltmann <moltmann@google.com> | 2020-03-12 19:26:10 +0000 |
| commit | 12ac3f406fed87cb9cd3a28b9947e7202a2d14bd (patch) | |
| tree | b7717fb053b3307d34706451712072261a6c62d0 /core/java/android/content/Context.java | |
| parent | 83d02a976abfed340bf848f0508a8118939d5008 (diff) | |
Rename featureId -> attributionTag
In the core functionality this changes everything including aidl's and
field names:
- Context
- ContentProvider
- AppOps*
- Package parsing
For the rest, this is a shallow change to only change to the changed
APIs. This keeps the change small-ish
Exempt-From-Owner-Approval: Rename
Fixes: 148792795
Test: TH
Change-Id: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
Merged-In: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
Diffstat (limited to 'core/java/android/content/Context.java')
| -rw-r--r-- | core/java/android/content/Context.java | 41 |
1 files changed, 30 insertions, 11 deletions
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index 5e9ed6026083..318ae11759db 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -815,16 +815,25 @@ public abstract class Context { } /** - * <p>Features are used in complex apps to logically separate parts of the app. E.g. a - * blogging app might also have a instant messaging app built in. + * <p>Attribution can be used in complex apps to logically separate parts of the app. E.g. a + * blogging app might also have a instant messaging app built in. In this case two separate tags + * can for used each sub-feature. * - * @return the feature id this context is for or {@code null} if this is the default - * feature. + * @return the attribution tag this context is for or {@code null} if this is the default. */ - public @Nullable String getFeatureId() { + public @Nullable String getAttributionTag() { return null; } + // TODO moltmann: Remove + /** + * @removed + */ + @Deprecated + public @Nullable String getFeatureId() { + return getAttributionTag(); + } + /** Return the full application info for this context's package. */ public abstract ApplicationInfo getApplicationInfo(); @@ -5826,19 +5835,29 @@ public abstract class Context { } /** - * Return a new Context object for the current Context but for a different feature in the app. - * Features can be used by complex apps to separate logical parts. + * Return a new Context object for the current Context but attribute to a different tag. + * In complex apps attribution tagging can be used to distinguish between separate logical + * parts. * - * @param featureId The feature id or {@code null} to create a context for the default feature. + * @param attributionTag The tag or {@code null} to create a context for the default. * - * @return A {@link Context} for the feature + * @return A {@link Context} that is tagged for the new attribution * - * @see #getFeatureId() + * @see #getAttributionTag() */ - public @NonNull Context createFeatureContext(@Nullable String featureId) { + public @NonNull Context createAttributionContext(@Nullable String attributionTag) { throw new RuntimeException("Not implemented. Must override in a subclass."); } + // TODO moltmann: remove + /** + * @removed + */ + @Deprecated + public @NonNull Context createFeatureContext(@Nullable String featureId) { + return createAttributionContext(featureId); + } + /** * Return a new Context object for the current Context but whose storage * APIs are backed by device-protected storage. |
