forked from poliva/rootadb
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
target api 17 to give nice styling on ICS devices, new background
pattern, swap nasty toggle button for check box, added code to enabled/disable boot receiver to save it running all the time.
- Loading branch information
Showing
8 changed files
with
234 additions
and
119 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,40 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="org.eslack.rootadb" | ||
android:versionCode="2" | ||
android:versionName="1.1"> | ||
<uses-sdk android:minSdkVersion="4" /> | ||
package="org.eslack.rootadb" | ||
android:versionCode="3" | ||
android:versionName="1.1" > | ||
|
||
<uses-sdk | ||
android:minSdkVersion="4" | ||
android:targetSdkVersion="17" /> | ||
|
||
<uses-permission android:name="android.permission.ACCESS_SUPERUSER" /> | ||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> | ||
<application android:label="@string/app_name" android:icon="@drawable/icon"> | ||
<activity android:name="RootAdb" | ||
android:label="@string/app_name"> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@drawable/icon" | ||
android:label="@string/app_name" > | ||
<activity | ||
android:name="RootAdb" | ||
android:label="@string/app_name" > | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity android:name=".SettingsActivity" android:label="RootAdb settings" /> | ||
<receiver android:name=".BootReceiver"> | ||
<activity | ||
android:name=".SettingsActivity" | ||
android:label="RootAdb settings" /> | ||
|
||
<receiver | ||
android:name=".BootReceiver" | ||
android:enabled="false" > | ||
<intent-filter> | ||
<action android:name="android.intent.action.BOOT_COMPLETED" /> | ||
</intent-filter> | ||
</receiver> | ||
</application> | ||
</manifest> | ||
|
||
</manifest> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > | ||
|
||
<item> | ||
<bitmap | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:antialias="true" | ||
android:dither="false" | ||
android:filter="false" | ||
android:gravity="left" | ||
android:src="@drawable/knitting250px" | ||
android:tileMode="repeat" /> | ||
</item> | ||
<item> | ||
<shape> | ||
<gradient | ||
android:angle="270" | ||
android:endColor="#2C000000" | ||
android:startColor="#B3000000" /> | ||
</shape> | ||
<shape> | ||
<gradient | ||
android:angle="270" | ||
android:centerColor="#000000" | ||
android:centerY="0.1" | ||
android:endColor="#c8c8c8" | ||
android:startColor="#000000" /> | ||
</shape> | ||
</item> | ||
|
||
</layer-list> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,39 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="vertical" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:background="#ffffffff" | ||
android:padding="15dp" | ||
> | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:background="@drawable/knitting_gradident" | ||
android:orientation="vertical" | ||
android:padding="15dp" > | ||
|
||
<LinearLayout | ||
android:gravity="center" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:padding="2dp" | ||
android:orientation="horizontal"> | ||
<LinearLayout | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center" | ||
android:orientation="horizontal" | ||
android:padding="2dp" > | ||
|
||
<ToggleButton | ||
android:id="@+id/togglebutton" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:textOn="insecure adb" | ||
android:textOff="secure adb" | ||
android:onClick="onToggleClicked"/> | ||
<CheckBox | ||
android:id="@+id/checkBox1" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:onClick="onToggleClicked" /> | ||
</LinearLayout> | ||
|
||
</LinearLayout> | ||
<ScrollView | ||
android:id="@+id/widget48" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:background="#00000000" > | ||
|
||
<ScrollView | ||
android:id="@+id/widget48" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:background="#ff000000"> | ||
<TextView | ||
android:id="@+id/outputView" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:background="#00000000" | ||
android:padding="2dp" | ||
android:textColor="#ffffffff" > | ||
</TextView> | ||
</ScrollView> | ||
|
||
<TextView android:id="@+id/outputView" | ||
android:padding="2dp" | ||
android:background="#ff000000" | ||
android:textColor="#ffffffff" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content"> | ||
</TextView> | ||
|
||
</ScrollView> | ||
|
||
</LinearLayout> | ||
</LinearLayout> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
|
||
<string name="app_name">RootAdb</string> | ||
</resources> | ||
<string name="button_on">secure adb</string> | ||
<string name="button_off">insecure adb</string> | ||
|
||
</resources> |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,49 @@ | ||
/* | ||
rootadb | ||
(c) 2013 Pau Oliva Fora <pof[at]eslack[dot]org> | ||
*/ | ||
*/ | ||
package org.eslack.rootadb; | ||
|
||
import org.eslack.rootadb.Utils; | ||
|
||
import android.os.Bundle; | ||
import android.preference.CheckBoxPreference; | ||
import android.preference.Preference; | ||
import android.preference.Preference.OnPreferenceChangeListener; | ||
import android.preference.PreferenceActivity; | ||
|
||
public class SettingsActivity extends PreferenceActivity { | ||
|
||
@Override | ||
public void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
addPreferencesFromResource(R.xml.preferences); | ||
} | ||
|
||
} | ||
|
||
private CheckBoxPreference mStartOnBootPreference; | ||
|
||
@Override | ||
public void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
addPreferencesFromResource(R.xml.preferences); | ||
|
||
mStartOnBootPreference = (CheckBoxPreference) getPreferenceScreen() | ||
.findPreference("start_onboot"); | ||
|
||
// toggle BootReceiver on/off | ||
mStartOnBootPreference | ||
.setOnPreferenceChangeListener(new OnPreferenceChangeListener() { | ||
|
||
@Override | ||
public boolean onPreferenceChange(Preference preference, | ||
Object newValue) { | ||
|
||
if (newValue instanceof Boolean) { | ||
if ((Boolean) newValue) { | ||
Utils.enableReceiver(getApplicationContext(), | ||
BootReceiver.class); | ||
} else { | ||
Utils.disableReceiver(getApplicationContext(), | ||
BootReceiver.class); | ||
} | ||
return true; | ||
} | ||
return false; | ||
} | ||
}); | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.