Created
November 29, 2012 09:23
-
-
Save rtfb/4167779 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/AndroidManifest.xml b/AndroidManifest.xml | |
index 57b4adb..c234246 100644 | |
--- a/AndroidManifest.xml | |
+++ b/AndroidManifest.xml | |
@@ -62,7 +62,9 @@ | |
<activity android:name="InstallProgress" | |
android:theme="@style/VimTheme" | |
android:launchMode="singleInstance" | |
+ android:excludeFromRecents="true" | |
android:label="@string/install_activity" | |
> | |
<intent-filter> | |
<action android:name="android.intent.action.VIEW" /> | |
diff --git a/src/net/momodalo/app/vimtouch/InstallProgress.java b/src/net/momodalo/app/vimtouch/InstallProgress.java | |
index 3f595b8..d8468d9 100644 | |
--- a/src/net/momodalo/app/vimtouch/InstallProgress.java | |
+++ b/src/net/momodalo/app/vimtouch/InstallProgress.java | |
@@ -314,9 +315,10 @@ public class InstallProgress extends Activity { | |
try { | |
InputStream attachment = getContentResolver().openInputStream(mUri); | |
installZip(attachment); | |
- showNotification(); | |
}catch(Exception e){} | |
- finish(); | |
+ launchMainActivity(); | |
+ System.runFinalizersOnExit(true); | |
+ System.exit(0); | |
} | |
}).start(); | |
} | |
@@ -355,6 +357,24 @@ public class InstallProgress extends Activity { | |
} | |
} | |
+ public void launchMainActivity() { | |
+ Intent intent = new Intent(this, VimTouch.class); | |
+ intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); | |
+ startActivity(intent); | |
+ } | |
+ | |
public void onDestroy() { | |
if(mReceiver != null) | |
unregisterReceiver(mReceiver); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment