Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
language: android
jdk: oraclejdk7
jdk: openjdk8

android:
components:
- build-tools-23.0.1
- android-23
- android-18
- extra
- sys-img-armeabi-v7a-android-18

Expand All @@ -14,7 +15,7 @@ install:
# Emulator Management: Create, Start and Wait
before_script:
- echo no | android create avd --force -n test -t android-18 --abi armeabi-v7a
- emulator -avd test -no-skin -no-audio -no-window &
- emulator -avd test -engine classic -no-skin -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,19 @@ private KeyStoreKeyGenerator(Application application, String filename) {
this.isHardwareBacked = KeyChain.isBoundKeyAlgorithm("RSA");
this.keyFile = new File(application.getFilesDir(), filename);

try {
// Load secret key and ensure our root document is ready.
loadOrGenerateKeys();

} catch (IOException e) {
throw new IllegalStateException(e);
} catch (GeneralSecurityException e) {
throw new IllegalStateException(e);
//WORKAROUND for https://issuetracker.google.com/issues/37137351

for (int i = 0; i <= 2; i++) {
try {
// Load secret key and ensure our root document is ready.
loadOrGenerateKeys();

} catch (IOException | GeneralSecurityException e) {
keyFile.delete();
if (i >= 2) {
throw new IllegalStateException("Failed to initialize KeyStoreKeyGenerator (failed to load security key)", e); // fatal error
}
}
}
}

Expand Down