Declare official platform slice
Create the notion of an official platform slice. This includes: - Adding a second authority to the provider - tagging slices in xml with a platform slice flag - Including authority in the getUri method Bug:73359139 Test: robotests Change-Id: I5382be138a262dbc5a8324c34aab131c5d0d5516 Merged-In: I581ee6dfcdf935f452a15e89e5d055e375ff1877
This commit is contained in:
@@ -70,6 +70,8 @@ public class SliceData {
|
||||
@SliceType
|
||||
private final int mSliceType;
|
||||
|
||||
private final boolean mIsPlatformDefined;
|
||||
|
||||
public String getKey() {
|
||||
return mKey;
|
||||
}
|
||||
@@ -106,6 +108,10 @@ public class SliceData {
|
||||
return mSliceType;
|
||||
}
|
||||
|
||||
public boolean isPlatformDefined() {
|
||||
return mIsPlatformDefined;
|
||||
}
|
||||
|
||||
private SliceData(Builder builder) {
|
||||
mKey = builder.mKey;
|
||||
mTitle = builder.mTitle;
|
||||
@@ -116,6 +122,7 @@ public class SliceData {
|
||||
mUri = builder.mUri;
|
||||
mPreferenceController = builder.mPrefControllerClassName;
|
||||
mSliceType = builder.mSliceType;
|
||||
mIsPlatformDefined = builder.mIsPlatformDefined;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -151,6 +158,8 @@ public class SliceData {
|
||||
|
||||
private int mSliceType;
|
||||
|
||||
private boolean mIsPlatformDefined;
|
||||
|
||||
public Builder setKey(String key) {
|
||||
mKey = key;
|
||||
return this;
|
||||
@@ -196,6 +205,11 @@ public class SliceData {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setPlatformDefined(boolean isPlatformDefined) {
|
||||
mIsPlatformDefined = isPlatformDefined;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SliceData build() {
|
||||
if (TextUtils.isEmpty(mKey)) {
|
||||
throw new IllegalStateException("Key cannot be empty");
|
||||
|
Reference in New Issue
Block a user