Fix NPE in onDestroy() when launched without args
The previous fix corrects startup, but crashes in onDestroy because of null value assumed to be initialized. Bug: 201719995 Test: adb shell am start com.android.systemui/.usb.UsbResolverActivity Change-Id: Ie255ece9e73db71cbb4468c59db6de79d8f659b5
This commit is contained in:
@@ -901,7 +901,8 @@ public class ResolverActivity extends Activity implements
|
||||
if (!isChangingConfigurations() && mPickOptionRequest != null) {
|
||||
mPickOptionRequest.cancel();
|
||||
}
|
||||
if (mMultiProfilePagerAdapter.getActiveListAdapter() != null) {
|
||||
if (mMultiProfilePagerAdapter != null
|
||||
&& mMultiProfilePagerAdapter.getActiveListAdapter() != null) {
|
||||
mMultiProfilePagerAdapter.getActiveListAdapter().onDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user