Loading core/java/com/android/internal/app/HeavyWeightSwitcherActivity.java +6 −3 Original line number Diff line number Diff line Loading @@ -53,8 +53,10 @@ public class HeavyWeightSwitcherActivity extends Activity { public static final String KEY_CUR_TASK = "cur_task"; /** Package of newly requested heavy-weight app. */ public static final String KEY_NEW_APP = "new_app"; public static final String KEY_ACTIVITY_OPTIONS = "activity_options"; IntentSender mStartIntent; Bundle mActivityOptions; boolean mHasResult; String mCurApp; int mCurTask; Loading @@ -67,6 +69,7 @@ public class HeavyWeightSwitcherActivity extends Activity { requestWindowFeature(Window.FEATURE_NO_TITLE); mStartIntent = (IntentSender)getIntent().getParcelableExtra(KEY_INTENT); mActivityOptions = getIntent().getBundleExtra(KEY_ACTIVITY_OPTIONS); mHasResult = getIntent().getBooleanExtra(KEY_HAS_RESULT, false); mCurApp = getIntent().getStringExtra(KEY_CUR_APP); mCurTask = getIntent().getIntExtra(KEY_CUR_TASK, 0); Loading Loading @@ -148,9 +151,9 @@ public class HeavyWeightSwitcherActivity extends Activity { if (mHasResult) { startIntentSenderForResult(mStartIntent, -1, null, Intent.FLAG_ACTIVITY_FORWARD_RESULT, Intent.FLAG_ACTIVITY_FORWARD_RESULT, 0); Intent.FLAG_ACTIVITY_FORWARD_RESULT, 0, mActivityOptions); } else { startIntentSenderForResult(mStartIntent, -1, null, 0, 0, 0); startIntentSenderForResult(mStartIntent, -1, null, 0, 0, 0, mActivityOptions); } } catch (IntentSender.SendIntentException ex) { Log.w("HeavyWeightSwitcherActivity", "Failure starting", ex); Loading services/core/java/com/android/server/wm/ActivityStarter.java +5 −0 Original line number Diff line number Diff line Loading @@ -772,6 +772,11 @@ class ActivityStarter { newIntent.putExtra(HeavyWeightSwitcherActivity.KEY_HAS_RESULT, true); } newIntent.putExtra(HeavyWeightSwitcherActivity.KEY_INTENT, new IntentSender(target)); ActivityOptions options = mRequest.activityOptions.getOptions(mRequest.intent, mRequest.activityInfo, mService.getProcessController(mRequest.caller), mSupervisor); newIntent.putExtra(HeavyWeightSwitcherActivity.KEY_ACTIVITY_OPTIONS, options.toBundle()); heavy.updateIntentForHeavyWeightActivity(newIntent); newIntent.putExtra(HeavyWeightSwitcherActivity.KEY_NEW_APP, mRequest.activityInfo.packageName); Loading Loading
core/java/com/android/internal/app/HeavyWeightSwitcherActivity.java +6 −3 Original line number Diff line number Diff line Loading @@ -53,8 +53,10 @@ public class HeavyWeightSwitcherActivity extends Activity { public static final String KEY_CUR_TASK = "cur_task"; /** Package of newly requested heavy-weight app. */ public static final String KEY_NEW_APP = "new_app"; public static final String KEY_ACTIVITY_OPTIONS = "activity_options"; IntentSender mStartIntent; Bundle mActivityOptions; boolean mHasResult; String mCurApp; int mCurTask; Loading @@ -67,6 +69,7 @@ public class HeavyWeightSwitcherActivity extends Activity { requestWindowFeature(Window.FEATURE_NO_TITLE); mStartIntent = (IntentSender)getIntent().getParcelableExtra(KEY_INTENT); mActivityOptions = getIntent().getBundleExtra(KEY_ACTIVITY_OPTIONS); mHasResult = getIntent().getBooleanExtra(KEY_HAS_RESULT, false); mCurApp = getIntent().getStringExtra(KEY_CUR_APP); mCurTask = getIntent().getIntExtra(KEY_CUR_TASK, 0); Loading Loading @@ -148,9 +151,9 @@ public class HeavyWeightSwitcherActivity extends Activity { if (mHasResult) { startIntentSenderForResult(mStartIntent, -1, null, Intent.FLAG_ACTIVITY_FORWARD_RESULT, Intent.FLAG_ACTIVITY_FORWARD_RESULT, 0); Intent.FLAG_ACTIVITY_FORWARD_RESULT, 0, mActivityOptions); } else { startIntentSenderForResult(mStartIntent, -1, null, 0, 0, 0); startIntentSenderForResult(mStartIntent, -1, null, 0, 0, 0, mActivityOptions); } } catch (IntentSender.SendIntentException ex) { Log.w("HeavyWeightSwitcherActivity", "Failure starting", ex); Loading
services/core/java/com/android/server/wm/ActivityStarter.java +5 −0 Original line number Diff line number Diff line Loading @@ -772,6 +772,11 @@ class ActivityStarter { newIntent.putExtra(HeavyWeightSwitcherActivity.KEY_HAS_RESULT, true); } newIntent.putExtra(HeavyWeightSwitcherActivity.KEY_INTENT, new IntentSender(target)); ActivityOptions options = mRequest.activityOptions.getOptions(mRequest.intent, mRequest.activityInfo, mService.getProcessController(mRequest.caller), mSupervisor); newIntent.putExtra(HeavyWeightSwitcherActivity.KEY_ACTIVITY_OPTIONS, options.toBundle()); heavy.updateIntentForHeavyWeightActivity(newIntent); newIntent.putExtra(HeavyWeightSwitcherActivity.KEY_NEW_APP, mRequest.activityInfo.packageName); Loading