Christoph Haas 5 years ago
commit
55ca4db95a
50 changed files with 551 additions and 0 deletions
  1. 9
    0
      .classpath
  2. 33
    0
      .project
  3. 4
    0
      .settings/org.eclipse.jdt.core.prefs
  4. 33
    0
      AndroidManifest.xml
  5. 33
    0
      bin/AndroidManifest.xml
  6. BIN
      bin/classes/at/sprinternet/mvnoroaming/BuildConfig.class
  7. BIN
      bin/classes/at/sprinternet/mvnoroaming/ExecuteAsRoot.class
  8. BIN
      bin/classes/at/sprinternet/mvnoroaming/MVNORoamingStatusChanger$1.class
  9. BIN
      bin/classes/at/sprinternet/mvnoroaming/MVNORoamingStatusChanger$2.class
  10. BIN
      bin/classes/at/sprinternet/mvnoroaming/MVNORoamingStatusChanger.class
  11. BIN
      bin/classes/at/sprinternet/mvnoroaming/R$attr.class
  12. BIN
      bin/classes/at/sprinternet/mvnoroaming/R$dimen.class
  13. BIN
      bin/classes/at/sprinternet/mvnoroaming/R$drawable.class
  14. BIN
      bin/classes/at/sprinternet/mvnoroaming/R$id.class
  15. BIN
      bin/classes/at/sprinternet/mvnoroaming/R$layout.class
  16. BIN
      bin/classes/at/sprinternet/mvnoroaming/R$menu.class
  17. BIN
      bin/classes/at/sprinternet/mvnoroaming/R$string.class
  18. BIN
      bin/classes/at/sprinternet/mvnoroaming/R$style.class
  19. BIN
      bin/classes/at/sprinternet/mvnoroaming/R.class
  20. BIN
      bin/classes/at/sprinternet/mvnoroaming/RebootService.class
  21. BIN
      bin/classes/at/sprinternet/mvnoroaming/RebootServiceReceiver.class
  22. BIN
      bin/dexedLibs/android-support-v4-fdaef44f6c6e5e528d87159766bd7e19.jar
  23. BIN
      bin/res/crunch/drawable-hdpi/ic_launcher.png
  24. BIN
      bin/res/crunch/drawable-mdpi/ic_launcher.png
  25. BIN
      bin/res/crunch/drawable-xhdpi/ic_launcher.png
  26. BIN
      bin/res/crunch/drawable-xxhdpi/ic_launcher.png
  27. 6
    0
      gen/at/sprinternet/mvnoroaming/BuildConfig.java
  28. 79
    0
      gen/at/sprinternet/mvnoroaming/R.java
  29. BIN
      ic_launcher-web.png
  30. BIN
      libs/android-support-v4.jar
  31. 20
    0
      proguard-project.txt
  32. 14
    0
      project.properties
  33. BIN
      res/drawable-hdpi/ic_launcher.png
  34. BIN
      res/drawable-mdpi/ic_launcher.png
  35. BIN
      res/drawable-xhdpi/ic_launcher.png
  36. BIN
      res/drawable-xxhdpi/ic_launcher.png
  37. 66
    0
      res/layout/activity_mvno.xml
  38. 9
    0
      res/menu/mvnoroaming_status_changer.xml
  39. 8
    0
      res/values-sw600dp/dimens.xml
  40. 9
    0
      res/values-sw720dp-land/dimens.xml
  41. 11
    0
      res/values-v11/styles.xml
  42. 12
    0
      res/values-v14/styles.xml
  43. 7
    0
      res/values/dimens.xml
  44. 13
    0
      res/values/strings.xml
  45. 20
    0
      res/values/styles.xml
  46. 22
    0
      src/at/sprinternet/mvnoroaming/ExecuteAsRoot.java
  47. 73
    0
      src/at/sprinternet/mvnoroaming/MVNORoamingStatusChanger.java
  48. 54
    0
      src/at/sprinternet/mvnoroaming/RebootService.java
  49. 16
    0
      src/at/sprinternet/mvnoroaming/RebootServiceReceiver.java
  50. 0
    0
      srcres/icon_roam.png

+ 9
- 0
.classpath View File

@@ -0,0 +1,9 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<classpath>
3
+	<classpathentry kind="src" path="src"/>
4
+	<classpathentry kind="src" path="gen"/>
5
+	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
6
+	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
7
+	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
8
+	<classpathentry kind="output" path="bin/classes"/>
9
+</classpath>

+ 33
- 0
.project View File

@@ -0,0 +1,33 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<projectDescription>
3
+	<name>MVNOroaming</name>
4
+	<comment></comment>
5
+	<projects>
6
+	</projects>
7
+	<buildSpec>
8
+		<buildCommand>
9
+			<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
10
+			<arguments>
11
+			</arguments>
12
+		</buildCommand>
13
+		<buildCommand>
14
+			<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
15
+			<arguments>
16
+			</arguments>
17
+		</buildCommand>
18
+		<buildCommand>
19
+			<name>org.eclipse.jdt.core.javabuilder</name>
20
+			<arguments>
21
+			</arguments>
22
+		</buildCommand>
23
+		<buildCommand>
24
+			<name>com.android.ide.eclipse.adt.ApkBuilder</name>
25
+			<arguments>
26
+			</arguments>
27
+		</buildCommand>
28
+	</buildSpec>
29
+	<natures>
30
+		<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
31
+		<nature>org.eclipse.jdt.core.javanature</nature>
32
+	</natures>
33
+</projectDescription>

+ 4
- 0
.settings/org.eclipse.jdt.core.prefs View File

@@ -0,0 +1,4 @@
1
+eclipse.preferences.version=1
2
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
3
+org.eclipse.jdt.core.compiler.compliance=1.6
4
+org.eclipse.jdt.core.compiler.source=1.6

+ 33
- 0
AndroidManifest.xml View File

@@ -0,0 +1,33 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+    package="at.sprinternet.mvnoroaming"
4
+    android:versionCode="1"
5
+    android:versionName="1.0" >
6
+
7
+    <uses-sdk
8
+        android:minSdkVersion="14"
9
+        android:targetSdkVersion="19" />
10
+    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
11
+    <uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>
12
+
13
+    <application
14
+        android:allowBackup="true"
15
+        android:icon="@drawable/ic_launcher"
16
+        android:label="@string/app_name"
17
+        android:theme="@style/AppTheme" android:testOnly="false">
18
+        <activity
19
+            android:name="at.sprinternet.mvnoroaming.MVNORoamingStatusChanger"
20
+            android:label="@string/app_name" >
21
+            <intent-filter>
22
+                <action android:name="android.intent.action.MAIN" />
23
+                <category android:name="android.intent.category.LAUNCHER" />
24
+            </intent-filter>
25
+        </activity>		
26
+		<receiver android:name=".RebootServiceReceiver">
27
+		    <intent-filter>
28
+		        <action android:name="android.intent.action.BOOT_COMPLETED" />
29
+		    </intent-filter>
30
+		</receiver>
31
+		<service android:name=".RebootService" />
32
+    </application>
33
+</manifest>

+ 33
- 0
bin/AndroidManifest.xml View File

@@ -0,0 +1,33 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+    package="at.sprinternet.mvnoroaming"
4
+    android:versionCode="1"
5
+    android:versionName="1.0" >
6
+
7
+    <uses-sdk
8
+        android:minSdkVersion="14"
9
+        android:targetSdkVersion="19" />
10
+    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
11
+    <uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>
12
+
13
+    <application
14
+        android:allowBackup="true"
15
+        android:icon="@drawable/ic_launcher"
16
+        android:label="@string/app_name"
17
+        android:theme="@style/AppTheme" android:testOnly="false">
18
+        <activity
19
+            android:name="at.sprinternet.mvnoroaming.MVNORoamingStatusChanger"
20
+            android:label="@string/app_name" >
21
+            <intent-filter>
22
+                <action android:name="android.intent.action.MAIN" />
23
+                <category android:name="android.intent.category.LAUNCHER" />
24
+            </intent-filter>
25
+        </activity>		
26
+		<receiver android:name=".RebootServiceReceiver">
27
+		    <intent-filter>
28
+		        <action android:name="android.intent.action.BOOT_COMPLETED" />
29
+		    </intent-filter>
30
+		</receiver>
31
+		<service android:name=".RebootService" />
32
+    </application>
33
+</manifest>

BIN
bin/classes/at/sprinternet/mvnoroaming/BuildConfig.class View File


BIN
bin/classes/at/sprinternet/mvnoroaming/ExecuteAsRoot.class View File


BIN
bin/classes/at/sprinternet/mvnoroaming/MVNORoamingStatusChanger$1.class View File


BIN
bin/classes/at/sprinternet/mvnoroaming/MVNORoamingStatusChanger$2.class View File


BIN
bin/classes/at/sprinternet/mvnoroaming/MVNORoamingStatusChanger.class View File


BIN
bin/classes/at/sprinternet/mvnoroaming/R$attr.class View File


BIN
bin/classes/at/sprinternet/mvnoroaming/R$dimen.class View File


BIN
bin/classes/at/sprinternet/mvnoroaming/R$drawable.class View File


BIN
bin/classes/at/sprinternet/mvnoroaming/R$id.class View File


BIN
bin/classes/at/sprinternet/mvnoroaming/R$layout.class View File


BIN
bin/classes/at/sprinternet/mvnoroaming/R$menu.class View File


BIN
bin/classes/at/sprinternet/mvnoroaming/R$string.class View File


BIN
bin/classes/at/sprinternet/mvnoroaming/R$style.class View File


BIN
bin/classes/at/sprinternet/mvnoroaming/R.class View File


BIN
bin/classes/at/sprinternet/mvnoroaming/RebootService.class View File


BIN
bin/classes/at/sprinternet/mvnoroaming/RebootServiceReceiver.class View File


BIN
bin/dexedLibs/android-support-v4-fdaef44f6c6e5e528d87159766bd7e19.jar View File


BIN
bin/res/crunch/drawable-hdpi/ic_launcher.png View File


BIN
bin/res/crunch/drawable-mdpi/ic_launcher.png View File


BIN
bin/res/crunch/drawable-xhdpi/ic_launcher.png View File


BIN
bin/res/crunch/drawable-xxhdpi/ic_launcher.png View File


+ 6
- 0
gen/at/sprinternet/mvnoroaming/BuildConfig.java View File

@@ -0,0 +1,6 @@
1
+/** Automatically generated file. DO NOT MODIFY */
2
+package at.sprinternet.mvnoroaming;
3
+
4
+public final class BuildConfig {
5
+    public final static boolean DEBUG = true;
6
+}

+ 79
- 0
gen/at/sprinternet/mvnoroaming/R.java
File diff suppressed because it is too large
View File


BIN
ic_launcher-web.png View File


BIN
libs/android-support-v4.jar View File


+ 20
- 0
proguard-project.txt View File

@@ -0,0 +1,20 @@
1
+# To enable ProGuard in your project, edit project.properties
2
+# to define the proguard.config property as described in that file.
3
+#
4
+# Add project specific ProGuard rules here.
5
+# By default, the flags in this file are appended to flags specified
6
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
7
+# You can edit the include path and order by changing the ProGuard
8
+# include property in project.properties.
9
+#
10
+# For more details, see
11
+#   http://developer.android.com/guide/developing/tools/proguard.html
12
+
13
+# Add any project specific keep options here:
14
+
15
+# If your project uses WebView with JS, uncomment the following
16
+# and specify the fully qualified class name to the JavaScript interface
17
+# class:
18
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19
+#   public *;
20
+#}

+ 14
- 0
project.properties View File

@@ -0,0 +1,14 @@
1
+# This file is automatically generated by Android Tools.
2
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3
+#
4
+# This file must be checked in Version Control Systems.
5
+#
6
+# To customize properties used by the Ant build system edit
7
+# "ant.properties", and override values to adapt the script to your
8
+# project structure.
9
+#
10
+# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11
+#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12
+
13
+# Project target.
14
+target=android-19

BIN
res/drawable-hdpi/ic_launcher.png View File


BIN
res/drawable-mdpi/ic_launcher.png View File


BIN
res/drawable-xhdpi/ic_launcher.png View File


BIN
res/drawable-xxhdpi/ic_launcher.png View File


+ 66
- 0
res/layout/activity_mvno.xml
File diff suppressed because it is too large
View File


+ 9
- 0
res/menu/mvnoroaming_status_changer.xml View File

@@ -0,0 +1,9 @@
1
+<menu xmlns:android="http://schemas.android.com/apk/res/android" >
2
+
3
+    <item
4
+        android:id="@+id/action_settings"
5
+        android:orderInCategory="100"
6
+        android:showAsAction="never"
7
+        android:title="@string/action_settings"/>
8
+
9
+</menu>

+ 8
- 0
res/values-sw600dp/dimens.xml View File

@@ -0,0 +1,8 @@
1
+<resources>
2
+
3
+    <!--
4
+         Customize dimensions originally defined in res/values/dimens.xml (such as
5
+         screen margins) for sw600dp devices (e.g. 7" tablets) here.
6
+    -->
7
+
8
+</resources>

+ 9
- 0
res/values-sw720dp-land/dimens.xml View File

@@ -0,0 +1,9 @@
1
+<resources>
2
+
3
+    <!--
4
+         Customize dimensions originally defined in res/values/dimens.xml (such as
5
+         screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
6
+    -->
7
+    <dimen name="activity_horizontal_margin">128dp</dimen>
8
+
9
+</resources>

+ 11
- 0
res/values-v11/styles.xml View File

@@ -0,0 +1,11 @@
1
+<resources>
2
+
3
+    <!--
4
+        Base application theme for API 11+. This theme completely replaces
5
+        AppBaseTheme from res/values/styles.xml on API 11+ devices.
6
+    -->
7
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
8
+        <!-- API 11 theme customizations can go here. -->
9
+    </style>
10
+
11
+</resources>

+ 12
- 0
res/values-v14/styles.xml View File

@@ -0,0 +1,12 @@
1
+<resources>
2
+
3
+    <!--
4
+        Base application theme for API 14+. This theme completely replaces
5
+        AppBaseTheme from BOTH res/values/styles.xml and
6
+        res/values-v11/styles.xml on API 14+ devices.
7
+    -->
8
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
9
+        <!-- API 14 theme customizations can go here. -->
10
+    </style>
11
+
12
+</resources>

+ 7
- 0
res/values/dimens.xml View File

@@ -0,0 +1,7 @@
1
+<resources>
2
+
3
+    <!-- Default screen margins, per the Android Design guidelines. -->
4
+    <dimen name="activity_horizontal_margin">16dp</dimen>
5
+    <dimen name="activity_vertical_margin">16dp</dimen>
6
+
7
+</resources>

+ 13
- 0
res/values/strings.xml View File

@@ -0,0 +1,13 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<resources>
3
+
4
+    <string name="app_name">MVNO roaming</string>
5
+    <string name="action_settings">Settings</string>
6
+    <string name="description">With this app you can disable the roaming icon if your service provider is a mvno (mobile virtual network operator)! Just enter your providername in the textfield.</string>
7
+    <string name="inputHint">Your provider. e.g. tmobile</string>
8
+    <string name="enableOnBoot">Enable this switch to set the correct providername after a reboot, so you do not need to run this app manually!</string>
9
+    <string name="update">Update</string>
10
+    <string name="rebootSwitch">Set on reboot:</string>
11
+    <string name="copyright">Written by h44z 2013. v1.0</string>
12
+
13
+</resources>

+ 20
- 0
res/values/styles.xml View File

@@ -0,0 +1,20 @@
1
+<resources>
2
+
3
+    <!--
4
+        Base application theme, dependent on API level. This theme is replaced
5
+        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
6
+    -->
7
+    <style name="AppBaseTheme" parent="android:Theme.Light">
8
+        <!--
9
+            Theme customizations available in newer API levels can go in
10
+            res/values-vXX/styles.xml, while customizations related to
11
+            backward-compatibility can go here.
12
+        -->
13
+    </style>
14
+
15
+    <!-- Application theme. -->
16
+    <style name="AppTheme" parent="AppBaseTheme">
17
+        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
18
+    </style>
19
+
20
+</resources>

+ 22
- 0
src/at/sprinternet/mvnoroaming/ExecuteAsRoot.java View File

@@ -0,0 +1,22 @@
1
+package at.sprinternet.mvnoroaming;
2
+
3
+import java.io.IOException;
4
+
5
+import android.util.Log;
6
+
7
+public class ExecuteAsRoot {
8
+	public static boolean exec(String command) {
9
+		try {
10
+			Process process = Runtime.getRuntime().exec(
11
+					new String[] { "su", "-c", command });
12
+			process.waitFor();			
13
+		} catch (IOException ex) {
14
+			Log.w("ROOT", "Can't get root access", ex);
15
+			return false;
16
+		} catch (InterruptedException ex) {
17
+			Log.w("ROOT", "Can't get root access", ex);
18
+			return false;
19
+		}
20
+		return true;
21
+	}
22
+}

+ 73
- 0
src/at/sprinternet/mvnoroaming/MVNORoamingStatusChanger.java
File diff suppressed because it is too large
View File


+ 54
- 0
src/at/sprinternet/mvnoroaming/RebootService.java
File diff suppressed because it is too large
View File


+ 16
- 0
src/at/sprinternet/mvnoroaming/RebootServiceReceiver.java View File

@@ -0,0 +1,16 @@
1
+package at.sprinternet.mvnoroaming;
2
+
3
+import android.content.BroadcastReceiver;
4
+import android.content.Context;
5
+import android.content.Intent;
6
+
7
+public class RebootServiceReceiver extends BroadcastReceiver {
8
+
9
+	@Override
10
+	public void onReceive(Context context, Intent intent) {
11
+		if ("android.intent.action.BOOT_COMPLETED".equals(intent.getAction())) {
12
+            Intent serviceIntent = new Intent(context, RebootService.class);
13
+            context.startService(serviceIntent);
14
+        }
15
+	}
16
+}

+ 0
- 0
srcres/icon_roam.png View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save