[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [orbot/master] quick fixes for app UI and VPN dialog



commit f4638873f83a282601b0237cb279a9f09f770985
Author: Nathan Freitas <nathan@xxxxxxxxxxx>
Date:   Sat Oct 29 11:20:51 2016 -0400

    quick fixes for app UI and VPN dialog
---
 app/src/main/AndroidManifest.xml                                  | 8 ++++----
 app/src/main/java/org/torproject/android/OrbotMainActivity.java   | 8 ++++----
 .../main/java/org/torproject/android/vpn/VPNEnableActivity.java   | 3 ++-
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 2e602bd..9036d5d 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -18,6 +18,7 @@
 	<uses-permission android:name="android.permission.INTERNET"/>
 	<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
 	<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
+	<uses-permission android:name="android.permission.ACCESS_SUPERUSER" />
 
     <application android:name="org.torproject.android.OrbotApp" android:icon="@drawable/ic_launcher"
      android:label="@string/app_name" 
@@ -26,9 +27,9 @@
       android:theme="@style/DefaultTheme" 
       android:allowBackup="false"
       android:allowClearUserData="true"
-      android:persistent="true"
-      android:stopWithTask="false"
       android:largeHeap="false"
+		android:hardwareAccelerated="false"
+
      >
       
         <activity android:name=".OrbotMainActivity" 
@@ -78,8 +79,7 @@
 		
       	<activity
 			android:name=".vpn.VPNEnableActivity" android:label="@string/app_name" android:exported="false"
-			android:theme="@android:style/Theme.Translucent"			
-			/> 
+			/>
 		
 			      	
       	<activity android:name="org.torproject.android.ui.PromoAppsActivity" android:exported="false"/>
diff --git a/app/src/main/java/org/torproject/android/OrbotMainActivity.java b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
index 93e79b2..a67b2b9 100644
--- a/app/src/main/java/org/torproject/android/OrbotMainActivity.java
+++ b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
@@ -239,7 +239,7 @@ public class OrbotMainActivity extends AppCompatActivity
           mDrawerToggle = new ActionBarDrawerToggle(
               this,  mDrawer,        
               toolbar,
-              android.R.string.ok, android.R.string.cancel
+              R.string.btn_okay, R.string.btn_cancel
           );
 
       getSupportActionBar().setDisplayHomeAsUpEnabled(true);
@@ -979,7 +979,7 @@ public class OrbotMainActivity extends AppCompatActivity
             	   }
             	   
                }
-           }).setNegativeButton(android.R.string.cancel, new Dialog.OnClickListener()
+           }).setNegativeButton(R.string.btn_cancel, new Dialog.OnClickListener()
 	        {
 	        	@Override
 				public void onClick(DialogInterface dialog, int which) {
@@ -1010,7 +1010,7 @@ public class OrbotMainActivity extends AppCompatActivity
         new AlertDialog.Builder(this)
         .setTitle(R.string.bridge_mode)
         .setView(view)
-        .setNegativeButton(android.R.string.cancel, new Dialog.OnClickListener()
+        .setNegativeButton(R.string.btn_cancel, new Dialog.OnClickListener()
         {
         	@Override
 			public void onClick(DialogInterface dialog, int which) {
@@ -1134,7 +1134,7 @@ public class OrbotMainActivity extends AppCompatActivity
                      .setIcon(R.drawable.onion32)
              .setTitle(title)
              .setMessage(msg)
-             .setPositiveButton(android.R.string.ok, null)
+             .setPositiveButton(R.string.btn_okay, null)
              .show();
              }
              else
diff --git a/app/src/main/java/org/torproject/android/vpn/VPNEnableActivity.java b/app/src/main/java/org/torproject/android/vpn/VPNEnableActivity.java
index 9ed87d6..9dd05d8 100644
--- a/app/src/main/java/org/torproject/android/vpn/VPNEnableActivity.java
+++ b/app/src/main/java/org/torproject/android/vpn/VPNEnableActivity.java
@@ -14,6 +14,7 @@ import android.content.Intent;
 import android.net.VpnService;
 import android.os.Bundle;
 import android.os.Handler;
+import android.support.v7.app.AppCompatActivity;
 import android.util.Log;
 import android.view.Window;
 
@@ -22,7 +23,7 @@ import android.view.Window;
  */
 
 @TargetApi(14)
-public class VPNEnableActivity extends Activity {
+public class VPNEnableActivity extends AppCompatActivity {
 	
 	private final static int REQUEST_VPN = 7777;
 	private	Intent intent = null;



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits