OSDN Git Service

Deprecate android.util.Mutable*.
authorTobias Thierer <tobiast@google.com>
Wed, 24 Jan 2018 13:40:56 +0000 (13:40 +0000)
committerTobias Thierer <tobiast@google.com>
Thu, 25 Jan 2018 12:29:40 +0000 (12:29 +0000)
commit9223fd6b6b3b1781b2284b0427d808a0780ff65b
tree8e0a257d9dfc127517162527fd4d3587fa209436
parentb6a5c92b507cefc92508593301821faa32f9ea65
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
api/current.txt
core/java/android/util/MutableBoolean.java
core/java/android/util/MutableByte.java
core/java/android/util/MutableChar.java
core/java/android/util/MutableDouble.java
core/java/android/util/MutableFloat.java
core/java/android/util/MutableInt.java
core/java/android/util/MutableLong.java
core/java/android/util/MutableShort.java