Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3342e26 authored by Danny Baumann's avatar Danny Baumann
Browse files

Add back notification light settings.

Change-Id: I474a14a1b395407f5ca273a5d6a3a7f03f7e4698
parent 83491d54
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1722,6 +1722,10 @@
            </intent-filter>
        </activity>

        <activity android:name=".notificationlight.NotificationLightSettings" />

        <activity android:name=".notificationlight.BatteryLightSettings" />

        <!-- CyanogenMod activities End -->

        <!-- Pseudo-activity used to provide an intent-filter entry point to encryption settings -->
+102 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2010 Daniel Nilsson
     Copyright (C) 2012 THe CyanogenMod 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. -->

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <com.android.settings.notificationlight.ColorPickerView
        android:id="@+id/color_picker_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_marginStart="10dp"
        android:layout_marginEnd="10dp" />

    <LinearLayout
        android:id="@+id/color_panel_view"
        android:layout_width="match_parent"
        android:layout_height="40dp"
        android:layout_alignStart="@id/color_picker_view"
        android:layout_alignEnd="@id/color_picker_view"
        android:layout_below="@id/color_picker_view"
        android:layout_marginBottom="4dp"
        android:layout_marginTop="4dp"
        android:orientation="horizontal" >

        <EditText
            android:id="@+id/hex_color_input"
            android:layout_width="0px"
            android:maxLength="6"
            android:digits="0123456789ABCDEFabcdef"
            android:inputType="textNoSuggestions"
            android:layout_height="match_parent"
            android:layout_weight="0.5" />

        <com.android.settings.notificationlight.ColorPanelView
            android:id="@+id/color_panel"
            android:layout_width="0px"
            android:layout_height="match_parent"
            android:layout_weight="0.5" />
    </LinearLayout>

    <LinearLayout
        android:id="@+id/speed_title_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/color_panel_view"
        android:layout_marginStart="10dp"
        android:layout_marginEnd="10dp"
        android:layout_marginTop="4dp"
        android:orientation="vertical" >

        <View
            android:layout_width="match_parent"
            android:layout_height="2dp"
            android:background="@android:drawable/divider_horizontal_dark" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="4dp"
            android:text="@string/pulse_speed_title"
            android:textAppearance="?android:attr/textAppearanceSmall" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:paddingBottom="4dip" >

            <Spinner
                android:id="@+id/on_spinner"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1" />

            <View
                android:layout_width="8dip"
                android:layout_height="match_parent" />

            <Spinner
                android:id="@+id/off_spinner"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1" />
        </LinearLayout>
    </LinearLayout>

</RelativeLayout>
+69 −0
Original line number Diff line number Diff line
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/app_light_pref"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="?android:attr/listPreferredItemHeight"
    android:gravity="center_vertical"
    android:background="?android:attr/selectableItemBackground" >

    <ImageView
        android:id="@+android:id/icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="4dip"
        android:maxWidth="36dip"
        android:maxHeight="36dip"
        android:adjustViewBounds="true"
        android:layout_gravity="center" />

    <RelativeLayout
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_margin="4dip"
        android:layout_weight="1">

        <TextView android:id="@+android:id/title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:singleLine="true"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:ellipsize="marquee"
            android:fadingEdge="horizontal" />

        <TextView android:id="@+android:id/summary"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@android:id/title"
            android:layout_alignStart="@android:id/title"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:textColor="?android:attr/textColorSecondary"
            android:maxLines="1" />
    </RelativeLayout>

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical" >

        <TextView
            android:id="@+id/textViewTimeOnValue"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="end"
            android:textAppearance="?android:attr/textAppearanceSmall" />

        <TextView
            android:id="@+id/textViewTimeOffValue"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="end"
            android:textAppearance="?android:attr/textAppearanceSmall" />
    </LinearLayout>

    <ImageView
        android:id="@+id/light_color"
        android:layout_width="32dip"
        android:layout_height="wrap_content"
        android:layout_gravity="center" />

</LinearLayout>
+11 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/textViewName"
    android:paddingStart="4dp"
    android:paddingEnd="4dp"
    android:paddingTop="8dp"
    android:paddingBottom="8dp"
    android:textAppearance="?android:attr/textAppearanceMedium" >

</TextView>
+35 −0
Original line number Diff line number Diff line
@@ -98,6 +98,41 @@
        <item>2</item>
    </string-array>

    <!-- Values for the notification light pulse spinners -->
    <string-array name="notification_pulse_length_entries" translatable="false">
        <item>@string/pulse_length_always_on</item>
        <item>@string/pulse_length_very_short</item>
        <item>@string/pulse_length_short</item>
        <item>@string/pulse_length_normal</item>
        <item>@string/pulse_length_long</item>
        <item>@string/pulse_length_very_long</item>
    </string-array>

    <string-array name="notification_pulse_length_values" translatable="false">
        <item>1</item>
        <item>250</item>
        <item>500</item>
        <item>1000</item>
        <item>2500</item>
        <item>5000</item>
    </string-array>

    <string-array name="notification_pulse_speed_entries" translatable="false">
        <item>@string/pulse_speed_very_fast</item>
        <item>@string/pulse_speed_fast</item>
        <item>@string/pulse_speed_normal</item>
        <item>@string/pulse_speed_slow</item>
        <item>@string/pulse_speed_very_slow</item>
    </string-array>

    <string-array name="notification_pulse_speed_values" translatable="false">
        <item>250</item>
        <item>500</item>
        <item>1000</item>
        <item>2500</item>
        <item>5000</item>
    </string-array>

    <!-- Auto-brightness sensitivity -->
    <string-array name="auto_brightness_sensitivity_entries" translatable="false">
        <item>@string/auto_brightness_sensitivity_verylow</item>
Loading