Skip to content

Commit

Permalink
F** me i'm dumbass
Browse files Browse the repository at this point in the history
  • Loading branch information
Neamar committed Oct 3, 2015
1 parent cc95459 commit 0c26ead
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<manifest
package="fr.neamar.kiss"
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="63"
android:versionName="2.10.0">
android:versionCode="64"
android:versionName="2.10.1">

<!-- Self explanatory -->
<uses-permission android:name="android.permission.READ_CONTACTS"/>
Expand Down
13 changes: 12 additions & 1 deletion app/src/main/java/fr/neamar/kiss/result/AppResult.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package fr.neamar.kiss.result;

import android.annotation.TargetApi;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
Expand Down Expand Up @@ -142,6 +143,16 @@ public Drawable getDrawable(Context context) {

@Override
public void doLaunch(Context context, View v) {
throw new RuntimeException("LOLILOL");
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
intent.setComponent(className);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);

try {
context.startActivity(intent);
} catch (ActivityNotFoundException e) {
// Application was just removed?
Toast.makeText(context, R.string.application_not_found, Toast.LENGTH_LONG).show();
}
}
}

0 comments on commit 0c26ead

Please sign in to comment.