/aosp12/packages/apps/Messaging/src/com/android/messaging/ui/ |
H A D | MultiAttachmentLayout.java | 82 private static class Tile { class in MultiAttachmentLayout 122 public final List<Tile> tiles; 123 public Layout(final Tile[] tilesArray) { in Layout() 134 new Layout(new Tile[] { Tile.large(0, 0), Tile.large(2, 0) }), // 2 items 135 new Layout(new Tile[] { Tile.large(0, 0), Tile.wide(2, 0), Tile.wide(2, 1) }), // 3 items 136 new Layout(new Tile[] { Tile.large(0, 0), Tile.wide(2, 0), Tile.small(2, 1), // 4+ items 137 Tile.small(3, 1) }), 146 new Layout(new Tile[] { Tile.large(2, 0), Tile.large(0, 0)}), // 2 items 147 new Layout(new Tile[] { Tile.large(2, 0), Tile.wide(0, 0), Tile.wide(0, 1) }), // 3 items 148 new Layout(new Tile[] { Tile.large(2, 0), Tile.wide(0, 0), Tile.small(1, 1), // 4+ items [all …]
|
/aosp12/packages/apps/Settings/tests/unit/src/com/android/settings/dashboard/ |
H A D | CategoryManagerTest.java | 39 import com.android.settingslib.drawer.Tile; 54 private Map<Pair<String, String>, Tile> mTileByComponentCache; 76 final Tile tile1 = new ActivityTile(mActivityInfo, CategoryKey.CATEGORY_ACCOUNT); in backwardCompatCleanupForCategory_shouldNotChangeCategoryForNewKeys() 77 final Tile tile2 = new ActivityTile(mActivityInfo, CategoryKey.CATEGORY_ACCOUNT); in backwardCompatCleanupForCategory_shouldNotChangeCategoryForNewKeys() 93 final Tile tile1 = new ActivityTile(mActivityInfo, CategoryKey.CATEGORY_ACCOUNT); in backwardCompatCleanupForCategory_shouldNotChangeCategoryForMixedKeys() 95 final Tile tile2 = new ActivityTile(mActivityInfo, oldCategory); in backwardCompatCleanupForCategory_shouldNotChangeCategoryForMixedKeys() 116 final Tile tile1 = new ActivityTile(mActivityInfo, oldCategory); in backwardCompatCleanupForCategory_shouldChangeCategoryForOldKeys() 140 final Tile tile2 = createActivityTile(category.key, testPackage, "class2", 50); in sortCategories_singlePackage_shouldReorderBasedOnPriority() 208 final Tile tile1 = createActivityTile(category.key, testPackage, "class1", 2); in sortCategories_internalAndExternalPackageTiles_shouldRetainPriorityOrdering() 209 final Tile tile2 = createActivityTile(category.key, testPackage, "class2", 1); in sortCategories_internalAndExternalPackageTiles_shouldRetainPriorityOrdering() [all …]
|
/aosp12/frameworks/base/packages/SettingsLib/Tile/src/com/android/settingslib/drawer/ |
H A D | DashboardCategory.java | 41 private List<Tile> mTiles = new ArrayList<>(); 53 Tile tile = Tile.CREATOR.createFromParcel(in); in DashboardCategory() 64 public synchronized List<Tile> getTiles() { in getTiles() 65 final List<Tile> result = new ArrayList<>(mTiles.size()); in getTiles() 66 for (Tile tile : mTiles) { in getTiles() 75 public synchronized void addTile(Tile tile) { in addTile() 96 public Tile getTile(int n) { in getTile() 104 Collections.sort(mTiles, Tile.TILE_COMPARATOR); in sortTiles() 148 Tile tile = mTiles.get(n); in writeToParcel()
|
H A D | TileUtils.java | 243 Map<Pair<String, String>, Tile> cache) { in getCategories() 247 final ArrayList<Tile> tiles = new ArrayList<>(); in getCategories() 267 for (Tile tile : tiles) { in getCategories() 295 UserHandle user, String action, Map<Pair<String, String>, Tile> addedCache, in loadTilesForAction() 296 String defaultCategory, List<Tile> outTiles, boolean requireSettings) { in loadTilesForAction() 306 UserHandle user, Map<Pair<String, String>, Tile> addedCache, in loadActivityTiles() 307 String defaultCategory, List<Tile> outTiles, Intent intent) { in loadActivityTiles() 323 UserHandle user, Map<Pair<String, String>, Tile> addedCache, in loadProviderTiles() 324 String defaultCategory, List<Tile> outTiles, Intent intent) { in loadProviderTiles() 352 && Tile.isPrimaryProfileOnly(componentInfo.metaData)) { in loadTile() [all …]
|
H A D | Tile.java | 54 public abstract class Tile implements Parcelable { class 74 public Tile(ComponentInfo info, String category) { in Tile() method in Tile 82 Tile(Parcel in) { in Tile() method in Tile 366 public static final Creator<Tile> CREATOR = new Creator<Tile>() { 367 public Tile createFromParcel(Parcel source) { 374 public Tile[] newArray(int size) { 375 return new Tile[size]; 393 public static final Comparator<Tile> TILE_COMPARATOR =
|
/aosp12/packages/apps/Settings/src/com/android/settings/dashboard/ |
H A D | CategoryManager.java | 33 import com.android.settingslib.drawer.Tile; 103 Tile tile = category.getTile(j); in updateCategoryFromDenylist() 113 final Map<ComponentName, Tile> result = new ArrayMap<>(); in getTileByComponentMap() 120 final Tile tile = category.getTile(i); in getTileByComponentMap() 164 for (Tile tile : homepageCategory.getTiles()) { in tryInitCategories() 178 Map<Pair<String, String>, Tile> tileByComponentCache, in backwardCompatCleanupForCategory() 188 List<Tile> tiles = packageToTileMap.get(packageName); in backwardCompatCleanupForCategory() 197 final List<Tile> tiles = entry.getValue(); in backwardCompatCleanupForCategory() 201 for (Tile tile : tiles) { in backwardCompatCleanupForCategory() 211 for (Tile tile : tiles) { in backwardCompatCleanupForCategory() [all …]
|
H A D | DashboardFeatureProvider.java | 22 import com.android.settingslib.drawer.Tile; 44 String getDashboardKeyForTile(Tile tile); in getDashboardKeyForTile() 61 DashboardFragment fragment, boolean forceRoundedIcon, Preference pref, Tile tile, in bindPreferenceToTileAndGetObservers() 67 void openTileIntent(FragmentActivity activity, Tile tile); in openTileIntent()
|
/aosp12/packages/apps/WallpaperPicker/src/com/android/photos/views/ |
H A D | TiledImageRenderer.java | 96 private final LongSparseArray<Tile> mActiveTiles = new LongSparseArray<Tile>(); 492 private void decodeTile(Tile tile) { in decodeTile() 527 return new Tile(x, y, level); in obtainTile() 572 Tile tile = null; in uploadTiles() 667 public Tile mNext; 734 public Tile getParentTile() { in getParentTile() 752 private Tile mHead; 754 public Tile pop() { in pop() 755 Tile tile = mHead; in pop() 762 public boolean push(Tile tile) { in push() [all …]
|
/aosp12/frameworks/base/packages/WallpaperCropper/src/com/android/photos/views/ |
H A D | TiledImageRenderer.java | 95 private final LongSparseArray<Tile> mActiveTiles = new LongSparseArray<Tile>(); 489 private void decodeTile(Tile tile) { in decodeTile() 524 return new Tile(x, y, level); in obtainTile() 569 Tile tile = null; in uploadTiles() 664 public Tile mNext; 731 public Tile getParentTile() { in getParentTile() 749 private Tile mHead; 751 public Tile pop() { in pop() 752 Tile tile = mHead; in pop() 759 public boolean push(Tile tile) { in push() [all …]
|
/aosp12/packages/apps/Gallery2/src/com/android/photos/views/ |
H A D | TiledImageRenderer.java | 96 private final LongSparseArray<Tile> mActiveTiles = new LongSparseArray<Tile>(); 492 private void decodeTile(Tile tile) { in decodeTile() 527 return new Tile(x, y, level); in obtainTile() 572 Tile tile = null; in uploadTiles() 667 public Tile mNext; 734 public Tile getParentTile() { in getParentTile() 752 private Tile mHead; 754 public Tile pop() { in pop() 755 Tile tile = mHead; in pop() 762 public boolean push(Tile tile) { in push() [all …]
|
/aosp12/frameworks/base/core/java/android/service/quicksettings/ |
H A D | Tile.java | 36 public final class Tile implements Parcelable { class 77 public Tile(Parcel source) { in Tile() method in Tile 84 public Tile() { in Tile() method in Tile 254 public static final @android.annotation.NonNull Creator<Tile> CREATOR = new Creator<Tile>() { 256 public Tile createFromParcel(Parcel source) { 257 return new Tile(source); 261 public Tile[] newArray(int size) { 262 return new Tile[size];
|
/aosp12/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
H A D | TileImageView.java | 99 private final LongSparseArray<Tile> mActiveTiles = new LongSparseArray<Tile>(); 475 void queueForUpload(Tile tile) { in queueForUpload() 491 boolean decodeTile(Tile tile) { in decodeTile() 519 return new Tile(x, y, level); in obtainTile() 568 Tile tile = null; in onGLIdle() 656 public Tile mNext; 720 public Tile getParentTile() { in getParentTile() 736 private Tile mHead; 738 public Tile pop() { in pop() 739 Tile tile = mHead; in pop() [all …]
|
/aosp12/packages/apps/Gallery2/src/com/android/gallery3d/glrenderer/ |
H A D | TiledTexture.java | 49 private static Tile sFreeTileHead = null; 116 public Tile nextFreeTile; 161 private static void freeTile(Tile tile) { in freeTile() 170 private static Tile obtainTile() { in obtainTile() 172 Tile result = sFreeTileHead; in obtainTile() 184 Tile next = mTiles[mUploadIndex++]; in uploadNextTile() 205 ArrayList<Tile> list = new ArrayList<Tile>(); in TiledTexture() 209 Tile tile = obtainTile(); in TiledTexture() 284 Tile t = mTiles[i]; in drawMixed() 303 Tile t = mTiles[i]; in draw() [all …]
|
/aosp12/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/tileimpl/ |
H A D | QSTileViewImplTest.kt | 21 import android.service.quicksettings.Tile 67 state.state = Tile.STATE_UNAVAILABLE 79 state.state = Tile.STATE_INACTIVE 91 state.state = Tile.STATE_ACTIVE 102 state.state = Tile.STATE_INACTIVE 113 state.state = Tile.STATE_ACTIVE 124 state.state = Tile.STATE_UNAVAILABLE 137 state.state = Tile.STATE_INACTIVE 150 state.state = Tile.STATE_ACTIVE 249 state.state = Tile.STATE_INACTIVE [all …]
|
/aosp12/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/ |
H A D | ActivityTileTest.java | 47 private Tile mTile; 87 final Tile tile = new ActivityTile(mActivityInfo, "category"); in getIcon_noContextOrMetadata_returnNull() 116 final Tile tile = new ActivityTile(mActivityInfo, "category"); in isIconTintable_hasMetadata_shouldReturnIconTintableMetadata() 127 final Tile tile = new ActivityTile(mActivityInfo, "category"); in isIconTintable_noIcon_shouldReturnFalse() 134 final Tile tile = new ActivityTile(mActivityInfo, "category"); in isIconTintable_noTintableMetadata_shouldReturnFalse() 142 final Tile tile = new ActivityTile(mActivityInfo, "category"); in getPriority_noMetadata_return0() 151 final Tile tile = new ActivityTile(mActivityInfo, "category"); in getPriority_badMetadata_return0() 160 final Tile tile = new ActivityTile(mActivityInfo, "category"); in getPriority_validMetadata_returnMetadataValue() 173 final Tile tile = new ActivityTile(mActivityInfo, "category"); in getTitle_shouldEnsureMetadataNotStale() 189 final Tile tile = new ActivityTile(mActivityInfo, "category"); in getTitle_noActivity_returnNull()
|
H A D | TileUtilsTest.java | 111 List<Tile> outTiles = new ArrayList<>(); in getTilesForIntent_shouldParseCategory() 131 List<Tile> outTiles = new ArrayList<>(); in getTilesForIntent_shouldParseKeyHintForSystemApp() 153 List<Tile> outTiles = new ArrayList<>(); in getTilesForIntent_shouldSkipNonSystemApp() 171 Map<Pair<String, String>, Tile> cache = new ArrayMap<>(); in getCategories_withPackageName() 192 List<Tile> outTiles = new ArrayList<>(); in getTilesForIntent_shouldReadMetadataTitleAsString() 214 List<Tile> outTiles = new ArrayList<>(); in getTilesForIntent_shouldReadMetadataTitleFromResource() 238 List<Tile> outTiles = new ArrayList<>(); in getTilesForIntent_shouldNotTintIconIfInSettingsPackage() 261 final List<Tile> outTiles = new ArrayList<>(); in getTilesForIntent_tileAlreadyInCache_shouldUpdateMetaData() 293 List<Tile> outTiles = new ArrayList<>(); in getTilesForIntent_shouldMarkIconTintableIfMetadataSet() 316 List<Tile> outTiles = new ArrayList<>(); in getTilesForIntent_shouldProcessUriContentForSystemApp() [all …]
|
H A D | ProviderTileTest.java | 57 private Tile mTile; 95 final Tile tile = new ProviderTile(mProviderInfo, "category", null); in getIcon_noContextOrMetadata_shouldThrowNullPointerException() 108 final Tile tile = new ProviderTile(mProviderInfo, "category", mMetaData); in isIconTintable_hasMetadata_shouldReturnIconTintableMetadata() 119 final Tile tile = new ProviderTile(mProviderInfo, "category", mMetaData); in isIconTintable_noIcon_shouldReturnFalse() 126 final Tile tile = new ProviderTile(mProviderInfo, "category", mMetaData); in isIconTintable_noTintableMetadata_shouldReturnFalse() 134 final Tile tile = new ProviderTile(mProviderInfo, "category", mMetaData); in getPriority_noMetadata_return0() 143 final Tile tile = new ProviderTile(mProviderInfo, "category", mMetaData); in getPriority_badMetadata_return0() 152 final Tile tile = new ProviderTile(mProviderInfo, "category", mMetaData); in getPriority_validMetadata_returnMetadataValue() 167 final Tile tile = new ProviderTile(mProviderInfo, "category", mMetaData); in getTitle_shouldEnsureMetadataNotStale()
|
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/ |
H A D | DashboardFeatureProviderImplTest.java | 75 import com.android.settingslib.drawer.Tile; 201 final Tile tile = new ActivityTile(mActivityInfo, CategoryKey.CATEGORY_HOMEPAGE); in bindPreference_noFragmentMetadata_shouldBindIntent() 214 final Tile tile = new ActivityTile(mActivityInfo, CategoryKey.CATEGORY_HOMEPAGE); in bindPreference_noFragmentMetadata_shouldBindToProfileSelector() 229 final Tile tile = new ActivityTile(mActivityInfo, CategoryKey.CATEGORY_HOMEPAGE); in bindPreference_noFragmentMetadataSingleUser_shouldBindToDirectLaunchIntent() 251 final Tile tile = new ActivityTile(mActivityInfo, CategoryKey.CATEGORY_HOMEPAGE); in bindPreference_toInternalSettingActivity_shouldBindToDirectLaunchIntentAndNotLog() 267 final Tile tile = mock(Tile.class); in bindPreference_nullPreference_shouldIgnore() 277 final Tile tile = new ActivityTile(mActivityInfo, CategoryKey.CATEGORY_HOMEPAGE); in bindPreference_withNullKeyNullPriority_shouldGenerateKeyAndPriority() 291 final Tile tile = new ActivityTile(mActivityInfo, CategoryKey.CATEGORY_HOMEPAGE); in bindPreference_noSummary_shouldSetNullSummary() 335 final Tile tile = new ProviderTile(mProviderInfo, CategoryKey.CATEGORY_HOMEPAGE, in bindPreference_onCheckedChanged_shouldPutStateToContentProvider() 356 final Tile tile = new ProviderTile(mProviderInfo, CategoryKey.CATEGORY_HOMEPAGE, in bindPreference_onCheckedChangedError_shouldRevertCheckedState() [all …]
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/external/ |
H A D | CustomTileStatePersister.kt | 21 import android.service.quicksettings.Tile 61 fun readState(key: TileServiceKey): Tile? { 76 fun persistState(key: TileServiceKey, tile: Tile) { 93 internal fun readTileFromString(stateString: String): Tile { 95 return Tile().apply { 111 internal fun writeToString(tile: Tile): String {
|
H A D | TileColorPicker.java | 20 import android.service.quicksettings.Tile; 51 case Tile.STATE_UNAVAILABLE: in getColor() 53 case Tile.STATE_INACTIVE: in getColor() 55 case Tile.STATE_ACTIVE: in getColor()
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/ |
H A D | DeviceControlsTile.kt | 23 import android.service.quicksettings.Tile 94 it.state = Tile.STATE_UNAVAILABLE // Start unavailable matching `hasControlsApps` 100 if (state.state == Tile.STATE_UNAVAILABLE) { 115 val showOverLockscreenWhenLocked = state.state == Tile.STATE_ACTIVE 128 state.state = Tile.STATE_ACTIVE 132 state.state = Tile.STATE_INACTIVE 137 state.state = Tile.STATE_UNAVAILABLE
|
/aosp12/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/external/ |
H A D | CustomTileTest.kt | 28 import android.service.quicksettings.Tile 169 customTile.qsTile.state = Tile.STATE_INACTIVE 173 customTile.qsTile.state = Tile.STATE_ACTIVE 177 customTile.qsTile.state = Tile.STATE_UNAVAILABLE 201 val t = Tile().apply { 202 state = Tile.STATE_INACTIVE 212 val state = Tile.STATE_INACTIVE 218 val t = Tile().apply { 253 val t = Tile().apply { 254 state = Tile.STATE_INACTIVE
|
H A D | CustomTileStatePersisterTest.kt | 22 import android.service.quicksettings.Tile 52 private const val TEST_STATE = Tile.STATE_INACTIVE 58 private fun Tile.isEqualTo(other: Tile): Boolean { regex 73 private lateinit var tile: Tile 86 tile = Tile()
|
H A D | TileColorPickerTest.java | 21 import android.service.quicksettings.Tile; 50 final int color = mTileColorPicker.getColor(Tile.STATE_UNAVAILABLE); in testGetColor_StateUnavailable_ReturnUnavailableColor() 59 final int color = mTileColorPicker.getColor(Tile.STATE_INACTIVE); in testGetColor_StateInactive_ReturnInactiveColor() 68 final int color = mTileColorPicker.getColor(Tile.STATE_ACTIVE); in testGetColor_StateActive_ReturnActiveColor()
|
/aosp12/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/ |
H A D | CastTileTest.java | 32 import android.service.quicksettings.Tile; 156 assertEquals(Tile.STATE_UNAVAILABLE, mCastTile.getState().state); in testStateUnavailable_wifiDisabled() 169 assertEquals(Tile.STATE_UNAVAILABLE, mCastTile.getState().state); in testStateUnavailable_wifiNotConnected() 191 assertEquals(Tile.STATE_ACTIVE, mCastTile.getState().state); in testStateActive_wifiEnabledAndCasting() 197 assertEquals(Tile.STATE_INACTIVE, mCastTile.getState().state); in testStateInactive_wifiEnabledNotCasting() 208 assertEquals(Tile.STATE_UNAVAILABLE, mCastTile.getState().state); in testStateUnavailable_hotspotDisabled() 229 assertEquals(Tile.STATE_ACTIVE, mCastTile.getState().state); in testStateActive_hotspotEnabledAndConnectedAndCasting() 236 assertEquals(Tile.STATE_INACTIVE, mCastTile.getState().state); in testStateInactive_hotspotEnabledAndConnectedAndNotCasting() 284 assertEquals(Tile.STATE_ACTIVE, mCastTile.getState().state); in testUpdateState_projectionOnly() 308 assertEquals(Tile.STATE_ACTIVE, mCastTile.getState().state); in testUpdateState_castingAndProjection() [all …]
|