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

[tor-commits] [orbot/master] don't show new features that require new perms on < SDK 23



commit 78984bd344b92003c6f391865584cede8c2fe96b
Author: n8fr8 <nathan@xxxxxxxxxxx>
Date:   Fri Jun 9 03:59:50 2017 -0400

    don't show new features that require new perms on < SDK 23
---
 app/src/main/java/org/torproject/android/OrbotMainActivity.java | 5 +++++
 app/src/main/res/menu/orbot_main.xml                            | 1 +
 2 files changed, 6 insertions(+)

diff --git a/app/src/main/java/org/torproject/android/OrbotMainActivity.java b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
index 8f34e48..0e9e2f7 100644
--- a/app/src/main/java/org/torproject/android/OrbotMainActivity.java
+++ b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
@@ -449,6 +449,11 @@ public class OrbotMainActivity extends AppCompatActivity
         MenuInflater inflater = getMenuInflater();
         inflater.inflate(R.menu.orbot_main, menu);
 
+        //We don't support these on per SDK 23
+        if (BuildConfig.FLAVOR.equals("minimalperm")) {
+            menu.findItem(R.id.menu_hidden_services_main).setVisible(false);
+        }
+
         return true;
     }
     
diff --git a/app/src/main/res/menu/orbot_main.xml b/app/src/main/res/menu/orbot_main.xml
index e556b76..deed1a6 100644
--- a/app/src/main/res/menu/orbot_main.xml
+++ b/app/src/main/res/menu/orbot_main.xml
@@ -47,6 +47,7 @@
     <item
         android:title="@string/menu_hidden_services"
         yourapp:showAsAction="never"
+        android:id="@+id/menu_hidden_services_main"
         >
       <menu>
         <item android:id="@+id/menu_hidden_services"



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