Make MobileNetworkActivity support onNewIntent
The launchMode for MobileNetworkActivity specified in the android manifest is "singleTask", which means that when an intent to it is launched, if there is an existing instance we will reuse that instead of creating a new one. But to handle this properly we need to know when it happens by implementing onNewIntent, which we weren't doing. Implementing this fixes a bug we noticed that if you have multiple SIMs and recently visit the details page for SIM 1 but then click on a SIM selection notification that should bring you to the details for SIM 2, we'd just bring up the details page for SIM 1 again. Fixes: 133447239 Test: make RunSettingsRoboTests Change-Id: Ia9106b15ffde437f6dd6fd2da23336ec5b28f75e
This commit is contained in:
@@ -76,6 +76,13 @@ public class MobileNetworkActivity extends SettingsBaseActivity {
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
protected void onNewIntent(Intent intent) {
|
||||
super.onNewIntent(intent);
|
||||
setIntent(intent);
|
||||
updateSubscriptions(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
Reference in New Issue
Block a user