Added a custom setting to hide dark mode feature in app
This commit is contained in:
parent
76262573a6
commit
10d8eb4d8c
3 changed files with 4 additions and 0 deletions
|
@ -83,6 +83,8 @@ public class AdvancedSettingsFragment extends SettingsFragment {
|
|||
mStartAtBoot = mRootView.findViewById(R.id.pref_autostart);
|
||||
|
||||
mDarkMode = mRootView.findViewById(R.id.pref_dark_mode);
|
||||
mDarkMode.setVisibility(
|
||||
getResources().getBoolean(R.bool.allow_dark_mode) ? View.VISIBLE : View.GONE);
|
||||
|
||||
mRemoteProvisioningUrl = mRootView.findViewById(R.id.pref_remote_provisioning);
|
||||
mRemoteProvisioningUrl.setInputType(
|
||||
|
|
|
@ -1136,6 +1136,7 @@ public class LinphonePreferences {
|
|||
|
||||
public boolean isDarkModeEnabled() {
|
||||
if (getConfig() == null) return false;
|
||||
if (!mContext.getResources().getBoolean(R.bool.allow_dark_mode)) return false;
|
||||
|
||||
boolean useNightModeDefault =
|
||||
AppCompatDelegate.getDefaultNightMode() == AppCompatDelegate.MODE_NIGHT_YES;
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
<bool name="hide_bottom_bar_on_second_level_views">true</bool>
|
||||
<bool name="use_full_screen_image_splashscreen">false</bool>
|
||||
<bool name="show_camera_preview_on_dialer_on_tablets">true</bool>
|
||||
<bool name="allow_dark_mode">true</bool>
|
||||
|
||||
<!-- Time -->
|
||||
<string name="history_date_format" translatable="false">EEE d MMM</string>
|
||||
|
|
Loading…
Reference in a new issue