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

Commit 26d8cb38 authored by Peter Wang's avatar Peter Wang
Browse files

Remove WindowManager references in Stk

Bug: 65884891
Bug: 143536562
Change-Id: Iaeb07569534a501b66f381f68c6341270529231b
Fix: 143536562
Test: Build
parent 70156bd8
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -557,12 +557,6 @@ interface IWindowManager
     */
    boolean isWindowTraceEnabled();

    /**
     * Requests that the WindowManager sends
     * WindowManagerPolicyConstants#ACTION_USER_ACTIVITY_NOTIFICATION on the next user activity.
     */
    void requestUserActivityNotification();

    /**
     * Notify WindowManager that it should not override the info in DisplayManager for the specified
     * display. This can disable letter- or pillar-boxing applied in DisplayManager when the metrics
+0 −6
Original line number Diff line number Diff line
@@ -65,12 +65,6 @@ public interface WindowManagerPolicyConstants {
    String NAV_BAR_MODE_2BUTTON_OVERLAY = "com.android.internal.systemui.navbar.twobutton";
    String NAV_BAR_MODE_GESTURAL_OVERLAY = "com.android.internal.systemui.navbar.gestural";

    /**
     * Broadcast sent when a user activity is detected.
     */
    String ACTION_USER_ACTIVITY_NOTIFICATION =
            "android.intent.action.USER_ACTIVITY_NOTIFICATION";

    /**
     * Sticky broadcast of the current HDMI plugged state.
     */
+0 −1
Original line number Diff line number Diff line
@@ -94,7 +94,6 @@
    <protected-broadcast android:name="android.intent.action.OVERLAY_CHANGED" />
    <protected-broadcast android:name="android.intent.action.OVERLAY_REMOVED" />
    <protected-broadcast android:name="android.intent.action.OVERLAY_PRIORITY_CHANGED" />
    <protected-broadcast android:name="android.intent.action.USER_ACTIVITY_NOTIFICATION" />
    <protected-broadcast android:name="android.intent.action.MY_PACKAGE_SUSPENDED" />
    <protected-broadcast android:name="android.intent.action.MY_PACKAGE_UNSUSPENDED" />

+1 −25
Original line number Diff line number Diff line
@@ -333,8 +333,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                KeyEvent.KEYCODE_CALCULATOR, Intent.CATEGORY_APP_CALCULATOR);
    }

    private static final int USER_ACTIVITY_NOTIFICATION_DELAY = 200;

    /** Amount of time (in milliseconds) to wait for windows drawn before powering on. */
    static final int WAITING_FOR_DRAWN_TIMEOUT = 1000;

@@ -487,7 +485,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {

    private boolean mPendingKeyguardOccluded;
    private boolean mKeyguardOccludedChanged;
    private boolean mNotifyUserActivity;

    SleepToken mScreenOffSleepToken;
    volatile boolean mKeyguardOccluded;
@@ -627,8 +624,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
    private static final int MSG_LAUNCH_ASSIST = 23;
    private static final int MSG_LAUNCH_ASSIST_LONG_PRESS = 24;
    private static final int MSG_POWER_VERY_LONG_PRESS = 25;
    private static final int MSG_NOTIFY_USER_ACTIVITY = 26;
    private static final int MSG_RINGER_TOGGLE_CHORD = 27;
    private static final int MSG_RINGER_TOGGLE_CHORD = 26;

    private class PolicyHandler extends Handler {
        @Override
@@ -708,13 +704,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                case MSG_HANDLE_ALL_APPS:
                    launchAllAppsAction();
                    break;
                case MSG_NOTIFY_USER_ACTIVITY:
                    removeMessages(MSG_NOTIFY_USER_ACTIVITY);
                    Intent intent = new Intent(ACTION_USER_ACTIVITY_NOTIFICATION);
                    intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
                    mContext.sendBroadcastAsUser(intent, UserHandle.ALL,
                            android.Manifest.permission.USER_ACTIVITY);
                    break;
                case MSG_RINGER_TOGGLE_CHORD:
                    handleRingerChordGesture();
                    break;
@@ -4892,13 +4881,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        mHandler.sendEmptyMessage(MSG_HIDE_BOOT_MESSAGE);
    }

    @Override
    public void requestUserActivityNotification() {
        if (!mNotifyUserActivity && !mHandler.hasMessages(MSG_NOTIFY_USER_ACTIVITY)) {
            mNotifyUserActivity = true;
        }
    }

    /** {@inheritDoc} */
    @Override
    public void userActivity() {
@@ -4920,12 +4902,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                mHandler.postDelayed(mScreenLockTimeout, mLockScreenTimeout);
            }
        }

        if (mDefaultDisplayPolicy.isAwake() && mNotifyUserActivity) {
            mHandler.sendEmptyMessageDelayed(MSG_NOTIFY_USER_ACTIVITY,
                    USER_ACTIVITY_NOTIFICATION_DELAY);
            mNotifyUserActivity = false;
        }
    }

    class ScreenLockTimeout implements Runnable {
+0 −6
Original line number Diff line number Diff line
@@ -1437,12 +1437,6 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants {
        }
    }

    /**
     * Requests that the WindowManager sends
     * WindowManagerPolicyConstants#ACTION_USER_ACTIVITY_NOTIFICATION on the next user activity.
     */
    public void requestUserActivityNotification();

    /**
     * Registers an IDisplayFoldListener.
     */
Loading