Skip to content

Commit

Permalink
* Added: Support for Android 2.1
Browse files Browse the repository at this point in the history
* Fixed: Rare crash when registering to Todoist via Budoist
  • Loading branch information
budowski committed Jul 11, 2012
1 parent bda0c35 commit 9319af5
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 10 deletions.
6 changes: 3 additions & 3 deletions AndroidManifest.xml
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="budo.budoist"
android:versionCode="25"
android:versionName="1.2.4" xmlns:android="http://schemas.android.com/apk/res/android">
android:versionCode="26"
android:versionName="1.2.5" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<uses-sdk android:minSdkVersion="8" />
<uses-sdk android:minSdkVersion="7" />

<application android:name="TodoistApplication" android:icon="@drawable/budoist_icon" android:label="Budoist">
<activity android:name="Bootloader"
Expand Down
2 changes: 1 addition & 1 deletion project.properties
Expand Up @@ -8,5 +8,5 @@
# project structure.

# Project target.
target=android-8
target=android-7
android.library.reference.1=tree-view-list-android
2 changes: 1 addition & 1 deletion src/budo/budoist/views/LoginView.java
Expand Up @@ -170,7 +170,7 @@ public void run() {
loginDialog.dismiss();
} catch (Exception exc) {
// Sometimes an IllegalArgumentException occurrs (View not attached to window manager).
// This could happens sometimes when the activity finishes before the dialog successfully
// This could happen sometimes when the activity finishes before the dialog successfully
// dismisses - so there's nothing to do here.
// See: http://stackoverflow.com/a/5102572/1233767
}
Expand Down
25 changes: 20 additions & 5 deletions src/budo/budoist/views/RegisterView.java
Expand Up @@ -117,9 +117,16 @@ public void run() {
// Registration failed
runOnUiThread(new Runnable() {
public void run() {
if (mRegisterDialog.isShowing())
mRegisterDialog.dismiss();

try {
if (mRegisterDialog.isShowing())
mRegisterDialog.dismiss();
} catch (Exception exc) {
// Sometimes an IllegalArgumentException occurrs (View not attached to window manager).
// This could happen sometimes when the activity finishes before the dialog successfully
// dismisses - so there's nothing to do here.
// See: http://stackoverflow.com/a/5102572/1233767
}

String errorText;
switch (e.getErrorCode()) {
case ERROR_PASSWORD_TOO_SHORT:
Expand All @@ -143,8 +150,16 @@ public void run() {

runOnUiThread(new Runnable() {
public void run() {
if (mRegisterDialog.isShowing())
mRegisterDialog.dismiss();
try {
if (mRegisterDialog.isShowing())
mRegisterDialog.dismiss();
} catch (Exception exc) {
// Sometimes an IllegalArgumentException occurrs (View not attached to window manager).
// This could happen sometimes when the activity finishes before the dialog successfully
// dismisses - so there's nothing to do here.
// See: http://stackoverflow.com/a/5102572/1233767
}

}
});

Expand Down

0 comments on commit 9319af5

Please sign in to comment.