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

Commit e23a4c13 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Stop using notification for IME switcher

InputMethodManagerService has had logic to show notifications when the
IME switcher icon cannot be shown on NavigationBar[1][2][3][4][5].

With this CL, such a fallback behavior is completely removed.  Devices
and form-factors that need a special handling need to come up with
their own solution rather than relying on this historical notification
mechanism.

 [1]: I2b9e955003c1f6703978824c947d5f322a039714
      7cfc0ed2
 [2]: Id36c8c34159bea8b72557b40bcf024d401f580b6
      01065a57
 [3]: I34a95732ef3e7c20d6549b57230c11f0c3db04d6
      d4b62599
 [4]: I58421143bee25be459f4f744688b37614a750051
      f62c0b83
 [5]: I6ad818fc9ef08991e24c5020498243f1fc417998
      24ab9e18

Bug: 245989733
Test: atest CtsPermission2TestCases:ProtectedBroadcastsTest
Test: presubmit
Change-Id: I3b09d2b05ba9bde686b360b9f720b5d4258551c3
parent cd4d015a
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -35,7 +35,10 @@ import java.util.List;

// Manages the NotificationChannels used by the frameworks itself.
public class SystemNotificationChannels {
    public static String VIRTUAL_KEYBOARD  = "VIRTUAL_KEYBOARD";
    /**
     * @deprecated Legacy system channel, which is no longer used,
     */
    @Deprecated public static String VIRTUAL_KEYBOARD  = "VIRTUAL_KEYBOARD";
    public static String PHYSICAL_KEYBOARD = "PHYSICAL_KEYBOARD";
    public static String SECURITY = "SECURITY";
    public static String CAR_MODE = "CAR_MODE";
@@ -72,13 +75,6 @@ public class SystemNotificationChannels {
    public static void createAll(Context context) {
        final NotificationManager nm = context.getSystemService(NotificationManager.class);
        List<NotificationChannel> channelsList = new ArrayList<NotificationChannel>();
        final NotificationChannel keyboard = new NotificationChannel(
                VIRTUAL_KEYBOARD,
                context.getString(R.string.notification_channel_virtual_keyboard),
                NotificationManager.IMPORTANCE_LOW);
        keyboard.setBlockable(true);
        channelsList.add(keyboard);

        final NotificationChannel physicalKeyboardChannel = new NotificationChannel(
                PHYSICAL_KEYBOARD,
                context.getString(R.string.notification_channel_physical_keyboard),
@@ -237,6 +233,7 @@ public class SystemNotificationChannels {
    /** Remove notification channels which are no longer used */
    public static void removeDeprecated(Context context) {
        final NotificationManager nm = context.getSystemService(NotificationManager.class);
        nm.deleteNotificationChannel(VIRTUAL_KEYBOARD);
        nm.deleteNotificationChannel(DEVICE_ADMIN_DEPRECATED);
        nm.deleteNotificationChannel(SYSTEM_CHANGES_DEPRECATED);
    }
+0 −1
Original line number Diff line number Diff line
@@ -668,7 +668,6 @@
    <protected-broadcast android:name="android.media.tv.action.PREVIEW_PROGRAM_BROWSABLE_DISABLED" />
    <protected-broadcast android:name="android.media.tv.action.WATCH_NEXT_PROGRAM_BROWSABLE_DISABLED" />
    <protected-broadcast android:name="android.media.tv.action.CHANNEL_BROWSABLE_REQUESTED" />
    <protected-broadcast android:name="com.android.server.inputmethod.InputMethodManagerService.SHOW_INPUT_METHOD_PICKER" />

    <!-- Time zone rules update intents fired by the system server -->
    <protected-broadcast android:name="com.android.intent.action.timezone.RULES_UPDATE_OPERATION" />
−755 B
Loading image diff...
−642 B
Loading image diff...
−1012 B
Loading image diff...
Loading