Loading core/java/android/app/Activity.java +19 −3 Original line number Diff line number Diff line Loading @@ -766,9 +766,19 @@ public class Activity extends ContextThemeWrapper private static final String REQUEST_PERMISSIONS_WHO_PREFIX = "@android:requestPermissions:"; private static final String AUTO_FILL_AUTH_WHO_PREFIX = "@android:autoFillAuth:"; private static final String KEYBOARD_SHORTCUTS_RECEIVER_PKG_NAME = "com.android.systemui"; private static final int LOG_AM_ON_CREATE_CALLED = 30057; private static final int LOG_AM_ON_START_CALLED = 30059; private static final int LOG_AM_ON_RESUME_CALLED = 30022; private static final int LOG_AM_ON_PAUSE_CALLED = 30021; private static final int LOG_AM_ON_STOP_CALLED = 30049; private static final int LOG_AM_ON_RESTART_CALLED = 30058; private static final int LOG_AM_ON_DESTROY_CALLED = 30060; private static final int LOG_AM_ON_ACTIVITY_RESULT_CALLED = 30062; private static final int LOG_AM_ON_TOP_RESUMED_GAINED_CALLED = 30064; private static final int LOG_AM_ON_TOP_RESUMED_LOST_CALLED = 30065; private static class ManagedDialog { Dialog mDialog; Bundle mArgs; Loading Loading @@ -2439,8 +2449,11 @@ public class Activity extends ContextThemeWrapper * {@link #onProvideKeyboardShortcuts} to retrieve the shortcuts for the foreground activity. */ public final void requestShowKeyboardShortcuts() { final ComponentName sysuiComponent = ComponentName.unflattenFromString( getResources().getString( com.android.internal.R.string.config_systemUIServiceComponent)); Intent intent = new Intent(Intent.ACTION_SHOW_KEYBOARD_SHORTCUTS); intent.setPackage(KEYBOARD_SHORTCUTS_RECEIVER_PKG_NAME); intent.setPackage(sysuiComponent.getPackageName()); sendBroadcastAsUser(intent, Process.myUserHandle()); } Loading @@ -2448,8 +2461,11 @@ public class Activity extends ContextThemeWrapper * Dismiss the Keyboard Shortcuts screen. */ public final void dismissKeyboardShortcutsHelper() { final ComponentName sysuiComponent = ComponentName.unflattenFromString( getResources().getString( com.android.internal.R.string.config_systemUIServiceComponent)); Intent intent = new Intent(Intent.ACTION_DISMISS_KEYBOARD_SHORTCUTS); intent.setPackage(KEYBOARD_SHORTCUTS_RECEIVER_PKG_NAME); intent.setPackage(sysuiComponent.getPackageName()); sendBroadcastAsUser(intent, Process.myUserHandle()); } Loading core/java/android/app/slice/SliceProvider.java +2 −2 Original line number Diff line number Diff line Loading @@ -515,8 +515,8 @@ public abstract class SliceProvider extends ContentProvider { public static PendingIntent createPermissionIntent(Context context, Uri sliceUri, String callingPackage) { Intent intent = new Intent(SliceManager.ACTION_REQUEST_SLICE_PERMISSION); intent.setComponent(new ComponentName("com.android.systemui", "com.android.systemui.SlicePermissionActivity")); intent.setComponent(ComponentName.unflattenFromString(context.getResources().getString( com.android.internal.R.string.config_slicePermissionComponent))); intent.putExtra(EXTRA_BIND_URI, sliceUri); intent.putExtra(EXTRA_PKG, callingPackage); intent.putExtra(EXTRA_PROVIDER_PKG, context.getPackageName()); Loading core/java/android/service/dreams/Sandman.java +4 −7 Original line number Diff line number Diff line Loading @@ -36,12 +36,6 @@ import android.util.Slog; public final class Sandman { private static final String TAG = "Sandman"; // The component name of a special dock app that merely launches a dream. // We don't want to launch this app when docked because it causes an unnecessary // activity transition. We just want to start the dream. private static final ComponentName SOMNAMBULATOR_COMPONENT = new ComponentName("com.android.systemui", "com.android.systemui.Somnambulator"); // The sandman is eternal. No one instantiates him. private Sandman() { Loading @@ -52,8 +46,11 @@ public final class Sandman { * False if we should dream instead, if appropriate. */ public static boolean shouldStartDockApp(Context context, Intent intent) { final ComponentName somnambulatorComponent = ComponentName.unflattenFromString( context.getResources().getString( com.android.internal.R.string.config_somnambulatorComponent)); ComponentName name = intent.resolveActivity(context.getPackageManager()); return name != null && !name.equals(SOMNAMBULATOR_COMPONENT); return name != null && !name.equals(somnambulatorComponent); } /** Loading core/java/android/service/quicksettings/TileService.java +4 −1 Original line number Diff line number Diff line Loading @@ -481,9 +481,12 @@ public class TileService extends Service { * as true on their TileService Manifest declaration, and will do nothing otherwise. */ public static final void requestListeningState(Context context, ComponentName component) { final ComponentName sysuiComponent = ComponentName.unflattenFromString( context.getResources().getString( com.android.internal.R.string.config_systemUIServiceComponent)); Intent intent = new Intent(ACTION_REQUEST_LISTENING); intent.putExtra(Intent.EXTRA_COMPONENT_NAME, component); intent.setPackage("com.android.systemui"); intent.setPackage(sysuiComponent.getPackageName()); context.sendBroadcast(intent, Manifest.permission.BIND_QUICK_SETTINGS_TILE); } } core/java/com/android/internal/util/ScreenRecordHelper.java +3 −6 Original line number Diff line number Diff line Loading @@ -24,10 +24,6 @@ import android.content.Intent; * Helper class to initiate a screen recording */ public class ScreenRecordHelper { private static final String SYSUI_PACKAGE = "com.android.systemui"; private static final String SYSUI_SCREENRECORD_LAUNCHER = "com.android.systemui.screenrecord.ScreenRecordDialog"; private final Context mContext; /** Loading @@ -42,8 +38,9 @@ public class ScreenRecordHelper { * Show dialog of screen recording options to user. */ public void launchRecordPrompt() { final ComponentName launcherComponent = new ComponentName(SYSUI_PACKAGE, SYSUI_SCREENRECORD_LAUNCHER); final ComponentName launcherComponent = ComponentName.unflattenFromString( mContext.getResources().getString( com.android.internal.R.string.config_screenRecorderComponent)); final Intent intent = new Intent(); intent.setComponent(launcherComponent); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); Loading Loading
core/java/android/app/Activity.java +19 −3 Original line number Diff line number Diff line Loading @@ -766,9 +766,19 @@ public class Activity extends ContextThemeWrapper private static final String REQUEST_PERMISSIONS_WHO_PREFIX = "@android:requestPermissions:"; private static final String AUTO_FILL_AUTH_WHO_PREFIX = "@android:autoFillAuth:"; private static final String KEYBOARD_SHORTCUTS_RECEIVER_PKG_NAME = "com.android.systemui"; private static final int LOG_AM_ON_CREATE_CALLED = 30057; private static final int LOG_AM_ON_START_CALLED = 30059; private static final int LOG_AM_ON_RESUME_CALLED = 30022; private static final int LOG_AM_ON_PAUSE_CALLED = 30021; private static final int LOG_AM_ON_STOP_CALLED = 30049; private static final int LOG_AM_ON_RESTART_CALLED = 30058; private static final int LOG_AM_ON_DESTROY_CALLED = 30060; private static final int LOG_AM_ON_ACTIVITY_RESULT_CALLED = 30062; private static final int LOG_AM_ON_TOP_RESUMED_GAINED_CALLED = 30064; private static final int LOG_AM_ON_TOP_RESUMED_LOST_CALLED = 30065; private static class ManagedDialog { Dialog mDialog; Bundle mArgs; Loading Loading @@ -2439,8 +2449,11 @@ public class Activity extends ContextThemeWrapper * {@link #onProvideKeyboardShortcuts} to retrieve the shortcuts for the foreground activity. */ public final void requestShowKeyboardShortcuts() { final ComponentName sysuiComponent = ComponentName.unflattenFromString( getResources().getString( com.android.internal.R.string.config_systemUIServiceComponent)); Intent intent = new Intent(Intent.ACTION_SHOW_KEYBOARD_SHORTCUTS); intent.setPackage(KEYBOARD_SHORTCUTS_RECEIVER_PKG_NAME); intent.setPackage(sysuiComponent.getPackageName()); sendBroadcastAsUser(intent, Process.myUserHandle()); } Loading @@ -2448,8 +2461,11 @@ public class Activity extends ContextThemeWrapper * Dismiss the Keyboard Shortcuts screen. */ public final void dismissKeyboardShortcutsHelper() { final ComponentName sysuiComponent = ComponentName.unflattenFromString( getResources().getString( com.android.internal.R.string.config_systemUIServiceComponent)); Intent intent = new Intent(Intent.ACTION_DISMISS_KEYBOARD_SHORTCUTS); intent.setPackage(KEYBOARD_SHORTCUTS_RECEIVER_PKG_NAME); intent.setPackage(sysuiComponent.getPackageName()); sendBroadcastAsUser(intent, Process.myUserHandle()); } Loading
core/java/android/app/slice/SliceProvider.java +2 −2 Original line number Diff line number Diff line Loading @@ -515,8 +515,8 @@ public abstract class SliceProvider extends ContentProvider { public static PendingIntent createPermissionIntent(Context context, Uri sliceUri, String callingPackage) { Intent intent = new Intent(SliceManager.ACTION_REQUEST_SLICE_PERMISSION); intent.setComponent(new ComponentName("com.android.systemui", "com.android.systemui.SlicePermissionActivity")); intent.setComponent(ComponentName.unflattenFromString(context.getResources().getString( com.android.internal.R.string.config_slicePermissionComponent))); intent.putExtra(EXTRA_BIND_URI, sliceUri); intent.putExtra(EXTRA_PKG, callingPackage); intent.putExtra(EXTRA_PROVIDER_PKG, context.getPackageName()); Loading
core/java/android/service/dreams/Sandman.java +4 −7 Original line number Diff line number Diff line Loading @@ -36,12 +36,6 @@ import android.util.Slog; public final class Sandman { private static final String TAG = "Sandman"; // The component name of a special dock app that merely launches a dream. // We don't want to launch this app when docked because it causes an unnecessary // activity transition. We just want to start the dream. private static final ComponentName SOMNAMBULATOR_COMPONENT = new ComponentName("com.android.systemui", "com.android.systemui.Somnambulator"); // The sandman is eternal. No one instantiates him. private Sandman() { Loading @@ -52,8 +46,11 @@ public final class Sandman { * False if we should dream instead, if appropriate. */ public static boolean shouldStartDockApp(Context context, Intent intent) { final ComponentName somnambulatorComponent = ComponentName.unflattenFromString( context.getResources().getString( com.android.internal.R.string.config_somnambulatorComponent)); ComponentName name = intent.resolveActivity(context.getPackageManager()); return name != null && !name.equals(SOMNAMBULATOR_COMPONENT); return name != null && !name.equals(somnambulatorComponent); } /** Loading
core/java/android/service/quicksettings/TileService.java +4 −1 Original line number Diff line number Diff line Loading @@ -481,9 +481,12 @@ public class TileService extends Service { * as true on their TileService Manifest declaration, and will do nothing otherwise. */ public static final void requestListeningState(Context context, ComponentName component) { final ComponentName sysuiComponent = ComponentName.unflattenFromString( context.getResources().getString( com.android.internal.R.string.config_systemUIServiceComponent)); Intent intent = new Intent(ACTION_REQUEST_LISTENING); intent.putExtra(Intent.EXTRA_COMPONENT_NAME, component); intent.setPackage("com.android.systemui"); intent.setPackage(sysuiComponent.getPackageName()); context.sendBroadcast(intent, Manifest.permission.BIND_QUICK_SETTINGS_TILE); } }
core/java/com/android/internal/util/ScreenRecordHelper.java +3 −6 Original line number Diff line number Diff line Loading @@ -24,10 +24,6 @@ import android.content.Intent; * Helper class to initiate a screen recording */ public class ScreenRecordHelper { private static final String SYSUI_PACKAGE = "com.android.systemui"; private static final String SYSUI_SCREENRECORD_LAUNCHER = "com.android.systemui.screenrecord.ScreenRecordDialog"; private final Context mContext; /** Loading @@ -42,8 +38,9 @@ public class ScreenRecordHelper { * Show dialog of screen recording options to user. */ public void launchRecordPrompt() { final ComponentName launcherComponent = new ComponentName(SYSUI_PACKAGE, SYSUI_SCREENRECORD_LAUNCHER); final ComponentName launcherComponent = ComponentName.unflattenFromString( mContext.getResources().getString( com.android.internal.R.string.config_screenRecorderComponent)); final Intent intent = new Intent(); intent.setComponent(launcherComponent); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); Loading