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

Commit 9223fd6b authored by Tobias Thierer's avatar Tobias Thierer
Browse files

Deprecate android.util.Mutable*.

Since http://r.android.com/565744 , these classes do not appear
in the signature of any other Android API. There are no plans to
make them part of any future API signatures.

They do not provide useful abstractions because:
 - They lack encapsulation and functionality (value is nonfinal;
   lack of equals/hashCode and toString).
 - It's trivial for apps to implement similar types for their
   internal use.

Only three of these eight classes (Mutable{Int,Long,Boolean}) are
used internally in Android; most of these usages could be written
better with named, more specific classes.

Therefore these classes do not pull their own weight on the API
surface of android.util.

This CL deprecates all eight classes in preparation for removing
them from the Android API surface at some point in the future, and
to allow the unused classes to be removed entirely.

Bug: 71546998
Test: Treehugger

(cherry picked from commit d5721941)

Change-Id: Ib8736faa86d0ae5eec2c47a294f21adcf21d3dc4
Merged-In: I1cc1eb5ca9c36749bbb9a233d60036f6319bf2d3
parent b6a5c92b
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -44315,42 +44315,42 @@ package android.util {
    method public void previousMonth();
  }
  public final class MutableBoolean {
  public final deprecated class MutableBoolean {
    ctor public MutableBoolean(boolean);
    field public boolean value;
  }
  public final class MutableByte {
  public final deprecated class MutableByte {
    ctor public MutableByte(byte);
    field public byte value;
  }
  public final class MutableChar {
  public final deprecated class MutableChar {
    ctor public MutableChar(char);
    field public char value;
  }
  public final class MutableDouble {
  public final deprecated class MutableDouble {
    ctor public MutableDouble(double);
    field public double value;
  }
  public final class MutableFloat {
  public final deprecated class MutableFloat {
    ctor public MutableFloat(float);
    field public float value;
  }
  public final class MutableInt {
  public final deprecated class MutableInt {
    ctor public MutableInt(int);
    field public int value;
  }
  public final class MutableLong {
  public final deprecated class MutableLong {
    ctor public MutableLong(long);
    field public long value;
  }
  public final class MutableShort {
  public final deprecated class MutableShort {
    ctor public MutableShort(short);
    field public short value;
  }
+2 −0
Original line number Diff line number Diff line
@@ -17,7 +17,9 @@
package android.util;

/**
 * @deprecated This class will be removed from a future version of the Android API.
 */
@Deprecated
public final class MutableBoolean {
    public boolean value;

+2 −0
Original line number Diff line number Diff line
@@ -17,7 +17,9 @@
package android.util;

/**
 * @deprecated This class will be removed from a future version of the Android API.
 */
@Deprecated
public final class MutableByte {
    public byte value;

+2 −0
Original line number Diff line number Diff line
@@ -17,7 +17,9 @@
package android.util;

/**
 * @deprecated This class will be removed from a future version of the Android API.
 */
@Deprecated
public final class MutableChar {
    public char value;

+2 −0
Original line number Diff line number Diff line
@@ -17,7 +17,9 @@
package android.util;

/**
 * @deprecated This class will be removed from a future version of the Android API.
 */
@Deprecated
public final class MutableDouble {
    public double value;

Loading