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

Commit 8123deb2 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Settings: Fix Diagnostics setting crash issue."

parents bc5c5137 6bf70fdc
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -298,6 +298,15 @@ public class PrivacySettings extends SettingsPreferenceFragment implements Index
    }

    private static boolean collectDiagnosticsEnabled(Context context) {
        return context.getResources().getBoolean(R.bool.config_collect_diagnostics_enabled);
        if (!context.getResources().getBoolean(R.bool.config_collect_diagnostics_enabled)) {
            return false;
        }

        try {
            return context.getPackageManager().getPackageInfo(
                    "com.tmobile.pr.mytmobile", 0) != null;
        } catch(PackageManager.NameNotFoundException e) {
            return false;
        }
    }
}