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

Commit ab4566a7 authored by Pedlar's avatar Pedlar Committed by Steve Kondik
Browse files

Expanded View Power Widget settings (Galaxy S style)

- Moved it to UIActivity so it is easier to find.
- Added Modes, like in the normal Settings widget, for buttons.

- If you had this added previously, you will experience a FC when
  you click on a already initialized button, this is because I
  changed the key value, so it is notmal, and will go away once
  they are removed.

- This Depends on the following:
Images: http://review.cyanogenmod.com/2028
Framework: http://review.cyanogenmod.com/1957
parent 6b0f96db
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -116,6 +116,12 @@
           </intent-filter>
        </activity>

        <activity android:name=".activities.WidgetActivity">
           <intent-filter>
              <action android:name="android.intent.action.MAIN" />
           </intent-filter>
        </activity>

        <activity android:name=".activities.BatteryTester"
                  android:label="Battery Tester">
        </activity>
+53 −0
Original line number Diff line number Diff line
@@ -315,4 +315,57 @@
        <item>0</item>
        <item>1</item>
    </string-array>

   <string-array name="entries_brightness_widget" translatable="false">
        <item>Auto/Dim/40%/100%</item>
        <item>Auto/Dim/25%/75%/100%</item>
        <item>Auto/25%/100%</item>
        <item>Dim/100%</item>
    </string-array>

   <string-array name="values_brightness_widget" translatable="false">
        <item>0</item>
        <item>1</item>
        <item>2</item>
        <item>3</item>
    </string-array>

    <string-array name="entries_network_widget" translatable="false">
        <item>2G/3G+2G</item>  
        <item>2G/3G Only</item>   
        <item>2G/3G Only/3G+2G</item>
    </string-array>

    <string-array name="values_network_widget" translatable="false">
        <item>0</item>
        <item>1</item>
        <item>2</item>
    </string-array>

    <string-array name="entries_screentimeout_widget" translatable="false">
        <item>15s/1m/5m</item>
        <item>30s/2m/5m</item>
    </string-array>

    <string-array name="values_screentimeout_widget" translatable="false">
        <item>0</item>
        <item>1</item>
    </string-array>

    <string-array name="entries_ring_widget" translatable="false">
        <item>Sound+Vibrate/Vibrate</item>
        <item>Sound/Vibrate</item>
        <item>Sound/Silent</item>
        <item>Sound+Vib/Vib/Silent</item>
        <item>Sound/Vibrate/Silent</item>
    </string-array>

    <string-array name="values_ring_widget" translatable="false">
        <item>0</item>
        <item>1</item>
        <item>2</item>
        <item>3</item>
        <item>4</item>
    </string-array>

</resources>
+30 −0
Original line number Diff line number Diff line
@@ -330,6 +330,35 @@
    <string name="summary_not_exp_bar_color_mask">Pick a color to apply to elements of the pulldown notification bar</string>


    <!-- Expanded View Power Widget -->
    <string name="title_expanded_widget">Notification power widget</string>
    <string name="summary_expanded_widget">Use the expanded views power widget</string>
    <string name="expanded_color_mask">Indicator color</string>
    <string name="title_widget_picker">Widget buttons</string>
    <string name="summary_widget_picker">Pick your widget buttons</string>
    <string name="title_toggle_wifi">Toggle Wifi</string>
    <string name="title_toggle_bluetooth">Toggle Bluetooth</string>
    <string name="title_toggle_gps">Toggle GPS</string>
    <string name="title_toggle_sound">Toggle Sound</string>
    <string name="title_toggle_brightness">Toggle Brightness</string>
    <string name="title_toggle_sync">Toggle Sync</string>
    <string name="title_toggle_wifiap">Toggle Wifi AP</string>
    <string name="title_toggle_screentimeout">Toggle Screentimeout</string>
    <string name="title_toggle_mobiledata">Toggle Mobiledata</string>
    <string name="title_toggle_lockscreen">Toggle Lockscreen</string>
    <string name="title_toggle_networkmode">Toggle 2G/3G</string>
    <string name="title_toggle_autorotate">Toggle Orientation</string>
    <string name="title_toggle_airplane">Toggle Airplane mode</string>
    <string name="title_button_modes">Button modes</string>
    <string name="pref_brightness_mode_title">Brightness modes</string>
    <string name="pref_brightness_mode_summary">Choose how the brightness button changes modes</string>
    <string name="pref_network_mode_title">Network modes</string>
    <string name="pref_network_mode_summary">Choose how the NetworkMode button changes modes</string>
    <string name="pref_screentimeout_mode_title">Screentimeout modes</string>
    <string name="pref_screentimeout_mode_summary">Choose how the Screentimeout button changes modes</string>
    <string name="pref_ring_mode_title">Sound modes</string>
    <string name="pref_ring_mode_summary">Choose how the sound button changes modes</string>

    <!-- Performance : Lock home memory -->
    <string name="pref_lock_home_title">Lock home in memory</string>
    <string name="pref_lock_home_summary">Attempt to keep the current home app in memory at all times</string>
