Merge "Add a new method in Sliceable."
This commit is contained in:
committed by
Android (Google) Code Review
commit
345dc2bf3a
@@ -25,6 +25,8 @@ import android.content.IntentFilter;
|
|||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.slice.Slice;
|
||||||
|
|
||||||
import com.android.settings.R;
|
import com.android.settings.R;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -49,12 +51,23 @@ public interface Sliceable {
|
|||||||
* <p>
|
* <p>
|
||||||
* This does not guarantee the setting is available.
|
* This does not guarantee the setting is available.
|
||||||
*
|
*
|
||||||
* @return {@code true} if the controller should be used externally as a Slice.
|
* @return {@code true} if the controller should be used as a Slice.
|
||||||
*/
|
*/
|
||||||
default boolean isSliceable() {
|
default boolean isSliceable() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines if the {@link Slice} should be public to other apps.
|
||||||
|
* This does not guarantee the setting is available.
|
||||||
|
*
|
||||||
|
* @return {@code true} if the controller should be used as a Slice, and is
|
||||||
|
* publicly visible to other apps.
|
||||||
|
*/
|
||||||
|
default boolean isPublicSlice() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns uri for this slice (if it's a slice).
|
* Returns uri for this slice (if it's a slice).
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user