Skip to content

Commit

Permalink
Fix crash & gesture lock not working. Resolve #3
Browse files Browse the repository at this point in the history
  • Loading branch information
SpongeBobSun committed Oct 10, 2016
1 parent e0dec6c commit e8260a3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 28 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "sun.bob.leela"
minSdkVersion 16
targetSdkVersion 24
versionCode 1
versionName "1.1"
versionCode 2
versionName "1.2"
renderscriptSupportModeEnabled true
resConfigs "en", "zh"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public QuickPassRunnable(String quickCode, String password) {

private void getPasswordHash() {
Account account = AccountHelper.getInstance(null).getQuickAccount();
if (this.passwordHash == null) {
if (account == null) {
UserDefault.getInstance(null).clearQuickPassword();
AccountHelper.getInstance(null).clearQuickAccount();
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,29 +133,6 @@ public void onClick(TextItem textItem) {
}
}));

// if (UserDefault.getInstance(null).hasQuickPassword()) {
// selectorItem = new SelectorItem(this, UserDefault.kSettingsQuickPassByte).setAdapter(new SettingsSpinnerAdapter()).setOnItemClickListener(new AdapterView.OnItemSelectedListener() {
// @Override
// public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
// getStorageInterface().save(UserDefault.kSettingsQuickPassByte, id);
// }
//
// @Override
// public void onNothingSelected(AdapterView<?> parent) {
//
// }
// });
//
// if (UserDefault.getInstance(null).getQuickPassByte() == UserDefault.v4x4) {
// selectorItem.setSelectedPos(1);
// } else {
// selectorItem.setSelectedPos(0);
// }
//
// addItem(selectorItem);
// } else {
//
// }

}

Expand Down Expand Up @@ -190,7 +167,12 @@ public void onEventMainThread(Object event) {
}
return;
}
dialog.dismiss();
if (dialog != null) {
dialog.dismiss();
}
if (!(event instanceof DBExportEvent)) {
return;
}
DBExportEvent dbExportEvent = (DBExportEvent) event;
if (dbExportEvent.success) {
new AlertDialog.Builder(this)
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/java/sun/bob/leela/utils/CryptoUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ public void onEventMainThread(CryptoEvent event) {
EventBus.getDefault().unregister(this);
break;
case AppConstants.TYPE_SHTHPPN:
dialog.dismiss();
if (dialog != null) {
dialog.dismiss();
}
break;
default:
if (dialog != null) {
Expand Down

0 comments on commit e8260a3

Please sign in to comment.