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

Commit 98003f87 authored by David Braun's avatar David Braun Committed by Android (Google) Code Review
Browse files

Merge "Do not attempt to configure null preferred activity" into klp-dev

parents 088822a2 d8fb3ddd
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -465,9 +465,11 @@ public final class SmsApplication {
            PackageManager packageManager = mContext.getPackageManager();
            // Ensure this component is still configured as the preferred activity
            ComponentName componentName = getDefaultSendToApplication(mContext, true);
            if (componentName != null) {
                configurePreferredActivity(packageManager, componentName);
            }
        }
    }

    public static void initSmsPackageMonitor(Context context) {
        sSmsPackageMonitor = new SmsPackageMonitor(context);
@@ -480,7 +482,8 @@ public final class SmsApplication {
        replacePreferredActivity(packageManager, componentName, SCHEME_SMS);
        replacePreferredActivity(packageManager, componentName, SCHEME_SMSTO);
        replacePreferredActivity(packageManager, componentName, SCHEME_MMS);
        replacePreferredActivity(packageManager, componentName, SCHEME_MMSTO);}
        replacePreferredActivity(packageManager, componentName, SCHEME_MMSTO);
    }

    /**
     * Updates the ACTION_SENDTO activity to the specified component for the specified scheme.