Home
last modified time | relevance | path

Searched refs:slice (Results 1 – 25 of 137) sorted by relevance

123456

/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/calling/
DWifiCallingSliceHelperTest.java19 import static android.app.slice.Slice.EXTRA_TOGGLE_STATE;
20 import static android.app.slice.Slice.HINT_TITLE;
21 import static android.app.slice.SliceItem.FORMAT_TEXT;
37 import androidx.slice.Slice;
38 import androidx.slice.SliceItem;
39 import androidx.slice.SliceMetadata;
40 import androidx.slice.SliceProvider;
41 import androidx.slice.core.SliceAction;
42 import androidx.slice.core.SliceQuery;
43 import androidx.slice.widget.ListContent;
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/
DNotificationChannelSliceTest.java21 import static android.app.slice.Slice.HINT_LIST_ITEM;
22 import static android.app.slice.SliceItem.FORMAT_SLICE;
42 import androidx.slice.Slice;
43 import androidx.slice.SliceItem;
44 import androidx.slice.SliceMetadata;
45 import androidx.slice.SliceProvider;
46 import androidx.slice.core.SliceQuery;
47 import androidx.slice.widget.SliceLiveData;
123 final Slice slice = mNotificationChannelSlice.getSlice(); in getSlice_hasSuggestedApp_shouldHaveNotificationChannelTitle() local
125 final SliceMetadata metadata = SliceMetadata.from(mContext, slice); in getSlice_hasSuggestedApp_shouldHaveNotificationChannelTitle()
[all …]
DBluetoothDevicesSliceTest.java19 import static android.app.slice.Slice.HINT_LIST_ITEM;
20 import static android.app.slice.SliceItem.FORMAT_SLICE;
36 import androidx.slice.Slice;
37 import androidx.slice.SliceItem;
38 import androidx.slice.SliceMetadata;
39 import androidx.slice.SliceProvider;
40 import androidx.slice.core.SliceQuery;
41 import androidx.slice.widget.SliceLiveData;
108 final Slice slice = mBluetoothDevicesSlice.getSlice(); in getSlice_hasBluetoothDevices_shouldHaveBluetoothDevicesTitle() local
110 final SliceMetadata metadata = SliceMetadata.from(mContext, slice); in getSlice_hasBluetoothDevices_shouldHaveBluetoothDevicesTitle()
[all …]
DContextualAdaptiveSleepSliceTest.java37 import androidx.slice.Slice;
38 import androidx.slice.SliceProvider;
39 import androidx.slice.widget.SliceLiveData;
87 final Slice slice = mContextualAdaptiveSleepSlice.getSlice(); in getSlice_ShowIfFeatureIsAvailable() local
89 assertThat(slice).isNotNull(); in getSlice_ShowIfFeatureIsAvailable()
96 final Slice slice = mContextualAdaptiveSleepSlice.getSlice(); in getSlice_DoNotShowIfFeatureIsUnavailable() local
98 assertThat(slice).isNull(); in getSlice_DoNotShowIfFeatureIsUnavailable()
103 final Slice slice = mContextualAdaptiveSleepSlice.getSlice(); in getSlice_ShowIfNotRecentlySetup() local
105 assertThat(slice).isNotNull(); in getSlice_ShowIfNotRecentlySetup()
113 final Slice slice = mContextualAdaptiveSleepSlice.getSlice(); in getSlice_DoNotShowIfRecentlySetup() local
[all …]
DLowStorageSliceTest.java19 import static android.app.slice.Slice.HINT_ERROR;
25 import androidx.slice.Slice;
26 import androidx.slice.SliceMetadata;
27 import androidx.slice.SliceProvider;
28 import androidx.slice.widget.SliceLiveData;
71 final Slice slice = mLowStorageSlice.getSlice(); in getSlice_lowStorage_shouldHaveStorageFreeTitle() local
73 final SliceMetadata metadata = SliceMetadata.from(mContext, slice); in getSlice_lowStorage_shouldHaveStorageFreeTitle()
82 final Slice slice = mLowStorageSlice.getSlice(); in getSlice_lowStorage_shouldNotHaveErrorHint() local
84 assertThat(slice.hasHint(HINT_ERROR)).isFalse(); in getSlice_lowStorage_shouldNotHaveErrorHint()
92 final Slice slice = mLowStorageSlice.getSlice(); in getSlice_storageFree_shouldHaveStorageSettingsTitle() local
[all …]
DBatteryFixSliceTest.java27 import androidx.slice.Slice;
28 import androidx.slice.SliceMetadata;
29 import androidx.slice.SliceProvider;
30 import androidx.slice.widget.SliceLiveData;
103 final Slice slice = mSlice.getSlice(); in getSlice_unimportantSlice_shouldSkip() local
105 assertThat(SliceMetadata.from(mContext, slice).isErrorSlice()).isTrue(); in getSlice_unimportantSlice_shouldSkip()
125 final Slice slice = mSlice.getSlice(); in getSlice_hasImportantTip_shouldTintIcon() local
/packages/apps/Settings/tests/robotests/src/com/android/settings/testutils/
DSliceTester.java19 import static android.app.slice.Slice.HINT_TITLE;
20 import static android.app.slice.Slice.SUBTYPE_COLOR;
21 import static android.app.slice.SliceItem.FORMAT_IMAGE;
22 import static android.app.slice.SliceItem.FORMAT_INT;
23 import static android.app.slice.SliceItem.FORMAT_TEXT;
32 import androidx.slice.Slice;
33 import androidx.slice.SliceItem;
34 import androidx.slice.SliceMetadata;
35 import androidx.slice.builders.ListBuilder;
36 import androidx.slice.core.SliceAction;
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/telephony/
DEnhanced4gLteSliceHelperTest.java19 import static android.app.slice.Slice.EXTRA_TOGGLE_STATE;
20 import static android.app.slice.Slice.HINT_TITLE;
21 import static android.app.slice.SliceItem.FORMAT_TEXT;
35 import androidx.slice.Slice;
36 import androidx.slice.SliceItem;
37 import androidx.slice.SliceMetadata;
38 import androidx.slice.SliceProvider;
39 import androidx.slice.core.SliceAction;
40 import androidx.slice.core.SliceQuery;
41 import androidx.slice.widget.SliceLiveData;
[all …]
DMobileDataSliceTest.java37 import androidx.slice.Slice;
38 import androidx.slice.SliceMetadata;
39 import androidx.slice.SliceProvider;
40 import androidx.slice.core.SliceAction;
41 import androidx.slice.widget.SliceLiveData;
114 intent.putExtra(android.app.slice.Slice.EXTRA_TOGGLE_STATE, true); in handleUriChange_turnedOn_updatesMobileData()
126 intent.putExtra(android.app.slice.Slice.EXTRA_TOGGLE_STATE, false); in handleUriChange_turnedOff_updatesMobileData()
138 intent.putExtra(android.app.slice.Slice.EXTRA_TOGGLE_STATE, false); in handleUriChange_turnedOff_airplaneModeOn_mobileDataDoesNotUpdate()
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/
DSliceBuilderUtilsTest.java35 import androidx.slice.Slice;
36 import androidx.slice.SliceMetadata;
37 import androidx.slice.SliceProvider;
38 import androidx.slice.core.SliceAction;
39 import androidx.slice.widget.SliceLiveData;
92 final Slice slice = SliceBuilderUtils.buildSlice(mContext, sliceData); in buildIntentSlice_returnsMatchingSlice() local
94 SliceTester.testSettingsIntentSlice(mContext, slice, sliceData); in buildIntentSlice_returnsMatchingSlice()
101 final Slice slice = SliceBuilderUtils.buildSlice(mContext, dummyData); in buildToggleSlice_returnsMatchingSlice() local
108 SliceTester.testSettingsToggleSlice(mContext, slice, dummyData); in buildToggleSlice_returnsMatchingSlice()
115 final Slice slice = SliceBuilderUtils.buildSlice(mContext, data); in buildSliderSlice_returnsMatchingSlice() local
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/
DEligibleCardCheckerTest.java19 import static android.app.slice.Slice.HINT_ERROR;
30 import androidx.slice.Slice;
31 import androidx.slice.SliceProvider;
32 import androidx.slice.widget.SliceLiveData;
36 import com.android.settings.wifi.slice.ContextualWifiSlice;
63 final Slice slice = wifiSlice.getSlice(); in isSliceToggleable_cardWithToggle_returnTrue() local
65 assertThat(mEligibleCardChecker.isSliceToggleable(slice)).isTrue(); in isSliceToggleable_cardWithToggle_returnTrue()
71 final Slice slice = emergencyInfoSlice.getSlice(); in isSliceToggleable_cardWithoutToggle_returnFalse() local
73 assertThat(mEligibleCardChecker.isSliceToggleable(slice)).isFalse(); in isSliceToggleable_cardWithoutToggle_returnFalse()
79 final Slice slice = wifiSlice.getSlice(); in isCardEligibleToDisplay_toggleSlice_hasInlineActionShouldBeTrue() local
[all …]
DContextualCardFeatureProviderImplTest.java40 import androidx.slice.Slice;
41 import androidx.slice.SliceProvider;
42 import androidx.slice.builders.ListBuilder;
43 import androidx.slice.builders.SliceAction;
44 import androidx.slice.widget.SliceLiveData;
83 final Slice slice = buildSlice(CONTEXTUAL_NOTIFICATION_CHANNEL_SLICE_URI, packageName); in logNotificationPackage_isContextualNotificationChannel_shouldLogPackage() local
85 mImpl.logNotificationPackage(slice); in logNotificationPackage_isContextualNotificationChannel_shouldLogPackage()
95 final Slice slice = buildSlice(FLASHLIGHT_SLICE_URI, packageName); in logNotificationPackage_isNotContextualNotificationChannel_shouldNotLogPackage() local
97 mImpl.logNotificationPackage(slice); in logNotificationPackage_isNotContextualNotificationChannel_shouldNotLogPackage()
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/
DEligibleCardChecker.java19 import static android.app.slice.Slice.HINT_ERROR;
28 import androidx.slice.Slice;
29 import androidx.slice.SliceMetadata;
30 import androidx.slice.SliceViewManager;
31 import androidx.slice.core.SliceAction;
100 final Slice slice = bindSlice(uri); in isCardEligibleToDisplay() local
102 if (isSliceToggleable(slice)) { in isCardEligibleToDisplay()
106 if (slice == null || slice.hasHint(HINT_ERROR)) { in isCardEligibleToDisplay()
121 public void onSliceUpdated(Slice slice) { in bindSlice()
125 returnSlice[0] = slice; in bindSlice()
[all …]
DContextualCardFeatureProviderImpl.java25 import androidx.slice.Slice;
26 import androidx.slice.SliceMetadata;
27 import androidx.slice.core.SliceAction;
44 public void logNotificationPackage(Slice slice) { in logNotificationPackage() argument
45 if (slice == null || !slice.getUri().equals( in logNotificationPackage()
50 final SliceAction primaryAction = SliceMetadata.from(mContext, slice).getPrimaryAction(); in logNotificationPackage()
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/deviceinfo/
DDeviceInfoSliceTest.java28 import androidx.slice.Slice;
29 import androidx.slice.SliceItem;
30 import androidx.slice.SliceMetadata;
31 import androidx.slice.SliceProvider;
32 import androidx.slice.core.SliceAction;
33 import androidx.slice.widget.SliceLiveData;
74 final Slice slice = mDeviceInfoSlice.getSlice(); in getSlice_hasSubscriptionInfo_shouldBeCorrectSliceContent() local
76 final SliceMetadata metadata = SliceMetadata.from(mContext, slice); in getSlice_hasSubscriptionInfo_shouldBeCorrectSliceContent()
84 final List<SliceItem> sliceItems = slice.getItems(); in getSlice_hasSubscriptionInfo_shouldBeCorrectSliceContent()
90 final Slice slice = mDeviceInfoSlice.getSlice(); in getSlice_hasNoSubscriptionInfo_shouldShowUnknown() local
[all …]
DDataUsageSliceTest.java30 import androidx.slice.Slice;
31 import androidx.slice.SliceItem;
32 import androidx.slice.SliceMetadata;
33 import androidx.slice.SliceProvider;
34 import androidx.slice.core.SliceAction;
35 import androidx.slice.widget.SliceLiveData;
86 final Slice slice = mDataUsageSlice.getSlice(); in getSlice_hasSim_shouldBeCorrectSliceContent() local
88 final SliceMetadata metadata = SliceMetadata.from(mContext, slice); in getSlice_hasSim_shouldBeCorrectSliceContent()
102 final Slice slice = mDataUsageSlice.getSlice(); in getSlice_hasNoSim_shouldShowNoSimCard() local
104 final SliceMetadata metadata = SliceMetadata.from(mContext, slice); in getSlice_hasNoSim_shouldShowNoSimCard()
[all …]
DStorageSliceTest.java28 import androidx.slice.Slice;
29 import androidx.slice.SliceMetadata;
30 import androidx.slice.SliceProvider;
31 import androidx.slice.core.SliceAction;
32 import androidx.slice.widget.SliceLiveData;
68 final Slice slice = mStorageSlice.getSlice(); in getSlice_shouldBeCorrectSliceContent() local
70 final SliceMetadata metadata = SliceMetadata.from(mContext, slice); in getSlice_shouldBeCorrectSliceContent()
/packages/apps/Settings/tests/robotests/src/com/android/settings/media/
DMediaOutputSliceTest.java20 import static android.app.slice.Slice.HINT_LIST_ITEM;
21 import static android.app.slice.SliceItem.FORMAT_SLICE;
39 import androidx.slice.Slice;
40 import androidx.slice.SliceMetadata;
41 import androidx.slice.SliceProvider;
42 import androidx.slice.core.SliceAction;
43 import androidx.slice.core.SliceQuery;
44 import androidx.slice.widget.SliceLiveData;
113 final Slice slice = mMediaOutputSlice.getSlice(); in getSlice_workerIsNull_shouldReturnZeroRow() local
115 final int rows = SliceQuery.findAll(slice, FORMAT_SLICE, HINT_LIST_ITEM, in getSlice_workerIsNull_shouldReturnZeroRow()
[all …]
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/slices/
DSliceContextualCardRenderer.java19 import static android.app.slice.Slice.HINT_ERROR;
38 import androidx.slice.Slice;
39 import androidx.slice.widget.SliceLiveData;
117 sliceLiveData.observe(mLifecycleOwner, slice -> { in bindView()
118 if (slice == null) { in bindView()
125 if (slice.hasHint(HINT_ERROR)) { in bindView()
126 Log.w(TAG, "Slice has HINT_ERROR, skipping rendering. uri=" + slice.getUri()); in bindView()
127 mSliceLiveDataMap.get(slice.getUri()).removeObservers(mLifecycleOwner); in bindView()
134 mDeferredSetupCardHelper.bindView(holder, card, slice); in bindView()
136 mHalfCardHelper.bindView(holder, card, slice); in bindView()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/slice/
DWifiSliceTest.java17 package com.android.settings.wifi.slice;
19 import static android.app.slice.Slice.HINT_LIST_ITEM;
20 import static android.app.slice.SliceItem.FORMAT_SLICE;
22 import static com.android.settings.wifi.slice.WifiSlice.DEFAULT_EXPANDED_ROW_COUNT;
41 import androidx.slice.Slice;
42 import androidx.slice.SliceItem;
43 import androidx.slice.SliceMetadata;
44 import androidx.slice.SliceProvider;
45 import androidx.slice.core.SliceAction;
46 import androidx.slice.core.SliceQuery;
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/flashlight/
DFlashlightSliceTest.java25 import androidx.slice.Slice;
26 import androidx.slice.SliceMetadata;
27 import androidx.slice.SliceProvider;
28 import androidx.slice.core.SliceAction;
29 import androidx.slice.widget.SliceLiveData;
59 final Slice slice = new FlashlightSlice(mContext).getSlice(); in getFlashlightSlice_correctData() local
61 final SliceMetadata metadata = SliceMetadata.from(mContext, slice); in getFlashlightSlice_correctData()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/homepage/contextualcards/
DEligibleCardChecker.java19 import static android.app.slice.Slice.HINT_ERROR;
28 import androidx.slice.Slice;
29 import androidx.slice.SliceViewManager;
95 final Slice slice = bindSlice(uri); in isCardEligibleToDisplay() local
96 if (slice == null || slice.hasHint(HINT_ERROR)) { in isCardEligibleToDisplay()
111 public void onSliceUpdated(Slice slice) { in bindSlice()
115 returnSlice[0] = slice; in bindSlice()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/slices/
DSlicePreferenceController.java26 import androidx.slice.Slice;
27 import androidx.slice.widget.SliceLiveData;
28 import androidx.slice.widget.SliceView;
84 public void onChanged(Slice slice) { in onChanged() argument
85 if (slice != null) { in onChanged()
86 mSlicePreference.onSliceUpdated(slice); in onChanged()
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/
DBluetoothSliceBuilderTest.java27 import androidx.slice.Slice;
28 import androidx.slice.SliceMetadata;
29 import androidx.slice.SliceProvider;
30 import androidx.slice.core.SliceAction;
31 import androidx.slice.widget.SliceLiveData;
79 intent.putExtra(android.app.slice.Slice.EXTRA_TOGGLE_STATE, true); in handleUriChange_updatesBluetooth()
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/
DZenModeSliceBuilderTest.java19 import static android.app.slice.Slice.EXTRA_TOGGLE_STATE;
28 import androidx.slice.Slice;
29 import androidx.slice.SliceMetadata;
30 import androidx.slice.SliceProvider;
31 import androidx.slice.core.SliceAction;
32 import androidx.slice.widget.SliceLiveData;

123456