Loading app/src/main/java/net/sourceforge/opencamera/DeviceSettings.java +7 −0 Original line number Diff line number Diff line Loading @@ -31,4 +31,11 @@ public class DeviceSettings { final boolean is_GS290 = Build.DEVICE != null && Build.DEVICE.equals("GS290"); return is_fairphone || is_xiaomi || is_GS290; } public static boolean isMurenaOne() { final boolean isMurena = Build.MANUFACTURER.equals("Secure_Phone") || Build.MANUFACTURER.equals("Murena"); final boolean isOne = Build.DEVICE.equals("one") || Build.DEVICE.equals("X2"); return isMurena && isOne; } } app/src/main/java/net/sourceforge/opencamera/MainActivity.java +10 −2 Original line number Diff line number Diff line Loading @@ -380,11 +380,20 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen if( MyDebug.LOG ) Log.d(TAG, "onCreate: time after updating folder history: " + (System.currentTimeMillis() - debug_time)); SharedPreferences.Editor editor = sharedPreferences.edit(); if (DeviceSettings.isMurenaOne()) { boolean isFirstTime = sharedPreferences.getBoolean("isFirstTimeMurenaOne", true); if (isFirstTime && applicationInterface.getEdgeModePref().equals("default")) { editor.putString(PreferenceKeys.EdgeModePreferenceKey, "off"); editor.putBoolean("isFirstTimeMurenaOne", false); editor.apply(); } } boolean isFirstTimeSaveLocation = sharedPreferences.getBoolean("isFirstTimeSaveLocation", true); String save_location = sharedPreferences.getString(PreferenceKeys.SaveLocationPreferenceKey, "Camera"); if (isFirstTimeSaveLocation && save_location.equals("OpenCamera")) { SharedPreferences.Editor editor = sharedPreferences.edit(); editor.putString(PreferenceKeys.SaveLocationPreferenceKey, "Camera"); editor.putBoolean("isFirstTimeSaveLocation", false); editor.apply(); Loading Loading @@ -704,7 +713,6 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen // We set the latest_version whether or not the dialog is shown - if we showed the first time dialog, we don't // want to then show the What's New dialog next time we run! Similarly if the user had disabled showing the dialog, // but then enables it, we still shouldn't show the dialog until the new time Open Camera upgrades. SharedPreferences.Editor editor = sharedPreferences.edit(); editor.putInt(PreferenceKeys.LatestVersionPreferenceKey, version_code); editor.apply(); } Loading Loading
app/src/main/java/net/sourceforge/opencamera/DeviceSettings.java +7 −0 Original line number Diff line number Diff line Loading @@ -31,4 +31,11 @@ public class DeviceSettings { final boolean is_GS290 = Build.DEVICE != null && Build.DEVICE.equals("GS290"); return is_fairphone || is_xiaomi || is_GS290; } public static boolean isMurenaOne() { final boolean isMurena = Build.MANUFACTURER.equals("Secure_Phone") || Build.MANUFACTURER.equals("Murena"); final boolean isOne = Build.DEVICE.equals("one") || Build.DEVICE.equals("X2"); return isMurena && isOne; } }
app/src/main/java/net/sourceforge/opencamera/MainActivity.java +10 −2 Original line number Diff line number Diff line Loading @@ -380,11 +380,20 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen if( MyDebug.LOG ) Log.d(TAG, "onCreate: time after updating folder history: " + (System.currentTimeMillis() - debug_time)); SharedPreferences.Editor editor = sharedPreferences.edit(); if (DeviceSettings.isMurenaOne()) { boolean isFirstTime = sharedPreferences.getBoolean("isFirstTimeMurenaOne", true); if (isFirstTime && applicationInterface.getEdgeModePref().equals("default")) { editor.putString(PreferenceKeys.EdgeModePreferenceKey, "off"); editor.putBoolean("isFirstTimeMurenaOne", false); editor.apply(); } } boolean isFirstTimeSaveLocation = sharedPreferences.getBoolean("isFirstTimeSaveLocation", true); String save_location = sharedPreferences.getString(PreferenceKeys.SaveLocationPreferenceKey, "Camera"); if (isFirstTimeSaveLocation && save_location.equals("OpenCamera")) { SharedPreferences.Editor editor = sharedPreferences.edit(); editor.putString(PreferenceKeys.SaveLocationPreferenceKey, "Camera"); editor.putBoolean("isFirstTimeSaveLocation", false); editor.apply(); Loading Loading @@ -704,7 +713,6 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen // We set the latest_version whether or not the dialog is shown - if we showed the first time dialog, we don't // want to then show the What's New dialog next time we run! Similarly if the user had disabled showing the dialog, // but then enables it, we still shouldn't show the dialog until the new time Open Camera upgrades. SharedPreferences.Editor editor = sharedPreferences.edit(); editor.putInt(PreferenceKeys.LatestVersionPreferenceKey, version_code); editor.apply(); } Loading