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

Commit f662e4b1 authored by Adnan Begovic's avatar Adnan Begovic
Browse files

SystemUi: Always wedge in the edit tile.

  If a user is upgrading from a prior release, we need
  to include the edit tile always.

Change-Id: I87bb426127f800046d772f1820f51234f2ddae02
parent c49807ae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -487,7 +487,7 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
    }

    public int getTilesPerPage() {
        return 8;
        return QSTileHost.TILES_PER_PAGE;
    }

    @Override
+8 −0
Original line number Diff line number Diff line
@@ -70,6 +70,8 @@ public class QSTileHost implements QSTile.Host, Tunable {
    private static final String TAG = "QSTileHost";
    private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);

    public static final int TILES_PER_PAGE = 8;

    private final Context mContext;
    private final PhoneStatusBar mStatusBar;
    private final LinkedHashMap<String, QSTile<?>> mTiles = new LinkedHashMap<>();
@@ -307,6 +309,12 @@ public class QSTileHost implements QSTile.Host, Tunable {
                tiles.add(tile);
            }
        }
        // ensure edit tile is present
        if (tiles.size() < TILES_PER_PAGE && !tiles.contains("edit")) {
            tiles.add("edit");
        } else if (tiles.size() > TILES_PER_PAGE && !tiles.contains("edit")) {
            tiles.add((TILES_PER_PAGE - 1), "edit");
        }
        return tiles;
    }