diff options
author | Jason Monk <jmonk@google.com> | 2015-06-19 14:20:46 -0400 |
---|---|---|
committer | Jason Monk <jmonk@google.com> | 2015-06-19 14:26:25 -0400 |
commit | ee43cdfa43b09a79e66d81f6673a79bc26427343 (patch) | |
tree | bfc6216edeb5de3b3acc27f15808872ad52e0129 /packages | |
parent | 1b48a6430ae503ff2826657ef0d1d4a090f7aa37 (diff) | |
download | frameworks_base-ee43cdfa43b09a79e66d81f6673a79bc26427343.zip frameworks_base-ee43cdfa43b09a79e66d81f6673a79bc26427343.tar.gz frameworks_base-ee43cdfa43b09a79e66d81f6673a79bc26427343.tar.bz2 |
Fix intent tile to unlock on launching activities
Change-Id: Ibde6a21d5a36d4697101e2201d1d77e26d684753
Diffstat (limited to 'packages')
8 files changed, 16 insertions, 12 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java index 9761cd1..4b1453d 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java @@ -390,7 +390,7 @@ public class QSPanel extends ViewGroup { mDetailSettingsButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { - mHost.startSettingsActivity(settingsIntent); + mHost.startActivityDismissingKeyguard(settingsIntent); } }); diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTile.java b/packages/SystemUI/src/com/android/systemui/qs/QSTile.java index 72bb136..38fade2 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSTile.java @@ -306,7 +306,7 @@ public abstract class QSTile<TState extends State> implements Listenable { } public interface Host { - void startSettingsActivity(Intent intent); + void startActivityDismissingKeyguard(Intent intent); void warn(String message, Throwable t); void collapsePanels(); Looper getLooper(); diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java index a9e8b38..07406b9 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java @@ -82,7 +82,7 @@ public class CellularTile extends QSTile<QSTile.SignalState> { if (mDataController.isMobileDataSupported()) { showDetail(true); } else { - mHost.startSettingsActivity(CELLULAR_SETTINGS); + mHost.startActivityDismissingKeyguard(CELLULAR_SETTINGS); } } diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java index f97f519..1b74eb6 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java @@ -263,7 +263,7 @@ public class DndTile extends QSTile<QSTile.BooleanState> { private final ZenModePanel.Callback mZenModePanelCallback = new ZenModePanel.Callback() { @Override public void onPrioritySettings() { - mHost.startSettingsActivity(ZEN_PRIORITY_SETTINGS); + mHost.startActivityDismissingKeyguard(ZEN_PRIORITY_SETTINGS); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/IntentTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/IntentTile.java index 19f4df6..f7f7acb 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/IntentTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/IntentTile.java @@ -96,7 +96,11 @@ public class IntentTile extends QSTile<QSTile.State> { private void sendIntent(String type, PendingIntent pi, String uri) { try { if (pi != null) { - pi.send(); + if (pi.isActivity()) { + getHost().startActivityDismissingKeyguard(pi.getIntent()); + } else { + pi.send(); + } } else if (uri != null) { final Intent intent = Intent.parseUri(uri, Intent.URI_INTENT_SCHEME); mContext.sendBroadcastAsUser(intent, new UserHandle(mCurrentUserId)); diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java index 9bc5b75..c33ef7c 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java @@ -104,7 +104,7 @@ public class WifiTile extends QSTile<QSTile.SignalState> { @Override protected void handleSecondaryClick() { if (!mWifiController.canConfigWifi()) { - mHost.startSettingsActivity(new Intent(Settings.ACTION_WIFI_SETTINGS)); + mHost.startActivityDismissingKeyguard(new Intent(Settings.ACTION_WIFI_SETTINGS)); return; } if (!mState.enabled) { @@ -290,7 +290,7 @@ public class WifiTile extends QSTile<QSTile.SignalState> { @Override public void onSettingsActivityTriggered(Intent settingsIntent) { - mHost.startSettingsActivity(settingsIntent); + mHost.startActivityDismissingKeyguard(settingsIntent); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index cd90d27..ade40e5 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -3101,16 +3101,16 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, || (mDisabled1 & StatusBarManager.DISABLE_SEARCH) != 0; } - public void postStartSettingsActivity(final Intent intent, int delay) { + public void postStartActivityDismissingKeyguard(final Intent intent, int delay) { mHandler.postDelayed(new Runnable() { @Override public void run() { - handleStartSettingsActivity(intent, true /*onlyProvisioned*/); + handleStartActivityDismissingKeyguard(intent, true /*onlyProvisioned*/); } }, delay); } - private void handleStartSettingsActivity(Intent intent, boolean onlyProvisioned) { + private void handleStartActivityDismissingKeyguard(Intent intent, boolean onlyProvisioned) { startActivityDismissingKeyguard(intent, onlyProvisioned, true /* dismissShade */); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java index 25a93dd..12434ac 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java @@ -129,8 +129,8 @@ public class QSTileHost implements QSTile.Host, Tunable { } @Override - public void startSettingsActivity(final Intent intent) { - mStatusBar.postStartSettingsActivity(intent, 0); + public void startActivityDismissingKeyguard(final Intent intent) { + mStatusBar.postStartActivityDismissingKeyguard(intent, 0); } @Override |