summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/usb/UsbDeviceManager.java
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2011-08-23 20:14:33 -0700
committerChristopher Tate <ctate@google.com>2011-08-24 14:06:00 -0700
commit765f97d5e608031bc1de4156c6e681e4d178c7ee (patch)
treed9fc8d00877be25ec61dc388e227964cfb34ae89 /services/java/com/android/server/usb/UsbDeviceManager.java
parent5b56f7d6f662a543d0432a46047a55f1ee900994 (diff)
downloadframeworks_base-765f97d5e608031bc1de4156c6e681e4d178c7ee.zip
frameworks_base-765f97d5e608031bc1de4156c6e681e4d178c7ee.tar.gz
frameworks_base-765f97d5e608031bc1de4156c6e681e4d178c7ee.tar.bz2
Make sure to go to the right Settings panel when tapping a notification
We now use Intent.makeRestartActivityTask() to build the notification PendingIntent objects, so that when tapped they restart the activity in the desired state. Fixes bug 5011926 Change-Id: Ie1ec3543cc0f49d1bd407622a617316cf53a078c
Diffstat (limited to 'services/java/com/android/server/usb/UsbDeviceManager.java')
-rw-r--r--services/java/com/android/server/usb/UsbDeviceManager.java18
1 files changed, 6 insertions, 12 deletions
diff --git a/services/java/com/android/server/usb/UsbDeviceManager.java b/services/java/com/android/server/usb/UsbDeviceManager.java
index a01c975..8f51466 100644
--- a/services/java/com/android/server/usb/UsbDeviceManager.java
+++ b/services/java/com/android/server/usb/UsbDeviceManager.java
@@ -568,12 +568,9 @@ public class UsbDeviceManager {
notification.sound = null;
notification.vibrate = null;
- Intent intent = new Intent(
- Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS);
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
- Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
- intent.setComponent(new ComponentName("com.android.settings",
- "com.android.settings.UsbSettings"));
+ Intent intent = Intent.makeRestartActivityTask(
+ new ComponentName("com.android.settings",
+ "com.android.settings.UsbSettings"));
PendingIntent pi = PendingIntent.getActivity(mContext, 0,
intent, 0);
notification.setLatestEventInfo(mContext, title, message, pi);
@@ -604,12 +601,9 @@ public class UsbDeviceManager {
notification.sound = null;
notification.vibrate = null;
- Intent intent = new Intent(
- Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS);
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
- Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
- intent.setComponent(new ComponentName("com.android.settings",
- "com.android.settings.DevelopmentSettings"));
+ Intent intent = Intent.makeRestartActivityTask(
+ new ComponentName("com.android.settings",
+ "com.android.settings.DevelopmentSettings"));
PendingIntent pi = PendingIntent.getActivity(mContext, 0,
intent, 0);
notification.setLatestEventInfo(mContext, title, message, pi);