Merge "LatinIME: Fix Implicit PendingIntent Vulnerability" into main
diff --git a/java/lint-baseline.xml b/java/lint-baseline.xml
index dbb81ca..7e70f01 100644
--- a/java/lint-baseline.xml
+++ b/java/lint-baseline.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<issues format="5" by="lint 4.1.0" client="cli" variant="all" version="4.1.0">
+<issues format="6" by="lint 8.4.0-alpha01" type="baseline" client="" dependencies="true" name="" variant="all" version="8.4.0-alpha01">
 
     <issue
         id="NewApi"
@@ -26,6 +26,39 @@
     <issue
         id="NewApi"
         message="Call requires API level 23 (current min is 21): `android.content.Context#getSystemService`"
+        errorLine1="        final WindowManager wm = getSystemService(WindowManager.class);"
+        errorLine2="                                 ~~~~~~~~~~~~~~~~">
+        <location
+            file="packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/LatinIME.java"
+            line="605"
+            column="34"/>
+    </issue>
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 23 (current min is 21): `android.app.ActivityOptions#makeBasic`"
+        errorLine1="                ActivityOptions.makeBasic().setLaunchDisplayId(currentDisplayId).toBundle());"
+        errorLine2="                                ~~~~~~~~~">
+        <location
+            file="packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/LatinIME.java"
+            line="1857"
+            column="33"/>
+    </issue>
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 26 (current min is 21): `android.app.ActivityOptions#setLaunchDisplayId`"
+        errorLine1="                ActivityOptions.makeBasic().setLaunchDisplayId(currentDisplayId).toBundle());"
+        errorLine2="                                            ~~~~~~~~~~~~~~~~~~">
+        <location
+            file="packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/LatinIME.java"
+            line="1857"
+            column="45"/>
+    </issue>
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 23 (current min is 21): `android.content.Context#getSystemService`"
         errorLine1="        final UserManager userManager = context.getSystemService(UserManager.class);"
         errorLine2="                                                ~~~~~~~~~~~~~~~~">
         <location
@@ -34,28 +67,4 @@
             column="49"/>
     </issue>
 
-    <issue
-        id="NewApi"
-        message="Call requires API level 23 (current min is 21): `android.app.ActivityOptions#makeBasic`">
-        <location
-            file="packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/LatinIME.java"
-            line="1842"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 23 (current min is 21): `android.content.Context#getSystemService`">
-        <location
-            file="packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/LatinIME.java"
-            line="605"/>
-    </issue>
-
-    <issue
-        id="NewApi"
-        message="Call requires API level 26 (current min is 21): `android.app.ActivityOptions#setLaunchDisplayId`">
-        <location
-            file="packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/LatinIME.java"
-            line="1842"/>
-    </issue>
-
 </issues>
\ No newline at end of file
diff --git a/native/dicttoolkit/Android.bp b/native/dicttoolkit/Android.bp
index 6560d65..4ae250f 100644
--- a/native/dicttoolkit/Android.bp
+++ b/native/dicttoolkit/Android.bp
@@ -24,7 +24,6 @@
 cc_defaults {
     name: "dicttoolkit_defaults",
 
-    cpp_std: "gnu++17",
     cflags: [
         "-Werror",
         "-Wall",
diff --git a/native/dicttoolkit/tests/utils/utf8_utils_test.cpp b/native/dicttoolkit/tests/utils/utf8_utils_test.cpp
index 9c59a8b..18fa2f4 100644
--- a/native/dicttoolkit/tests/utils/utf8_utils_test.cpp
+++ b/native/dicttoolkit/tests/utils/utf8_utils_test.cpp
@@ -40,7 +40,7 @@
         EXPECT_EQ('t', codePoints[3]);
     }
     {
-        const std::vector<int> codePoints = Utf8Utils::getCodePoints(u8"\u3042a\u03C2\u0410");
+        const std::vector<int> codePoints = Utf8Utils::getCodePoints("\u3042a\u03C2\u0410");
         EXPECT_EQ(4u, codePoints.size());
         EXPECT_EQ(0x3042, codePoints[0]); // HIRAGANA LETTER A
         EXPECT_EQ('a', codePoints[1]);
@@ -48,7 +48,7 @@
         EXPECT_EQ(0x0410, codePoints[3]); // GREEK SMALL LETTER FINAL SIGMA
     }
     {
-        const std::vector<int> codePoints = Utf8Utils::getCodePoints(u8"\U0001F36A?\U0001F752");
+        const std::vector<int> codePoints = Utf8Utils::getCodePoints("\U0001F36A?\U0001F752");
         EXPECT_EQ(3u, codePoints.size());
         EXPECT_EQ(0x1F36A, codePoints[0]); // COOKIE
         EXPECT_EQ('?', codePoints[1]);
@@ -75,7 +75,7 @@
                 0x1F36A /* COOKIE */,
                 0x1F752 /* ALCHEMICAL SYMBOL FOR STARRED TRIDENT */
         };
-        EXPECT_EQ(u8"\u00E0\u03C2\u0430\u3042\U0001F36A\U0001F752",
+        EXPECT_EQ("\u00E0\u03C2\u0430\u3042\U0001F36A\U0001F752",
                 Utf8Utils::getUtf8String(CodePointArrayView(codePoints)));
     }
 }