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

Commit 49f2385c authored by Yanting Yang's avatar Yanting Yang
Browse files

Fix NPE of UnrestrictedDataAccessPreference

Add null check for the DataUsageState to avoid NPE since it comes from
the extraInfo of AppEntry that possibly be null.

Fixes: 217250071
Test: manual
Change-Id: I1a41a49ed74bc6addc6b5dd0564973c210a6af74
parent a2781721
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ public class UnrestrictedDataAccessPreference extends AppSwitchPreference implem

    @Override
    protected void onClick() {
        if (mDataUsageState.isDataSaverDenylisted) {
        if (mDataUsageState != null && mDataUsageState.isDataSaverDenylisted) {
            // app is denylisted, launch App Data Usage screen
            AppInfoDashboardFragment.startAppInfoFragment(AppDataUsage.class,
                    R.string.data_usage_app_summary_title,