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

Commit 9600df03 authored by Jason Monk's avatar Jason Monk Committed by Gerrit Code Review
Browse files

Merge "Fix Hotspot tile is shown on Guest user"

parents 50140286 efd1c54a
Loading
Loading
Loading
Loading
+14 −6
Original line number Diff line number Diff line
@@ -335,16 +335,24 @@ public class QSTileHost implements QSTile.Host, Tunable {
            QSTile<?> tile = mTiles.get(tileSpec);
            if (tile != null && (!(tile instanceof CustomTile)
                    || ((CustomTile) tile).getUser() == currentUser)) {
                if (tile.isAvailable()) {
                    if (DEBUG) Log.d(TAG, "Adding " + tile);
                    tile.removeCallbacks();
                    newTiles.put(tileSpec, tile);
                } else {
                    tile.destroy();
                }
            } else {
                if (DEBUG) Log.d(TAG, "Creating tile: " + tileSpec);
                try {
                    tile = createTile(tileSpec);
                    if (tile != null && tile.isAvailable()) {
                    if (tile != null) {
                        if (tile.isAvailable()) {
                            tile.setTileSpec(tileSpec);
                            newTiles.put(tileSpec, tile);
                        } else {
                            tile.destroy();
                        }
                    }
                } catch (Throwable t) {
                    Log.w(TAG, "Error creating tile for spec: " + tileSpec, t);