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

Commit 2cfe388e authored by Stefan Andonian's avatar Stefan Andonian
Browse files

Make all the SystemUiProxy APIs Oneway.

Do this to background ANR produced by "SystemUiProxy.setHomeRotationEnabled"

Bug: 251502424
Test: Verified this works on device without crashing anything.
Change-Id: Ia93e175a8c1b2eb5440fa934d12bd06d6b431a13
parent 691b6c29
Loading
Loading
Loading
Loading
+16 −16
Original line number Diff line number Diff line
@@ -34,12 +34,12 @@ interface ISystemUiProxy {
    /**
     * Begins screen pinning on the provided {@param taskId}.
     */
    void startScreenPinning(int taskId) = 1;
    oneway void startScreenPinning(int taskId) = 1;

    /**
     * Notifies SystemUI that Overview is shown.
     */
    void onOverviewShown(boolean fromHome) = 6;
    oneway void onOverviewShown(boolean fromHome) = 6;

    /**
     * Proxies motion events from the homescreen UI to the status bar. Only called when
@@ -48,57 +48,57 @@ interface ISystemUiProxy {
     *
     * Normal gesture: DOWN, MOVE/POINTER_DOWN/POINTER_UP)*, UP or CANCLE
     */
    void onStatusBarMotionEvent(in MotionEvent event) = 9;
    oneway void onStatusBarMotionEvent(in MotionEvent event) = 9;

    /**
     * Proxies the assistant gesture's progress started from navigation bar.
     */
    void onAssistantProgress(float progress) = 12;
    oneway void onAssistantProgress(float progress) = 12;

    /**
    * Proxies the assistant gesture fling velocity (in pixels per millisecond) upon completion.
    * Velocity is 0 for drag gestures.
    */
    void onAssistantGestureCompletion(float velocity) = 18;
    oneway void onAssistantGestureCompletion(float velocity) = 18;

    /**
     * Start the assistant.
     */
    void startAssistant(in Bundle bundle) = 13;
    oneway void startAssistant(in Bundle bundle) = 13;

    /**
     * Notifies that the accessibility button in the system's navigation area has been clicked
     */
    void notifyAccessibilityButtonClicked(int displayId) = 15;
    oneway void notifyAccessibilityButtonClicked(int displayId) = 15;

    /**
     * Notifies that the accessibility button in the system's navigation area has been long clicked
     */
    void notifyAccessibilityButtonLongClicked() = 16;
    oneway void notifyAccessibilityButtonLongClicked() = 16;

    /**
     * Ends the system screen pinning.
     */
    void stopScreenPinning() = 17;
    oneway void stopScreenPinning() = 17;

    /**
     * Notifies that quickstep will switch to a new task
     * @param rotation indicates which Surface.Rotation the gesture was started in
     */
    void notifyPrioritizedRotation(int rotation) = 25;
    oneway void notifyPrioritizedRotation(int rotation) = 25;

    /**
     * Notifies to expand notification panel.
     */
    void expandNotificationPanel() = 29;
    oneway void expandNotificationPanel() = 29;

    /**
     * Notifies SystemUI to invoke Back.
     */
    void onBackPressed() = 44;
    oneway void onBackPressed() = 44;

    /** Sets home rotation enabled. */
    void setHomeRotationEnabled(boolean enabled) = 45;
    oneway void setHomeRotationEnabled(boolean enabled) = 45;

    /** Notifies when taskbar status updated */
    oneway void notifyTaskbarStatus(boolean visible, boolean stashed) = 47;
@@ -113,17 +113,17 @@ interface ISystemUiProxy {
    /**
     * Notifies SystemUI to invoke IME Switcher.
     */
    void onImeSwitcherPressed() = 49;
    oneway void onImeSwitcherPressed() = 49;

    /**
     * Notifies to toggle notification panel.
     */
    void toggleNotificationPanel() = 50;
    oneway void toggleNotificationPanel() = 50;

    /**
     * Handle the screenshot request.
     */
    void takeScreenshot(in ScreenshotRequest request) = 51;
    oneway void takeScreenshot(in ScreenshotRequest request) = 51;

    // Next id = 52
}
+1 −1
Original line number Diff line number Diff line
@@ -2021,7 +2021,7 @@ public class LauncherAppsService extends SystemService {
                        }
                        // Each launcher has a different set of pinned shortcuts, so we need to do a
                        // query in here.
                        // (As of now, only one launcher has the permission at a time, so it's bit
                        // (As of now, only one launcher has the permission at a time, so it's a bit
                        // moot, but we may change the permission model eventually.)
                        final List<ShortcutInfo> list =
                                mShortcutServiceInternal.getShortcuts(launcherUserId,