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

Commit 8c3d46fd authored by Jeff Chang's avatar Jeff Chang Committed by Automerger Merge Worker
Browse files

Merge "Handle the WatchRotation failed" into rvc-dev am: 8fdb8d4f am:...

Merge "Handle the WatchRotation failed" into rvc-dev am: 8fdb8d4f am: c4a99abf am: c9ba78af am: 03c30c98

Change-Id: I2c1433f8dc5e6573c80bc915c0c992b775e53376
parents b8cba999 03c30c98
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import android.os.Handler;
import android.os.Looper;
import android.os.RemoteException;
import android.provider.Settings;
import android.util.Log;
import android.view.IRotationWatcher.Stub;
import android.view.MotionEvent;
import android.view.Surface;
@@ -54,6 +55,7 @@ import java.util.function.Consumer;
/** Contains logic that deals with showing a rotate suggestion button with animation. */
public class RotationButtonController {

    private static final String TAG = "StatusBar/RotationButtonController";
    private static final int BUTTON_FADE_IN_OUT_DURATION_MS = 100;
    private static final int NAVBAR_HIDDEN_PENDING_ICON_TIMEOUT_MS = 20000;

@@ -139,6 +141,9 @@ public class RotationButtonController {
        try {
            WindowManagerGlobal.getWindowManagerService()
                    .watchRotation(mRotationWatcher, mContext.getDisplay().getDisplayId());
        } catch (IllegalArgumentException e) {
            mListenersRegistered = false;
            Log.w(TAG, "RegisterListeners for the display failed");
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }