summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2019-01-30 19:41:01 +0000
committerNarayan Kamath <narayan@google.com>2019-01-30 19:43:03 +0000
commitacdccf0a4eeb777ec2293b842f313194e6d35b9f (patch)
tree871e1631bac4fd11aededc4f16c668e498e21b30 /core/java
parentbade093c2cb7f15de1464de9c81f0849c69d6604 (diff)
ModuleInfo: Address API council feedback.
Use CharSequence instead of String for package labels Bug:123587616 Test: atest ModuleInfoProviderTest Change-Id: I2ed9712aabad57c7e6325e452aa0caee19476213
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/content/pm/ModuleInfo.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/java/android/content/pm/ModuleInfo.java b/core/java/android/content/pm/ModuleInfo.java
index 07e640b1ba61..044e87d3dc7b 100644
--- a/core/java/android/content/pm/ModuleInfo.java
+++ b/core/java/android/content/pm/ModuleInfo.java
@@ -32,7 +32,7 @@ public final class ModuleInfo implements Parcelable {
// constructor, and writeToParcel.
/** Public name of this module. */
- private String mName;
+ private CharSequence mName;
/** The package name of this module. */
private String mPackageName;
@@ -57,13 +57,13 @@ public final class ModuleInfo implements Parcelable {
}
/** @hide Sets the public name of this module. */
- public ModuleInfo setName(String name) {
+ public ModuleInfo setName(CharSequence name) {
mName = name;
return this;
}
/** Gets the public name of this module. */
- public @Nullable String getName() {
+ public @Nullable CharSequence getName() {
return mName;
}
@@ -123,13 +123,13 @@ public final class ModuleInfo implements Parcelable {
/** Flattens this object into the given {@link Parcel}. */
public void writeToParcel(Parcel dest, int parcelableFlags) {
- dest.writeString(mName);
+ dest.writeCharSequence(mName);
dest.writeString(mPackageName);
dest.writeBoolean(mHidden);
}
private ModuleInfo(Parcel source) {
- mName = source.readString();
+ mName = source.readCharSequence();
mPackageName = source.readString();
mHidden = source.readBoolean();
}