mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-05-06 17:34:09 +00:00
Fix formatting and use lamda functions
This commit is contained in:
parent
a78762756a
commit
f7203d4ac9
@ -21,9 +21,7 @@ public class VideoAudioSettingsFragment extends BasePreferenceFragment {
|
|||||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
listener = new SharedPreferences.OnSharedPreferenceChangeListener() {
|
listener = (sharedPreferences, s) -> {
|
||||||
@Override
|
|
||||||
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String s) {
|
|
||||||
|
|
||||||
// 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
|
||||||
@ -36,23 +34,16 @@ public class VideoAudioSettingsFragment extends BasePreferenceFragment {
|
|||||||
&& !Settings.canDrawOverlays(getContext())) {
|
&& !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,
|
||||||
@Override
|
view -> PermissionHelper.checkSystemAlertWindowPermission(getContext()))
|
||||||
public void onClick(View view) {
|
|
||||||
PermissionHelper.checkSystemAlertWindowPermission(getContext());
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.show();
|
.show();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
||||||
addPreferencesFromResource(R.xml.video_audio_settings);
|
addPreferencesFromResource(R.xml.video_audio_settings);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user