Convert xml based API allowDynamicSummaryInSlice to java
- Add boolean useDynamicSliceSummary() in Sliceable interface. This is the switch equivalent to android:allowDynamicSummaryInSlice in xml. It moves the setter closer to regular Sliceable APIs, thus less easily to miss. - Coverted all android:allowDynamicSummaryInSlice to use the java API. - Except 2 prefs in my_device_info. They incorrectly set this to true previously (controller is not sliceable, no point setting dynamicSliceSummary to true. They just won't do anything) Fixes: 128446156 Test: robolectric Change-Id: Ic57acd590dec3e87dcf4592df137321d14b854d9
This commit is contained in:
@@ -73,8 +73,6 @@ public class SliceData {
|
||||
|
||||
private final boolean mIsPlatformDefined;
|
||||
|
||||
private final boolean mIsDynamicSummaryAllowed;
|
||||
|
||||
private final String mUnavailableSliceSubtitle;
|
||||
|
||||
public String getKey() {
|
||||
@@ -121,10 +119,6 @@ public class SliceData {
|
||||
return mIsPlatformDefined;
|
||||
}
|
||||
|
||||
public boolean isDynamicSummaryAllowed() {
|
||||
return mIsDynamicSummaryAllowed;
|
||||
}
|
||||
|
||||
public String getUnavailableSliceSubtitle() {
|
||||
return mUnavailableSliceSubtitle;
|
||||
}
|
||||
@@ -141,7 +135,6 @@ public class SliceData {
|
||||
mPreferenceController = builder.mPrefControllerClassName;
|
||||
mSliceType = builder.mSliceType;
|
||||
mIsPlatformDefined = builder.mIsPlatformDefined;
|
||||
mIsDynamicSummaryAllowed = builder.mIsDynamicSummaryAllowed;
|
||||
mUnavailableSliceSubtitle = builder.mUnavailableSliceSubtitle;
|
||||
}
|
||||
|
||||
@@ -182,8 +175,6 @@ public class SliceData {
|
||||
|
||||
private boolean mIsPlatformDefined;
|
||||
|
||||
private boolean mIsDynamicSummaryAllowed;
|
||||
|
||||
private String mUnavailableSliceSubtitle;
|
||||
|
||||
public Builder setKey(String key) {
|
||||
@@ -241,11 +232,6 @@ public class SliceData {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setDynamicSummaryAllowed(boolean isDynamicSummaryAllowed) {
|
||||
mIsDynamicSummaryAllowed = isDynamicSummaryAllowed;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setUnavailableSliceSubtitle(
|
||||
String unavailableSliceSubtitle) {
|
||||
mUnavailableSliceSubtitle = unavailableSliceSubtitle;
|
||||
|
||||
Reference in New Issue
Block a user