Fix NPE in InstantAppButtonsPreferenceController
- check for valid install options menu before trying to disable it. Change-Id: Ibe644a506094e66b0f657092a25557f5096d4942 Fixes: 73767192 Test: make RunSettingsRoboTests
This commit is contained in:
@@ -112,9 +112,10 @@ public class InstantAppButtonsPreferenceController extends BasePreferenceControl
|
||||
@Override
|
||||
public void onPrepareOptionsMenu(Menu menu) {
|
||||
mInstallMenu = menu.findItem(AppInfoDashboardFragment.INSTALL_INSTANT_APP_MENU);
|
||||
final Intent appStoreIntent = AppStoreUtil.getAppStoreLink(mContext, mPackageName);
|
||||
if (appStoreIntent == null) {
|
||||
mInstallMenu.setEnabled(false);
|
||||
if (mInstallMenu != null) {
|
||||
if (AppStoreUtil.getAppStoreLink(mContext, mPackageName) == null) {
|
||||
mInstallMenu.setEnabled(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user