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

Commit 70168dde authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Make Parcelable classes final, API cleanup.

Remove some Context methods that leaked through.  Add lint rule to
recommend using List<? extends Parcelable> instead of Parcelable[].

Bug: 27932224, 27930145, 27932911
Change-Id: Ia302de46cdb0c5101fa175a09316df91aeefcf0d
parent 60328375
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -8222,8 +8222,6 @@ package android.content {
    method public java.lang.String getPackageResourcePath();
    method public android.content.res.Resources getResources();
    method public android.content.SharedPreferences getSharedPreferences(java.lang.String, int);
    method public android.content.SharedPreferences getSharedPreferences(java.io.File, int);
    method public java.io.File getSharedPreferencesPath(java.lang.String);
    method public java.lang.Object getSystemService(java.lang.String);
    method public java.lang.String getSystemServiceName(java.lang.Class<?>);
    method public android.content.res.Resources.Theme getTheme();
@@ -9991,7 +9989,7 @@ package android.content.pm {
    field public java.lang.String permission;
  }
  public class ShortcutInfo implements android.os.Parcelable {
  public final class ShortcutInfo implements android.os.Parcelable {
    method public int describeContents();
    method public android.content.ComponentName getActivityComponent();
    method public android.os.PersistableBundle getExtras();
@@ -29481,7 +29479,7 @@ package android.os.health {
    method public android.os.health.HealthStats[] takeUidSnapshots(int[]);
  }
  public class TimerStat implements android.os.Parcelable {
  public final class TimerStat implements android.os.Parcelable {
    ctor public TimerStat();
    ctor public TimerStat(int, long);
    ctor public TimerStat(android.os.Parcel);
@@ -37954,8 +37952,6 @@ package android.test.mock {
    method public java.lang.String getPackageResourcePath();
    method public android.content.res.Resources getResources();
    method public android.content.SharedPreferences getSharedPreferences(java.lang.String, int);
    method public android.content.SharedPreferences getSharedPreferences(java.io.File, int);
    method public java.io.File getSharedPreferencesPath(java.lang.String);
    method public java.lang.Object getSystemService(java.lang.String);
    method public java.lang.String getSystemServiceName(java.lang.Class<?>);
    method public android.content.res.Resources.Theme getTheme();
+2 −6
Original line number Diff line number Diff line
@@ -8532,8 +8532,6 @@ package android.content {
    method public java.lang.String getPackageResourcePath();
    method public android.content.res.Resources getResources();
    method public android.content.SharedPreferences getSharedPreferences(java.lang.String, int);
    method public android.content.SharedPreferences getSharedPreferences(java.io.File, int);
    method public java.io.File getSharedPreferencesPath(java.lang.String);
    method public java.lang.Object getSystemService(java.lang.String);
    method public java.lang.String getSystemServiceName(java.lang.Class<?>);
    method public android.content.res.Resources.Theme getTheme();
@@ -10389,7 +10387,7 @@ package android.content.pm {
    field public java.lang.String permission;
  }
  public class ShortcutInfo implements android.os.Parcelable {
  public final class ShortcutInfo implements android.os.Parcelable {
    method public int describeContents();
    method public android.content.ComponentName getActivityComponent();
    method public android.os.PersistableBundle getExtras();
@@ -31794,7 +31792,7 @@ package android.os.health {
    method public android.os.health.HealthStats[] takeUidSnapshots(int[]);
  }
  public class TimerStat implements android.os.Parcelable {
  public final class TimerStat implements android.os.Parcelable {
    ctor public TimerStat();
    ctor public TimerStat(int, long);
    ctor public TimerStat(android.os.Parcel);
@@ -40670,8 +40668,6 @@ package android.test.mock {
    method public java.lang.String getPackageResourcePath();
    method public android.content.res.Resources getResources();
    method public android.content.SharedPreferences getSharedPreferences(java.lang.String, int);
    method public android.content.SharedPreferences getSharedPreferences(java.io.File, int);
    method public java.io.File getSharedPreferencesPath(java.lang.String);
    method public java.lang.Object getSystemService(java.lang.String);
    method public java.lang.String getSystemServiceName(java.lang.Class<?>);
    method public android.content.res.Resources.Theme getTheme();
+2 −6
Original line number Diff line number Diff line
@@ -8228,8 +8228,6 @@ package android.content {
    method public java.lang.String getPackageResourcePath();
    method public android.content.res.Resources getResources();
    method public android.content.SharedPreferences getSharedPreferences(java.lang.String, int);
    method public android.content.SharedPreferences getSharedPreferences(java.io.File, int);
    method public java.io.File getSharedPreferencesPath(java.lang.String);
    method public java.lang.Object getSystemService(java.lang.String);
    method public java.lang.String getSystemServiceName(java.lang.Class<?>);
    method public android.content.res.Resources.Theme getTheme();
@@ -10001,7 +9999,7 @@ package android.content.pm {
    field public java.lang.String permission;
  }
  public class ShortcutInfo implements android.os.Parcelable {
  public final class ShortcutInfo implements android.os.Parcelable {
    method public int describeContents();
    method public android.content.ComponentName getActivityComponent();
    method public android.os.PersistableBundle getExtras();
@@ -29547,7 +29545,7 @@ package android.os.health {
    method public android.os.health.HealthStats[] takeUidSnapshots(int[]);
  }
  public class TimerStat implements android.os.Parcelable {
  public final class TimerStat implements android.os.Parcelable {
    ctor public TimerStat();
    ctor public TimerStat(int, long);
    ctor public TimerStat(android.os.Parcel);
@@ -38026,8 +38024,6 @@ package android.test.mock {
    method public java.lang.String getPackageResourcePath();
    method public android.content.res.Resources getResources();
    method public android.content.SharedPreferences getSharedPreferences(java.lang.String, int);
    method public android.content.SharedPreferences getSharedPreferences(java.io.File, int);
    method public java.io.File getSharedPreferencesPath(java.lang.String);
    method public java.lang.Object getSystemService(java.lang.String);
    method public java.lang.String getSystemServiceName(java.lang.Class<?>);
    method public android.content.res.Resources.Theme getTheme();
+2 −0
Original line number Diff line number Diff line
@@ -164,6 +164,7 @@ public class ContextWrapper extends Context {
        return mBase.getSharedPreferences(name, mode);
    }

    /** @removed */
    @Override
    public SharedPreferences getSharedPreferences(File file, int mode) {
        return mBase.getSharedPreferences(file, mode);
@@ -201,6 +202,7 @@ public class ContextWrapper extends Context {
        return mBase.getFileStreamPath(name);
    }

    /** @removed */
    @Override
    public File getSharedPreferencesPath(String name) {
        return mBase.getSharedPreferencesPath(name);
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ import java.lang.annotation.RetentionPolicy;
 *
 *   We will disallow byte[] icons, because they can easily go over binder size limit.
 */
public class ShortcutInfo implements Parcelable {
public final class ShortcutInfo implements Parcelable {
    /* @hide */
    public static final int FLAG_DYNAMIC = 1 << 0;

Loading