[MOD][HOW-TO] Enable/disable brightness slider with toggle!

Search This thread

loserskater

Inactive Recognized Developer
Jun 6, 2008
2,160
4,434
Palmdale, CA
This will allow you to enable and disable the brightness slider right from the settings menu.
No more flashing extra zips, or having to build another SystemUI!

Let's get to it!

The two files we'll be working with are:
SecSettings.apk
SystemUI.apk

First let's start with SecSettings.apk

Navigate to res/values/string.xml
And add the following lines to the bottom:
Code:
    <string name="brightness_slider_title">Display brightness slider</string>
    <string name="brightness_slider_summary">Show brightness slider in notification panel</string>


Next navigate to res/xml/display_settings.xml
Add the line in red:
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/display_settings"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
    <PreferenceCategory android:title="@string/tts_general_section_title" />
    <PreferenceScreen android:title="@string/wallpaper" android:key="wallpaper" android:fragment="com.android.settings.WallpaperSettings" />
    <PreferenceScreen android:title="@string/led_indicator_settings" android:key="led_indicator_settings" android:fragment="com.android.settings.LedIndicatorSettings" />
    <SwitchPreferenceScreen android:title="@string/page_buddy" android:key="contextualpage_settings" android:summary="@string/page_buddy_summary" android:fragment="com.android.settings.ContextualPageSettings" />
    <PreferenceCategory android:title="@string/display_label" android:key="screen_category" />
    <PreferenceScreen android:title="@string/screen_mode_setting" android:key="mode" android:summary="@string/screen_mode_summary">
        <intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.ModePreview" />
    </PreferenceScreen>
    <com.android.settings.BrightnessPreference android:title="@string/brightness" android:key="brightness" android:widgetLayout="@layout/round_more_icon" android:dialogTitle="@string/brightness" />
    <CheckBoxPreference android:title="@string/accelerometer_title_second" android:key="accelerometer_second" />
    <CheckBoxPreference android:title="@string/accelerometer_title" android:key="accelerometer" />
    <ListPreference android:persistent="false" android:entries="@array/screen_timeout_entries" android:title="@string/screen_timeout" android:key="screen_timeout" android:summary="@string/screen_timeout_summary" android:widgetLayout="@layout/round_more_icon" android:entryValues="@array/screen_timeout_values" />
    <PreferenceScreen android:title="@string/screensaver_settings_title" android:key="screensaver" android:fragment="com.android.settings.DreamSettings" />
    [COLOR="Red"]<CheckBoxPreference android:title="@string/brightness_slider_title" android:key="display_brightness_slider" android:summary="@string/brightness_slider_summary" />[/COLOR]
    <PreferenceCategory android:title="@string/features_category_title" android:key="features_category" />
    <CheckBoxPreference android:title="@string/intelligent_rotation_title" android:key="intelligent_rotation" android:summary="@string/intelligent_rotation_summary" />
    <CheckBoxPreference android:title="@string/intelligent_sleep_title" android:key="intelligent_sleep" android:summary="@string/intelligent_sleep_summary" />
    <PreferenceCategory android:title="@string/font" />
    <com.android.settings.flipfont.FontListPreference android:title="@string/monotype_preference_title" android:key="MONOTYPE" android:summary="@string/monotype_preference_summary" android:widgetLayout="@layout/round_more_icon" />
    <com.android.settings.FontSizeListPreference android:entries="@array/entries_font_size" android:title="@string/title_font_size" android:key="font_size" android:summary="@string/summary_font_size" android:widgetLayout="@layout/round_more_icon" android:dialogTitle="@string/dialog_title_font_size" android:entryValues="@array/entryvalues_font_size" />
    <PreferenceCategory android:title="@string/more_settings" android:key="more_settings" />
    <ListPreference android:persistent="false" android:entries="@array/quick_launch_entries" android:title="@string/quick_launch_title" android:key="quick_launch" android:summary="@string/screen_quick_launch_summary" android:widgetLayout="@layout/round_more_icon" android:entryValues="@array/quick_launch_values" />
    <CheckBoxPreference android:title="@string/sub_lcd_auto_lock" android:key="sub_lcd_auto_lock" android:summary="@string/sub_lcd_auto_lock_summary" />
    <CheckBoxPreference android:title="@string/key_night_mode" android:key="key_night_mode" />
    <ListPreference android:persistent="false" android:entries="@array/key_backlight_entries" android:title="@string/key_backlight" android:key="key_backlight" android:widgetLayout="@layout/round_more_icon" android:entryValues="@array/key_backlight_values" />
    <ListPreference android:persistent="false" android:entries="@array/touch_key_light_entries" android:title="@string/touch_key_light" android:key="touch_key_light" android:summary="@string/touch_key_light_summary" android:widgetLayout="@layout/round_more_icon" android:entryValues="@array/touch_key_light_values" />
    <CheckBoxPreference android:persistent="false" android:title="@string/display_battery_percentage" android:key="display_battery_level" android:summary="@string/display_battery_percentage_summary" />
    <CheckBoxPreference android:persistent="false" android:title="@string/display_saving" android:key="power_saving_mode" android:summary="@string/display_saving_mode_summary" />
    <CheckBoxPreference android:persistent="false" android:title="@string/notification_pulse_title" android:key="notification_pulse" />
    <CheckBoxPreference android:title="@string/edgezoom_title" android:key="edgezoom_toggle" android:summary="@string/edgezoom_summary" />
</PreferenceScreen>

Next navigate to smali/com/android/settings/DisplaySettings.smali
Add the following in red:
Code:
.field private mBrightness:Lcom/android/settings/BrightnessPreference;

.field private mBrightnessPreference:Lcom/android/settings/BrightnessPreference;

[COLOR="red"].field private mBrightnessSliderPreference:Landroid/preference/CheckBoxPreference;[/COLOR]

.field private mContextualPage:Landroid/preference/SwitchPreferenceScreen;

.field protected mContextualPageUncheckerHandler:Landroid/os/Handler;

