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

Commit 8f2390cc authored by Chavi Weingarten's avatar Chavi Weingarten Committed by Automerger Merge Worker
Browse files

Merge "Use WindowInfosListener instead of SF reporting to IF" into sc-v2-dev am: ad802be8

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/14885200

Change-Id: Icadb25cac959a422da5f4f6662510fb1f85fe385
parents 470943fd ad802be8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -68,6 +68,7 @@ cc_library_static {
        "android/gui/FocusRequest.aidl",
        "android/gui/InputApplicationInfo.aidl",
        "android/gui/IWindowInfosListener.aidl",
        "android/gui/IWindowInfosReportedListener.aidl",
        "android/gui/WindowInfo.aidl",
        "WindowInfo.cpp",
    ],
+7 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@

namespace android {

using gui::IWindowInfosReportedListener;
using gui::WindowInfo;
using gui::WindowInfosListener;

@@ -64,7 +65,8 @@ status_t WindowInfosListenerReporter::removeWindowInfosListener(
}

binder::Status WindowInfosListenerReporter::onWindowInfosChanged(
        const std::vector<WindowInfo>& windowInfos) {
        const std::vector<WindowInfo>& windowInfos,
        const sp<IWindowInfosReportedListener>& windowInfosReportedListener) {
    std::unordered_set<sp<WindowInfosListener>, ISurfaceComposer::SpHash<WindowInfosListener>>
            windowInfosListeners;

@@ -79,6 +81,10 @@ binder::Status WindowInfosListenerReporter::onWindowInfosChanged(
        listener->onWindowInfosChanged(windowInfos);
    }

    if (windowInfosReportedListener) {
        windowInfosReportedListener->onWindowInfosReported();
    }

    return binder::Status::ok();
}

+2 −1
Original line number Diff line number Diff line
@@ -16,10 +16,11 @@

package android.gui;

import android.gui.IWindowInfosReportedListener;
import android.gui.WindowInfo;

/** @hide */
oneway interface IWindowInfosListener
{
    void onWindowInfosChanged(in WindowInfo[] windowInfos);
    void onWindowInfosChanged(in WindowInfo[] windowInfos, in @nullable IWindowInfosReportedListener windowInfosReportedListener);
}
+3 −3
Original line number Diff line number Diff line
@@ -14,10 +14,10 @@
 * limitations under the License.
 */

package android.os;
package android.gui;

/** @hide */
oneway interface ISetInputWindowsListener
oneway interface IWindowInfosReportedListener
{
    void onSetInputWindowsFinished();
    void onWindowInfosReported();
}
+3 −2
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#pragma once

#include <android/gui/BnWindowInfosListener.h>
#include <android/gui/IWindowInfosReportedListener.h>
#include <binder/IBinder.h>
#include <gui/ISurfaceComposer.h>
#include <gui/WindowInfosListener.h>
@@ -29,8 +30,8 @@ class ISurfaceComposer;
class WindowInfosListenerReporter : public gui::BnWindowInfosListener {
public:
    static sp<WindowInfosListenerReporter> getInstance();

    binder::Status onWindowInfosChanged(const std::vector<gui::WindowInfo>& windowInfos) override;
    binder::Status onWindowInfosChanged(const std::vector<gui::WindowInfo>& windowInfos,
                                        const sp<gui::IWindowInfosReportedListener>&) override;

    status_t addWindowInfosListener(const sp<gui::WindowInfosListener>& windowInfosListener,
                                    const sp<ISurfaceComposer>&);
Loading