Define manifest <queries> allowing us to make intent queries on API 30+

This commit is contained in:
Torsten Grote
2020-12-14 12:01:56 -03:00
parent 04485e58da
commit 98788c7c80
2 changed files with 24 additions and 0 deletions

View File

@@ -443,4 +443,27 @@
android:theme="@style/BriarTheme" />
</application>
<queries>
<package android:name="info.guardianproject.ripple" />
<package android:name="com.huawei.systemmanager" />
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="http" />
</intent>
<!-- white-listing the intents below does not seem necessary,
but they are still included in case modified Android versions require it -->
<intent>
<action android:name="android.bluetooth.adapter.action.REQUEST_DISCOVERABLE" />
</intent>
<intent>
<action android:name="android.settings.CHANNEL_NOTIFICATION_SETTINGS" />
</intent>
</queries>
</manifest>

View File

@@ -82,6 +82,7 @@ public class PanicPreferencesFragment extends PreferenceFragmentCompat
entries.add(0, getString(R.string.panic_app_setting_none));
entryValues.add(0, PACKAGE_NAME_NONE);
// only info.guardianproject.ripple is whitelisted in manifest
for (ResolveInfo resolveInfo : PanicResponder.resolveTriggerApps(pm)) {
if (resolveInfo.activityInfo == null)
continue;