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

Commit 8c21679b authored by tonyzhu's avatar tonyzhu
Browse files

Fix null exception.

Block test, need to be fixed soon.

Test: build pass.
Change-Id: If833dbaf1e193d3819eeb5cd86e9f3c94af0b22c
parent 8ba94c5d
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(),