From 3be2314facce486b5698f23fb7a02deed8ec192c Mon Sep 17 00:00:00 2001 From: Abdelrahman Daim Date: Tue, 24 Sep 2024 12:21:22 -0700 Subject: [PATCH] Add a check to ensure that intent data is available before proceeding. Summary: There are instances where intent data is absent, leading to a crash while trying to retrieve the schema. This change adds a null check to prevent attempted access when there's no data. Test: Successful Build on master branch Change-Id: Ie83bd3243f2c79102061d3fa43d809b3ef3c6c78 Signed-off-by: Abdelrahman Daim --- .../settings/applications/appinfo/AppInfoDashboardFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java b/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java index 90d733e6fe1..1712e85259c 100644 --- a/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java +++ b/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java @@ -715,7 +715,7 @@ public class AppInfoDashboardFragment extends DashboardFragment if (mPackageName == null) { final Intent intent = args == null ? getActivity().getIntent() : (Intent) args.getParcelable("intent"); - if (intent != null) { + if (intent != null && intent.getData() != null) { mPackageName = intent.getData().getSchemeSpecificPart(); } }