Use base-layer API to determine if build is "debuggable" |
||||
Issue descriptionDiscussed briefly in http://crrev/c/1349327. Android has a notion of "is the current build of Android debuggable or not?" Within the platform, this is defined by Build.IS_DEBUGGABLE [1]. This unfortunately isn't available in the public or system SDK, but we have several spots in chromium which try to copy this with: ``` !Build.TYPE.equals("user") ``` We should move this into base-layer to have a consistent definition of debug-ability across chromium. (note: this ticket is completely unrelated to "debuggable" APKs). [1] https://cs.corp.google.com/android/frameworks/base/core/java/android/os/Build.java?l=1186&rcl=6d45ba0491e9cff60c7a715794ec289206f49cd0
,
Nov 27
,
Nov 28
Updating description, since the API exists in base/ already
,
Nov 30
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a4e4bb73dba61a56ee3c8fda1bcdacffec4ec7a8 commit a4e4bb73dba61a56ee3c8fda1bcdacffec4ec7a8 Author: Nate Fischer <ntfschr@chromium.org> Date: Fri Nov 30 21:15:29 2018 Android: use base layer API to check debuggability This converts Android WebView code to use the base-layer definition of whether to enable developer-only features (in this case, the command line). This also comments the BuildInfo method to mention Android's definition of debuggability (IS_DEBUGGABLE), which could improve discoverability. Although this is a change in logic, this should not impact real behavior, since "not equal to 'user'" should in practice be the same as "equal to 'userdebug' or 'eng'," since these are the only three valid values. R=agrieve@google.com, tobiasjs@google.com Bug: 908668 Test: N/A Change-Id: I6007d564078a899567226a3777c02bfcffc16f75 Reviewed-on: https://chromium-review.googlesource.com/c/1351733 Commit-Queue: Nate Fischer <ntfschr@chromium.org> Reviewed-by: agrieve <agrieve@chromium.org> Reviewed-by: Tobias Sargeant <tobiasjs@chromium.org> Cr-Commit-Position: refs/heads/master@{#612785} [modify] https://crrev.com/a4e4bb73dba61a56ee3c8fda1bcdacffec4ec7a8/android_webview/glue/java/src/com/android/webview/chromium/SharedStatics.java [modify] https://crrev.com/a4e4bb73dba61a56ee3c8fda1bcdacffec4ec7a8/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumAwInit.java [modify] https://crrev.com/a4e4bb73dba61a56ee3c8fda1bcdacffec4ec7a8/android_webview/java/src/org/chromium/android_webview/command_line/CommandLineUtil.java [modify] https://crrev.com/a4e4bb73dba61a56ee3c8fda1bcdacffec4ec7a8/android_webview/support_library/boundary_interfaces/src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java [modify] https://crrev.com/a4e4bb73dba61a56ee3c8fda1bcdacffec4ec7a8/base/android/java/src/org/chromium/base/BuildInfo.java
,
Nov 30
No manual verification necessary. |
||||
►
Sign in to add a comment |
||||
Comment 1 by ntfschr@chromium.org
, Nov 27