/packages/modules/Connectivity/staticlibs/netd/libnetdutils/ |
D | MemBlockTest.cpp | 37 for (Slice slice = result.get(); !slice.empty(); slice = drop(slice, 1)) { in makeArbitraryMemBlock() local 38 slice.base()[0] = ARBITRARY_VALUE; in makeArbitraryMemBlock() 43 void checkAllZeros(Slice slice) { in checkAllZeros() argument 44 for (; !slice.empty(); slice = drop(slice, 1)) { in checkAllZeros() 45 EXPECT_EQ(0U, slice.base()[0]); in checkAllZeros() 50 Slice slice = block.get(); in checkArbitraryMemBlock() local 51 EXPECT_EQ(expectedSize, slice.size()); in checkArbitraryMemBlock() 52 EXPECT_NE(nullptr, slice.base()); in checkArbitraryMemBlock() 53 for (; !slice.empty(); slice = drop(slice, 1)) { in checkArbitraryMemBlock() 54 EXPECT_EQ(ARBITRARY_VALUE, slice.base()[0]); in checkArbitraryMemBlock() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/calling/ |
D | WifiCallingSliceHelperTest.java | 19 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; 39 import androidx.slice.Slice; 40 import androidx.slice.SliceItem; 41 import androidx.slice.SliceMetadata; 42 import androidx.slice.SliceProvider; 43 import androidx.slice.core.SliceAction; 44 import androidx.slice.core.SliceQuery; 45 import androidx.slice.widget.ListContent; [all …]
|
/packages/apps/Settings/src/com/android/settings/bluetooth/ |
D | BlockingPrefWithSliceController.java | 19 import static android.app.slice.Slice.HINT_PERMISSION_REQUEST; 20 import static android.app.slice.Slice.HINT_TITLE; 21 import static android.app.slice.SliceItem.FORMAT_ACTION; 22 import static android.app.slice.SliceItem.FORMAT_IMAGE; 23 import static android.app.slice.SliceItem.FORMAT_SLICE; 24 import static android.app.slice.SliceItem.FORMAT_TEXT; 41 import androidx.slice.Slice; 42 import androidx.slice.SliceItem; 43 import androidx.slice.builders.ListBuilder; 44 import androidx.slice.builders.SliceAction; [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/testutils/ |
D | SliceTester.java | 19 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/unit/src/com/android/settings/network/telephony/ |
D | Enhanced4gLteSliceHelperTest.java | 19 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; 38 import androidx.slice.Slice; 39 import androidx.slice.SliceItem; 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; [all …]
|
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/ |
D | EligibleCardChecker.java | 19 import static android.app.slice.Slice.HINT_ERROR; 29 import androidx.slice.Slice; 30 import androidx.slice.SliceMetadata; 31 import androidx.slice.SliceViewManager; 32 import androidx.slice.core.SliceAction; 96 final Slice slice = bindSlice(uri); in isCardEligibleToDisplay() local 98 if (slice == null || slice.hasHint(HINT_ERROR)) { in isCardEligibleToDisplay() 103 mCard = card.mutate().setSlice(slice).build(); in isCardEligibleToDisplay() 105 if (isSliceToggleable(slice)) { in isCardEligibleToDisplay() 115 final SliceViewManager.SliceCallback callback = slice -> { }; in bindSlice() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/ |
D | LowStorageSliceTest.java | 19 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; 68 final Slice slice = mLowStorageSlice.getSlice(); in getSlice_lowStorage_shouldHaveStorageFreeTitle() local 70 final SliceMetadata metadata = SliceMetadata.from(mContext, slice); in getSlice_lowStorage_shouldHaveStorageFreeTitle() 79 final Slice slice = mLowStorageSlice.getSlice(); in getSlice_lowStorage_shouldNotHaveErrorHint() local 81 assertThat(slice.hasHint(HINT_ERROR)).isFalse(); in getSlice_lowStorage_shouldNotHaveErrorHint() 89 final Slice slice = mLowStorageSlice.getSlice(); in getSlice_storageFree_shouldHaveStorageSettingsTitle() local [all …]
|
D | ContextualAdaptiveSleepSliceTest.java | 37 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 …]
|
D | BluetoothDevicesSliceTest.java | 19 import static android.app.slice.Slice.HINT_LIST_ITEM; 20 import static android.app.slice.SliceItem.FORMAT_SLICE; 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.SliceQuery; 46 import androidx.slice.widget.SliceLiveData; 131 final Slice slice = mBluetoothDevicesSlice.getSlice(); in getSlice_noBluetoothHardware_shouldReturnNull() local 133 assertThat(slice).isNull(); in getSlice_noBluetoothHardware_shouldReturnNull() [all …]
|
/packages/modules/NeuralNetworks/common/ |
D | MetaModel.cpp | 105 auto& slice = mCachedSlices[version]; in getSlice() local 106 if (slice.mState == SliceState::UNINITIALIZED) { in getSlice() 107 slice = makeSlice(version); in getSlice() 109 if (slice.mState == SliceState::INVALID) { in getSlice() 113 slice.mModel, Mapper([&slice](uint32_t slicedOperationIndex) { in getSlice() 114 return slice.mSlicedOperationIndexToOrigIndex.at(slicedOperationIndex); in getSlice() 243 Slice* slice, std::map<uint32_t, uint32_t>* origOperandIndexToSlicedIndex, in processOperations() argument 249 auto& slicedOperands = slice->mModel.main.operands; in processOperations() 250 auto& slicedOperations = slice->mModel.main.operations; in processOperations() 272 slice->mSlicedOperationIndexToOrigIndex.push_back(origOperationIndex); in processOperations() [all …]
|
/packages/modules/Bluetooth/system/gd/rust/linux/utils/src/ |
D | adv_parser.rs | 59 .flat_map(|slice| slice.chunks(2)) in extract_service_uuids() 63 .flat_map(|slice| slice.chunks(4)) in extract_service_uuids() 68 .flat_map(|slice| slice.chunks(16)) in extract_service_uuids() 85 .filter_map(|slice| { in extract_service_data() 86 Uuid::try_from_little_endian(slice.get(0..2)?) in extract_service_data() 88 .map(|uuid| (uuid.to_string(), slice[2..].to_vec())) in extract_service_data() 90 .chain(iterate_adv_data(bytes, SERVICE_DATA_32_BIT_UUID).filter_map(|slice| { in extract_service_data() 91 Uuid::try_from_little_endian(slice.get(0..4)?) in extract_service_data() 93 .map(|uuid| (uuid.to_string(), slice[4..].to_vec())) in extract_service_data() 95 .chain(iterate_adv_data(bytes, SERVICE_DATA_128_BIT_UUID).filter_map(|slice| { in extract_service_data() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/ |
D | SliceBuilderUtilsTest.java | 32 import androidx.slice.Slice; 33 import androidx.slice.SliceMetadata; 34 import androidx.slice.SliceProvider; 35 import androidx.slice.core.SliceAction; 36 import androidx.slice.widget.SliceLiveData; 90 final Slice slice = SliceBuilderUtils.buildSlice(mContext, sliceData); in buildIntentSlice_returnsMatchingSlice() local 92 SliceTester.testSettingsIntentSlice(mContext, slice, sliceData); in buildIntentSlice_returnsMatchingSlice() 99 final Slice slice = SliceBuilderUtils.buildSlice(mContext, mockData); in buildToggleSlice_returnsMatchingSlice() local 100 SliceTester.testSettingsToggleSlice(mContext, slice, mockData); in buildToggleSlice_returnsMatchingSlice() 107 final Slice slice = SliceBuilderUtils.buildSlice(mContext, data); in buildSliderSlice_returnsMatchingSlice() local [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/media/ |
D | RemoteMediaSliceTest.java | 19 import static android.app.slice.Slice.EXTRA_RANGE_VALUE; 20 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; 132 final Slice slice = mRemoteMediaSlice.getSlice(); in getSlice_noActiveSession_checkRowNumber() local [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/ |
D | EligibleCardCheckerTest.java | 19 import static android.app.slice.Slice.HINT_ERROR; 34 import androidx.slice.Slice; 35 import androidx.slice.SliceProvider; 36 import androidx.slice.widget.SliceLiveData; 37 import androidx.slice.builders.ListBuilder; 38 import androidx.slice.builders.SliceAction; 70 final Slice slice = buildSlice(); in isSliceToggleable_cardWithToggle_returnTrue() local 72 assertThat(mEligibleCardChecker.isSliceToggleable(slice)).isTrue(); in isSliceToggleable_cardWithToggle_returnTrue() 77 final Slice slice = buildSlice(); in isCardEligibleToDisplay_toggleSlice_hasInlineActionShouldBeTrue() local 78 doReturn(slice).when(mEligibleCardChecker).bindSlice(any(Uri.class)); in isCardEligibleToDisplay_toggleSlice_hasInlineActionShouldBeTrue() [all …]
|
/packages/apps/TvSettings/TwoPanelSettingsLib/src/com/android/tv/twopanelsettings/slices/ |
D | EmbeddedSlicePreferenceHelper.java | 19 import static android.app.slice.Slice.HINT_PARTIAL; 27 import androidx.slice.Slice; 28 import androidx.slice.SliceItem; 29 import androidx.slice.widget.ListContent; 30 import androidx.slice.widget.SliceContent; 65 public void onChanged(Slice slice) { in onChanged() argument 66 mSlice = slice; in onChanged() 67 if (slice == null || slice.getHints() == null || slice.getHints().contains(HINT_PARTIAL)) { in onChanged()
|
/packages/apps/Settings/tests/unit/src/com/android/settings/network/ |
D | ProviderModelSliceTest.java | 19 import static android.app.slice.Slice.EXTRA_TOGGLE_STATE; 50 import androidx.slice.Slice; 51 import androidx.slice.SliceItem; 52 import androidx.slice.SliceMetadata; 53 import androidx.slice.SliceProvider; 54 import androidx.slice.builders.ListBuilder; 55 import androidx.slice.builders.SliceAction; 56 import androidx.slice.widget.SliceLiveData; 65 import com.android.settings.wifi.slice.WifiSliceItem; 176 final Slice slice = mMockProviderModelSlice.getSlice(); in getSlice_isGuestUser_shouldNotAddRow() local [all …]
|
/packages/apps/Settings/src/com/android/settings/panel/ |
D | PanelSlicesAdapter.java | 19 import static android.app.slice.Slice.HINT_ERROR; 20 import static android.app.slice.SliceItem.FORMAT_SLICE; 36 import androidx.slice.Slice; 37 import androidx.slice.SliceItem; 38 import androidx.slice.widget.SliceView; 125 private static final int ROW_VIEW_ID = androidx.slice.view.R.id.row_view; 145 public void onBind(Slice slice) { in onBind() argument 147 if (slice == null || !isValidSlice(slice)) { in onBind() 152 sliceView.setSlice(slice); in onBind() 167 slice.getUri().getLastPathSegment() in onBind() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/display/ |
D | AlwaysOnDisplaySliceTest.java | 34 import androidx.slice.Slice; 35 import androidx.slice.SliceMetadata; 36 import androidx.slice.SliceProvider; 37 import androidx.slice.widget.SliceLiveData; 82 final Slice slice = mSlice.getSlice(); in getSlice_alwaysOnNotSupported_returnNull() local 84 assertThat(slice).isNull(); in getSlice_alwaysOnNotSupported_returnNull() 91 final Slice slice = mSlice.getSlice(); in getSlice_alwaysOnSupported_showTitleSubtitle() local 92 final SliceMetadata metadata = SliceMetadata.from(mContext, slice); in getSlice_alwaysOnSupported_showTitleSubtitle() 103 intent.putExtra(android.app.slice.Slice.EXTRA_TOGGLE_STATE, false); in onNotifyChange_toggleOff_disableAoD() 115 intent.putExtra(android.app.slice.Slice.EXTRA_TOGGLE_STATE, true); in onNotifyChange_toggleOn_enableAoD()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/slice/ |
D | WifiSliceTest.java | 17 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; 23 import static com.android.settings.wifi.slice.WifiSlice.DEFAULT_EXPANDED_ROW_COUNT; 40 import androidx.slice.Slice; 41 import androidx.slice.SliceItem; 42 import androidx.slice.SliceMetadata; 43 import androidx.slice.SliceProvider; 44 import androidx.slice.core.SliceAction; 45 import androidx.slice.core.SliceQuery; [all …]
|
/packages/apps/TvSettings/TwoPanelSettingsLib/src/com/android/tv/twopanelsettings/slices/builders/ |
D | PreferenceSliceBuilderImpl.java | 19 import static android.app.slice.Slice.HINT_ACTIONS; 20 import static android.app.slice.Slice.HINT_KEYWORDS; 21 import static android.app.slice.Slice.HINT_LARGE; 22 import static android.app.slice.Slice.HINT_LAST_UPDATED; 23 import static android.app.slice.Slice.HINT_LIST_ITEM; 24 import static android.app.slice.Slice.HINT_NO_TINT; 25 import static android.app.slice.Slice.HINT_PARTIAL; 26 import static android.app.slice.Slice.HINT_SHORTCUT; 27 import static android.app.slice.Slice.HINT_SUMMARY; 28 import static android.app.slice.Slice.HINT_TITLE; [all …]
|
D | TemplateSliceBuilder.java | 24 import androidx.slice.Clock; 25 import androidx.slice.Slice; 26 import androidx.slice.SliceManager; 27 import androidx.slice.SliceProvider; 28 import androidx.slice.SliceSpec; 29 import androidx.slice.SystemClock;
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/flashlight/ |
D | FlashlightSliceTest.java | 26 import androidx.slice.Slice; 27 import androidx.slice.SliceMetadata; 28 import androidx.slice.SliceProvider; 29 import androidx.slice.core.SliceAction; 30 import androidx.slice.widget.SliceLiveData; 66 final Slice slice = new FlashlightSlice(mContext).getSlice(); in getFlashlightSlice_correctData() local 68 final SliceMetadata metadata = SliceMetadata.from(mContext, slice); in getFlashlightSlice_correctData()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/ |
D | BluetoothSliceBuilderTest.java | 27 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/src/com/android/settings/slices/ |
D | SlicePreferenceController.java | 27 import androidx.slice.Slice; 28 import androidx.slice.widget.SliceLiveData; 29 import androidx.slice.widget.SliceView; 93 public void onChanged(Slice slice) { in onChanged() argument 94 mSlicePreference.onSliceUpdated(slice); in onChanged() 95 Log.w(TAG, "Slice UI updated, uri: " + mUri + ", slice content: " + slice); in onChanged()
|
D | SlicePreference.java | 23 import androidx.slice.Slice; 24 import androidx.slice.widget.SliceView; 52 public void onSliceUpdated(Slice slice) { in onSliceUpdated() argument 53 if (slice == null) { in onSliceUpdated() 58 mSliceView.onChanged(slice); in onSliceUpdated()
|