diff options
Diffstat (limited to 'java/com/android/dialer/main/impl/MainImpl.java')
-rw-r--r-- | java/com/android/dialer/main/impl/MainImpl.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/java/com/android/dialer/main/impl/MainImpl.java b/java/com/android/dialer/main/impl/MainImpl.java index e6d9a43ef..1cd457c8a 100644 --- a/java/com/android/dialer/main/impl/MainImpl.java +++ b/java/com/android/dialer/main/impl/MainImpl.java @@ -66,6 +66,16 @@ final class MainImpl implements Main { PackageManager.DONT_KILL_APP); } + @Override + public void disableComponentForTesting(Context context) { + context + .getPackageManager() + .setComponentEnabledSetting( + new ComponentName(context, MainActivity.class), + PackageManager.COMPONENT_ENABLED_STATE_DISABLED, + PackageManager.DONT_KILL_APP); + } + @TargetApi(VERSION_CODES.O) private static void createLauncherShortcutO(Context context) { ShortcutInfoCompat shortcutInfo = |