reformatted code
This commit is contained in:
parent
1f24c18614
commit
a78762756a
|
@ -27,14 +27,13 @@ public class VideoAudioSettingsFragment extends BasePreferenceFragment {
|
||||||
|
|
||||||
//on M and above, if user chooses to minimise to popup player on exit and the app doesn't have
|
//on M and above, if user chooses to minimise to popup player on exit and the app doesn't have
|
||||||
//display over other apps permission, show a snackbar to let the user give permission
|
//display over other apps permission, show a snackbar to let the user give permission
|
||||||
if(s.equals(getString(R.string.minimize_on_exit_key))){
|
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M &&
|
||||||
|
s.equals(getString(R.string.minimize_on_exit_key))){
|
||||||
|
|
||||||
String newSetting = sharedPreferences.getString(s,null);
|
String newSetting = sharedPreferences.getString(s,null);
|
||||||
if(newSetting != null){
|
if(newSetting != null
|
||||||
|
&& newSetting.equals(getString(R.string.minimize_on_exit_popup_key))
|
||||||
if(newSetting.equals(getString(R.string.minimize_on_exit_popup_key))){
|
&& !Settings.canDrawOverlays(getContext())){
|
||||||
|
|
||||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !Settings.canDrawOverlays(getContext())){
|
|
||||||
|
|
||||||
Snackbar.make(getListView(),R.string.permission_display_over_apps,Snackbar.LENGTH_INDEFINITE)
|
Snackbar.make(getListView(),R.string.permission_display_over_apps,Snackbar.LENGTH_INDEFINITE)
|
||||||
.setAction(R.string.settings, new View.OnClickListener() {
|
.setAction(R.string.settings, new View.OnClickListener() {
|
||||||
|
@ -48,8 +47,7 @@ public class VideoAudioSettingsFragment extends BasePreferenceFragment {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue