diff --git a/res/layout/dark_ui_activation_button.xml b/res/layout/dark_ui_activation_button.xml
new file mode 100644
index 0000000..5f9eefc
--- /dev/null
+++ b/res/layout/dark_ui_activation_button.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright (C) 2019 The Android Open Source Project
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:minHeight="?android:attr/listPreferredItemHeight">
+
+    <Button
+        android:id="@+id/dark_ui_turn_on_button"
+        style="@style/ActionPrimaryButton"
+        android:layout_marginStart="@dimen/screen_margin_sides"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_vertical" />
+
+    <Button
+        android:id="@+id/dark_ui_turn_off_button"
+        style="@style/ActionSecondaryButton"
+        android:layout_marginStart="@dimen/screen_margin_sides"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_vertical" />
+
+</LinearLayout>
\ No newline at end of file
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
index ba5f9e3..068ba8c 100644
--- a/res/values/arrays.xml
+++ b/res/values/arrays.xml
@@ -100,6 +100,14 @@
         <item>1800000</item>
     </string-array>
 
+    <!-- Dark theme scheduling preferences  [CHAR LIMIT=NONE] -->
+    <string-array name="dark_ui_scheduler_preference_titles">
+        <!-- 1: None -->
+        <item>@string/dark_ui_auto_mode_never</item>
+        <!-- 2: Auto -->
+        <item>@string/dark_ui_auto_mode_auto</item>
+    </string-array>
+
     <!-- Security settings.  The delay after screen is turned off until device locks.
          These are shown in a list dialog. -->
     <string-array name="lock_after_timeout_entries">
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 7f11827..ecfce4a 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2762,6 +2762,40 @@
     <!-- Night display slice screen, subtitle of intensity setting when night light is off. [CHAR LIMIT=30] -->
     <string name="night_display_not_currently_on">Night Light not currently on</string>
 
+    <!--    Dark ui screen-->
+    <!-- Display settings screen, activation button action for manual mode. [CHAR LIMIT=40] -->
+    <string name="dark_ui_activation_on_manual">Turn on now</string>
+    <!-- Display settings screen, deactivation button action for manual mode. [CHAR LIMIT=40] -->
+    <string name="dark_ui_activation_off_manual">Turn off now</string>
+    <!-- Display settings screen, activation button action for sunset-to-sunrise schedule [CHAR LIMIT=40] -->
+    <string name="dark_ui_activation_on_auto">Turn on until sunrise</string>
+    <!-- Display settings screen, deactivation button action for sunset-to-sunrise schedule [CHAR LIMIT=40] -->
+    <string name="dark_ui_activation_off_auto">Turn off until sunset</string>
+    <!-- Dark UI screen, setting option name to enable Dark UI [CHAR LIMIT=30] -->
+    <string name="dark_ui_title">Dark Mode</string>
+    <!-- Dark UI screen, setting option name to configure whether Dark UI turn on/off automatically. [CHAR LIMIT=30] -->
+    <string name="dark_ui_auto_mode_title">Schedule</string>
+    <!-- Dark UI screen, setting option value for Dark UI to *never* turn on/off automatically. [CHAR LIMIT=30] -->
+    <string name="dark_ui_auto_mode_never">None</string>
+    <!-- Dark UIscreen, setting option value for Dark UI to turn on/off automatically at sunset/sunrise. [CHAR LIMIT=32] -->
+    <string name="dark_ui_auto_mode_auto">Turns on from sunset to sunrise</string>
+    <!-- Dark UIscreen, setting option name controlling the current activation status. [CHAR LIMIT=30] -->
+    <string name="dark_ui_status_title">Status</string>
+    <!-- Display settings screen, summary format of Dark UI when off. [CHAR LIMIT=NONE] -->
+    <string name="dark_ui_summary_off">Off / <xliff:g name="auto_mode_summary" example="Never turn on automatically">%1$s</xliff:g></string>
+    <!-- Display settings screen, summary of Dark UI when off and will *never* turn on automatically. [CHAR LIMIT=NONE] -->
+    <string name="dark_ui_summary_off_auto_mode_never">Will never turn on automatically</string>
+    <!-- Display settings screen, summary of Dark UI when off and will turn on automatically at sunset. [CHAR LIMIT=NONE] -->
+    <string name="dark_ui_summary_off_auto_mode_auto">Will turn on automatically at sunset</string>
+    <!-- Display settings screen, summary format of Dark UI when on. [CHAR LIMIT=NONE] -->
+    <string name="dark_ui_summary_on">On / <xliff:g name="auto_mode_summary" example="Never turn off automatically">%1$s</xliff:g></string>
+    <!-- Display settings screen, summary of Dark UI when on and will *never* turn off automatically. [CHAR LIMIT=NONE] -->
+    <string name="dark_ui_summary_on_auto_mode_never">Will never turn off automatically</string>
+    <!-- Display settings screen, summary of Dark UI when on and will turn off automatically at sunrise. [CHAR LIMIT=NONE] -->
+    <string name="dark_ui_summary_on_auto_mode_auto">Will turn off automatically at sunrise</string>
+    <!-- Dark theme screen, description of Dark theme feature. [CHAR LIMIT=NONE] -->
+    <string name="dark_ui_text">Dark theme uses true black to help keep your battery alive longer. Dark theme schedules wait to turn on until your screen is off.</string>
+
     <!-- Sound & display settings screen, setting option name to change screen timeout -->
     <string name="screen_timeout">Screen timeout</string>
     <!-- Sound & display settings screen, setting option name to change screen timeout [CHAR LIMIT=30] -->
