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

Commit be380be6 authored by Prabir Pradhan's avatar Prabir Pradhan
Browse files

Remove focus change callbacks from IWindow

Since window focus changes are dispatched by InputDispatcher, remove
focus change callbacks from IWindow so that WM cannot dispatch focus
changes without going through InputDispatcher.

Bug: None
Test: presubmit
Change-Id: Idff4c18084f35febf2bb6e5622b7e987130e8c76
parent 38ddd45e
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -94,12 +94,6 @@ oneway interface IWindow {
    void dispatchAppVisibility(boolean visible);
    void dispatchGetNewSurface();

    /**
     * Tell the window that it is either gaining or losing focus.  Keep it up
     * to date on the current state showing navigational focus too.
     */
    void windowFocusChanged(boolean hasFocus);

    void closeSystemDialogs(String reason);

    /**
+0 −8
Original line number Diff line number Diff line
@@ -9740,14 +9740,6 @@ public final class ViewRootImpl implements ViewParent,
            }
        }

        @Override
        public void windowFocusChanged(boolean hasFocus) {
            final ViewRootImpl viewAncestor = mViewAncestor.get();
            if (viewAncestor != null) {
                viewAncestor.windowFocusChanged(hasFocus);
            }
        }

        private static int checkCallingPermission(String permission) {
            try {
                return ActivityManager.getService().checkPermission(
+0 −4
Original line number Diff line number Diff line
@@ -89,10 +89,6 @@ public class BaseIWindow extends IWindow.Stub {
    public void dispatchGetNewSurface() {
    }

    @Override
    public void windowFocusChanged(boolean hasFocus) {
    }

    @Override
    public void executeCommand(String command, String parameters, ParcelFileDescriptor out) {
        if (out != null) {
+0 −3
Original line number Diff line number Diff line
@@ -355,9 +355,6 @@ public class SystemWindows {
        @Override
        public void dispatchGetNewSurface() {}

        @Override
        public void windowFocusChanged(boolean hasFocus) {}

        @Override
        public void executeCommand(String command, String parameters, ParcelFileDescriptor out) {}

+0 −4
Original line number Diff line number Diff line
@@ -68,10 +68,6 @@ public class TestIWindow extends IWindow.Stub {
    public void dispatchGetNewSurface() throws RemoteException {
    }

    @Override
    public void windowFocusChanged(boolean hasFocus) throws RemoteException {
    }

    @Override
    public void closeSystemDialogs(String reason) throws RemoteException {
    }