From 028f76e62ea31f44c68846ce6ec5296aae96823b Mon Sep 17 00:00:00 2001 From: Nathan Freitas Date: Fri, 9 Jun 2017 02:01:42 -0400 Subject: [PATCH] add "minimal permission" build for SDK 16 to 22 devices - these platforms don't allow for runtime permissions requests and the new permissions we are asking for can be alarming - we will disable the advanced hidden service features on these devices --- app/build.gradle | 13 +- app/src/minimalperm/AndroidManifest.xml | 165 ++++++++++++++++++++ app/src/minimalperm/res/menu/orbot_main.xml | 80 ++++++++++ 3 files changed, 254 insertions(+), 4 deletions(-) create mode 100644 app/src/minimalperm/AndroidManifest.xml create mode 100644 app/src/minimalperm/res/menu/orbot_main.xml diff --git a/app/build.gradle b/app/build.gradle index 38f21696..e21a302d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,26 +3,31 @@ apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion "25" - defaultConfig { applicationId "org.torproject.android" - minSdkVersion 16 + minSdkVersion 23 targetSdkVersion 25 } - lintOptions { checkReleaseBuilds false // Or, if you prefer, you can continue to check for errors in release builds, // but continue the build even when errors are found: abortOnError false } - buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } + productFlavors { + minimalperm { + minSdkVersion 16 + applicationId 'org.torproject.android' + targetSdkVersion 22 + maxSdkVersion 22 + } + } } dependencies { diff --git a/app/src/minimalperm/AndroidManifest.xml b/app/src/minimalperm/AndroidManifest.xml new file mode 100644 index 00000000..523938a2 --- /dev/null +++ b/app/src/minimalperm/AndroidManifest.xml @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/minimalperm/res/menu/orbot_main.xml b/app/src/minimalperm/res/menu/orbot_main.xml new file mode 100644 index 00000000..6685baa3 --- /dev/null +++ b/app/src/minimalperm/res/menu/orbot_main.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + +