fix(browser-select-setting): don't query user's browser (excessive-permissions)
This commit is contained in:
parent
faee3e3dd6
commit
0700274d6b
|
@ -25,10 +25,6 @@
|
||||||
<intent>
|
<intent>
|
||||||
<action android:name="android.intent.action.TRANSLATE" />
|
<action android:name="android.intent.action.TRANSLATE" />
|
||||||
</intent>
|
</intent>
|
||||||
<intent>
|
|
||||||
<action android:name="android.intent.action.VIEW"/>
|
|
||||||
<data android:scheme="http"/>
|
|
||||||
</intent>
|
|
||||||
</queries>
|
</queries>
|
||||||
|
|
||||||
<application
|
<application
|
||||||
|
|
|
@ -178,14 +178,14 @@ public class SettingsBehaviorFragment extends BaseSettingsFragment<Void> impleme
|
||||||
|
|
||||||
private void onCustomTabsClick(ListItem<?> item){
|
private void onCustomTabsClick(ListItem<?> item){
|
||||||
// GlobalUserPreferences.useCustomTabs=customTabsItem.checked;
|
// GlobalUserPreferences.useCustomTabs=customTabsItem.checked;
|
||||||
Intent intent=new Intent(Intent.ACTION_VIEW, Uri.parse("http://example.com"));
|
// Intent intent=new Intent(Intent.ACTION_VIEW, Uri.parse("http://example.com"));
|
||||||
ResolveInfo info=getActivity().getPackageManager().resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY);
|
// ResolveInfo info=getActivity().getPackageManager().resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY);
|
||||||
final String browserName;
|
final String browserName = getContext().getString(R.string.system_browser);
|
||||||
if(info==null){
|
// if(info==null){
|
||||||
browserName="??";
|
// browserName="??";
|
||||||
}else{
|
// }else{
|
||||||
browserName=info.loadLabel(getActivity().getPackageManager()).toString();
|
// browserName=info.loadLabel(getActivity().getPackageManager()).toString();
|
||||||
}
|
// }
|
||||||
ArrayAdapter<CharSequence> adapter=new ArrayAdapter<>(getActivity(), R.layout.item_alert_single_choice_2lines_but_different, R.id.text,
|
ArrayAdapter<CharSequence> 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)}){
|
new String[]{getString(R.string.in_app_browser), getString(R.string.system_browser)}){
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue