[tor-commits] [orbot/master] update to support specific permissions for Service
n8fr8 at torproject.org
n8fr8 at torproject.org
Tue Apr 8 05:55:59 UTC 2014
commit e78486a41f8fd4e2c1f5a14fe7c6b6e11eb89779
Author: Nathan Freitas <nathan at freitas.net>
Date: Tue Apr 8 01:12:35 2014 -0400
update to support specific permissions for Service
this is an attempted fix for Samsung S3/Note3 issues
---
AndroidManifest.xml | 17 +++++++++++------
res/values/strings.xml | 3 +++
src/org/torproject/android/Orbot.java | 2 +-
3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 453921a..95239a7 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1,16 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.torproject.android"
- android:versionName="13.0.6-BETA-3"
- android:versionCode="73"
+ android:versionName="13.0.6-BETA-3a"
+ android:versionCode="74"
android:installLocation="auto"
- > <uses-permission android:name="android.permission.INTERNET" />
- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
- <uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>
+ >
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19"/>
+ <permission android:name="org.torproject.android.MANAGE_TOR" android:label="@string/permission_manage_tor_label" android:description="@string/permission_manage_tor_description" android:protectionLevel="signature"></permission>
+ <uses-permission android:name="android.permission.INTERNET" />
+ <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+ <uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>
+ <uses-permission android:name="org.torproject.android.MANAGE_TOR"/>
+
<application android:name=".OrbotApp" android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:configChanges="locale|orientation|screenSize"
@@ -78,6 +82,7 @@
android:name=".service.TorService"
android:exported="false"
android:process=":remote"
+ android:permission="org.torproject.android.MANAGE_TOR"
>
<intent-filter>
<action android:name="org.torproject.android.service.ITorService" />
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 8e40b05..f6ee084 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -244,5 +244,8 @@
<string name="menu_verify_browser">Check Browser</string>
<string name="menu_use_chatsecure">Use ChatSecure</string>
+
+ <string name="permission_manage_tor_label">Manage Tor</string>
+ <string name="permission_manage_tor_description">Enable this app to control the Tor service</string>
</resources>
diff --git a/src/org/torproject/android/Orbot.java b/src/org/torproject/android/Orbot.java
index f48e0a9..14a865f 100644
--- a/src/org/torproject/android/Orbot.java
+++ b/src/org/torproject/android/Orbot.java
@@ -1137,7 +1137,7 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
{
Intent iTorService = new Intent(this, TorService.class);
-
+
getApplication().getApplicationContext().startService(iTorService);
//since its auto create, we prob don't ever need to call startService
More information about the tor-commits
mailing list