Merge "Fix the NPE when input a wrong package" into sc-v2-dev am: baa58563bf am: 1568b185a5

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16115939

Change-Id: Ifddb7c09a8f0d3f6868ac60c1a935b586e2a5baa
This commit is contained in:
TreeHugger Robot
2021-10-26 03:57:36 +00:00
committed by Automerger Merge Worker

View File

@@ -105,6 +105,11 @@ public class AppLaunchSettings extends AppInfoBase implements
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (mAppEntry == null) {
Log.w(TAG, "onCreate: mAppEntry is null, please check the reason!!!");
getActivity().finish();
return;
}
addPreferencesFromResource(R.xml.installed_app_launch_settings);
mDomainVerificationManager = mContext.getSystemService(DomainVerificationManager.class);
initUIComponents();