[automerger skipped] Merge "Add AppOps overload to be able to watch foreground changes." into sc-dev am: 001bb2fb5c am: 9fad56cb33 am: 3f8ed18125 -s ours am: f7f5abfbb7 -s ours am: 6f0810ee9f -s ours am: b1ec172783 -s ours am: 76f52fb62b -s ours

am skip reason: Merged-In I89af46de557fbfc31d69613367a4e26a5222430a with SHA-1 83d1c72376 is already in history

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

Change-Id: Ifa6c0fd51ec027e0ecdc50231e9d0956437d79ea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/libs/gui/Android.bp b/libs/gui/Android.bp
index 3c8df2b..a45e8c5 100644
--- a/libs/gui/Android.bp
+++ b/libs/gui/Android.bp
@@ -131,13 +131,25 @@
     },
 }
 
-filegroup {
+aidl_library {
+    name: "libgui_aidl_hdrs",
+    hdrs: [
+        "android/gui/DisplayInfo.aidl",
+        "android/gui/FocusRequest.aidl",
+        "android/gui/InputApplicationInfo.aidl",
+        "android/gui/IWindowInfosListener.aidl",
+        "android/gui/IWindowInfosPublisher.aidl",
+        "android/gui/IWindowInfosReportedListener.aidl",
+        "android/gui/WindowInfo.aidl",
+        "android/gui/WindowInfosUpdate.aidl",
+    ],
+}
+
+aidl_library {
     name: "libgui_aidl",
     srcs: ["aidl/**/*.aidl"],
-    path: "aidl/",
-    aidl: {
-        deps: [":android_gui_aidl"],
-    },
+    strip_import_prefix: "aidl",
+    deps: ["libgui_aidl_hdrs"],
 }
 
 filegroup {
@@ -149,9 +161,6 @@
 cc_library_static {
     name: "libgui_aidl_static",
     vendor_available: true,
-    srcs: [
-        ":libgui_aidl",
-    ],
 
     shared_libs: [
         "libbinder",
@@ -177,9 +186,7 @@
 
     aidl: {
         export_aidl_headers: true,
-        include_dirs: [
-            "frameworks/native/libs/gui",
-        ],
+        libs: ["libgui_aidl"],
     },
 }