diff options
author | Adam Cohen <adamcohen@google.com> | 2015-03-27 15:14:00 -0700 |
---|---|---|
committer | Adam Cohen <adamcohen@google.com> | 2015-03-27 22:19:38 +0000 |
commit | 173f711e03dfce70d76c3b45f764a4f6b682a3b3 (patch) | |
tree | 686b994c27e880f007af01ba3c6c5a735f202d51 /src | |
parent | 2dd9f018ff32a1f34023826b64422622f6610daf (diff) | |
download | android_packages_apps_Trebuchet-173f711e03dfce70d76c3b45f764a4f6b682a3b3.tar.gz android_packages_apps_Trebuchet-173f711e03dfce70d76c3b45f764a4f6b682a3b3.tar.bz2 android_packages_apps_Trebuchet-173f711e03dfce70d76c3b45f764a4f6b682a3b3.zip |
Ensure that we capture all paths for starting activity for result
-> AppWidgetManagerCompatVL uses an IntentSender to launch the widget
config activity (to handle the case of cross profile config activities)
-> Launcher was not overriding this method, and so not capturing the fact
that we are waiting for a result.
issue 19723510
Change-Id: If5751e6d23d31c9f7b3b85f9464a93f935487cec
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index a8fd79e47..56a74e563 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -42,6 +42,7 @@ import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; +import android.content.IntentSender; import android.content.SharedPreferences; import android.content.pm.ActivityInfo; import android.content.pm.ApplicationInfo; @@ -2079,10 +2080,26 @@ public class Launcher extends Activity @Override public void startActivityForResult(Intent intent, int requestCode) { + onStartForResult(requestCode); + super.startActivityForResult(intent, requestCode); + } + + @Override + public void startIntentSenderForResult (IntentSender intent, int requestCode, + Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, Bundle options) { + onStartForResult(requestCode); + try { + super.startIntentSenderForResult(intent, requestCode, + fillInIntent, flagsMask, flagsValues, extraFlags, options); + } catch (IntentSender.SendIntentException e) { + throw new ActivityNotFoundException(); + } + } + + private void onStartForResult(int requestCode) { if (requestCode >= 0) { setWaitingForResult(true); } - super.startActivityForResult(intent, requestCode); } /** |