Skip to content

Instantly share code, notes, and snippets.

@rtfb
Created November 29, 2012 09:23
Show Gist options
  • Save rtfb/4167779 to your computer and use it in GitHub Desktop.
Save rtfb/4167779 to your computer and use it in GitHub Desktop.
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