QuickTileService: require phone be unlocked
Reported-by: Simon <simon@laro.se> Reported-by: Harsh Shandilya <me@msfjarvis.dev> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
b67fa3a38c
commit
1e5596f977
@ -60,12 +60,14 @@ public class QuickTileService extends TileService {
|
||||
@Override
|
||||
public void onClick() {
|
||||
if (tunnel != null) {
|
||||
final Tile tile = getQsTile();
|
||||
if (tile != null) {
|
||||
tile.setIcon(tile.getIcon() == iconOn ? iconOff : iconOn);
|
||||
tile.updateTile();
|
||||
}
|
||||
tunnel.setState(State.TOGGLE).whenComplete(this::onToggleFinished);
|
||||
unlockAndRun(() -> {
|
||||
final Tile tile = getQsTile();
|
||||
if (tile != null) {
|
||||
tile.setIcon(tile.getIcon() == iconOn ? iconOff : iconOn);
|
||||
tile.updateTile();
|
||||
}
|
||||
tunnel.setState(State.TOGGLE).whenComplete(this::onToggleFinished);
|
||||
});
|
||||
} else {
|
||||
final Intent intent = new Intent(this, MainActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
|
Loading…
Reference in New Issue
Block a user