From 0700274d6b629d5790efad14edb699366abec385 Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Sun, 12 May 2024 08:07:36 -0300 Subject: [PATCH] fix(browser-select-setting): don't query user's browser (excessive-permissions) --- mastodon/src/main/AndroidManifest.xml | 4 ---- .../settings/SettingsBehaviorFragment.java | 16 ++++++++-------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/mastodon/src/main/AndroidManifest.xml b/mastodon/src/main/AndroidManifest.xml index 69a320a39..422cb8b98 100644 --- a/mastodon/src/main/AndroidManifest.xml +++ b/mastodon/src/main/AndroidManifest.xml @@ -25,10 +25,6 @@ - - - - impleme private void onCustomTabsClick(ListItem item){ // GlobalUserPreferences.useCustomTabs=customTabsItem.checked; - Intent intent=new Intent(Intent.ACTION_VIEW, Uri.parse("http://example.com")); - ResolveInfo info=getActivity().getPackageManager().resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY); - final String browserName; - if(info==null){ - browserName="??"; - }else{ - browserName=info.loadLabel(getActivity().getPackageManager()).toString(); - } +// Intent intent=new Intent(Intent.ACTION_VIEW, Uri.parse("http://example.com")); +// ResolveInfo info=getActivity().getPackageManager().resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY); + final String browserName = getContext().getString(R.string.system_browser); +// if(info==null){ +// browserName="??"; +// }else{ +// browserName=info.loadLabel(getActivity().getPackageManager()).toString(); +// } ArrayAdapter adapter=new ArrayAdapter<>(getActivity(), R.layout.item_alert_single_choice_2lines_but_different, R.id.text, new String[]{getString(R.string.in_app_browser), getString(R.string.system_browser)}){ @Override