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

Commit 09771c6c authored by Michael Bestas's avatar Michael Bestas Committed by Gerrit Code Review
Browse files

SystemUI: Correct long press intents of some tiles

Change-Id: I1eb3c6d0933150084c3800f93b97531f1e51fa18
parent 8c7b965b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -88,6 +88,11 @@ public class CastTile extends QSTile<QSTile.BooleanState> {
        showDetail(true);
    }

    @Override
    protected void handleLongClick() {
        mHost.startSettingsActivity(CAST_SETTINGS);
    }

    @Override
    protected void handleUpdateState(BooleanState state, Object arg) {
        state.visible = !(mKeyguard.isSecure() && mKeyguard.isShowing());
+5 −2
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.systemui.qs.tiles;

import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.provider.Settings;
@@ -28,7 +29,9 @@ import com.android.systemui.statusbar.policy.HotspotController;

/** Quick settings tile: Hotspot **/
public class HotspotTile extends QSTile<QSTile.BooleanState> {
    private static final Intent WIRELESS_SETTINGS = new Intent(Settings.ACTION_WIRELESS_SETTINGS);

    private static final Intent TETHER_SETTINGS = new Intent().setComponent(new ComponentName(
            "com.android.settings", "com.android.settings.TetherSettings"));
    private final HotspotController mController;
    private final Callback mCallback = new Callback();
    private final UsageTracker mUsageTracker;
@@ -68,7 +71,7 @@ public class HotspotTile extends QSTile<QSTile.BooleanState> {

    @Override
    protected void handleLongClick() {
        mHost.startSettingsActivity(WIRELESS_SETTINGS);
        mHost.startSettingsActivity(TETHER_SETTINGS);
    }

    @Override
+4 −1
Original line number Diff line number Diff line
/*
 * Copyright (C) 2015 The CyanogenMod Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
@@ -29,7 +30,9 @@ import com.android.systemui.qs.QSTile;

/** Quick settings tile: LiveDisplay mode switcher **/
public class LiveDisplayTile extends QSTile<LiveDisplayTile.LiveDisplayState> {
    private static final Intent LIVEDISPLAY_SETTINGS = new Intent("android.settings.LIVEDISPLAY_SETTINGS");

    private static final Intent LIVEDISPLAY_SETTINGS =
            new Intent("android.settings.LIVEDISPLAY_SETTINGS");

    private final LiveDisplayObserver mObserver;
    private final String[] mEntries;
+8 −0
Original line number Diff line number Diff line
@@ -39,6 +39,9 @@ public class LockscreenToggleTile extends QSTile<QSTile.BooleanState>

    private static final String KEY_ENABLED = "lockscreen_enabled";

    private static final Intent LOCK_SCREEN_SETTINGS =
            new Intent("android.settings.LOCK_SCREEN_SETTINGS");

    private KeyguardViewMediator mKeyguardViewMediator;
    private KeyguardMonitor mKeyguard;
    private boolean mPersistedState;
@@ -88,6 +91,11 @@ public class LockscreenToggleTile extends QSTile<QSTile.BooleanState>
        refreshState();
    }

    @Override
    protected void handleLongClick() {
        mHost.startSettingsActivity(LOCK_SCREEN_SETTINGS);
    }

    @Override
    protected void handleUpdateState(BooleanState state, Object arg) {
        final boolean lockscreenEnforced = mKeyguardViewMediator.lockscreenEnforcedByDevicePolicy();
+8 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.systemui.qs.tiles;

import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.database.ContentObserver;
@@ -29,6 +30,8 @@ import com.android.systemui.qs.QSTile;

public class PerfProfileTile extends QSTile<PerfProfileTile.ProfileState> {

    private static final Intent BATTERY_SETTINGS = new Intent(Intent.ACTION_POWER_USAGE_SUMMARY);

    private int[] mEntryIconRes;
    private String[] mEntries;
    private String[] mPerfProfileValues;
@@ -77,6 +80,11 @@ public class PerfProfileTile extends QSTile<PerfProfileTile.ProfileState> {
        changeToNextProfile();
    }

    @Override
    protected void handleLongClick() {
        mHost.startSettingsActivity(BATTERY_SETTINGS);
    }

    @Override
    protected void handleUpdateState(ProfileState state, Object arg) {
        state.visible = true;
Loading