Fixed
Status Update
Comments
yb...@google.com <yb...@google.com>
[Deleted User] <[Deleted User]> #2
Thank you for reporting this issue. For us to further investigate this issue, please provide the following additional information:
Android build
Which Android build are you using? (e.g. OPP1.170223.012)
Steps to reproduce
What steps are needed to reproduce this issue?
Please provide sample project or apk to reproduce the issue. Also mention the steps to be followed for reproducing the issue with the given sample project or apk.
Frequency
How frequently does this issue occur? (e.g 100% of the time, 10% of the time)
Screen record of the issue, for clarity
Please capture screen record or video of the issue using following steps:
adb shell screenrecord /sdcard/video.mp4
Subsequently use following command to pull the recorded file:
adb pull /sdcard/video.mp4
Attach the file to this issue.
NOTE : To avoid leaking private information, please share screenshots and bugreports only in Google Drive. Share files with android-bugreport@google.com and include only Google drive links in your bug. Bug report attachments should not be included directly in issue reports.
Android build
Which Android build are you using? (e.g. OPP1.170223.012)
Steps to reproduce
What steps are needed to reproduce this issue?
Please provide sample project or apk to reproduce the issue. Also mention the steps to be followed for reproducing the issue with the given sample project or apk.
Frequency
How frequently does this issue occur? (e.g 100% of the time, 10% of the time)
Screen record of the issue, for clarity
Please capture screen record or video of the issue using following steps:
adb shell screenrecord /sdcard/video.mp4
Subsequently use following command to pull the recorded file:
adb pull /sdcard/video.mp4
Attach the file to this issue.
NOTE : To avoid leaking private information, please share screenshots and bugreports only in Google Drive. Share files with android-bugreport@google.com and include only Google drive links in your bug. Bug report attachments should not be included directly in issue reports.
ch...@beyls.net <ch...@beyls.net> #3
Android 9 on Nokia 7 Plus
Build number 00WW_3_54H_SP03
Android Studio 3.5.1 on macOS 10.13.6
compileSdkVersion 29
buildToolsVersion '29.0.2'
minSdkVersion 17
targetSdkVersion 28
implementation 'androidx.biometric:biometric:1.0.0-rc01'
Code taken from "Allow for fallback to non-biometric credentials" in
https://developer.android.com/training/sign-in/biometric-auth
Problem:
1. Show biometric prompt.
2. Tap "USE PASSWORD" instead of scanning fingerprint.
3. Unlock using pattern.
4. Activity stops responding.
See attached MP4 video.
This happens consistently.
Project attached in MyApplication.zip
Build number 00WW_3_54H_SP03
Android Studio 3.5.1 on macOS 10.13.6
compileSdkVersion 29
buildToolsVersion '29.0.2'
minSdkVersion 17
targetSdkVersion 28
implementation 'androidx.biometric:biometric:1.0.0-rc01'
Code taken from "Allow for fallback to non-biometric credentials" in
Problem:
1. Show biometric prompt.
2. Tap "USE PASSWORD" instead of scanning fingerprint.
3. Unlock using pattern.
4. Activity stops responding.
See attached MP4 video.
This happens consistently.
Project attached in MyApplication.zip
ro...@gmail.com <ro...@gmail.com> #4
Same issue with androidx.biometric:biometric:1.0.0-rc02
Android 9 on Nokia 7 Plus
Build number 00WW_3_54H_SP03
Android Studio 3.5.1 on macOS 10.13.6
compileSdkVersion 29
buildToolsVersion '29.0.2'
minSdkVersion 17
targetSdkVersion 28
implementation 'androidx.biometric:biometric:1.0.0-rc02'
Code taken from "Allow for fallback to non-biometric credentials" in
https://developer.android.com/training/sign-in/biometric-auth
Problem:
1. Show biometric prompt.
2. Tap "USE PASSWORD" instead of scanning fingerprint.
3. Unlock using pattern.
4. Activity stops responding.
See attached MP4 video.
This happens consistently.
Android 9 on Nokia 7 Plus
Build number 00WW_3_54H_SP03
Android Studio 3.5.1 on macOS 10.13.6
compileSdkVersion 29
buildToolsVersion '29.0.2'
minSdkVersion 17
targetSdkVersion 28
implementation 'androidx.biometric:biometric:1.0.0-rc02'
Code taken from "Allow for fallback to non-biometric credentials" in
Problem:
1. Show biometric prompt.
2. Tap "USE PASSWORD" instead of scanning fingerprint.
3. Unlock using pattern.
4. Activity stops responding.
See attached MP4 video.
This happens consistently.
ch...@beyls.net <ch...@beyls.net> #5
I am facing the exact same issue.
Android 9 on Moto Z2 Play (XT1710-07)
Build number PPS29.133-30
Android Studio 3.5.1 on Windows 10 Pro
compileSdkVersion 28
buildToolsVersion '28.0.3'
minSdkVersion 23
targetSdkVersion 28
implementation 'androidx.biometric:biometric:1.0.0-rc02'
Android 9 on Moto Z2 Play (XT1710-07)
Build number PPS29.133-30
Android Studio 3.5.1 on Windows 10 Pro
compileSdkVersion 28
buildToolsVersion '28.0.3'
minSdkVersion 23
targetSdkVersion 28
implementation 'androidx.biometric:biometric:1.0.0-rc02'
[Deleted User] <[Deleted User]> #6
ch...@gmail.com <ch...@gmail.com> #7
yb...@google.com <yb...@google.com> #8
This error case appears to be triggered by creating BiometricPrompt immediately before calling authenticate(), rather than recreating the prompt in the Activity's onCreate() (or Fragment's onCreateView()) lifecycle method as intended. That's obviously an easy mistake to make, so I'll work on making sure the documentation is clearer here.
The fact that the activity appears to hang afterward is definitely a bug and will be fixed by aosp/1151594, likely in a 1.0.1 bugfix release. For now, I'm closing this bug as a duplicate of b/143683687 .
The fact that the activity appears to hang afterward is definitely a bug and will be fixed by aosp/1151594, likely in a 1.0.1 bugfix release. For now, I'm closing this bug as a duplicate of
ch...@gmail.com <ch...@gmail.com> #9
Correction: b/143091227
mm...@commonsware.com <mm...@commonsware.com> #10
Must it be in onCreate?
I'm doing this in onResume instead of onCreate so that the prompt shows up when the user comes back to my app.
I'm doing this in onResume instead of onCreate so that the prompt shows up when the user comes back to my app.
yb...@google.com <yb...@google.com> #11
Project: platform/frameworks/support
Branch: androidx-master-dev
commit df08869e2c6f2d066f1caf143cebdb965c1b5a2c
Author: Curtis Belmonte <curtislb@google.com>
Date: Mon Nov 18 15:17:00 2019
Fix BiometricPrompt + device credential error case
BiometricPrompt currently has a bug in the following usage scenario:
1. The prompt is not instantiated in onCreate() or onCreateView()
2. Device credential auth is enabled with setDeviceCredentialAllowed()
3. authenticate() is called twice in the same activity/fragment
When this happens, the handler bridge is incorrectly reset before the
handler activity can be launched, preventing the prompt from being shown
at all. While this isn't a recommended usage pattern for
BiometricPrompt at the moment, it still shouldn't cause the prompt to
get stuck in this state. This commit therefore ensures that the above
scenario no longer triggers the bug.
Test: Manually, using sample app from b/143097321
Test: ./gradlew biometric:test
Test: ./gradlew biometric:connectedAndroidTest
Fixes: 143097321
Change-Id: Ie7e343d9323437d9765e512a09a0e25a6c86dd8e
M biometric/src/main/java/androidx/biometric/BiometricPrompt.java
M biometric/src/main/java/androidx/biometric/DeviceCredentialHandlerActivity.java
https://android-review.googlesource.com/1168851
Branch: androidx-master-dev
commit df08869e2c6f2d066f1caf143cebdb965c1b5a2c
Author: Curtis Belmonte <curtislb@google.com>
Date: Mon Nov 18 15:17:00 2019
Fix BiometricPrompt + device credential error case
BiometricPrompt currently has a bug in the following usage scenario:
1. The prompt is not instantiated in onCreate() or onCreateView()
2. Device credential auth is enabled with setDeviceCredentialAllowed()
3. authenticate() is called twice in the same activity/fragment
When this happens, the handler bridge is incorrectly reset before the
handler activity can be launched, preventing the prompt from being shown
at all. While this isn't a recommended usage pattern for
BiometricPrompt at the moment, it still shouldn't cause the prompt to
get stuck in this state. This commit therefore ensures that the above
scenario no longer triggers the bug.
Test: Manually, using sample app from
Test: ./gradlew biometric:test
Test: ./gradlew biometric:connectedAndroidTest
Fixes: 143097321
Change-Id: Ie7e343d9323437d9765e512a09a0e25a6c86dd8e
M biometric/src/main/java/androidx/biometric/BiometricPrompt.java
M biometric/src/main/java/androidx/biometric/DeviceCredentialHandlerActivity.java
zh...@gmail.com <zh...@gmail.com> #12
Yes, initializing the prompt in onResume() should be fine as well.
Unmarked as duplicate, since aosp/1168851 should be a more proper fix for this. Targeting it for inclusion in 1.0.1.
Unmarked as duplicate, since aosp/1168851 should be a more proper fix for this. Targeting it for inclusion in 1.0.1.
sa...@gmail.com <sa...@gmail.com> #13
da...@google.com <da...@google.com>
pa...@gmail.com <pa...@gmail.com> #14
I believe I am facing a related issue. I am using BiometricPrompt with setDeviceCredentialAllowed. This is fully working on an older device running Oreo (now that I recreate the activity each time after using BiometricPrompt). The user can choose to use their fingerprint to authenticate, or can select to use the pin. In both cases, once the user successfully authenticates, onAuthenticationSucceeded is called on the BiometricPrompt.AuthenticationCallback.
However when used in the emulator, running Android 10, as soon as the user selects the "Use PIN" option, onAuthenticationError is called with errorCode=5 and errString=Authentication canceled
However when used in the emulator, running Android 10, as soon as the user selects the "Use PIN" option, onAuthenticationError is called with errorCode=5 and errString=Authentication canceled
ap...@google.com <ap...@google.com> #15
Yes I am facing the same issue. Once I get the errCode = 5, the activity starting acting very strange. It then again gives an errCode = 10 before crashing again.
ap...@google.com <ap...@google.com> #16
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 94867f06a611c3ada3dc95aa394d9e8485be2db5
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Aug 20 13:38:26 2018
Room FTS Support - Processor
Created FtsEntityProcessor to process classes annotated with @FtsEntity.
EntityProcessor & FtsEntityProcessor now implement a common interface
BaseEntityProcessor that will either create the Entity or FtsEntity
value object based on the element annotation. FtsEntity extends Entity
which keep intact most of the Entity class reference around the compiler
code .
Created migration bundle class for FtsEntity to later handle migration.
Bug: 62356416
Test: ./gradlew room:room-compiler:test \
room:integration-tests:testapp:cC
Change-Id: I867635165b7e1dcb37806273c1c097fa4f450408
M room/compiler/src/main/kotlin/androidx/room/ext/element_ext.kt
M room/compiler/src/main/kotlin/androidx/room/parser/SqlParser.kt
A room/compiler/src/main/kotlin/androidx/room/processor/BaseEntityProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/FieldProcessor.kt
A room/compiler/src/main/kotlin/androidx/room/processor/FtsTableEntityProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/compiler/src/main/kotlin/androidx/room/processor/RawQueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/ShortcutMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/ShortcutParameterProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/TableEntityProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/vo/Entity.kt
A room/compiler/src/main/kotlin/androidx/room/vo/FtsEntity.kt
A room/compiler/src/main/kotlin/androidx/room/vo/FtsOptions.kt
A room/compiler/src/main/kotlin/androidx/room/vo/LanguageId.kt
M room/compiler/src/main/kotlin/androidx/room/vo/Pojo.kt
M room/compiler/src/test/kotlin/androidx/room/processor/BaseEntityParserTest.kt
A room/compiler/src/test/kotlin/androidx/room/processor/BaseFtsEntityParserTest.kt
M room/compiler/src/test/kotlin/androidx/room/processor/FieldProcessorTest.kt
A room/compiler/src/test/kotlin/androidx/room/processor/Fts3TableEntityProcessorTest.kt
A room/compiler/src/test/kotlin/androidx/room/processor/Fts4TableEntityProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/processor/PojoProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/processor/TableEntityProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/test_util.kt
M room/compiler/src/test/kotlin/androidx/room/verifier/DatabaseVerifierTest.kt
M room/compiler/src/test/kotlin/androidx/room/vo/EntityTest.kt
A room/compiler/src/test/kotlin/androidx/room/vo/FtsEntityTest.kt
M room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/TestDatabase.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/Mail.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/TestDatabase.java
A room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/dao/MailDao.java
A room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/FtsTableTest.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/TestDatabaseTest.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/TestUtil.java
A room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/vo/Mail.java
M room/migration/src/main/java/androidx/room/migration/bundle/EntityBundle.java
A room/migration/src/main/java/androidx/room/migration/bundle/FtsEntityBundle.java
A room/migration/src/main/java/androidx/room/migration/bundle/FtsOptionsBundle.java
https://android-review.googlesource.com/735153
https://goto.google.com/android-sha1/94867f06a611c3ada3dc95aa394d9e8485be2db5
Branch: androidx-master-dev
commit 94867f06a611c3ada3dc95aa394d9e8485be2db5
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Aug 20 13:38:26 2018
Room FTS Support - Processor
Created FtsEntityProcessor to process classes annotated with @FtsEntity.
EntityProcessor & FtsEntityProcessor now implement a common interface
BaseEntityProcessor that will either create the Entity or FtsEntity
value object based on the element annotation. FtsEntity extends Entity
which keep intact most of the Entity class reference around the compiler
code .
Created migration bundle class for FtsEntity to later handle migration.
Bug: 62356416
Test: ./gradlew room:room-compiler:test \
room:integration-tests:testapp:cC
Change-Id: I867635165b7e1dcb37806273c1c097fa4f450408
M room/compiler/src/main/kotlin/androidx/room/ext/element_ext.kt
M room/compiler/src/main/kotlin/androidx/room/parser/SqlParser.kt
A room/compiler/src/main/kotlin/androidx/room/processor/BaseEntityProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/FieldProcessor.kt
A room/compiler/src/main/kotlin/androidx/room/processor/FtsTableEntityProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/compiler/src/main/kotlin/androidx/room/processor/RawQueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/ShortcutMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/ShortcutParameterProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/TableEntityProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/vo/Entity.kt
A room/compiler/src/main/kotlin/androidx/room/vo/FtsEntity.kt
A room/compiler/src/main/kotlin/androidx/room/vo/FtsOptions.kt
A room/compiler/src/main/kotlin/androidx/room/vo/LanguageId.kt
M room/compiler/src/main/kotlin/androidx/room/vo/Pojo.kt
M room/compiler/src/test/kotlin/androidx/room/processor/BaseEntityParserTest.kt
A room/compiler/src/test/kotlin/androidx/room/processor/BaseFtsEntityParserTest.kt
M room/compiler/src/test/kotlin/androidx/room/processor/FieldProcessorTest.kt
A room/compiler/src/test/kotlin/androidx/room/processor/Fts3TableEntityProcessorTest.kt
A room/compiler/src/test/kotlin/androidx/room/processor/Fts4TableEntityProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/processor/PojoProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/processor/TableEntityProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/test_util.kt
M room/compiler/src/test/kotlin/androidx/room/verifier/DatabaseVerifierTest.kt
M room/compiler/src/test/kotlin/androidx/room/vo/EntityTest.kt
A room/compiler/src/test/kotlin/androidx/room/vo/FtsEntityTest.kt
M room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/TestDatabase.java
A room/integration-tests/autovaluetestapp/src/androidTest/java/androidx/room/integration/autovaluetestapp/vo/Mail.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/TestDatabase.java
A room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/dao/MailDao.java
A room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/FtsTableTest.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/TestDatabaseTest.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/TestUtil.java
A room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/vo/Mail.java
M room/migration/src/main/java/androidx/room/migration/bundle/EntityBundle.java
A room/migration/src/main/java/androidx/room/migration/bundle/FtsEntityBundle.java
A room/migration/src/main/java/androidx/room/migration/bundle/FtsOptionsBundle.java
ap...@google.com <ap...@google.com> #17
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 82c5c2d2588cb443aa44ebdf9549a3945aac7153
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Tue Aug 21 11:28:45 2018
Room FTS Support - BaseEntityProcessor Rename
Rename BaseEntityProcessor to EntityProcessor. This is done in a
separate commit than the renaming of EntityProcessor to
TableEntityProcessor so that we don't lose git history and it properly
shows as a rename and not an add / remove change.
Bug: 62356416
Test: N/A
Change-Id: I8f7f7e3d64453856cd062a956203b89ed1450cc5
M room/compiler/src/main/kotlin/androidx/room/processor/EntityProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/FtsTableEntityProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/TableEntityProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/vo/Pojo.kt
https://android-review.googlesource.com/735894
https://goto.google.com/android-sha1/82c5c2d2588cb443aa44ebdf9549a3945aac7153
Branch: androidx-master-dev
commit 82c5c2d2588cb443aa44ebdf9549a3945aac7153
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Tue Aug 21 11:28:45 2018
Room FTS Support - BaseEntityProcessor Rename
Rename BaseEntityProcessor to EntityProcessor. This is done in a
separate commit than the renaming of EntityProcessor to
TableEntityProcessor so that we don't lose git history and it properly
shows as a rename and not an add / remove change.
Bug: 62356416
Test: N/A
Change-Id: I8f7f7e3d64453856cd062a956203b89ed1450cc5
M room/compiler/src/main/kotlin/androidx/room/processor/EntityProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/FtsTableEntityProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/TableEntityProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/vo/Pojo.kt
ap...@google.com <ap...@google.com> #18
Project: platform/frameworks/support
Branch: androidx-master-dev
commit ff5d15a5e9aca547eb6a6756fb11aec0186e6a64
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Aug 20 13:42:42 2018
Room FTS Support - InvalidationTracker
Updated InvalidationTracker to support adding triggers to FTS shadow
tables based on a lookup map provided. This enables reactive return
types for virtual table entities such as FTS.
Bug: 62356416
Test: ./gradlew room:room-compiler:test \
room:room-runtime:test \
room:integration-tests:testapp:cC
Change-Id: Ib8b2ac7b72e7ad6e170043b57035cf91f052ddf9
M room/compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/compiler/src/test/data/databasewriter/output/ComplexDatabase.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/LiveDataQueryTest.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/RxJava2Test.java
M room/runtime/src/main/java/androidx/room/InvalidationTracker.java
M room/runtime/src/test/java/androidx/room/InvalidationTrackerTest.java
https://android-review.googlesource.com/735154
https://goto.google.com/android-sha1/ff5d15a5e9aca547eb6a6756fb11aec0186e6a64
Branch: androidx-master-dev
commit ff5d15a5e9aca547eb6a6756fb11aec0186e6a64
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Aug 20 13:42:42 2018
Room FTS Support - InvalidationTracker
Updated InvalidationTracker to support adding triggers to FTS shadow
tables based on a lookup map provided. This enables reactive return
types for virtual table entities such as FTS.
Bug: 62356416
Test: ./gradlew room:room-compiler:test \
room:room-runtime:test \
room:integration-tests:testapp:cC
Change-Id: Ib8b2ac7b72e7ad6e170043b57035cf91f052ddf9
M room/compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/compiler/src/test/data/databasewriter/output/ComplexDatabase.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/LiveDataQueryTest.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/RxJava2Test.java
M room/runtime/src/main/java/androidx/room/InvalidationTracker.java
M room/runtime/src/test/java/androidx/room/InvalidationTrackerTest.java
ap...@google.com <ap...@google.com> #19
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 8cce609814cb86d4a5ddeafefc07f7a0d07b841a
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Aug 20 13:58:55 2018
Room FTS Support - Migration
Added fts entity migration validator that uses the sql create statement
for validation. This is necessary since fts options are not stored in
any public metadata table nor are available through any known pragma.
Created a FtsTableInfoValidatorWriter that will generate the code that
uses FtsTableInfo to get the create sql from sqlite_master so that FTS
options can be parsed and compared. TableInfoValidationWriter and
FtsTableInfoValidatorWriter now implement a common interface named
ValidationWriter that counts statement to be written.
Added a TypeAdapterFactory to SchemaBundle's GSON instance so that both
FtsEntityBundle and EntityBundle can be deserialized from the schema
json file.
Bug: 62356416
Test: ./gradlew room:room-compiler:test \
room:integration-tests:testapp:cC
Change-Id: I34c4d0206ef75f47e1541f7c1f0543c0f2b1e853
M room/compiler/src/main/kotlin/androidx/room/ext/javapoet_ext.kt
M room/compiler/src/main/kotlin/androidx/room/vo/FtsOptions.kt
A room/compiler/src/main/kotlin/androidx/room/writer/FtsTableInfoValidationWriter.kt
M room/compiler/src/main/kotlin/androidx/room/writer/SQLiteOpenHelperWriter.kt
M room/compiler/src/main/kotlin/androidx/room/writer/TableInfoValidationWriter.kt
A room/compiler/src/main/kotlin/androidx/room/writer/ValidationWriter.kt
M room/compiler/src/test/kotlin/androidx/room/vo/FtsEntityTest.kt
A room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.FtsMigrationTest.FtsMigrationDb/1.json
A room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.FtsMigrationTest.FtsMigrationDb/2.json
A room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/FtsMigrationTest.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/FtsTableTest.java
M room/migration/src/main/java/androidx/room/migration/bundle/SchemaBundle.java
A room/runtime/src/main/java/androidx/room/util/FtsTableInfo.java
A room/runtime/src/test/java/androidx/room/util/FtsTableInfoTest.java
M room/testing/src/main/java/androidx/room/testing/MigrationTestHelper.java
https://android-review.googlesource.com/735155
https://goto.google.com/android-sha1/8cce609814cb86d4a5ddeafefc07f7a0d07b841a
Branch: androidx-master-dev
commit 8cce609814cb86d4a5ddeafefc07f7a0d07b841a
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Aug 20 13:58:55 2018
Room FTS Support - Migration
Added fts entity migration validator that uses the sql create statement
for validation. This is necessary since fts options are not stored in
any public metadata table nor are available through any known pragma.
Created a FtsTableInfoValidatorWriter that will generate the code that
uses FtsTableInfo to get the create sql from sqlite_master so that FTS
options can be parsed and compared. TableInfoValidationWriter and
FtsTableInfoValidatorWriter now implement a common interface named
ValidationWriter that counts statement to be written.
Added a TypeAdapterFactory to SchemaBundle's GSON instance so that both
FtsEntityBundle and EntityBundle can be deserialized from the schema
json file.
Bug: 62356416
Test: ./gradlew room:room-compiler:test \
room:integration-tests:testapp:cC
Change-Id: I34c4d0206ef75f47e1541f7c1f0543c0f2b1e853
M room/compiler/src/main/kotlin/androidx/room/ext/javapoet_ext.kt
M room/compiler/src/main/kotlin/androidx/room/vo/FtsOptions.kt
A room/compiler/src/main/kotlin/androidx/room/writer/FtsTableInfoValidationWriter.kt
M room/compiler/src/main/kotlin/androidx/room/writer/SQLiteOpenHelperWriter.kt
M room/compiler/src/main/kotlin/androidx/room/writer/TableInfoValidationWriter.kt
A room/compiler/src/main/kotlin/androidx/room/writer/ValidationWriter.kt
M room/compiler/src/test/kotlin/androidx/room/vo/FtsEntityTest.kt
A room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.FtsMigrationTest.FtsMigrationDb/1.json
A room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.FtsMigrationTest.FtsMigrationDb/2.json
A room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/FtsMigrationTest.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/FtsTableTest.java
M room/migration/src/main/java/androidx/room/migration/bundle/SchemaBundle.java
A room/runtime/src/main/java/androidx/room/util/FtsTableInfo.java
A room/runtime/src/test/java/androidx/room/util/FtsTableInfoTest.java
M room/testing/src/main/java/androidx/room/testing/MigrationTestHelper.java
ap...@google.com <ap...@google.com> #20
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 641db546c6439004e83fb393e6ee5d2b6cf7b193
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Aug 30 15:05:50 2018
Room FTS Support - External Content
Support the content= FTS option in external content mode only. This
option allows users to specify another @Entity class in the FTS
annotation. The specified entity table will be used as content instead
of the FTS table creating its own content table.
To keep tables in sync as recommended by the SQLite documentation, Room
creates sync triggers so that all write operations are only done in the
reference table, avoiding bad indexed data in the FTS table due to the
user not performing write operations in both tables.
Bug: 62356416
Test: ./gradlew room:room-compiler:test \
room:room-migration:test \
room:integration-tests:testapp:cC
Change-Id: I26073295193618b211cc48e30aa8824b5130ed8e
M room/common/src/main/java/androidx/room/Fts4Entity.java
M room/compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/FtsTableEntityProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/compiler/src/main/kotlin/androidx/room/vo/FtsEntity.kt
M room/compiler/src/main/kotlin/androidx/room/vo/FtsOptions.kt
M room/compiler/src/main/kotlin/androidx/room/writer/FtsTableInfoValidationWriter.kt
M room/compiler/src/main/kotlin/androidx/room/writer/SQLiteOpenHelperWriter.kt
M room/compiler/src/test/data/databasewriter/output/ComplexDatabase.java
M room/compiler/src/test/kotlin/androidx/room/processor/DatabaseProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/processor/Fts4TableEntityProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/vo/FtsEntityTest.kt
M room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.FtsMigrationTest.FtsMigrationDb/1.json
M room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.FtsMigrationTest.FtsMigrationDb/2.json
A room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.FtsMigrationTest.FtsMigrationDb/3.json
A room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.FtsMigrationTest.FtsMigrationDb/4.json
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/FtsTestDatabase.java
A room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/dao/SongDao.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/FtsMigrationTest.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/FtsTableTest.java
A room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/vo/Song.java
A room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/vo/SongDescription.java
M room/migration/build.gradle
M room/migration/src/main/java/androidx/room/migration/bundle/DatabaseBundle.java
M room/migration/src/main/java/androidx/room/migration/bundle/FtsEntityBundle.java
M room/migration/src/main/java/androidx/room/migration/bundle/FtsOptionsBundle.java
M room/migration/src/main/java/androidx/room/migration/bundle/SchemaBundle.java
A room/migration/src/test/java/androidx/room/migration/bundle/DatabaseBundleTest.java
M room/runtime/src/main/java/androidx/room/RoomOpenHelper.java
M room/runtime/src/main/java/androidx/room/util/DBUtil.java
https://android-review.googlesource.com/742701
https://goto.google.com/android-sha1/641db546c6439004e83fb393e6ee5d2b6cf7b193
Branch: androidx-master-dev
commit 641db546c6439004e83fb393e6ee5d2b6cf7b193
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Aug 30 15:05:50 2018
Room FTS Support - External Content
Support the content= FTS option in external content mode only. This
option allows users to specify another @Entity class in the FTS
annotation. The specified entity table will be used as content instead
of the FTS table creating its own content table.
To keep tables in sync as recommended by the SQLite documentation, Room
creates sync triggers so that all write operations are only done in the
reference table, avoiding bad indexed data in the FTS table due to the
user not performing write operations in both tables.
Bug: 62356416
Test: ./gradlew room:room-compiler:test \
room:room-migration:test \
room:integration-tests:testapp:cC
Change-Id: I26073295193618b211cc48e30aa8824b5130ed8e
M room/common/src/main/java/androidx/room/Fts4Entity.java
M room/compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/FtsTableEntityProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/compiler/src/main/kotlin/androidx/room/vo/FtsEntity.kt
M room/compiler/src/main/kotlin/androidx/room/vo/FtsOptions.kt
M room/compiler/src/main/kotlin/androidx/room/writer/FtsTableInfoValidationWriter.kt
M room/compiler/src/main/kotlin/androidx/room/writer/SQLiteOpenHelperWriter.kt
M room/compiler/src/test/data/databasewriter/output/ComplexDatabase.java
M room/compiler/src/test/kotlin/androidx/room/processor/DatabaseProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/processor/Fts4TableEntityProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/vo/FtsEntityTest.kt
M room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.FtsMigrationTest.FtsMigrationDb/1.json
M room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.FtsMigrationTest.FtsMigrationDb/2.json
A room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.FtsMigrationTest.FtsMigrationDb/3.json
A room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.FtsMigrationTest.FtsMigrationDb/4.json
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/FtsTestDatabase.java
A room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/dao/SongDao.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/FtsMigrationTest.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/FtsTableTest.java
A room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/vo/Song.java
A room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/vo/SongDescription.java
M room/migration/build.gradle
M room/migration/src/main/java/androidx/room/migration/bundle/DatabaseBundle.java
M room/migration/src/main/java/androidx/room/migration/bundle/FtsEntityBundle.java
M room/migration/src/main/java/androidx/room/migration/bundle/FtsOptionsBundle.java
M room/migration/src/main/java/androidx/room/migration/bundle/SchemaBundle.java
A room/migration/src/test/java/androidx/room/migration/bundle/DatabaseBundleTest.java
M room/runtime/src/main/java/androidx/room/RoomOpenHelper.java
M room/runtime/src/main/java/androidx/room/util/DBUtil.java
[Deleted User] <[Deleted User]> #22
Hi, I have a problem with the Fts4 annotation, when I mark the Entity class with the Fts4 annotation, my binding classes are not generated
yb...@google.com <yb...@google.com> #23
can you please file a new bug with more details on what is wrong with it?
A sample app that reproduces would make it much better.
Thanks.
A sample app that reproduces would make it much better.
Thanks.
sr...@gmail.com <sr...@gmail.com> #24
Hi,
Is there an example to show how how to use this in an entity? I was trying to look for test code which could help but did not find any annotation usage.
thanks
Is there an example to show how how to use this in an entity? I was trying to look for test code which could help but did not find any annotation usage.
thanks
sr...@gmail.com <sr...@gmail.com> #25
I found the example in 'SongDescription' class, I also tried it, it works for me.
thanks a lot!!
thanks a lot!!
yb...@google.com <yb...@google.com> #26
We are updating the docs so should be available soon.
Meanwhile, the FTS integration test class might give some directions:
https://android.googlesource.com/platform/frameworks/support/+/androidx-master-dev/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/FtsTableTest.java
Meanwhile, the FTS integration test class might give some directions:
da...@gmail.com <da...@gmail.com> #27
#25 can you post a link to the "SongDescription" class you're talking about? Can't find it anywhere :-(
xm...@gmail.com <xm...@gmail.com> #30
When support icu Tokenizer?
to...@gmail.com <to...@gmail.com> #31
Is there any plan support icu tokenizer?
ji...@gmail.com <ji...@gmail.com> #32
It seems that the icu tokenizer is still not supported in version 2.2.1
Description
Version used: 1.0.0-alpha2
Devices/Android versions reproduced on: N/A
Room does not currently support FTS3 or FTS4 virtual tables. These tables are however supported by all Android versions.
Example SQL statement to create one of those tables:
CREATE VIRTUAL TABLE event_titles USING FTS3(title TEXT, subtitle TEXT);
I suggest adding a parameter to the @Entity annotation. Example:
@Entity(tableName = "event_titles", tableType = FTS3)
Those tables only support String columns, in addition to the integer primary key. This can be enforced by Room at compile time.
Then, a DAO can query these columns using full-text search:
@Query("SELECT * FROM event_titles WHERE title MATCH :word")
List<Event> findEvents(String word);