Skip to content

Commit

Permalink
test2
Browse files Browse the repository at this point in the history
  • Loading branch information
parrotgeek1 committed Jul 3, 2016
1 parent 6fb0b57 commit 0491664
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 58 deletions.
Binary file modified app/app-release.apk
Binary file not shown.
10 changes: 0 additions & 10 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.parrotgeek.launcherhijack">
<uses-permission android:name="android.permission.BIND_ACCESSIBILITY_SERVICE" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
Expand All @@ -12,16 +10,8 @@
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name=".AccServ"
android:label="To detect home button press"
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE">
<intent-filter>
<action android:name="android.accessibilityservice.AccessibilityService" />
</intent-filter>
</service>
</application>
</manifest>
47 changes: 0 additions & 47 deletions app/src/main/java/com/parrotgeek/launcherhijack/AccServ.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package com.parrotgeek.launcherhijack;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

public class MainActivity extends AppCompatActivity {

Expand All @@ -10,4 +12,10 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}

private void chooser(View view){
Intent choose = new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_HOME).setClassName("android","com.android.internal.app.ResolverActivity");
startActivity(choose);
}

}
22 changes: 21 additions & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,25 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!" />
android:id="@+id/textView"
android:text="Tap the button to force reset the default launcher. (You will need to pick the launcher a second time when you press Home due to a Fire OS bug.)"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Clear Default Launcher"
android:id="@+id/button"
android:layout_below="@+id/textView"
android:layout_centerHorizontal="true"
android:onClick="chooser" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="by parrotgeek1 on XDA"
android:id="@+id/textView2"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" />
</RelativeLayout>

0 comments on commit 0491664

Please sign in to comment.