summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Tobias Thierer <tobiast@google.com> 2018-01-24 13:40:56 +0000
committer Tobias Thierer <tobiast@google.com> 2018-01-25 12:29:40 +0000
commit9223fd6b6b3b1781b2284b0427d808a0780ff65b (patch)
tree8e0a257d9dfc127517162527fd4d3587fa209436
parentb6a5c92b507cefc92508593301821faa32f9ea65 (diff)
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 d57219411b3718da0850ef109e63d1a311a03d31) Change-Id: Ib8736faa86d0ae5eec2c47a294f21adcf21d3dc4 Merged-In: I1cc1eb5ca9c36749bbb9a233d60036f6319bf2d3
-rw-r--r--api/current.txt16
-rw-r--r--core/java/android/util/MutableBoolean.java2
-rw-r--r--core/java/android/util/MutableByte.java2
-rw-r--r--core/java/android/util/MutableChar.java2
-rw-r--r--core/java/android/util/MutableDouble.java2
-rw-r--r--core/java/android/util/MutableFloat.java2
-rw-r--r--core/java/android/util/MutableInt.java2
-rw-r--r--core/java/android/util/MutableLong.java2
-rw-r--r--core/java/android/util/MutableShort.java2
9 files changed, 24 insertions, 8 deletions
diff --git a/api/current.txt b/api/current.txt
index 094c88d8f590..7a2f2b5af894 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -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;
}
diff --git a/core/java/android/util/MutableBoolean.java b/core/java/android/util/MutableBoolean.java
index ed837ab6afd3..44e73cc38b8f 100644
--- a/core/java/android/util/MutableBoolean.java
+++ b/core/java/android/util/MutableBoolean.java
@@ -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;
diff --git a/core/java/android/util/MutableByte.java b/core/java/android/util/MutableByte.java
index cc6b00a8046f..b9ec25dab2ad 100644
--- a/core/java/android/util/MutableByte.java
+++ b/core/java/android/util/MutableByte.java
@@ -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;
diff --git a/core/java/android/util/MutableChar.java b/core/java/android/util/MutableChar.java
index 9a2e2bce5915..9f7a9ae82c32 100644
--- a/core/java/android/util/MutableChar.java
+++ b/core/java/android/util/MutableChar.java
@@ -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;
diff --git a/core/java/android/util/MutableDouble.java b/core/java/android/util/MutableDouble.java
index bd7329a380ee..56e539bc0f6f 100644
--- a/core/java/android/util/MutableDouble.java
+++ b/core/java/android/util/MutableDouble.java
@@ -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;
diff --git a/core/java/android/util/MutableFloat.java b/core/java/android/util/MutableFloat.java
index e6f2d7dc7b30..6d7ad59d2473 100644
--- a/core/java/android/util/MutableFloat.java
+++ b/core/java/android/util/MutableFloat.java
@@ -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 MutableFloat {
public float value;
diff --git a/core/java/android/util/MutableInt.java b/core/java/android/util/MutableInt.java
index a3d8606d916a..bb2456601be3 100644
--- a/core/java/android/util/MutableInt.java
+++ b/core/java/android/util/MutableInt.java
@@ -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 MutableInt {
public int value;
diff --git a/core/java/android/util/MutableLong.java b/core/java/android/util/MutableLong.java
index 575068ea9364..86e70e1baebf 100644
--- a/core/java/android/util/MutableLong.java
+++ b/core/java/android/util/MutableLong.java
@@ -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 MutableLong {
public long value;
diff --git a/core/java/android/util/MutableShort.java b/core/java/android/util/MutableShort.java
index 48fb232b5287..b94ab0732251 100644
--- a/core/java/android/util/MutableShort.java
+++ b/core/java/android/util/MutableShort.java
@@ -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 MutableShort {
public short value;