@@ -6879,6 +6913,7 @@
     <string name="help_url_connected_devices" translatable="false"></string>
     <string name="help_url_apps_and_notifications" translatable="false"></string>
     <string name="help_url_night_display" translatable="false"></string>
+    <string name="help_url_dark_theme" translatable="false"></string>
     <string name="help_url_screen_saver" translatable="false"></string>
     <string name="help_url_pickup_gesture" translatable="false"></string>
     <string name="help_url_storage_dashboard" translatable="false"></string>
diff --git a/res/xml/dark_mode_settings.xml b/res/xml/dark_mode_settings.xml
new file mode 100644
index 0000000..9247a0c
--- /dev/null
+++ b/res/xml/dark_mode_settings.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2019 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<PreferenceScreen
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:settings="http://schemas.android.com/apk/res-auto"
+    android:title="@string/dark_ui_mode"
+    android:key="dark_ui_mode_screen"
+    settings:keywords="@string/keywords_dark_ui_mode">
+
+    <DropDownPreference
+        android:key="dark_ui_auto_mode"
+        android:title="@string/dark_ui_auto_mode_title"
+        android:summary="%s"
+        android:entries="@array/dark_ui_scheduler_preference_titles"
+        android:entryValues="@array/dark_ui_scheduler_preference_titles"
+        settings:controller="com.android.settings.display.darkmode.DarkModeScheduleSelectorController"
+        settings:keywords="@string/keywords_dark_ui_mode"/>
+
+    <com.android.settingslib.widget.LayoutPreference
+        android:key="dark_ui_activated"
+        android:title="@string/dark_ui_title"
+        android:selectable="false"
+        android:layout="@layout/dark_ui_activation_button"
+        settings:allowDividerBelow="true"
+        settings:controller="com.android.settings.display.darkmode.DarkModeActivationPreferenceController"
+        settings:keywords="@string/keywords_dark_ui_mode"/>
+
+    <com.android.settingslib.widget.FooterPreference
+            android:key="dark_ui_footer"
+            android:title="@string/dark_ui_text"
+            android:selectable="false"
+            settings:searchable="false"
+            settings:allowDividerAbove="true"/>
+
+</PreferenceScreen>
\ No newline at end of file
diff --git a/res/xml/dark_ui_settings.xml b/res/xml/dark_ui_settings.xml
index 1f11eba..8932670 100644
--- a/res/xml/dark_ui_settings.xml
+++ b/res/xml/dark_ui_settings.xml
@@ -21,4 +21,4 @@
     android:key="dark_ui_mode_screen"
     settings:staticPreferenceLocation="append"
     settings:keywords="@string/keywords_dark_ui_mode">
-</PreferenceScreen >
+</PreferenceScreen >
\ No newline at end of file
diff --git a/res/xml/display_settings.xml b/res/xml/display_settings.xml
index c45e6a2..9bc6710 100644
--- a/res/xml/display_settings.xml
+++ b/res/xml/display_settings.xml
@@ -31,6 +31,15 @@
         <intent android:action="com.android.intent.action.SHOW_BRIGHTNESS_DIALOG" />
     </com.android.settingslib.RestrictedPreference>
 
+    <com.android.settings.display.darkmode.DarkModePreference
+        android:key="dark_ui_mode"
+        android:title="@string/dark_ui_mode"
+        android:fragment="com.android.settings.display.darkmode.DarkModeSettingsFragment"
+        android:widgetLayout="@null"
+        settings:widgetLayout="@null"
+        settings:controller="com.android.settings.display.DarkUIPreferenceController"
+        settings:searchable="false"/>
+
     <com.android.settings.display.NightDisplayPreference
         android:key="night_display"
         android:title="@string/night_display_title"
@@ -54,13 +63,6 @@
         settings:controller="com.android.settings.display.WallpaperPreferenceController">
     </com.android.settingslib.RestrictedPreference>
 
-
-    <SwitchPreference
-        android:key="dark_ui_mode"
-        android:title="@string/dark_ui_mode"
-        settings:keywords="@string/keywords_dark_ui_mode"
-        settings:controller="com.android.settings.display.DarkUIPreferenceController"/>
-
     <!-- Cross-listed item, if you change this, also change it in power_usage_summary.xml -->
     <com.android.settings.display.TimeoutListPreference
         android:key="screen_timeout"
diff --git a/src/com/android/settings/DisplaySettings.java b/src/com/android/settings/DisplaySettings.java
index 29ac8b6..6b23b29 100644
--- a/src/com/android/settings/DisplaySettings.java
+++ b/src/com/android/settings/DisplaySettings.java
@@ -23,7 +23,6 @@
 import com.android.settings.dashboard.DashboardFragment;
 import com.android.settings.display.BrightnessLevelPreferenceController;
 import com.android.settings.display.CameraGesturePreferenceController;
-import com.android.settings.display.DarkUIPreferenceController;
 import com.android.settings.display.LiftToWakePreferenceController;
 import com.android.settings.display.NightDisplayPreferenceController;
 import com.android.settings.display.NightModePreferenceController;
@@ -65,7 +64,6 @@
     @Override
     public void onCreate(Bundle icicle) {
         super.onCreate(icicle);
-        use(DarkUIPreferenceController.class).setParentFragment(this);
     }
 
     @Override
diff --git a/src/com/android/settings/display/DarkUIPreferenceController.java b/src/com/android/settings/display/DarkUIPreferenceController.java
index b85511d..7e550d7 100644
--- a/src/com/android/settings/display/DarkUIPreferenceController.java
+++ b/src/com/android/settings/display/DarkUIPreferenceController.java
@@ -21,6 +21,7 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
+import android.content.res.Configuration;
 import android.os.PowerManager;
 import android.provider.Settings;
 
@@ -28,10 +29,10 @@
 import androidx.fragment.app.Fragment;
 import androidx.preference.Preference;
 import androidx.preference.PreferenceScreen;
-import androidx.preference.SwitchPreference;
 
 import com.android.settings.R;
 import com.android.settings.core.TogglePreferenceController;
+import com.android.settings.display.darkmode.DarkModePreference;
 import com.android.settingslib.core.lifecycle.LifecycleObserver;
 import com.android.settingslib.core.lifecycle.events.OnStart;
 import com.android.settingslib.core.lifecycle.events.OnStop;
@@ -44,7 +45,7 @@
     public static final int DIALOG_SEEN = 1;
 
     @VisibleForTesting
-    SwitchPreference mPreference;
+    Preference mPreference;
 
     private UiModeManager mUiModeManager;
     private PowerManager mPowerManager;
@@ -68,7 +69,8 @@
 
     @Override
     public boolean isChecked() {
-        return mUiModeManager.getNightMode() == UiModeManager.MODE_NIGHT_YES;
+         return (mContext.getResources().getConfiguration().uiMode
+                 & Configuration.UI_MODE_NIGHT_YES) != 0;
     }
 
     @Override
@@ -92,10 +94,7 @@
             showDarkModeDialog();
             return false;
         }
-        mUiModeManager.setNightMode(isChecked
-                ? UiModeManager.MODE_NIGHT_YES
-                : UiModeManager.MODE_NIGHT_NO);
-        return true;
+        return mUiModeManager.setNightModeActivated(isChecked);
     }
 
     private void showDarkModeDialog() {
@@ -113,12 +112,10 @@
         boolean isBatterySaver = isPowerSaveMode();
         mPreference.setEnabled(!isBatterySaver);
         if (isBatterySaver) {
-            int stringId = mUiModeManager.getNightMode() == UiModeManager.MODE_NIGHT_YES
+            int stringId = isChecked()
                     ? R.string.dark_ui_mode_disabled_summary_dark_theme_on
                     : R.string.dark_ui_mode_disabled_summary_dark_theme_off;
             mPreference.setSummary(mContext.getString(stringId));
-        } else {
-            mPreference.setSummary(null);
         }
     }
 
@@ -127,22 +124,17 @@
         return mPowerManager.isPowerSaveMode();
     }
 
-
-    @VisibleForTesting
-    void setUiModeManager(UiModeManager uiModeManager) {
-        mUiModeManager = uiModeManager;
-    }
-
-    public void setParentFragment(Fragment fragment) {
-        mFragment = fragment;
-    }
-
     @Override
     public void onStart() {
         mContext.registerReceiver(mReceiver,
                 new IntentFilter(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED));
     }
 
+    // used by AccessibilitySettings
+    public void setParentFragment(Fragment fragment) {
+        mFragment = fragment;
+    }
+
     @Override
     public void onStop() {
         mContext.unregisterReceiver(mReceiver);
diff --git a/src/com/android/settings/display/darkmode/DarkModeActivationPreferenceController.java b/src/com/android/settings/display/darkmode/DarkModeActivationPreferenceController.java
new file mode 100644
index 0000000..98d4b14
--- /dev/null
+++ b/src/com/android/settings/display/darkmode/DarkModeActivationPreferenceController.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the
+ * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package com.android.settings.display.darkmode;
+
+import android.app.UiModeManager;
+import android.content.Context;
+import android.content.res.Configuration;
+import android.view.View;
+import android.widget.Button;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceScreen;
+import com.android.settings.R;
+import com.android.settings.core.BasePreferenceController;
+import com.android.settingslib.widget.LayoutPreference;
+
+/**
+ * Controller for activate/deactivate night mode button
+ */
+public class DarkModeActivationPreferenceController extends BasePreferenceController {
+    private final UiModeManager mUiModeManager;
+    private Button mTurnOffButton;
+    private Button mTurnOnButton;
+
+    public DarkModeActivationPreferenceController(Context context,
+            String preferenceKey) {
+        super(context, preferenceKey);
+
+        mUiModeManager = context.getSystemService(UiModeManager.class);
+    }
+
+    @Override
+    public final void updateState(Preference preference) {
+        final boolean active = (mContext.getResources().getConfiguration().uiMode
+                & Configuration.UI_MODE_NIGHT_YES) != 0;
+        updateNightMode(active);
+    }
+
+    private void updateNightMode(boolean active) {
+        final int autoMode = mUiModeManager.getNightMode();
+        String buttonText;
+
+        if (autoMode == UiModeManager.MODE_NIGHT_AUTO) {
+            buttonText = mContext.getString(active
+                    ? R.string.dark_ui_activation_off_auto
+                    : R.string.dark_ui_activation_on_auto);
+        } else {
+            buttonText = mContext.getString(active
+                    ? R.string.dark_ui_activation_off_manual
+                    : R.string.dark_ui_activation_on_manual);
+        }
+        if (active) {
+            mTurnOnButton.setVisibility(View.GONE);
+            mTurnOffButton.setVisibility(View.VISIBLE);
+            mTurnOffButton.setText(buttonText);
+        } else {
+            mTurnOnButton.setVisibility(View.VISIBLE);
+            mTurnOffButton.setVisibility(View.GONE);
+            mTurnOnButton.setText(buttonText);
+        }
+    }
+
+    @Override
+    public CharSequence getSummary() {
+        final boolean isActivated = (mContext.getResources().getConfiguration().uiMode
+                & Configuration.UI_MODE_NIGHT_YES) != 0;
+        final int autoMode = mUiModeManager.getNightMode();
+        if (autoMode == UiModeManager.MODE_NIGHT_AUTO) {
+            return mContext.getString(isActivated
+                    ? R.string.dark_ui_summary_on_auto_mode_auto
+                    : R.string.dark_ui_summary_off_auto_mode_auto);
+        } else {
+            return mContext.getString(isActivated
+                    ? R.string.dark_ui_summary_on_auto_mode_never
+                    : R.string.dark_ui_summary_off_auto_mode_never);
+        }
+    }
+
+    private final View.OnClickListener mListener = new View.OnClickListener() {
+        @Override
+        public void onClick(View v) {
+            final boolean active = (mContext.getResources().getConfiguration().uiMode
+                    & Configuration.UI_MODE_NIGHT_YES) != 0;
+            mUiModeManager.setNightModeActivated(!active);
+            updateNightMode(!active);
+        }
+    };
+
+    @Override
+    public void displayPreference(PreferenceScreen screen) {
+        super.displayPreference(screen);
+
+        final LayoutPreference preference = screen.findPreference(getPreferenceKey());
+        mTurnOnButton = preference.findViewById(R.id.dark_ui_turn_on_button);
+        mTurnOnButton.setOnClickListener(mListener);
+        mTurnOffButton = preference.findViewById(R.id.dark_ui_turn_off_button);
+        mTurnOffButton.setOnClickListener(mListener);
+    }
+
+    @Override
+    public int getAvailabilityStatus() {
+        return AVAILABLE;
+    }
+}
diff --git a/src/com/android/settings/display/darkmode/DarkModeObserver.java b/src/com/android/settings/display/darkmode/DarkModeObserver.java
new file mode 100644
index 0000000..1c076f7
--- /dev/null
+++ b/src/com/android/settings/display/darkmode/DarkModeObserver.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the
+ * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package com.android.settings.display.darkmode;
+
+import android.content.Context;
+import android.database.ContentObserver;
+import android.net.Uri;
+import android.os.Handler;
+import android.os.Looper;
+import android.provider.Settings;
+import com.android.internal.annotations.VisibleForTesting;
+
+/**
+ * Observes changes for dark night settings*/
+public class DarkModeObserver {
+    private ContentObserver mContentObserver;
+    private Runnable mCallback;
+    private Context mContext;
+
+    public DarkModeObserver(Context context) {
+        mContext = context;
+        mContentObserver = new ContentObserver(new Handler(Looper.getMainLooper())) {
+            @Override
+            public void onChange(boolean selfChange, Uri uri) {
+                super.onChange(selfChange, uri);
+                final String setting = uri == null ? null : uri.getLastPathSegment();
+                if (setting != null && mCallback != null) {
+                    switch (setting) {
+                        case Settings.Secure.UI_NIGHT_MODE:
+                            mCallback.run();
+                            break;
+                        default:
+                    }
+                }
+            }
+        };
+    }
+
+    /**
+     * subscribe callback when night mode changed in the database
+     *
+     * @param callback the callback that gets triggered when subscribed
+     */
+    public void subscribe(Runnable callback) {
+        callback.run();
+        mCallback = callback;
+        final Uri uri = Settings.Secure.getUriFor(Settings.Secure.UI_NIGHT_MODE);
+        mContext.getContentResolver().registerContentObserver(uri, false, mContentObserver);
+    }
+
+    /**
+     * unsubscribe from dark ui database changes
+     */
+    public void unsubscribe() {
+        mContext.getContentResolver().unregisterContentObserver(mContentObserver);
+        mCallback = null;
+    }
+
+    @VisibleForTesting
+    protected void setContentObserver(ContentObserver co) {
+        mContentObserver = co;
+    }
+
+    @VisibleForTesting
+    protected ContentObserver getContentObserver() {
+        return mContentObserver;
+    }
+}
diff --git a/src/com/android/settings/display/darkmode/DarkModePreference.java b/src/com/android/settings/display/darkmode/DarkModePreference.java
new file mode 100644
index 0000000..2a8909f
--- /dev/null
+++ b/src/com/android/settings/display/darkmode/DarkModePreference.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the
+ * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package com.android.settings.display.darkmode;
+
+import android.app.UiModeManager;
+import android.content.Context;
+import android.content.res.Configuration;
+import android.util.AttributeSet;
+import com.android.settings.R;
+import com.android.settings.widget.MasterSwitchPreference;
+
+/**
+ * component for the display settings dark ui summary*/
+public class DarkModePreference extends MasterSwitchPreference {
+
+    private UiModeManager mUiModeManager;
+    private DarkModeObserver mDarkModeObserver;
+    private Runnable mCallback;
+
+    public DarkModePreference(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        mDarkModeObserver = new DarkModeObserver(context);
+        mUiModeManager = context.getSystemService(UiModeManager.class);
+        mCallback = () -> {
+            updateSummary();
+        };
+        mDarkModeObserver.subscribe(mCallback);
+    }
+
+    @Override
+    public void onAttached() {
+        super.onAttached();
+        mDarkModeObserver.subscribe(mCallback);
+    }
+
+    @Override
+    public void onDetached() {
+        super.onDetached();
+        mDarkModeObserver.unsubscribe();
+    }
+
+    private void updateSummary() {
+        final boolean active = (getContext().getResources().getConfiguration().uiMode
+                & Configuration.UI_MODE_NIGHT_YES) != 0;
+        final boolean auto = mUiModeManager.getNightMode() == UiModeManager.MODE_NIGHT_AUTO;
+
+        String detail;
+        if (active) {
+            detail = getContext().getString(auto
+                    ? R.string.dark_ui_summary_on_auto_mode_auto
+                    : R.string.dark_ui_summary_on_auto_mode_never);
+        } else {
+            detail = getContext().getString(auto
+                    ? R.string.dark_ui_summary_off_auto_mode_auto
+                    : R.string.dark_ui_summary_off_auto_mode_never);
+        }
+        String summary = getContext().getString(active
+                ? R.string.dark_ui_summary_on
+                : R.string.dark_ui_summary_off, detail);
+
+        setSummary(summary);
+    }
+}
diff --git a/src/com/android/settings/display/darkmode/DarkModeScheduleSelectorController.java b/src/com/android/settings/display/darkmode/DarkModeScheduleSelectorController.java
new file mode 100644
index 0000000..ab7ea92
--- /dev/null
+++ b/src/com/android/settings/display/darkmode/DarkModeScheduleSelectorController.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the
+ * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package com.android.settings.display.darkmode;
+
+import android.app.UiModeManager;
+import android.content.Context;
+import android.content.res.Configuration;
+import androidx.preference.DropDownPreference;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceScreen;
+import com.android.settings.R;
+import com.android.settings.core.BasePreferenceController;
+
+/**
+ * Controller for the dark ui option dropdown
+ */
+public class DarkModeScheduleSelectorController extends BasePreferenceController
+        implements Preference.OnPreferenceChangeListener {
+
+    private final UiModeManager mUiModeManager;
+    private boolean mPreferenceSet = false;
+    private DropDownPreference mPreference;
+    private String mCurrentMode;
+
+    public DarkModeScheduleSelectorController(Context context, String key) {
+        super(context, key);
+        mUiModeManager = context.getSystemService(UiModeManager.class);
+    }
+
+    @Override
+    public void displayPreference(PreferenceScreen screen) {
+        super.displayPreference(screen);
+
+        mPreference = screen.findPreference(getPreferenceKey());
+    }
+
+    @Override
+    public int getAvailabilityStatus() {
+        return BasePreferenceController.AVAILABLE;
+    }
+
+    @Override
+    public final void updateState(Preference preference) {
+        mCurrentMode =
+                mUiModeManager.getNightMode() == UiModeManager.MODE_NIGHT_AUTO
+                ? mContext.getString(R.string.dark_ui_auto_mode_auto)
+                : mContext.getString(R.string.dark_ui_auto_mode_never);
+        mPreference.setValue(mCurrentMode);
+    }
+    @Override
+    public final boolean onPreferenceChange(Preference preference, Object newValue) {
+        String newMode = (String) newValue;
+        if (newMode == mCurrentMode) {
+            return false;
+        }
+        mCurrentMode = newMode;
+        if (mCurrentMode == mContext.getString(R.string.dark_ui_auto_mode_never)) {
+            boolean active = (mContext.getResources().getConfiguration().uiMode
+                    & Configuration.UI_MODE_NIGHT_YES) != 0;
+            int mode = active ? UiModeManager.MODE_NIGHT_YES
+                    : UiModeManager.MODE_NIGHT_NO;
+            mUiModeManager.setNightMode(mode);
+
+        } else if (mCurrentMode ==
+                mContext.getString(R.string.dark_ui_auto_mode_auto)) {
+            mUiModeManager.setNightMode(UiModeManager.MODE_NIGHT_AUTO);
+        }
+        return true;
+    }
+}
diff --git a/src/com/android/settings/display/darkmode/DarkModeSettingsFragment.java b/src/com/android/settings/display/darkmode/DarkModeSettingsFragment.java
new file mode 100644
index 0000000..6293316
--- /dev/null
+++ b/src/com/android/settings/display/darkmode/DarkModeSettingsFragment.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the
+ * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package com.android.settings.display.darkmode;
+
+import android.content.Context;
+import android.os.Bundle;
+import android.app.settings.SettingsEnums;
+import com.android.settings.R;
+import com.android.settings.dashboard.DashboardFragment;
+import com.android.settings.search.BaseSearchIndexProvider;
+import com.android.settingslib.search.SearchIndexable;
+
+/**
+ * Settings screen for Dark UI Mode
+ */
+@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
+public class DarkModeSettingsFragment extends DashboardFragment {
+
+    private static final String TAG = "DarkModeSettingsFragment";
+    private DarkModeObserver mContentObserver;
+    private Runnable mCallback = () -> {
+        updatePreferenceStates();
+    };
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        final Context context = getContext();
+        mContentObserver = new DarkModeObserver(context);
+    }
+
+    @Override
+    public void onStart() {
+        super.onStart();
+        // Listen for changes only while visible.
+        mContentObserver.subscribe(mCallback);
+    }
+
+    @Override
+    public void onStop() {
+        super.onStop();
+        // Stop listening for state changes.
+        mContentObserver.unsubscribe();
+    }
+
+    @Override
+    protected int getPreferenceScreenResId() {
+        return R.xml.dark_mode_settings;
+    }
+
+    @Override
+    public int getHelpResource() {
+        return R.string.help_url_dark_theme;
+    }
+
+    @Override
+    protected String getLogTag() {
+        return TAG;
+    }
+
+    @Override
+    public int getMetricsCategory() {
+        return SettingsEnums.DARK_UI_SETTINGS;
+    }
+
+    public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
+            new BaseSearchIndexProvider(R.xml.dark_mode_settings);
+}
diff --git a/tests/robotests/src/com/android/settings/display/DarkUIPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/display/DarkUIPreferenceControllerTest.java
index 3659803..9924cb4 100644
--- a/tests/robotests/src/com/android/settings/display/DarkUIPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/display/DarkUIPreferenceControllerTest.java
@@ -16,25 +16,9 @@
 
 package com.android.settings.display;
 
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
 import android.content.Context;
-import android.os.Handler;
-import android.os.IPowerManager;
-import android.os.PowerManager;
-
 import androidx.fragment.app.Fragment;
-import androidx.preference.PreferenceScreen;
-import androidx.preference.SwitchPreference;
-
-import org.junit.Assert;
+import com.android.settings.display.darkmode.DarkModePreference;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -43,6 +27,10 @@
 import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
+import static com.google.common.truth.Truth.assertThat;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.spy;
+
 @RunWith(RobolectricTestRunner.class)
 public class DarkUIPreferenceControllerTest {
 
@@ -57,7 +45,7 @@
         mContext = spy(RuntimeEnvironment.application);
         mController = spy(new DarkUIPreferenceController(mContext, "dark_ui_mode"));
         mController.setParentFragment(mFragment);
-        mController.mPreference = new SwitchPreference(mContext);
+        mController.mPreference = new DarkModePreference(mContext, null /* AttributeSet attrs */);
         mController.onStart();
     }
 
diff --git a/tests/robotests/src/com/android/settings/display/darkmode/DarkModeActivationPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/display/darkmode/DarkModeActivationPreferenceControllerTest.java
new file mode 100644
index 0000000..24cbd07
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/display/darkmode/DarkModeActivationPreferenceControllerTest.java
@@ -0,0 +1,155 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the
+ * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package com.android.settings.display.darkmode;
+
+import android.app.UiModeManager;
+import android.content.Context;
+import android.content.res.Configuration;
+import android.content.res.Resources;
+import android.view.View;
+import android.widget.Button;
+import androidx.preference.PreferenceScreen;
+import com.android.settings.R;
+import com.android.settingslib.widget.LayoutPreference;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.RobolectricTestRunner;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.eq;
+
+@RunWith(RobolectricTestRunner.class)
+public class DarkModeActivationPreferenceControllerTest {
+    private DarkModeActivationPreferenceController mController;
+    private String mPreferenceKey = "key";
+    @Mock
+    private LayoutPreference mPreference;
+    @Mock
+    private PreferenceScreen mScreen;
+    @Mock
+    private Resources res;
+    @Mock
+    private Context mContext;
+    @Mock
+    private UiModeManager mService;
+    @Mock
+    private Button mTurnOffButton;
+    @Mock
+    private Button mTurnOnButton;
+
+    private Configuration configNightYes = new Configuration();
+    private Configuration configNightNo = new Configuration();;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mService = mock(UiModeManager.class);
+        when(mContext.getResources()).thenReturn(res);
+        when(mContext.getSystemService(UiModeManager.class)).thenReturn(mService);
+        when(mScreen.findPreference(anyString())).thenReturn(mPreference);
+        when(mPreference.findViewById(
+                eq(R.id.dark_ui_turn_on_button))).thenReturn(mTurnOnButton);
+        when(mPreference.findViewById(
+                eq(R.id.dark_ui_turn_off_button))).thenReturn(mTurnOffButton);
+        when(mService.setNightModeActivated(anyBoolean())).thenReturn(true);
+        when(mContext.getString(
+                R.string.dark_ui_activation_off_auto)).thenReturn("off_auto");
+        when(mContext.getString(
+                R.string.dark_ui_activation_on_auto)).thenReturn("on_auto");
+        when(mContext.getString(
+                R.string.dark_ui_activation_off_manual)).thenReturn("off_manual");
+        when(mContext.getString(
+                R.string.dark_ui_activation_on_manual)).thenReturn("on_manual");
+        when(mContext.getString(
+                R.string.dark_ui_summary_off_auto_mode_auto)).thenReturn("summary_off_auto");
+        when(mContext.getString(
+                R.string.dark_ui_summary_on_auto_mode_auto)).thenReturn("summary_on_auto");
+        when(mContext.getString(
+                R.string.dark_ui_summary_off_auto_mode_never)).thenReturn("summary_off_manual");
+        when(mContext.getString(
+                R.string.dark_ui_summary_on_auto_mode_never)).thenReturn("summary_on_manual");
+        mController = new DarkModeActivationPreferenceController(mContext, mPreferenceKey);
+        mController.displayPreference(mScreen);
+        configNightNo.uiMode = Configuration.UI_MODE_NIGHT_NO;
+        configNightYes.uiMode = Configuration.UI_MODE_NIGHT_YES;
+    }
+
+    @Test
+    public void nightMode_toggleButton_offManual() {
+        when(mService.getNightMode()).thenReturn(UiModeManager.MODE_NIGHT_YES);
+        when(res.getConfiguration()).thenReturn(configNightYes);
+
+        mController.updateState(mPreference);
+
+        verify(mTurnOnButton).setVisibility(eq(View.GONE));
+        verify(mTurnOffButton).setVisibility(eq(View.VISIBLE));
+        verify(mTurnOffButton).setText(eq(mContext.getString(
+                R.string.dark_ui_activation_off_manual)));
+    }
+
+
+    @Test
+    public void nightMode_toggleButton_onAutoWhenModeIsYes() {
+        when(mService.getNightMode()).thenReturn(UiModeManager.MODE_NIGHT_YES);
+        when(res.getConfiguration()).thenReturn(configNightNo);
+
+        mController.updateState(mPreference);
+
+        verify(mTurnOffButton).setVisibility(eq(View.GONE));
+        verify(mTurnOnButton).setVisibility(eq(View.VISIBLE));
+        verify(mTurnOnButton).setText(eq(mContext.getString(
+                R.string.dark_ui_activation_on_manual)));
+    }
+
+    @Test
+    public void nightMode_toggleButton_onAutoWhenModeIsAuto() {
+        when(mService.getNightMode()).thenReturn(UiModeManager.MODE_NIGHT_AUTO);
+        when(res.getConfiguration()).thenReturn(configNightNo);
+
+        mController.updateState(mPreference);
+
+        verify(mTurnOffButton).setVisibility(eq(View.GONE));
+        verify(mTurnOnButton).setVisibility(eq(View.VISIBLE));
+        verify(mTurnOnButton).setText(eq(mContext.getString(
+                R.string.dark_ui_activation_on_auto)));
+    }
+
+    @Test
+    public void nightModeSummary_buttonText_onManual() {
+        when(mService.getNightMode()).thenReturn(UiModeManager.MODE_NIGHT_NO);
+        when(res.getConfiguration()).thenReturn(configNightYes);
+
+        assertEquals(mController.getSummary(), mContext.getString(
+                R.string.dark_ui_summary_on_auto_mode_never));
+    }
+
+    @Test
+    public void nightModeSummary_buttonText_offAuto() {
+        when(mService.getNightMode()).thenReturn(UiModeManager.MODE_NIGHT_AUTO);
+        when(res.getConfiguration()).thenReturn(configNightNo);
+
+        assertEquals(mController.getSummary(), mContext.getString(
+                R.string.dark_ui_summary_off_auto_mode_auto));
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/display/darkmode/DarkModeObserverTest.java b/tests/robotests/src/com/android/settings/display/darkmode/DarkModeObserverTest.java
new file mode 100644
index 0000000..dfa8ba1
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/display/darkmode/DarkModeObserverTest.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the
+ * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package com.android.settings.display.darkmode;
+
+import android.content.Context;
+import android.database.ContentObserver;
+import android.net.Uri;
+import android.provider.Settings;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.RobolectricTestRunner;
+import org.robolectric.RuntimeEnvironment;
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.times;
+
+
+@RunWith(RobolectricTestRunner.class)
+public class DarkModeObserverTest {
+    private Context mContext;
+    private ContentObserver mContentObserver;
+    private DarkModeObserver mDarkModeObserver;
+    private Runnable mCallback;
+    private Uri mUri = Settings.Secure.getUriFor(Settings.Secure.UI_NIGHT_MODE);
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mContext = spy(RuntimeEnvironment.application);
+        mDarkModeObserver = new DarkModeObserver(mContext);
+        mContentObserver = mDarkModeObserver.getContentObserver();
+        mCallback = mock(Runnable.class);
+    }
+
+    @Test
+    public void callbackTest_subscribedCallbackCalled() {
+        mDarkModeObserver.subscribe(mCallback);
+        mContentObserver.onChange(false, mUri);
+        Mockito.verify(mCallback, times(2)).run();
+    }
+
+    @Test
+    public void callbackTest_unsubscribedCallNotbackCalled() {
+        mDarkModeObserver.subscribe(mCallback);
+        mContentObserver.onChange(false, mUri);
+        mDarkModeObserver.unsubscribe();
+        mContentObserver.onChange(false, mUri);
+        Mockito.verify(mCallback, times(2)).run();
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/display/darkmode/DarkModeScheduleSelectorControllerTest.java b/tests/robotests/src/com/android/settings/display/darkmode/DarkModeScheduleSelectorControllerTest.java
new file mode 100644
index 0000000..a844fec
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/display/darkmode/DarkModeScheduleSelectorControllerTest.java
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the
+ * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package com.android.settings.display.darkmode;
+
+import android.app.UiModeManager;
+import android.content.Context;
+import androidx.preference.DropDownPreference;
+import androidx.preference.PreferenceScreen;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.RobolectricTestRunner;
+import org.robolectric.RuntimeEnvironment;
+import com.android.settings.R;
+
+import static junit.framework.TestCase.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+@RunWith(RobolectricTestRunner.class)
+public class DarkModeScheduleSelectorControllerTest {
+    private DarkModeScheduleSelectorController mController;
+    private String mPreferenceKey = "key";
+    @Mock
+    private DropDownPreference mPreference;
+    @Mock
+    private PreferenceScreen mScreen;
+    private Context mContext;
+    @Mock
+    private UiModeManager mService;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mContext = spy(RuntimeEnvironment.application);
+        when(mContext.getSystemService(UiModeManager.class)).thenReturn(mService);
+        when(mContext.getString(R.string.dark_ui_auto_mode_never)).thenReturn("never");
+        when(mContext.getString(R.string.dark_ui_auto_mode_auto)).thenReturn("auto");
+        mPreference = spy(new DropDownPreference(mContext));
+        when(mScreen.findPreference(anyString())).thenReturn(mPreference);
+        when(mService.setNightModeActivated(anyBoolean())).thenReturn(true);
+        mController = new DarkModeScheduleSelectorController(mContext, mPreferenceKey);
+    }
+
+    @Test
+    public void nightMode_preferenceChange_preferenceChangeTrueWhenChangedOnly() {
+        when(mService.getNightMode()).thenReturn(UiModeManager.MODE_NIGHT_YES);
+        mController.displayPreference(mScreen);
+        boolean changed = mController
+                .onPreferenceChange(mScreen, mContext.getString(R.string.dark_ui_auto_mode_auto));
+        assertTrue(changed);
+        changed = mController
+                .onPreferenceChange(mScreen, mContext.getString(R.string.dark_ui_auto_mode_auto));
+        assertFalse(changed);
+    }
+
+    @Test
+    public void nightMode_updateStateNone_dropDownValueChangedToNone() {
+        when(mService.getNightMode()).thenReturn(UiModeManager.MODE_NIGHT_YES);
+        mController.displayPreference(mScreen);
+        mController.updateState(mPreference);
+        verify(mPreference).setValue(mContext.getString(R.string.dark_ui_auto_mode_never));
+    }
+
+    @Test
+    public void nightMode_updateStateNone_dropDownValueChangedToAuto() {
+        when(mService.getNightMode()).thenReturn(UiModeManager.MODE_NIGHT_AUTO);
+        mController.displayPreference(mScreen);
+        mController.updateState(mPreference);
+        verify(mPreference).setValue(mContext.getString(R.string.dark_ui_auto_mode_auto));
+    }
+}
