Merge "Convert Android.mk to Android.bp" am: 301483980c am: 75436afd61 am: 84ed246fbe

Original change: https://android-review.googlesource.com/c/platform/frameworks/rs/+/1690365

Change-Id: I509ab3fb820d34dbcfeb500a06e1cdaacdbaf2fd
diff --git a/driver/rsdGL.cpp b/driver/rsdGL.cpp
index 6111e0d..ca16148 100644
--- a/driver/rsdGL.cpp
+++ b/driver/rsdGL.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include <system/window.h>
+#include <vndk/window.h>
 
 #include <sys/types.h>
 #include <sys/resource.h>
@@ -440,12 +440,12 @@
     }
 
     if (dc->gl.currentWndSurface != nullptr) {
-        dc->gl.currentWndSurface->decStrong(nullptr);
+        ANativeWindow_release(dc->gl.currentWndSurface);
     }
 
     dc->gl.currentWndSurface = (ANativeWindow *)sur;
     if (dc->gl.currentWndSurface != nullptr) {
-        dc->gl.currentWndSurface->incStrong(nullptr);
+        ANativeWindow_acquire(dc->gl.currentWndSurface);
 
         rsc->setWatchdogGL("eglCreateWindowSurface", __LINE__, __FILE__);
         dc->gl.egl.surface = eglCreateWindowSurface(dc->gl.egl.display, dc->gl.egl.config,
@@ -468,7 +468,7 @@
     RsdHal *dc = (RsdHal *)rsc->mHal.drv;
 
     if (dc->gl.wndSurface != nullptr) {
-        dc->gl.wndSurface->decStrong(nullptr);
+        ANativeWindow_release(dc->gl.wndSurface);
         dc->gl.wndSurface = nullptr;
     }
     if(w && h) {
@@ -476,7 +476,7 @@
         // pbuffer to avoid this pitfall.
         dc->gl.wndSurface = (ANativeWindow *)sur;
         if (dc->gl.wndSurface != nullptr) {
-            dc->gl.wndSurface->incStrong(nullptr);
+            ANativeWindow_acquire(dc->gl.wndSurface);
         }
     }
 
diff --git a/tests/java_api/ImageProcessing_jb/AndroidManifest.xml b/tests/java_api/ImageProcessing_jb/AndroidManifest.xml
index 5a61312..ea3d7ef 100644
--- a/tests/java_api/ImageProcessing_jb/AndroidManifest.xml
+++ b/tests/java_api/ImageProcessing_jb/AndroidManifest.xml
@@ -8,13 +8,15 @@
                  android:hardwareAccelerated="true"
                  android:theme="@android:style/Theme.Holo.Light">
         <uses-library android:name="android.test.runner" />
-        <activity android:name="ImageProcessingActivityJB">
+        <activity android:name="ImageProcessingActivityJB"
+                  android:exported="true">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
             </intent-filter>
         </activity>
 
-        <activity class=".IPControlsJB" android:name="IPControlsJB">
+        <activity class=".IPControlsJB" android:name="IPControlsJB"
+                  android:exported="true">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.LAUNCHER" />
diff --git a/tests/java_api/RsBLAS_Benchmark/AndroidManifest.xml b/tests/java_api/RsBLAS_Benchmark/AndroidManifest.xml
index 38a2c93..87f29b8 100644
--- a/tests/java_api/RsBLAS_Benchmark/AndroidManifest.xml
+++ b/tests/java_api/RsBLAS_Benchmark/AndroidManifest.xml
@@ -22,12 +22,14 @@
     <application android:label="RsBlasBenchmark"
                  android:hardwareAccelerated="true">
         <uses-library android:name="android.test.runner" />
-        <activity android:name="BlasBenchmark">
+        <activity android:name="BlasBenchmark"
+                  android:exported="true">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
             </intent-filter>
         </activity>
-        <activity class=".BlasControls" android:name="BlasControls">
+        <activity class=".BlasControls" android:name="BlasControls"
+                  android:exported="true">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.LAUNCHER" />