mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user