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 <adaim@meta.com>
This commit is contained in:
Abdelrahman Daim
2024-09-24 12:21:22 -07:00
parent feee29caf8
commit 3be2314fac

View File

@@ -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();
}
}