Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b437cd9 authored by Sunny Shao's avatar Sunny Shao
Browse files

Fix the NPE when input a wrong package

- The mAppEntry is null when got a wrong package.

Bug: 201950262
Test: manual test
Change-Id: I582ec61d816e6f6c3332e4a21d86fb37f3a4354b
parent c1770fe4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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();