Loading _docs/history.html +5 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,11 @@ <p>< <small><a href="index.html">Main Page.</a></small></p> <pre> Version 1.53.1 (2024/06/03) FIXED Bug in 1.53 where video subtitles option was incorrectly disabled when SAF enabled, also fixed a related crash when recreating fragment. Version 1.53 (2024/05/28) FIXED Device specific crashes when starting with Camera2 API (related to camera vendor Loading app/src/main/java/net/sourceforge/opencamera/PreferenceSubVideo.java +15 −4 Original line number Diff line number Diff line Loading @@ -210,13 +210,24 @@ public class PreferenceSubVideo extends PreferenceSubScreen { // a dependency (and indeed can't use one, as the preference_using_saf won't exist here as a Preference) pref = (ListPreference)findPreference("preference_video_subtitle"); if( pref != null ) { boolean using_saf = false; // n.b., not safe to call main_activity.getApplicationInterface().getStorageUtils().isUsingSAF() if fragment // is being recreated if( Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP ) { SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this.getActivity()); if( sharedPreferences.getBoolean(PreferenceKeys.UsingSAFPreferenceKey, false) ) { using_saf = true; } } if( MyDebug.LOG ) Log.d(TAG, "using_saf: " + using_saf); //pref.setDependency("preference_using_saf"); MainActivity main_activity = (MainActivity)this.getActivity(); if( main_activity.getStorageUtils().isUsingSAF() ) { pref.setEnabled(false); if( using_saf ) { pref.setEnabled(true); } else { pref.setEnabled(true); pref.setEnabled(false); } } } Loading Loading
_docs/history.html +5 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,11 @@ <p>< <small><a href="index.html">Main Page.</a></small></p> <pre> Version 1.53.1 (2024/06/03) FIXED Bug in 1.53 where video subtitles option was incorrectly disabled when SAF enabled, also fixed a related crash when recreating fragment. Version 1.53 (2024/05/28) FIXED Device specific crashes when starting with Camera2 API (related to camera vendor Loading
app/src/main/java/net/sourceforge/opencamera/PreferenceSubVideo.java +15 −4 Original line number Diff line number Diff line Loading @@ -210,13 +210,24 @@ public class PreferenceSubVideo extends PreferenceSubScreen { // a dependency (and indeed can't use one, as the preference_using_saf won't exist here as a Preference) pref = (ListPreference)findPreference("preference_video_subtitle"); if( pref != null ) { boolean using_saf = false; // n.b., not safe to call main_activity.getApplicationInterface().getStorageUtils().isUsingSAF() if fragment // is being recreated if( Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP ) { SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this.getActivity()); if( sharedPreferences.getBoolean(PreferenceKeys.UsingSAFPreferenceKey, false) ) { using_saf = true; } } if( MyDebug.LOG ) Log.d(TAG, "using_saf: " + using_saf); //pref.setDependency("preference_using_saf"); MainActivity main_activity = (MainActivity)this.getActivity(); if( main_activity.getStorageUtils().isUsingSAF() ) { pref.setEnabled(false); if( using_saf ) { pref.setEnabled(true); } else { pref.setEnabled(true); pref.setEnabled(false); } } } Loading