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

Commit 2f035a6b authored by tonyzhu's avatar tonyzhu Committed by android-build-merger
Browse files

Fix null exception. am: 8c21679b

am: f45933a1

Change-Id: I7adb28c873de503cc02c8724c13d911ff711e1e5
parents d965cf97 f45933a1
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -81,11 +81,14 @@ public class AppUninstallBroadcastReceiver extends BroadcastReceiver {
    }

    private void handleUninstallOfCallScreeningService(Context context, String packageName) {
        ComponentName componentName = null;
        String defaultCallScreeningApp = Settings.Secure
            .getStringForUser(context.getContentResolver(),
                Settings.Secure.CALL_SCREENING_DEFAULT_COMPONENT, UserHandle.USER_CURRENT);

        ComponentName componentName = ComponentName.unflattenFromString(defaultCallScreeningApp);
        if (defaultCallScreeningApp != null) {
            componentName = ComponentName.unflattenFromString(defaultCallScreeningApp);
        }

        if (componentName != null && componentName.getPackageName().equals(packageName)) {
            Settings.Secure.putStringForUser(context.getContentResolver(),