Make some display related slices public.
Only PreferenceControllers with isPublicSlice() set to true are exposed to other apps. Others will be Settings only. Bug: 141088937 Test: robotests Change-Id: I2a36da4ac4bb14a4d2ac7b89ab2bb3ebf8e655f7
This commit is contained in:
@@ -35,7 +35,6 @@ import com.android.settings.core.BasePreferenceController;
|
||||
import com.android.settings.testutils.FakeFeatureFactory;
|
||||
import com.android.settings.testutils.shadow.ShadowRotationPolicy;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -153,6 +152,11 @@ public class AutoRotatePreferenceControllerTest {
|
||||
assertThat(controller.isSliceable()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isPublicSlice_returnTrue() {
|
||||
assertThat(mController.isPublicSlice()).isTrue();
|
||||
}
|
||||
|
||||
private void enableAutoRotationPreference() {
|
||||
when(mPackageManager.hasSystemFeature(anyString())).thenReturn(true);
|
||||
when(mContext.getResources().getBoolean(anyInt())).thenReturn(true);
|
||||
|
Reference in New Issue
Block a user