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

Commit 12ac3f40 authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

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
parent 83d02a97
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -670,7 +670,7 @@ public class UserLifecycleTests {
    private void startApp(int userId, String packageName) throws RemoteException {
        final Context context = InstrumentationRegistry.getContext();
        final WaitResult result = ActivityTaskManager.getService().startActivityAndWait(null,
                context.getPackageName(), context.getFeatureId(),
                context.getPackageName(), context.getAttributionTag(),
                context.getPackageManager().getLaunchIntentForPackage(packageName), null, null,
                null, 0, 0, null, null, userId);
        attestTrue("User " + userId + " failed to start " + packageName,
+5 −6
Original line number Diff line number Diff line
@@ -620,7 +620,6 @@ package android {
    field public static final int fastScrollTextColor = 16843609; // 0x1010359
    field public static final int fastScrollThumbDrawable = 16843574; // 0x1010336
    field public static final int fastScrollTrackDrawable = 16843577; // 0x1010339
    field public static final int featureId = 16844301; // 0x101060d
    field public static final int fillAfter = 16843197; // 0x10101bd
    field public static final int fillAlpha = 16843980; // 0x10104cc
    field public static final int fillBefore = 16843196; // 0x10101bc
@@ -4586,7 +4585,7 @@ package android.app {
  public final class AsyncNotedAppOp implements android.os.Parcelable {
    method public int describeContents();
    method @Nullable public String getFeatureId();
    method @Nullable public String getAttributionTag();
    method @NonNull public String getMessage();
    method @IntRange(from=0) public int getNotingUid();
    method @NonNull public String getOp();
@@ -6430,7 +6429,7 @@ package android.app {
  public final class SyncNotedAppOp implements android.os.Parcelable {
    ctor public SyncNotedAppOp(@IntRange(from=0L) int, @Nullable String);
    method public int describeContents();
    method @Nullable public String getFeatureId();
    method @Nullable public String getAttributionTag();
    method @NonNull public String getOp();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.app.SyncNotedAppOp> CREATOR;
@@ -9696,7 +9695,7 @@ package android.content {
    method public abstract int delete(@NonNull android.net.Uri, @Nullable String, @Nullable String[]);
    method public int delete(@NonNull android.net.Uri, @Nullable android.os.Bundle);
    method public void dump(java.io.FileDescriptor, java.io.PrintWriter, String[]);
    method @Nullable public final String getCallingFeatureId();
    method @Nullable public final String getCallingAttributionTag();
    method @Nullable public final String getCallingPackage();
    method @Nullable public final String getCallingPackageUnchecked();
    method @Nullable public final android.content.Context getContext();
@@ -10030,11 +10029,11 @@ package android.content {
    method @CheckResult(suggest="#enforceUriPermission(Uri,int,int,String)") public abstract int checkUriPermission(android.net.Uri, int, int, int);
    method @CheckResult(suggest="#enforceUriPermission(Uri,String,String,int,int,int,String)") public abstract int checkUriPermission(@Nullable android.net.Uri, @Nullable String, @Nullable String, int, int, int);
    method @Deprecated public abstract void clearWallpaper() throws java.io.IOException;
    method @NonNull public android.content.Context createAttributionContext(@Nullable String);
    method public abstract android.content.Context createConfigurationContext(@NonNull android.content.res.Configuration);
    method public abstract android.content.Context createContextForSplit(String) throws android.content.pm.PackageManager.NameNotFoundException;
    method public abstract android.content.Context createDeviceProtectedStorageContext();
    method public abstract android.content.Context createDisplayContext(@NonNull android.view.Display);
    method @NonNull public android.content.Context createFeatureContext(@Nullable String);
    method public abstract android.content.Context createPackageContext(String, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method @NonNull public android.content.Context createWindowContext(int, @Nullable android.os.Bundle);
    method public abstract String[] databaseList();
@@ -10052,6 +10051,7 @@ package android.content {
    method public abstract android.content.Context getApplicationContext();
    method public abstract android.content.pm.ApplicationInfo getApplicationInfo();
    method public abstract android.content.res.AssetManager getAssets();
    method @Nullable public String getAttributionTag();
    method public abstract java.io.File getCacheDir();
    method public abstract ClassLoader getClassLoader();
    method public abstract java.io.File getCodeCacheDir();
@@ -10068,7 +10068,6 @@ package android.content {
    method @Nullable public abstract java.io.File getExternalFilesDir(@Nullable String);
    method public abstract java.io.File[] getExternalFilesDirs(String);
    method @Deprecated public abstract java.io.File[] getExternalMediaDirs();
    method @Nullable public String getFeatureId();
    method public abstract java.io.File getFileStreamPath(String);
    method public abstract java.io.File getFilesDir();
    method public java.util.concurrent.Executor getMainExecutor();
+14 −0
Original line number Diff line number Diff line
// Signature format: 2.0
package android {

  public static final class R.attr {
    field public static final int featureId = 16844301; // 0x101060d
  }

}

package android.app {

  public class ActivityManager {
@@ -69,11 +77,17 @@ package android.app.usage {

package android.content {

  public abstract class ContentProvider implements android.content.ComponentCallbacks2 {
    method @Deprecated @Nullable public final String getCallingFeatureId();
  }

  public abstract class ContentResolver {
    method @Deprecated public void notifyChange(@NonNull Iterable<android.net.Uri>, @Nullable android.database.ContentObserver, int);
  }

  public abstract class Context {
    method @Deprecated @NonNull public android.content.Context createFeatureContext(@Nullable String);
    method @Deprecated @Nullable public String getFeatureId();
    method public abstract android.content.SharedPreferences getSharedPreferences(java.io.File, int);
    method public abstract java.io.File getSharedPreferencesPath(String);
  }
+33 −33
Original line number Diff line number Diff line
@@ -448,14 +448,37 @@ package android.app {
    field public static final int UID_STATE_TOP = 200; // 0xc8
  }
  public static final class AppOpsManager.HistoricalFeatureOps implements android.os.Parcelable {
  public static final class AppOpsManager.AttributedHistoricalOps implements android.os.Parcelable {
    method public int describeContents();
    method @Nullable public String getFeatureId();
    method @Nullable public android.app.AppOpsManager.HistoricalOp getOp(@NonNull String);
    method @NonNull public android.app.AppOpsManager.HistoricalOp getOpAt(@IntRange(from=0) int);
    method @IntRange(from=0) public int getOpCount();
    method @Nullable public String getTag();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.app.AppOpsManager.HistoricalFeatureOps> CREATOR;
    field @NonNull public static final android.os.Parcelable.Creator<android.app.AppOpsManager.AttributedHistoricalOps> CREATOR;
  }
  public static final class AppOpsManager.AttributedOpEntry implements android.os.Parcelable {
    method public int describeContents();
    method public long getLastAccessBackgroundTime(int);
    method public long getLastAccessForegroundTime(int);
    method public long getLastAccessTime(int);
    method public long getLastAccessTime(int, int, int);
    method public long getLastBackgroundDuration(int);
    method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastBackgroundProxyInfo(int);
    method public long getLastDuration(int);
    method public long getLastDuration(int, int, int);
    method public long getLastForegroundDuration(int);
    method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastForegroundProxyInfo(int);
    method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastProxyInfo(int);
    method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastProxyInfo(int, int, int);
    method public long getLastRejectBackgroundTime(int);
    method public long getLastRejectForegroundTime(int);
    method public long getLastRejectTime(int);
    method public long getLastRejectTime(int, int, int);
    method public boolean isRunning();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.app.AppOpsManager.AttributedOpEntry> CREATOR;
  }
  public static final class AppOpsManager.HistoricalOp implements android.os.Parcelable {
@@ -491,7 +514,7 @@ package android.app {
  public static final class AppOpsManager.HistoricalOpsRequest.Builder {
    ctor public AppOpsManager.HistoricalOpsRequest.Builder(long, long);
    method @NonNull public android.app.AppOpsManager.HistoricalOpsRequest build();
    method @NonNull public android.app.AppOpsManager.HistoricalOpsRequest.Builder setFeatureId(@Nullable String);
    method @NonNull public android.app.AppOpsManager.HistoricalOpsRequest.Builder setAttributionTag(@Nullable String);
    method @NonNull public android.app.AppOpsManager.HistoricalOpsRequest.Builder setFlags(int);
    method @NonNull public android.app.AppOpsManager.HistoricalOpsRequest.Builder setOpNames(@Nullable java.util.List<java.lang.String>);
    method @NonNull public android.app.AppOpsManager.HistoricalOpsRequest.Builder setPackageName(@Nullable String);
@@ -500,9 +523,9 @@ package android.app {
  public static final class AppOpsManager.HistoricalPackageOps implements android.os.Parcelable {
    method public int describeContents();
    method @IntRange(from=0) public int getFeatureCount();
    method @Nullable public android.app.AppOpsManager.HistoricalFeatureOps getFeatureOps(@NonNull String);
    method @NonNull public android.app.AppOpsManager.HistoricalFeatureOps getFeatureOpsAt(@IntRange(from=0) int);
    method @Nullable public android.app.AppOpsManager.AttributedHistoricalOps getAttributedOps(@NonNull String);
    method @NonNull public android.app.AppOpsManager.AttributedHistoricalOps getAttributedOpsAt(@IntRange(from=0) int);
    method @IntRange(from=0) public int getAttributedOpsCount();
    method @Nullable public android.app.AppOpsManager.HistoricalOp getOp(@NonNull String);
    method @NonNull public android.app.AppOpsManager.HistoricalOp getOpAt(@IntRange(from=0) int);
    method @IntRange(from=0) public int getOpCount();
@@ -523,8 +546,8 @@ package android.app {
  public static final class AppOpsManager.OpEntry implements android.os.Parcelable {
    method public int describeContents();
    method @NonNull public java.util.Map<java.lang.String,android.app.AppOpsManager.AttributedOpEntry> getAttributedOpEntries();
    method @Deprecated public long getDuration();
    method @NonNull public java.util.Map<java.lang.String,android.app.AppOpsManager.OpFeatureEntry> getFeatures();
    method public long getLastAccessBackgroundTime(int);
    method public long getLastAccessForegroundTime(int);
    method public long getLastAccessTime(int);
@@ -554,36 +577,13 @@ package android.app {
  public static final class AppOpsManager.OpEventProxyInfo implements android.os.Parcelable {
    method public int describeContents();
    method @Nullable public String getFeatureId();
    method @Nullable public String getAttributionTag();
    method @Nullable public String getPackageName();
    method @IntRange(from=0) public int getUid();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.app.AppOpsManager.OpEventProxyInfo> CREATOR;
  }
  public static final class AppOpsManager.OpFeatureEntry implements android.os.Parcelable {
    method public int describeContents();
    method public long getLastAccessBackgroundTime(int);
    method public long getLastAccessForegroundTime(int);
    method public long getLastAccessTime(int);
    method public long getLastAccessTime(int, int, int);
    method public long getLastBackgroundDuration(int);
    method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastBackgroundProxyInfo(int);
    method public long getLastDuration(int);
    method public long getLastDuration(int, int, int);
    method public long getLastForegroundDuration(int);
    method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastForegroundProxyInfo(int);
    method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastProxyInfo(int);
    method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastProxyInfo(int, int, int);
    method public long getLastRejectBackgroundTime(int);
    method public long getLastRejectForegroundTime(int);
    method public long getLastRejectTime(int);
    method public long getLastRejectTime(int, int, int);
    method public boolean isRunning();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.app.AppOpsManager.OpFeatureEntry> CREATOR;
  }
  public static final class AppOpsManager.PackageOps implements android.os.Parcelable {
    method public int describeContents();
    method @NonNull public java.util.List<android.app.AppOpsManager.OpEntry> getOps();
@@ -688,7 +688,7 @@ package android.app {
  public final class RuntimeAppOpAccessMessage implements android.os.Parcelable {
    ctor public RuntimeAppOpAccessMessage(@IntRange(from=0L) int, @IntRange(from=0L) int, @NonNull String, @Nullable String, @NonNull String, int);
    method public int describeContents();
    method @Nullable public String getFeatureId();
    method @Nullable public String getAttributionTag();
    method @NonNull public String getMessage();
    method @NonNull public String getOp();
    method @NonNull public String getPackageName();
+33 −33
Original line number Diff line number Diff line
@@ -263,14 +263,37 @@ package android.app {
    field public static final int UID_STATE_TOP = 200; // 0xc8
  }

  public static final class AppOpsManager.HistoricalFeatureOps implements android.os.Parcelable {
  public static final class AppOpsManager.AttributedHistoricalOps implements android.os.Parcelable {
    method public int describeContents();
    method @Nullable public String getFeatureId();
    method @Nullable public android.app.AppOpsManager.HistoricalOp getOp(@NonNull String);
    method @NonNull public android.app.AppOpsManager.HistoricalOp getOpAt(@IntRange(from=0) int);
    method @IntRange(from=0) public int getOpCount();
    method @Nullable public String getTag();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.app.AppOpsManager.HistoricalFeatureOps> CREATOR;
    field @NonNull public static final android.os.Parcelable.Creator<android.app.AppOpsManager.AttributedHistoricalOps> CREATOR;
  }

  public static final class AppOpsManager.AttributedOpEntry implements android.os.Parcelable {
    method public int describeContents();
    method public long getLastAccessBackgroundTime(int);
    method public long getLastAccessForegroundTime(int);
    method public long getLastAccessTime(int);
    method public long getLastAccessTime(int, int, int);
    method public long getLastBackgroundDuration(int);
    method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastBackgroundProxyInfo(int);
    method public long getLastDuration(int);
    method public long getLastDuration(int, int, int);
    method public long getLastForegroundDuration(int);
    method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastForegroundProxyInfo(int);
    method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastProxyInfo(int);
    method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastProxyInfo(int, int, int);
    method public long getLastRejectBackgroundTime(int);
    method public long getLastRejectForegroundTime(int);
    method public long getLastRejectTime(int);
    method public long getLastRejectTime(int, int, int);
    method public boolean isRunning();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.app.AppOpsManager.AttributedOpEntry> CREATOR;
  }

  public static final class AppOpsManager.HistoricalOp implements android.os.Parcelable {
@@ -311,7 +334,7 @@ package android.app {
  public static final class AppOpsManager.HistoricalOpsRequest.Builder {
    ctor public AppOpsManager.HistoricalOpsRequest.Builder(long, long);
    method @NonNull public android.app.AppOpsManager.HistoricalOpsRequest build();
    method @NonNull public android.app.AppOpsManager.HistoricalOpsRequest.Builder setFeatureId(@Nullable String);
    method @NonNull public android.app.AppOpsManager.HistoricalOpsRequest.Builder setAttributionTag(@Nullable String);
    method @NonNull public android.app.AppOpsManager.HistoricalOpsRequest.Builder setFlags(int);
    method @NonNull public android.app.AppOpsManager.HistoricalOpsRequest.Builder setOpNames(@Nullable java.util.List<java.lang.String>);
    method @NonNull public android.app.AppOpsManager.HistoricalOpsRequest.Builder setPackageName(@Nullable String);
@@ -320,9 +343,9 @@ package android.app {

  public static final class AppOpsManager.HistoricalPackageOps implements android.os.Parcelable {
    method public int describeContents();
    method @IntRange(from=0) public int getFeatureCount();
    method @Nullable public android.app.AppOpsManager.HistoricalFeatureOps getFeatureOps(@NonNull String);
    method @NonNull public android.app.AppOpsManager.HistoricalFeatureOps getFeatureOpsAt(@IntRange(from=0) int);
    method @Nullable public android.app.AppOpsManager.AttributedHistoricalOps getAttributedOps(@NonNull String);
    method @NonNull public android.app.AppOpsManager.AttributedHistoricalOps getAttributedOpsAt(@IntRange(from=0) int);
    method @IntRange(from=0) public int getAttributedOpsCount();
    method @Nullable public android.app.AppOpsManager.HistoricalOp getOp(@NonNull String);
    method @NonNull public android.app.AppOpsManager.HistoricalOp getOpAt(@IntRange(from=0) int);
    method @IntRange(from=0) public int getOpCount();
@@ -343,8 +366,8 @@ package android.app {

  public static final class AppOpsManager.OpEntry implements android.os.Parcelable {
    method public int describeContents();
    method @NonNull public java.util.Map<java.lang.String,android.app.AppOpsManager.AttributedOpEntry> getAttributedOpEntries();
    method @Deprecated public long getDuration();
    method @NonNull public java.util.Map<java.lang.String,android.app.AppOpsManager.OpFeatureEntry> getFeatures();
    method public long getLastAccessBackgroundTime(int);
    method public long getLastAccessForegroundTime(int);
    method public long getLastAccessTime(int);
@@ -374,36 +397,13 @@ package android.app {

  public static final class AppOpsManager.OpEventProxyInfo implements android.os.Parcelable {
    method public int describeContents();
    method @Nullable public String getFeatureId();
    method @Nullable public String getAttributionTag();
    method @Nullable public String getPackageName();
    method @IntRange(from=0) public int getUid();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.app.AppOpsManager.OpEventProxyInfo> CREATOR;
  }

  public static final class AppOpsManager.OpFeatureEntry implements android.os.Parcelable {
    method public int describeContents();
    method public long getLastAccessBackgroundTime(int);
    method public long getLastAccessForegroundTime(int);
    method public long getLastAccessTime(int);
    method public long getLastAccessTime(int, int, int);
    method public long getLastBackgroundDuration(int);
    method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastBackgroundProxyInfo(int);
    method public long getLastDuration(int);
    method public long getLastDuration(int, int, int);
    method public long getLastForegroundDuration(int);
    method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastForegroundProxyInfo(int);
    method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastProxyInfo(int);
    method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastProxyInfo(int, int, int);
    method public long getLastRejectBackgroundTime(int);
    method public long getLastRejectForegroundTime(int);
    method public long getLastRejectTime(int);
    method public long getLastRejectTime(int, int, int);
    method public boolean isRunning();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.app.AppOpsManager.OpFeatureEntry> CREATOR;
  }

  public static final class AppOpsManager.PackageOps implements android.os.Parcelable {
    method public int describeContents();
    method @NonNull public java.util.List<android.app.AppOpsManager.OpEntry> getOps();
@@ -465,7 +465,7 @@ package android.app {
  public final class RuntimeAppOpAccessMessage implements android.os.Parcelable {
    ctor public RuntimeAppOpAccessMessage(@IntRange(from=0L) int, @IntRange(from=0L) int, @NonNull String, @Nullable String, @NonNull String, int);
    method public int describeContents();
    method @Nullable public String getFeatureId();
    method @Nullable public String getAttributionTag();
    method @NonNull public String getMessage();
    method @NonNull public String getOp();
    method @NonNull public String getPackageName();
Loading