[Android] Hide active text handle.

We want to hide the active text handle when the HandleObserver is
activated.

We only want to make the handle invisible but still keep it functioning.
So in this CL we are setting its alpha to control the visibility.

Bug: 798017, 814868
Change-Id: I1d3018ab6a40307eae67c5f0146e84c0c297bcf3
Reviewed-on: https://chromium-review.googlesource.com/1011552
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Mohsen Izadi <mohsen@chromium.org>
Reviewed-by: Pedro Amaral <amaralp@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Commit-Queue: Shimi Zhang <ctzsm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552196}

CrOS-Libchrome-Original-Commit: fa804f3f8ebab0c246eef37a4f238b810ea70fcf
diff --git a/base/android/build_info.cc b/base/android/build_info.cc
index 151c045..2299d58 100644
--- a/base/android/build_info.cc
+++ b/base/android/build_info.cc
@@ -24,7 +24,7 @@
   return strdup(params[index].c_str());
 }
 
-int SdkIntParam(const std::vector<std::string>& params, int index) {
+int GetIntParam(const std::vector<std::string>& params, int index) {
   int ret = 0;
   bool success = StringToInt(params[index], &ret);
   DCHECK(success);
@@ -59,7 +59,7 @@
       android_build_id_(StrDupParam(params, 2)),
       manufacturer_(StrDupParam(params, 3)),
       model_(StrDupParam(params, 4)),
-      sdk_int_(SdkIntParam(params, 5)),
+      sdk_int_(GetIntParam(params, 5)),
       build_type_(StrDupParam(params, 6)),
       board_(StrDupParam(params, 7)),
       host_package_name_(StrDupParam(params, 8)),
@@ -76,6 +76,7 @@
       custom_themes_(StrDupParam(params, 19)),
       resources_version_(StrDupParam(params, 20)),
       extracted_file_suffix_(params[21]),
+      is_at_least_p_(GetIntParam(params, 22)),
       java_exception_info_(NULL) {}
 
 // static
diff --git a/base/android/build_info.h b/base/android/build_info.h
index 1d8f510..82825a5 100644
--- a/base/android/build_info.h
+++ b/base/android/build_info.h
@@ -127,6 +127,8 @@
     return java_exception_info_;
   }
 
+  bool is_at_least_p() const { return is_at_least_p_; }
+
   void SetJavaExceptionInfo(const std::string& info);
 
   void ClearJavaExceptionInfo();
@@ -163,6 +165,7 @@
   const char* const resources_version_;
   // Not needed by breakpad.
   const std::string extracted_file_suffix_;
+  const int is_at_least_p_;
   // This is set via set_java_exception_info, not at constructor time.
   const char* java_exception_info_;
 
diff --git a/base/android/java/src/org/chromium/base/BuildInfo.java b/base/android/java/src/org/chromium/base/BuildInfo.java
index cfe96d8..6a77719 100644
--- a/base/android/java/src/org/chromium/base/BuildInfo.java
+++ b/base/android/java/src/org/chromium/base/BuildInfo.java
@@ -64,6 +64,7 @@
                 buildInfo.androidBuildFingerprint, buildInfo.gmsVersionCode,
                 buildInfo.installerPackageName, buildInfo.abiString, BuildConfig.FIREBASE_APP_ID,
                 buildInfo.customThemes, buildInfo.resourcesVersion, buildInfo.extractedFileSuffix,
+                isAtLeastP() ? "1" : "0",
         };
     }