Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 8db94cb2 authored by Arne Coucheron's avatar Arne Coucheron Committed by Michael Bestas
Browse files

SystemUI: Only add GarbageMonitor tile to default tiles on ENG builds

Change-Id: Ice1bab5f3d1b3a15f20085cfb7f5578c7f70855a
parent b7489ed4
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -46,7 +46,7 @@ public interface QSHost {
        final String defaultTileList = res.getString(R.string.quick_settings_tiles_default);
        final String defaultTileList = res.getString(R.string.quick_settings_tiles_default);


        tiles.addAll(Arrays.asList(defaultTileList.split(",")));
        tiles.addAll(Arrays.asList(defaultTileList.split(",")));
        if (Build.IS_DEBUGGABLE
        if (Build.IS_ENG
                && GarbageMonitor.ADD_MEMORY_TILE_TO_DEFAULT_ON_DEBUGGABLE_BUILDS) {
                && GarbageMonitor.ADD_MEMORY_TILE_TO_DEFAULT_ON_DEBUGGABLE_BUILDS) {
            tiles.add(GarbageMonitor.MemoryTile.TILE_SPEC);
            tiles.add(GarbageMonitor.MemoryTile.TILE_SPEC);
        }
        }
+1 −1
Original line number Original line Diff line number Diff line
@@ -114,7 +114,7 @@ public class TileQueryHelper {
                possibleTiles.add(spec);
                possibleTiles.add(spec);
            }
            }
        }
        }
        if (Build.IS_DEBUGGABLE && !current.contains(GarbageMonitor.MemoryTile.TILE_SPEC)) {
        if (Build.IS_ENG && !current.contains(GarbageMonitor.MemoryTile.TILE_SPEC)) {
            possibleTiles.add(GarbageMonitor.MemoryTile.TILE_SPEC);
            possibleTiles.add(GarbageMonitor.MemoryTile.TILE_SPEC);
        }
        }


+2 −2
Original line number Original line Diff line number Diff line
@@ -81,8 +81,8 @@ public class QSFactoryImpl implements QSFactory {
    protected QSTileImpl createTileInternal(String tileSpec) {
    protected QSTileImpl createTileInternal(String tileSpec) {
        // Stock tiles.
        // Stock tiles.
        if (mTileMap.containsKey(tileSpec)
        if (mTileMap.containsKey(tileSpec)
                // We should not return a Garbage Monitory Tile if the build is not Debuggable
                // We should not return a Garbage Monitory Tile if the build is not Eng
                && (!tileSpec.equals(GarbageMonitor.MemoryTile.TILE_SPEC) || Build.IS_DEBUGGABLE)) {
                && (!tileSpec.equals(GarbageMonitor.MemoryTile.TILE_SPEC) || Build.IS_ENG)) {
            return mTileMap.get(tileSpec).get();
            return mTileMap.get(tileSpec).get();
        }
        }