Mark ab/7061308 as merged in stage.
Bug: 180401296
Merged-In: Ie1a0307f3c8f3fc4013b4395cb843f1a96d32b6d
Change-Id: I833ab148ad9f4632a639c45b97d0b6aebd7471f1
diff --git a/Android.bp b/Android.bp
index 3abd6c1..64845db 100644
--- a/Android.bp
+++ b/Android.bp
@@ -12,6 +12,23 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+package {
+ default_applicable_licenses: ["packages_inputmethods_LatinIME_license"],
+}
+
+// Added automatically by a large-scale-change
+// See: http://go/android-license-faq
+license {
+ name: "packages_inputmethods_LatinIME_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-Apache-2.0",
+ ],
+ license_text: [
+ "NOTICE",
+ ],
+}
+
filegroup {
name: "dicttool_deps",
srcs: [
diff --git a/common/Android.bp b/common/Android.bp
index 925eef7..fd55127 100644
--- a/common/Android.bp
+++ b/common/Android.bp
@@ -12,6 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "packages_inputmethods_LatinIME_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["packages_inputmethods_LatinIME_license"],
+}
+
java_library {
name: "latinime-common",
host_supported: true,
diff --git a/java/Android.bp b/java/Android.bp
index f41e94a..e3e644c 100644
--- a/java/Android.bp
+++ b/java/Android.bp
@@ -12,6 +12,25 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+package {
+ default_applicable_licenses: [
+ "packages_inputmethods_LatinIME_java_license",
+ ],
+}
+
+// Added automatically by a large-scale-change
+// See: http://go/android-license-faq
+license {
+ name: "packages_inputmethods_LatinIME_java_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-Apache-2.0",
+ ],
+ license_text: [
+ "NOTICE",
+ ],
+}
+
android_app {
name: "LatinIME",
diff --git a/native/dicttoolkit/Android.bp b/native/dicttoolkit/Android.bp
index fd35697..4ae250f 100644
--- a/native/dicttoolkit/Android.bp
+++ b/native/dicttoolkit/Android.bp
@@ -12,6 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "packages_inputmethods_LatinIME_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["packages_inputmethods_LatinIME_license"],
+}
+
cc_defaults {
name: "dicttoolkit_defaults",
diff --git a/native/jni/Android.bp b/native/jni/Android.bp
index 7419ed1..ab14632 100644
--- a/native/jni/Android.bp
+++ b/native/jni/Android.bp
@@ -12,6 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "packages_inputmethods_LatinIME_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["packages_inputmethods_LatinIME_license"],
+}
+
filegroup {
name: "LATIN_IME_CORE_SRC_FILES",
srcs: [
@@ -179,7 +188,9 @@
cc_test {
name: "liblatinime_unittests",
host_supported: true,
-
+ test_options: {
+ unit_test: true,
+ },
cflags: [
"-Wno-unused-parameter",
"-Wno-unused-function",
diff --git a/native/jni/tests/dictionary/utils/format_utils_test.cpp b/native/jni/tests/dictionary/utils/format_utils_test.cpp
index 3561bda..34defe7 100644
--- a/native/jni/tests/dictionary/utils/format_utils_test.cpp
+++ b/native/jni/tests/dictionary/utils/format_utils_test.cpp
@@ -57,7 +57,13 @@
{
const std::vector<uint8_t> buffer =
getBuffer(FormatUtils::MAGIC_NUMBER, FormatUtils::VERSION_2, 0, 0);
- EXPECT_EQ(FormatUtils::VERSION_2, FormatUtils::detectFormatVersion(
+ EXPECT_EQ(FormatUtils::UNKNOWN_VERSION, FormatUtils::detectFormatVersion(
+ ReadOnlyByteArrayView(buffer.data(), buffer.size())));
+ }
+ {
+ const std::vector<uint8_t> buffer =
+ getBuffer(FormatUtils::MAGIC_NUMBER, FormatUtils::VERSION_202, 0, 0);
+ EXPECT_EQ(FormatUtils::VERSION_202, FormatUtils::detectFormatVersion(
ReadOnlyByteArrayView(buffer.data(), buffer.size())));
}
{
@@ -75,7 +81,7 @@
{
const std::vector<uint8_t> buffer =
- getBuffer(FormatUtils::MAGIC_NUMBER - 1, FormatUtils::VERSION_2, 0, 0);
+ getBuffer(FormatUtils::MAGIC_NUMBER - 1, FormatUtils::VERSION_402, 0, 0);
EXPECT_EQ(FormatUtils::UNKNOWN_VERSION, FormatUtils::detectFormatVersion(
ReadOnlyByteArrayView(buffer.data(), buffer.size())));
}
@@ -87,7 +93,7 @@
}
{
const std::vector<uint8_t> buffer =
- getBuffer(FormatUtils::MAGIC_NUMBER, FormatUtils::VERSION_2, 0, 0);
+ getBuffer(FormatUtils::MAGIC_NUMBER, FormatUtils::VERSION_402, 0, 0);
EXPECT_EQ(FormatUtils::UNKNOWN_VERSION, FormatUtils::detectFormatVersion(
ReadOnlyByteArrayView(buffer.data(), buffer.size() - 1)));
}
diff --git a/tests/Android.bp b/tests/Android.bp
index 76681f6..e1db354 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -12,6 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "packages_inputmethods_LatinIME_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["packages_inputmethods_LatinIME_license"],
+}
+
android_test {
name: "LatinIMETests",
diff --git a/tools/EditTextVariations/Android.bp b/tools/EditTextVariations/Android.bp
index 94b4951..f6ed156 100644
--- a/tools/EditTextVariations/Android.bp
+++ b/tools/EditTextVariations/Android.bp
@@ -12,6 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "packages_inputmethods_LatinIME_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["packages_inputmethods_LatinIME_license"],
+}
+
android_test {
name: "EditTextVariations",
diff --git a/tools/dicttool/Android.bp b/tools/dicttool/Android.bp
index 83b4ed3..48f751e 100644
--- a/tools/dicttool/Android.bp
+++ b/tools/dicttool/Android.bp
@@ -12,6 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "packages_inputmethods_LatinIME_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["packages_inputmethods_LatinIME_license"],
+}
+
java_binary_host {
name: "dicttool_aosp",
diff --git a/tools/make-keyboard-text/Android.bp b/tools/make-keyboard-text/Android.bp
index 4976051..781f53f 100644
--- a/tools/make-keyboard-text/Android.bp
+++ b/tools/make-keyboard-text/Android.bp
@@ -13,6 +13,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "packages_inputmethods_LatinIME_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["packages_inputmethods_LatinIME_license"],
+}
+
java_binary_host {
name: "make-keyboard-text",