.method private updateState
Add the sections in red
Code:
    iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;

    invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v4, "display_battery_percentage"

    invoke-static {v0, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v0

    if-eqz v0, :cond_3

    move v0, v1

    :goto_2
    invoke-virtual {v3, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V

    [COLOR="red"]iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mBrightnessSliderPreference:Landroid/preference/CheckBoxPreference;

    invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v4, "display_brightness_slider"

    invoke-static {v0, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v0

    if-eqz v0, :cond_bs

    move v0, v1

    :goto_bs
    invoke-virtual {v3, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V[/COLOR]

    .line 807
    iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mTouchKeyLight:Landroid/preference/ListPreference;

    invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v3

    const-string v4, "button_key_light"

    const/16 v5, 0x5dc

    invoke-static {v3, v4, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v3

    invoke-static {v3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V
Code:
    :cond_2
    move v0, v2

    .line 802
    goto :goto_1

    :cond_3
    move v0, v2

    .line 805
    goto :goto_2

    [COLOR="red"]:cond_bs
    move v0, v2

    goto :goto_bs[/COLOR]
    
    :cond_4
    move v0, v2

    .line 811
    goto :goto_3

    :cond_5
    move v1, v2

    .line 812
    goto :goto_4
.end method

.method public onCreate
Add the parts in red:
Code:
    const-string v11, "display_battery_level"

    invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v11

    check-cast v11, Landroid/preference/CheckBoxPreference;

    iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;

    [COLOR="red"]const-string v11, "display_brightness_slider"

    invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v11

    check-cast v11, Landroid/preference/CheckBoxPreference;

    iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mBrightnessSliderPreference:Landroid/preference/CheckBoxPreference;[/COLOR]

    .line 398
    invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getActivity()Landroid/app/Activity;

    move-result-object v11

    invoke-static {v11}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z

    move-result v11

    if-eqz v11, :cond_6

.method public onPreferenceTreeClick
Add the parts in red
Code:
    :cond_4
    iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;

    invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_6

    .line 875
    iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;

    invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z

    move-result v0

    .line 876
    invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v3

    const-string v4, "display_battery_percentage"

    if-eqz v0, :cond_5

    move v2, v1

    :cond_5
    invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z

    goto :goto_2

    .line 878
    :cond_6
    [COLOR="red"]iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBrightnessSliderPreference:Landroid/preference/CheckBoxPreference;

    invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_next

    iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBrightnessSliderPreference:Landroid/preference/CheckBoxPreference;

    invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z

    move-result v0

    invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v3

    const-string v4, "display_brightness_slider"

    if-eqz v0, :cond_bright

    move v2, v1

    :cond_bright
    invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z

    goto :goto_2
    
    :cond_next[/COLOR]
    iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mNotificationPulse:Landroid/preference/CheckBoxPreference;

    if-ne p2, v0, :cond_8

    .line 879
    iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mNotificationPulse:Landroid/preference/CheckBoxPreference;

    invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z

    move-result v0

That's it for SecSettings. Recompile and move on to SystemUI.
 
Last edited:

loserskater

Inactive Recognized Developer
Jun 6, 2008
2,160
4,434
Palmdale, CA
SystemUI

Navigate to res/layout/tw_statusbar_expanded.xml
Modify the line in blue.
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="@dimen/notification_panel_margin_left"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
    <FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
        <include android:layout_width="fill_parent" android:layout_height="@dimen/tw_notification_panel_header_height" layout="@layout/tw_status_bar_expanded_header" />
        <com.wanam.systemui.quickpanel.PowerWidget android:id="@id/exp_power_stat" android:layout_width="wrap_content" android:layout_height="@dimen/quick_setting_button_height" android:layout_marginTop="@dimen/tw_notification_panel_header_height" />
        <HorizontalScrollView android:id="@id/quicksetting_scroller" android:visibility="gone" android:scrollbars="none" android:layout_width="wrap_content" android:layout_height="@dimen/quick_setting_button_height" android:layout_marginTop="@dimen/tw_notification_panel_header_height">
            <com.android.systemui.statusbar.policy.quicksetting.QuickSettingPanel android:orientation="horizontal" android:id="@id/quicksetting_container" android:layout_width="wrap_content" android:layout_height="wrap_content" android:divider="@drawable/tw_black_bg" android:showDividers="middle" />
        </HorizontalScrollView>
        <ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="@dimen/notification_panel_quicksettingbtn_height" android:overScrollMode="ifContentScrolls">
            <LinearLayout android:orientation="vertical" android:id="@id/scrollCart" android:layout_width="fill_parent" android:layout_height="wrap_content">
                    [COLOR="Blue"]<LinearLayout android:orientation="vertical" android:id="@id/brightness_controller" android:background="#ff000000" android:visibility="visible" android:layout_width="fill_parent" android:layout_height="56.0dip">[/COLOR]
                    <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="55.0dip">
                        <ImageView android:id="@id/brightness_icon" android:clickable="true" android:layout_width="25.0dip" android:layout_height="fill_parent" android:layout_marginLeft="13.0dip" android:src="@drawable/ic_sysbar_brightness" android:contentDescription="@string/accessibility_brightness_icon" />
                        <FrameLayout android:id="@id/brightness_group" android:layout_width="fill_parent" android:layout_height="fill_parent">
                            <com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
                            <com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/auto_brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
                        </FrameLayout>
                    </LinearLayout>
                    <View android:background="#ff091a24" android:layout_width="fill_parent" android:layout_height="1.0dip" />
                </LinearLayout>
                <LinearLayout android:orientation="vertical" android:id="@id/noNotificationsTitle" android:focusable="true" android:layout_width="fill_parent" android:layout_height="wrap_content">
                    <TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/noNotificationsText" android:paddingLeft="11.0dip" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height" android:text="@string/status_bar_no_notifications_title" />
                </LinearLayout>
                <LinearLayout android:orientation="vertical" android:id="@id/onGoingCart" android:background="#ff293945" android:focusable="true" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
                    <TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/onGoingNotificationText" android:paddingLeft="11.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:text="@string/status_bar_ongoing_events_title" />
                </LinearLayout>
                <com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/onGoingItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
                <LinearLayout android:orientation="vertical" android:id="@id/notificationCart" android:background="#ff293945" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
                    <RelativeLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
                        <TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/latestNotificationText" android:paddingLeft="11.0dip" android:layout_width="180.0dip" android:layout_height="fill_parent" android:text="@string/status_bar_latest_events_title" android:layout_alignParentLeft="true" />
                        <TextView android:textSize="@dimen/status_bar_expanded_notification_clear_button_text_size" android:textColor="@color/tw_status_bar_clear_btn_text" android:gravity="center" android:id="@id/clear_all_button" android:background="@drawable/tw_btn_default_small" android:padding="0.100000024dip" android:focusable="true" android:clickable="true" android:layout_width="@dimen/status_bar_expanded_clear_button_width" android:layout_height="fill_parent" android:layout_marginRight="4.0dip" android:text="@string/status_bar_clear_all_button" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
                    </RelativeLayout>
                </LinearLayout>
                <com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/notificationItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
                <com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
            </LinearLayout>
        </ScrollView>
    </FrameLayout>
    <com.android.systemui.statusbar.phone.CloseDragHandle android:layout_gravity="bottom" android:orientation="vertical" android:id="@id/close" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height">
        <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
            <ImageView android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height" android:src="@drawable/tw_status_bar_close" android:scaleType="fitXY" />
            <TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="bottom" android:id="@id/carrier_label" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_marginBottom="0.0dip" />
        </RelativeLayout>
    </com.android.systemui.statusbar.phone.CloseDragHandle>
</FrameLayout>

Next Navigate to smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
Add the parts in red:
Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;,
        [COLOR="Red"]Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BrightnessSliderObserver;,[/COLOR]
        Lcom/android/systemui/statusbar/phone/PhoneStatusBar$FastColorDrawable;,
        Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;,
        Lcom/android/systemui/statusbar/phone/PhoneStatusBar$NotificationClicker;,
        Lcom/android/systemui/statusbar/phone/PhoneStatusBar$H;,
        Lcom/android/systemui/statusbar/phone/PhoneStatusBar$ExpandedDialog;
    }
.end annotation

Code:
.field private mBatteryTextObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;

.field mBrightness:Lcom/android/systemui/statusbar/policy/BrightnessController;

[COLOR="red"].field private mBrightnessSlider:Landroid/widget/LinearLayout;

.field private mBrightnessSliderObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BrightnessSliderObserver;[/COLOR]

.field private mBroadcastReceiver:Landroid/content/BroadcastReceiver;

.field private mCallOnGoingView:Landroid/view/View;

.field private mCarrierLabel:Landroid/widget/TextView;

.method public constructor
Code:
    new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;

    invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryTextObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;

    [COLOR="red"]new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BrightnessSliderObserver;

    invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BrightnessSliderObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSliderObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BrightnessSliderObserver;[/COLOR]

    .line 3912
    return-void
.end method

Add the following method in red:
Code:
.method static synthetic access$600(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)Lcom/android/systemui/statusbar/BaseStatusBar$H;
    .locals 1
    .parameter "x0"

    .prologue
    .line 154
    iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mHandler:Lcom/android/systemui/statusbar/BaseStatusBar$H;

    return-object v0
.end method

[COLOR="red"].method static synthetic access$6000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)Landroid/widget/LinearLayout;
    .locals 1
    .parameter "x0"

    .prologue
    .line 154
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSlider:Landroid/widget/LinearLayout;

    return-object v0
.end method[/COLOR]

.method static synthetic access$700(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)Lcom/android/systemui/statusbar/BaseStatusBar$H;
    .locals 1
    .parameter "x0"

    .prologue
    .line 154
    iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mHandler:Lcom/android/systemui/statusbar/BaseStatusBar$H;

    return-object v0
.end method


.method protected makeStatusBarView
Add the parts in red:
NOTE: Make sure you look at this section. You have to match an ID from res/values/public.xml
Code:
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;

    const/4 v10, 0x0

    invoke-virtual {v9, v10}, Landroid/widget/ScrollView;->setVerticalScrollBarEnabled(Z)V

    move-object/from16 v0, p0

    iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

    const v10, 0x7f0d011f

    invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;

    move-result-object v9

    check-cast v9, Lcom/wanam/systemui/quickpanel/PowerWidget;

    move-object/from16 v0, p0

    iput-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/wanam/systemui/quickpanel/PowerWidget;

    [COLOR="red"]iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

    const v10, 0x7f0d00e4  [B]#Match with res/values/public.xml - brightness_controller[/B]

    invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;

    move-result-object v9

    check-cast v9, Landroid/widget/LinearLayout;

    iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSlider:Landroid/widget/LinearLayout;

    iget-object v9, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

    invoke-virtual {v9}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v9

    const-string v10, "display_brightness_slider"

    invoke-static {v10}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v10

    const/4 v11, 0x0

    iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSliderObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BrightnessSliderObserver;

    invoke-virtual {v9, v10, v11, v12}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V

    iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSlider:Landroid/widget/LinearLayout;

    iget-object v9, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

    invoke-virtual {v9}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v9

    const-string v11, "display_brightness_slider"

    const/4 v12, 0x0

    invoke-static {v9, v11, v12}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v9

    const/4 v11, 0x1

    if-ne v9, v11, :cond_bright

    const/4 v9, 0x0

    :goto_bright
    invoke-virtual {v10, v9}, Landroid/widget/LinearLayout;->setVisibility(I)V[/COLOR]

    .line 735
    new-instance v9, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;

    iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

    invoke-direct {v9, p0, v1, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/content/Context;Landroid/view/View;)V

    iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTicker:Lcom/android/systemui/statusbar/phone/Ticker;

    .line 737
    iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

    const v10, 0x7f0d0040

    invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;

    move-result-object v8

    check-cast v8, Lcom/android/systemui/statusbar/phone/TickerView;

Code:
iget-object v9, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;

    iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedContents:Landroid/view/View;

    goto/16 :goto_5

    .line 730
    :cond_e
    const/4 v9, 0x4

    goto/16 :goto_6

    [COLOR="red"]:cond_bright
    const/16 v9, 0x8

    goto/16 :goto_bright[/COLOR]
    
    .line 762
    .restart local v8       #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
    :cond_f
    const/16 v9, 0x8

    goto/16 :goto_7

    .line 786
    .restart local v7       #signalCluster:Lcom/android/systemui/statusbar/SignalClusterView;
    :cond_10
    iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNetworkController:Lcom/android/systemui/statusbar/policy/NetworkController;

    iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCarrierLabel:Landroid/widget/TextView;

    invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/policy/NetworkController;->addCombinedLabelView(Landroid/widget/TextView;)V

    goto/16 :goto_8

Now download the file attached and extract to smali/com/android/systemui/statusbar/phone

That's it recompile and test it out.
 
Last edited:

enewman17

Senior Member
Sep 20, 2010
3,672
8,717
Fort Wayne, IN
i can not find the folder to exact that file to can some one tell where it is please and thank u

Not trying to insult you, please do not take this the wrong way. But if you need to ask that question then this thread is not for you. This will require editing smali, and xml. It is not a drag and drop type of mod.

Besides in the directions he had told you exactly where it goes.

Sent from my SAMSUNG-SGH-I747 using xda premium
 

Idyar

Senior Member
Nov 14, 2012
566
386
Toronto
You are the man I have had to build 2 systemui for every build this will save me a tonne of work.

Thanks again, I think our ROM is like 50% mods by you at this point lol.
 
  • Like
Reactions: loserskater

Idyar

Senior Member
Nov 14, 2012
566
386
Toronto
You are the man I have had to build 2 systemui for every build this will save me a tonne of work.

Thanks again, I think our ROM is like 50% mods by you at this point lol.

Just wanted to add a silly mistake I made while putting this in. When searching for the correct value in public.xml make sure you use brightness_controller not brightness_controller_height (LOL) Took me like 15 mins to figure out haha.

Thanks again Loser, you are exactly the kind of person that makes this community great.
 
  • Like
Reactions: loserskater

upndwn4par

Inactive Recognized Developer
Jan 22, 2012
3,640
10,375
New Jersey
If you are not using the 23 toggle mod, makeStatusBarView needs to look like this (add the code in red).


smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali

.method protected makeStatusBarView

Code:
.line 733
    iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;

    const/4 v10, 0x0

    invoke-virtual {v9, v10}, Landroid/widget/ScrollView;->setVerticalScrollBarEnabled(Z)V

[COLOR="Red"]    iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/androidsystemustatusbar/phone/StatusBarWindowView;

    const v10, 0x7f0d00e4  #Match with res/values/public.xml - brightness_controller

    invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;

    move-result-object v9

    check-cast v9, Landroid/widget/LinearLayout;

    iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSlider:Landroid/widget/LinearLayout;

    iget-object v9, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

    invoke-virtual {v9}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v9

    const-string v10, "display_brightness_slider"

    invoke-static {v10}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v10

    const/4 v11, 0x0

    iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSliderObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BrightnessSliderObserver;

    invoke-virtual {v9, v10, v11, v12}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V

    iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSlider:Landroid/widget/LinearLayout;

    iget-object v9, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

    invoke-virtual {v9}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v9

    const-string v11, "display_brightness_slider"

    const/4 v12, 0x0

    invoke-static {v9, v11, v12}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v9

    const/4 v11, 0x1

    if-ne v9, v11, :cond_bright

    const/4 v9, 0x0

    :goto_bright
    invoke-virtual {v10, v9}, Landroid/widget/LinearLayout;->setVisibility(I)V[/COLOR]
	
    .line 735
    new-instance v9, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;

    iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

    invoke-direct {v9, p0, v1, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/content/Context;Landroid/view/View;)V
 

enewman17

Senior Member
Sep 20, 2010
3,672
8,717
Fort Wayne, IN
This was a doosy, but this really makes a perfect edition to total customization. I love this along with Didact74 battery mod. You've made so many happy with your work. And I'm so proud of myself I actually got it right the first time. I'm grinning ear to ear man. :D I'm starting to understand the language better. Still a ways off from doing something like this myself but one mod at a time right.

Sent from my SAMSUNG-SGH-I747 using xda premium
 
  • Like
Reactions: upndwn4par

loserskater

Inactive Recognized Developer
Jun 6, 2008
2,160
4,434
Palmdale, CA
This was a doosy, but this really makes a perfect edition to total customization. I love this along with Didact74 battery mod. You've made so many happy with your work. And I'm so proud of myself I actually got it right the first time. I'm grinning ear to ear man. :D I'm starting to understand the language better. Still a ways off from doing something like this myself but one mod at a time right.

Sent from my SAMSUNG-SGH-I747 using xda premium

You should have seen my grin when I got it working. It makes me so happy when it works out. And it's even better seeing people enjoy using it.

Sent from my SAMSUNG-SGH-I747
 
  • Like
Reactions: enewman17

zubrug

Senior Member
Jan 25, 2010
51
8
Really appreciate the lessons. :thumbup:

Sent from my SAMSUNG-SGH-I747 using xda premium
 

JoeyDuran

Senior Member
Jan 4, 2013
1,472
2,189
Spring
will this work for the sprint version? i tried everything youve said step by step, and i get and error...

I: Smaling...
[3192,4] All register args must fit in 4 bits
[3198,4] The register number must be less than v16

[3198,37] mismatched tree node: Lcom/android/setti
ngs/DisplaySettings; expecting I_CATCHES
Exception in thread "main" brut.androlib.AndrolibE
xception: Could not smali file: C:\TickleMyAndroid
\_working\SecSettings.apk\smali\com\android\settin
gs\DisplaySettings.smali
at brut.androlib.src.DexFileBuilder.addSma
liFile(DexFileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSma
liFile(DexFileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFil
e(SmaliBuilder.java:66)
at brut.androlib.src.SmaliBuilder.build(Sm
aliBuilder.java:50)
at brut.androlib.src.SmaliBuilder.build(Sm
aliBuilder.java:37)
at brut.androlib.Androlib.buildSourcesSmal
i(Androlib.java:257)
at brut.androlib.Androlib.buildSources(And
rolib.java:214)
at brut.androlib.Androlib.build(Androlib.j
ava:205)
at brut.androlib.Androlib.build(Androlib.j
ava:176)
at brut.apktool.Main.cmdBuild(Main.java:22
8)
at brut.apktool.Main.main(Main.java:79)
Press any key to continue . . .
 

JoeyDuran

Senior Member
Jan 4, 2013
1,472
2,189
Spring
I didn't try compiling it, but let me know if this works: https://dl.dropbox.com/u/5084138/DisplaySettings.smali
okay secsettings compiled successfully... (thank you!) :)

then i got to the systemui and was doing good until i got to the .method protected makeStatusBarView part.. i cant find a place to add them... i have a bunch of v13 and the lines in your box has a bunch of v9... thats just got me all confused and im afraid to just put them anywhere because itll probably just get another erorr again
 

Top Liked Posts

  • There are no posts matching your filters.
  • 26
    This will allow you to enable and disable the brightness slider right from the settings menu.
    No more flashing extra zips, or having to build another SystemUI!

    Let's get to it!

    The two files we'll be working with are:
    SecSettings.apk
    SystemUI.apk

    First let's start with SecSettings.apk

    Navigate to res/values/string.xml
    And add the following lines to the bottom:
    Code:
        <string name="brightness_slider_title">Display brightness slider</string>
        <string name="brightness_slider_summary">Show brightness slider in notification panel</string>


    Next navigate to res/xml/display_settings.xml
    Add the line in red:
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <PreferenceScreen android:title="@string/display_settings"
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
        <PreferenceCategory android:title="@string/tts_general_section_title" />
        <PreferenceScreen android:title="@string/wallpaper" android:key="wallpaper" android:fragment="com.android.settings.WallpaperSettings" />
        <PreferenceScreen android:title="@string/led_indicator_settings" android:key="led_indicator_settings" android:fragment="com.android.settings.LedIndicatorSettings" />
        <SwitchPreferenceScreen android:title="@string/page_buddy" android:key="contextualpage_settings" android:summary="@string/page_buddy_summary" android:fragment="com.android.settings.ContextualPageSettings" />
        <PreferenceCategory android:title="@string/display_label" android:key="screen_category" />
        <PreferenceScreen android:title="@string/screen_mode_setting" android:key="mode" android:summary="@string/screen_mode_summary">
            <intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.ModePreview" />
        </PreferenceScreen>
        <com.android.settings.BrightnessPreference android:title="@string/brightness" android:key="brightness" android:widgetLayout="@layout/round_more_icon" android:dialogTitle="@string/brightness" />
        <CheckBoxPreference android:title="@string/accelerometer_title_second" android:key="accelerometer_second" />
        <CheckBoxPreference android:title="@string/accelerometer_title" android:key="accelerometer" />
        <ListPreference android:persistent="false" android:entries="@array/screen_timeout_entries" android:title="@string/screen_timeout" android:key="screen_timeout" android:summary="@string/screen_timeout_summary" android:widgetLayout="@layout/round_more_icon" android:entryValues="@array/screen_timeout_values" />
        <PreferenceScreen android:title="@string/screensaver_settings_title" android:key="screensaver" android:fragment="com.android.settings.DreamSettings" />
        [COLOR="Red"]<CheckBoxPreference android:title="@string/brightness_slider_title" android:key="display_brightness_slider" android:summary="@string/brightness_slider_summary" />[/COLOR]
        <PreferenceCategory android:title="@string/features_category_title" android:key="features_category" />
        <CheckBoxPreference android:title="@string/intelligent_rotation_title" android:key="intelligent_rotation" android:summary="@string/intelligent_rotation_summary" />
        <CheckBoxPreference android:title="@string/intelligent_sleep_title" android:key="intelligent_sleep" android:summary="@string/intelligent_sleep_summary" />
        <PreferenceCategory android:title="@string/font" />
        <com.android.settings.flipfont.FontListPreference android:title="@string/monotype_preference_title" android:key="MONOTYPE" android:summary="@string/monotype_preference_summary" android:widgetLayout="@layout/round_more_icon" />
        <com.android.settings.FontSizeListPreference android:entries="@array/entries_font_size" android:title="@string/title_font_size" android:key="font_size" android:summary="@string/summary_font_size" android:widgetLayout="@layout/round_more_icon" android:dialogTitle="@string/dialog_title_font_size" android:entryValues="@array/entryvalues_font_size" />
        <PreferenceCategory android:title="@string/more_settings" android:key="more_settings" />
        <ListPreference android:persistent="false" android:entries="@array/quick_launch_entries" android:title="@string/quick_launch_title" android:key="quick_launch" android:summary="@string/screen_quick_launch_summary" android:widgetLayout="@layout/round_more_icon" android:entryValues="@array/quick_launch_values" />
        <CheckBoxPreference android:title="@string/sub_lcd_auto_lock" android:key="sub_lcd_auto_lock" android:summary="@string/sub_lcd_auto_lock_summary" />
        <CheckBoxPreference android:title="@string/key_night_mode" android:key="key_night_mode" />
        <ListPreference android:persistent="false" android:entries="@array/key_backlight_entries" android:title="@string/key_backlight" android:key="key_backlight" android:widgetLayout="@layout/round_more_icon" android:entryValues="@array/key_backlight_values" />
        <ListPreference android:persistent="false" android:entries="@array/touch_key_light_entries" android:title="@string/touch_key_light" android:key="touch_key_light" android:summary="@string/touch_key_light_summary" android:widgetLayout="@layout/round_more_icon" android:entryValues="@array/touch_key_light_values" />
        <CheckBoxPreference android:persistent="false" android:title="@string/display_battery_percentage" android:key="display_battery_level" android:summary="@string/display_battery_percentage_summary" />
        <CheckBoxPreference android:persistent="false" android:title="@string/display_saving" android:key="power_saving_mode" android:summary="@string/display_saving_mode_summary" />
        <CheckBoxPreference android:persistent="false" android:title="@string/notification_pulse_title" android:key="notification_pulse" />
        <CheckBoxPreference android:title="@string/edgezoom_title" android:key="edgezoom_toggle" android:summary="@string/edgezoom_summary" />
    </PreferenceScreen>

    Next navigate to smali/com/android/settings/DisplaySettings.smali
    Add the following in red:
    Code:
    .field private mBrightness:Lcom/android/settings/BrightnessPreference;
    
    .field private mBrightnessPreference:Lcom/android/settings/BrightnessPreference;
    
    [COLOR="red"].field private mBrightnessSliderPreference:Landroid/preference/CheckBoxPreference;[/COLOR]
    
    .field private mContextualPage:Landroid/preference/SwitchPreferenceScreen;
    
    .field protected mContextualPageUncheckerHandler:Landroid/os/Handler;

    .method private updateState
    Add the sections in red
    Code:
        iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v0
    
        const-string v4, "display_battery_percentage"
    
        invoke-static {v0, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v0
    
        if-eqz v0, :cond_3
    
        move v0, v1
    
        :goto_2
        invoke-virtual {v3, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
    
        [COLOR="red"]iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mBrightnessSliderPreference:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v0
    
        const-string v4, "display_brightness_slider"
    
        invoke-static {v0, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v0
    
        if-eqz v0, :cond_bs
    
        move v0, v1
    
        :goto_bs
        invoke-virtual {v3, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V[/COLOR]
    
        .line 807
        iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mTouchKeyLight:Landroid/preference/ListPreference;
    
        invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v3
    
        const-string v4, "button_key_light"
    
        const/16 v5, 0x5dc
    
        invoke-static {v3, v4, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v3
    
        invoke-static {v3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
    
        move-result-object v3
    
        invoke-virtual {v0, v3}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V
    Code:
        :cond_2
        move v0, v2
    
        .line 802
        goto :goto_1
    
        :cond_3
        move v0, v2
    
        .line 805
        goto :goto_2
    
        [COLOR="red"]:cond_bs
        move v0, v2
    
        goto :goto_bs[/COLOR]
        
        :cond_4
        move v0, v2
    
        .line 811
        goto :goto_3
    
        :cond_5
        move v1, v2
    
        .line 812
        goto :goto_4
    .end method

    .method public onCreate
    Add the parts in red:
    Code:
        const-string v11, "display_battery_level"
    
        invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
    
        move-result-object v11
    
        check-cast v11, Landroid/preference/CheckBoxPreference;
    
        iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
    
        [COLOR="red"]const-string v11, "display_brightness_slider"
    
        invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
    
        move-result-object v11
    
        check-cast v11, Landroid/preference/CheckBoxPreference;
    
        iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mBrightnessSliderPreference:Landroid/preference/CheckBoxPreference;[/COLOR]
    
        .line 398
        invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getActivity()Landroid/app/Activity;
    
        move-result-object v11
    
        invoke-static {v11}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
    
        move-result v11
    
        if-eqz v11, :cond_6

    .method public onPreferenceTreeClick
    Add the parts in red
    Code:
        :cond_4
        iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    
        move-result v0
    
        if-eqz v0, :cond_6
    
        .line 875
        iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
    
        move-result v0
    
        .line 876
        invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v3
    
        const-string v4, "display_battery_percentage"
    
        if-eqz v0, :cond_5
    
        move v2, v1
    
        :cond_5
        invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
    
        goto :goto_2
    
        .line 878
        :cond_6
        [COLOR="red"]iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBrightnessSliderPreference:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    
        move-result v0
    
        if-eqz v0, :cond_next
    
        iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBrightnessSliderPreference:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
    
        move-result v0
    
        invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v3
    
        const-string v4, "display_brightness_slider"
    
        if-eqz v0, :cond_bright
    
        move v2, v1
    
        :cond_bright
        invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
    
        goto :goto_2
        
        :cond_next[/COLOR]
        iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mNotificationPulse:Landroid/preference/CheckBoxPreference;
    
        if-ne p2, v0, :cond_8
    
        .line 879
        iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mNotificationPulse:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
    
        move-result v0

    That's it for SecSettings. Recompile and move on to SystemUI.
    20
    SystemUI

    Navigate to res/layout/tw_statusbar_expanded.xml
    Modify the line in blue.
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <FrameLayout android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="@dimen/notification_panel_margin_left"
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
        <FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
            <include android:layout_width="fill_parent" android:layout_height="@dimen/tw_notification_panel_header_height" layout="@layout/tw_status_bar_expanded_header" />
            <com.wanam.systemui.quickpanel.PowerWidget android:id="@id/exp_power_stat" android:layout_width="wrap_content" android:layout_height="@dimen/quick_setting_button_height" android:layout_marginTop="@dimen/tw_notification_panel_header_height" />
            <HorizontalScrollView android:id="@id/quicksetting_scroller" android:visibility="gone" android:scrollbars="none" android:layout_width="wrap_content" android:layout_height="@dimen/quick_setting_button_height" android:layout_marginTop="@dimen/tw_notification_panel_header_height">
                <com.android.systemui.statusbar.policy.quicksetting.QuickSettingPanel android:orientation="horizontal" android:id="@id/quicksetting_container" android:layout_width="wrap_content" android:layout_height="wrap_content" android:divider="@drawable/tw_black_bg" android:showDividers="middle" />
            </HorizontalScrollView>
            <ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="@dimen/notification_panel_quicksettingbtn_height" android:overScrollMode="ifContentScrolls">
                <LinearLayout android:orientation="vertical" android:id="@id/scrollCart" android:layout_width="fill_parent" android:layout_height="wrap_content">
                        [COLOR="Blue"]<LinearLayout android:orientation="vertical" android:id="@id/brightness_controller" android:background="#ff000000" android:visibility="visible" android:layout_width="fill_parent" android:layout_height="56.0dip">[/COLOR]
                        <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="55.0dip">
                            <ImageView android:id="@id/brightness_icon" android:clickable="true" android:layout_width="25.0dip" android:layout_height="fill_parent" android:layout_marginLeft="13.0dip" android:src="@drawable/ic_sysbar_brightness" android:contentDescription="@string/accessibility_brightness_icon" />
                            <FrameLayout android:id="@id/brightness_group" android:layout_width="fill_parent" android:layout_height="fill_parent">
                                <com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
                                <com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/auto_brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
                            </FrameLayout>
                        </LinearLayout>
                        <View android:background="#ff091a24" android:layout_width="fill_parent" android:layout_height="1.0dip" />
                    </LinearLayout>
                    <LinearLayout android:orientation="vertical" android:id="@id/noNotificationsTitle" android:focusable="true" android:layout_width="fill_parent" android:layout_height="wrap_content">
                        <TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/noNotificationsText" android:paddingLeft="11.0dip" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height" android:text="@string/status_bar_no_notifications_title" />
                    </LinearLayout>
                    <LinearLayout android:orientation="vertical" android:id="@id/onGoingCart" android:background="#ff293945" android:focusable="true" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
                        <TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/onGoingNotificationText" android:paddingLeft="11.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:text="@string/status_bar_ongoing_events_title" />
                    </LinearLayout>
                    <com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/onGoingItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
                    <LinearLayout android:orientation="vertical" android:id="@id/notificationCart" android:background="#ff293945" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
                        <RelativeLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
                            <TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/latestNotificationText" android:paddingLeft="11.0dip" android:layout_width="180.0dip" android:layout_height="fill_parent" android:text="@string/status_bar_latest_events_title" android:layout_alignParentLeft="true" />
                            <TextView android:textSize="@dimen/status_bar_expanded_notification_clear_button_text_size" android:textColor="@color/tw_status_bar_clear_btn_text" android:gravity="center" android:id="@id/clear_all_button" android:background="@drawable/tw_btn_default_small" android:padding="0.100000024dip" android:focusable="true" android:clickable="true" android:layout_width="@dimen/status_bar_expanded_clear_button_width" android:layout_height="fill_parent" android:layout_marginRight="4.0dip" android:text="@string/status_bar_clear_all_button" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
                        </RelativeLayout>
                    </LinearLayout>
                    <com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/notificationItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
                    <com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
                </LinearLayout>
            </ScrollView>
        </FrameLayout>
        <com.android.systemui.statusbar.phone.CloseDragHandle android:layout_gravity="bottom" android:orientation="vertical" android:id="@id/close" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height">
            <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
                <ImageView android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height" android:src="@drawable/tw_status_bar_close" android:scaleType="fitXY" />
                <TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="bottom" android:id="@id/carrier_label" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_marginBottom="0.0dip" />
            </RelativeLayout>
        </com.android.systemui.statusbar.phone.CloseDragHandle>
    </FrameLayout>

    Next Navigate to smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
    Add the parts in red:
    Code:
    # annotations
    .annotation system Ldalvik/annotation/MemberClasses;
        value = {
            Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;,
            [COLOR="Red"]Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BrightnessSliderObserver;,[/COLOR]
            Lcom/android/systemui/statusbar/phone/PhoneStatusBar$FastColorDrawable;,
            Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;,
            Lcom/android/systemui/statusbar/phone/PhoneStatusBar$NotificationClicker;,
            Lcom/android/systemui/statusbar/phone/PhoneStatusBar$H;,
            Lcom/android/systemui/statusbar/phone/PhoneStatusBar$ExpandedDialog;
        }
    .end annotation

    Code:
    .field private mBatteryTextObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;
    
    .field mBrightness:Lcom/android/systemui/statusbar/policy/BrightnessController;
    
    [COLOR="red"].field private mBrightnessSlider:Landroid/widget/LinearLayout;
    
    .field private mBrightnessSliderObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BrightnessSliderObserver;[/COLOR]
    
    .field private mBroadcastReceiver:Landroid/content/BroadcastReceiver;
    
    .field private mCallOnGoingView:Landroid/view/View;
    
    .field private mCarrierLabel:Landroid/widget/TextView;

    .method public constructor
    Code:
        new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;
    
        invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
    
        iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryTextObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;
    
        [COLOR="red"]new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BrightnessSliderObserver;
    
        invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BrightnessSliderObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
    
        iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSliderObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BrightnessSliderObserver;[/COLOR]
    
        .line 3912
        return-void
    .end method

    Add the following method in red:
    Code:
    .method static synthetic access$600(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)Lcom/android/systemui/statusbar/BaseStatusBar$H;
        .locals 1
        .parameter "x0"
    
        .prologue
        .line 154
        iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mHandler:Lcom/android/systemui/statusbar/BaseStatusBar$H;
    
        return-object v0
    .end method
    
    [COLOR="red"].method static synthetic access$6000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)Landroid/widget/LinearLayout;
        .locals 1
        .parameter "x0"
    
        .prologue
        .line 154
        iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSlider:Landroid/widget/LinearLayout;
    
        return-object v0
    .end method[/COLOR]
    
    .method static synthetic access$700(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)Lcom/android/systemui/statusbar/BaseStatusBar$H;
        .locals 1
        .parameter "x0"
    
        .prologue
        .line 154
        iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mHandler:Lcom/android/systemui/statusbar/BaseStatusBar$H;
    
        return-object v0
    .end method


    .method protected makeStatusBarView
    Add the parts in red:
    NOTE: Make sure you look at this section. You have to match an ID from res/values/public.xml
    Code:
    iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
    
        const/4 v10, 0x0
    
        invoke-virtual {v9, v10}, Landroid/widget/ScrollView;->setVerticalScrollBarEnabled(Z)V
    
        move-object/from16 v0, p0
    
        iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
    
        const v10, 0x7f0d011f
    
        invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
    
        move-result-object v9
    
        check-cast v9, Lcom/wanam/systemui/quickpanel/PowerWidget;
    
        move-object/from16 v0, p0
    
        iput-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/wanam/systemui/quickpanel/PowerWidget;
    
        [COLOR="red"]iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
    
        const v10, 0x7f0d00e4  [B]#Match with res/values/public.xml - brightness_controller[/B]
    
        invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
    
        move-result-object v9
    
        check-cast v9, Landroid/widget/LinearLayout;
    
        iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSlider:Landroid/widget/LinearLayout;
    
        iget-object v9, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
    
        invoke-virtual {v9}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v9
    
        const-string v10, "display_brightness_slider"
    
        invoke-static {v10}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
    
        move-result-object v10
    
        const/4 v11, 0x0
    
        iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSliderObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BrightnessSliderObserver;
    
        invoke-virtual {v9, v10, v11, v12}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
    
        iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSlider:Landroid/widget/LinearLayout;
    
        iget-object v9, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
    
        invoke-virtual {v9}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v9
    
        const-string v11, "display_brightness_slider"
    
        const/4 v12, 0x0
    
        invoke-static {v9, v11, v12}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v9
    
        const/4 v11, 0x1
    
        if-ne v9, v11, :cond_bright
    
        const/4 v9, 0x0
    
        :goto_bright
        invoke-virtual {v10, v9}, Landroid/widget/LinearLayout;->setVisibility(I)V[/COLOR]
    
        .line 735
        new-instance v9, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;
    
        iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
    
        invoke-direct {v9, p0, v1, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/content/Context;Landroid/view/View;)V
    
        iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTicker:Lcom/android/systemui/statusbar/phone/Ticker;
    
        .line 737
        iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
    
        const v10, 0x7f0d0040
    
        invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
    
        move-result-object v8
    
        check-cast v8, Lcom/android/systemui/statusbar/phone/TickerView;

    Code:
    iget-object v9, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;
    
        iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedContents:Landroid/view/View;
    
        goto/16 :goto_5
    
        .line 730
        :cond_e
        const/4 v9, 0x4
    
        goto/16 :goto_6
    
        [COLOR="red"]:cond_bright
        const/16 v9, 0x8
    
        goto/16 :goto_bright[/COLOR]
        
        .line 762
        .restart local v8       #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
        :cond_f
        const/16 v9, 0x8
    
        goto/16 :goto_7
    
        .line 786
        .restart local v7       #signalCluster:Lcom/android/systemui/statusbar/SignalClusterView;
        :cond_10
        iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNetworkController:Lcom/android/systemui/statusbar/policy/NetworkController;
    
        iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCarrierLabel:Landroid/widget/TextView;
    
        invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/policy/NetworkController;->addCombinedLabelView(Landroid/widget/TextView;)V
    
        goto/16 :goto_8

    Now download the file attached and extract to smali/com/android/systemui/statusbar/phone

    That's it recompile and test it out.
    4
    i can not find the folder to exact that file to can some one tell where it is please and thank u

    Not trying to insult you, please do not take this the wrong way. But if you need to ask that question then this thread is not for you. This will require editing smali, and xml. It is not a drag and drop type of mod.

    Besides in the directions he had told you exactly where it goes.

    Sent from my SAMSUNG-SGH-I747 using xda premium
    4
    If you are not using the 23 toggle mod, makeStatusBarView needs to look like this (add the code in red).


    smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali

    .method protected makeStatusBarView

    Code:
    .line 733
        iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
    
        const/4 v10, 0x0
    
        invoke-virtual {v9, v10}, Landroid/widget/ScrollView;->setVerticalScrollBarEnabled(Z)V
    
    [COLOR="Red"]    iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/androidsystemustatusbar/phone/StatusBarWindowView;
    
        const v10, 0x7f0d00e4  #Match with res/values/public.xml - brightness_controller
    
        invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
    
        move-result-object v9
    
        check-cast v9, Landroid/widget/LinearLayout;
    
        iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSlider:Landroid/widget/LinearLayout;
    
        iget-object v9, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
    
        invoke-virtual {v9}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v9
    
        const-string v10, "display_brightness_slider"
    
        invoke-static {v10}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
    
        move-result-object v10
    
        const/4 v11, 0x0
    
        iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSliderObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BrightnessSliderObserver;
    
        invoke-virtual {v9, v10, v11, v12}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
    
        iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSlider:Landroid/widget/LinearLayout;
    
        iget-object v9, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
    
        invoke-virtual {v9}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v9
    
        const-string v11, "display_brightness_slider"
    
        const/4 v12, 0x0
    
        invoke-static {v9, v11, v12}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v9
    
        const/4 v11, 0x1
    
        if-ne v9, v11, :cond_bright
    
        const/4 v9, 0x0
    
        :goto_bright
        invoke-virtual {v10, v9}, Landroid/widget/LinearLayout;->setVisibility(I)V[/COLOR]
    	
        .line 735
        new-instance v9, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;
    
        iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
    
        invoke-direct {v9, p0, v1, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/content/Context;Landroid/view/View;)V
    3
    Hi.

    could this guide be used to show/hide other items in the statusbar?
    assuming that all 'mBrightnessSlider' and 'Observer' references are changed and the 'PhoneStatusBar$BrightnessSliderObserver.smali' is configured to a different access$XXXX value?
    You would need to change the references to LinearLayout and not just the field name in the smali to the view type of what you are trying to show/hide if it is not a LinearLayout i.e imageview etc

    Oh and the id obviously! :)

    Sent from my GT-I9305 using Tapatalk