Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Depreciate STORAGE permission #81

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions patches/Depreciate-Storage-permission-in-Vanadium.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Date: Sat, 3 Oct 2020 02:55:33 +0000
Subject: [PATCH] Depreciate Storage permission in Vanadium

---
chrome/android/java/AndroidManifest.xml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml
index a9b1a61d10cf..30db0e19ea6a 100644
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -48,7 +48,8 @@ by a child template that "extends" this file.
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.NFC"/>
- <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
+ <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
+ android:maxSdkVersion="29"/>
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS"/>
<uses-permission android:name="android.permission.READ_SYNC_STATS"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
@@ -58,7 +59,8 @@ by a child template that "extends" this file.
<uses-permission-sdk-23 android:name="android.permission.USE_FINGERPRINT"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
+ android:maxSdkVersion="29"/>
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS"/>
{% set enable_vr = enable_vr|default(0) %}
{% if enable_vr == "true" %}
--
2.25.1

23 changes: 23 additions & 0 deletions patches/Initial-attempt-to-gate-URLs-by-INTERNET-permission.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Date: Sat, 3 Oct 2020 03:07:06 +0000
Subject: [PATCH] Initial attempt to gate URLs being opened without INTERNET
permission

---
chrome/android/java/AndroidManifest.xml | 1 +
1 file changed, 1 insertion(+)

diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml
index 30db0e19ea6a..69b84b3a6f4b 100644
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -200,6 +200,7 @@ by a child template that "extends" this file.
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|mcc|mnc|screenLayout|smallestScreenSize|uiMode|density">
</activity>
<activity-alias android:name="com.google.android.apps.chrome.IntentDispatcher"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will end up rejecting requests from apps without the permission. We need to do it in a way that users are prompted about it.

+ android:permission="android.permission.INTERNET"
android:targetActivity="org.chromium.chrome.browser.document.ChromeLauncherActivity"
android:exported="true">
<intent-filter>
--
2.25.1