@@ -415,4 +444,5 @@
    <string name="quiet_hours_dim">Dim LED</string>
    <string name="quiet_hours_dim_on">LED will dim if possible</string>
    <string name="quiet_hours_dim_off">LED will be full brightness</string>

</resources>
+60 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
    <CheckBoxPreference android:key="toggle_wifi"
        android:title="@string/title_toggle_wifi"
        android:defaultValue="true" />
    <CheckBoxPreference android:key="toggle_bluetooth"
        android:title="@string/title_toggle_bluetooth"
        android:defaultValue="true" />
    <CheckBoxPreference android:key="toggle_gps"
        android:title="@string/title_toggle_gps"
        android:defaultValue="true" />
    <CheckBoxPreference android:key="toggle_sound"
        android:title="@string/title_toggle_sound"
        android:defaultValue="true" />
    <CheckBoxPreference android:key="toggle_brightness"
        android:title="@string/title_toggle_brightness"
        android:defaultValue="false" />
    <CheckBoxPreference android:key="toggle_sync"
        android:title="@string/title_toggle_sync"
        android:defaultValue="false" />
    <CheckBoxPreference android:key="toggle_wifiap"
        android:title="@string/title_toggle_wifiap"
        android:defaultValue="false" />
    <CheckBoxPreference android:key="toggle_screentimeout"
        android:title="@string/title_toggle_screentimeout"
        android:defaultValue="false" />
    <CheckBoxPreference android:key="toggle_autorotate"
        android:title="@string/title_toggle_autorotate"
        android:defaultValue="false" />
    <CheckBoxPreference android:key="toggle_mobiledata"
        android:title="@string/title_toggle_mobiledata"
        android:defaultValue="false" />
    <CheckBoxPreference android:key="toggle_networkmode"
        android:title="@string/title_toggle_networkmode"
        android:defaultValue="false" />
    <CheckBoxPreference android:key="toggle_lockscreen"
        android:title="@string/title_toggle_lockscreen"
        android:defaultValue="false" />
    <CheckBoxPreference android:key="toggle_airplane"
        android:title="@string/title_toggle_airplane"
        android:defaultValue="false" />

    <PreferenceCategory android:title="@string/title_button_modes">
        <ListPreference android:key="pref_brightness_mode" android:dialogTitle="@string/pref_brightness_mode_title"
            android:title="@string/pref_brightness_mode_title" android:summary="@string/pref_brightness_mode_summary"
            android:entries="@array/entries_brightness_widget" android:entryValues="@array/values_brightness_widget" />

        <ListPreference android:key="pref_network_mode" android:dialogTitle="@string/pref_network_mode_title"
            android:title="@string/pref_network_mode_title" android:summary="@string/pref_network_mode_summary"
            android:entries="@array/entries_network_widget" android:entryValues="@array/values_network_widget" />

        <ListPreference android:key="pref_screentimeout_mode" android:dialogTitle="@string/pref_screentimeout_mode_title"
            android:title="@string/pref_screentimeout_mode_title" android:summary="@string/pref_screentimeout_mode_summary"  
            android:entries="@array/entries_screentimeout_widget" android:entryValues="@array/values_screentimeout_widget" />

        <ListPreference android:key="pref_ring_mode" android:dialogTitle="@string/pref_ring_mode_title"
            android:title="@string/pref_ring_mode_title" android:summary="@string/pref_ring_mode_summary"
            android:entries="@array/entries_ring_widget" android:entryValues="@array/values_ring_widget" />
    </PreferenceCategory>
</PreferenceScreen>
+21 −0
Original line number Diff line number Diff line
@@ -71,6 +71,27 @@

    </PreferenceCategory>

    <!-- Expanded View Power Widget -->
   <PreferenceCategory android:title="@string/title_expanded_widget">
      <CheckBoxPreference android:key="expanded_widget"
         android:title="@string/title_expanded_widget"
         android:summary="@string/summary_expanded_widget"
         android:defaultValue="true" />
      <Preference
         android:key="expanded_color_mask"
         android:title="@string/expanded_color_mask"
         android:summary="@string/expanded_color_mask"
         android:defaultValue="-1"
         android:dependency="expanded_widget" />
      <PreferenceScreen android:key="widget_picker"
          android:title="@string/title_widget_picker" android:summary="@string/summary_widget_picker">
          <intent android:action="android.intent.action.MAIN"
              android:targetPackage="com.cyanogenmod.cmparts"
              android:targetClass="com.cyanogenmod.cmparts.activities.WidgetActivity" />
      </PreferenceScreen>
   </PreferenceCategory>

    
    <!-- Rotation -->
    <PreferenceCategory android:title="@string/ui_rotation_title">
        <CheckBoxPreference android:key="pref_rotation_90"
Loading