Fixed
Status Update
Comments
uc...@google.com <uc...@google.com>
xa...@google.com <xa...@google.com>
an...@elektrobit.com <an...@elektrobit.com> #2
Fixed by aosp/1116471
ch...@google.com <ch...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit f4dd0625de408b804e98937a2f0445609cdc30e7
Author: Curtis Belmonte <curtislb@google.com>
Date: Wed Sep 11 13:15:25 2019
Fix hardware error given by FingerprintHelperFragment
Previously, FingerprintHelperFragment would yield an error code of
ERROR_HW_UNAVAILABLE when no fingerprint hardware was detected. This
commit changes this behavior to instead yield ERROR_HW_NOT_PRESENT.
Test: manual
Bug: 140427586
Change-Id: Iedde10f937c57560aa7771d93527d11822695120
M biometric/src/main/java/androidx/biometric/FingerprintHelperFragment.java
https://android-review.googlesource.com/1119590
https://goto.google.com/android-sha1/f4dd0625de408b804e98937a2f0445609cdc30e7
Branch: androidx-master-dev
commit f4dd0625de408b804e98937a2f0445609cdc30e7
Author: Curtis Belmonte <curtislb@google.com>
Date: Wed Sep 11 13:15:25 2019
Fix hardware error given by FingerprintHelperFragment
Previously, FingerprintHelperFragment would yield an error code of
ERROR_HW_UNAVAILABLE when no fingerprint hardware was detected. This
commit changes this behavior to instead yield ERROR_HW_NOT_PRESENT.
Test: manual
Bug: 140427586
Change-Id: Iedde10f937c57560aa7771d93527d11822695120
M biometric/src/main/java/androidx/biometric/FingerprintHelperFragment.java
Description
- Version of Gradle Plugin: com.android.tools.build:gradle:3.5.1
- Version of Gradle: 6.1.1
- Version of Java: Adopt Open JDK 1.8.0_242
- OS: Ubuntu 18.04.4 LTS
Prerequesites:
- Local Gradle 6.1.1 installation, e.g. at /opt/devenv/gradle
Steps to Reproduce:
1. Import a clean Android library Gradle project into Android Studio (AS). The project only contains a build.gradle and no Gradle wrapper
2. AS opens the "Gradle Sync" dialog -> cancel to select local Gradle installation
3. AS opens "Import Gradle Project" dialog to select Gradle home location -> enter /opt/devenv/gradle
4. AS complains "Gradle 5.4.1 or newer is required"
Debugging:
- Problem is located in AS/plugins/android/lib/android.jar
- com.android.tools.idea.gradle.util.GradleVersions
- has a Problem to identify the Gradle version in the local Gradle installation
- Line 108: libFolderPath.listFiles() -> under Ubuntu this Java call returns an unsorted file list
- When iterating over this file list -> gradle-core-api-6.1.1.jar has a lower index then gradle-core-6.1.1.jar
- Line 122: the Pattern ("gradle-core-(.*)\\.jar") matches "gradle-core-api-6.1.1.jar" as a valid file
- Line 125: returns matching group(1) as version -> "api-6.1.1"
- Line 134: finally removeTimestampFromGradleVersion returns -> "api"
- com.android.tools.idea.gradle.project.ChooseGradleHomeDialog
- Line 152: there is a version compare in the dialog GradleVersion("5.4.1").compareTo(GradleVersion("api")) = 5 > 0
- This results in the error message
Solution:
- GradleVersions has to fix the Pattern matcher to identify the proper Gradle version in a local Gradle installation
Additional info:
- Java File.listFiles() seems to return an alphabetically sorted list under Windows, so the error did not occur there, since gradle-core-6.1.1.jar is identified properly
- I already reported the problem