Enable QuickLaunch and use (Hidden Settings) - Galaxy S II Themes and Apps

In DisplaySettings.smali I have found some feature but this feature (QuickLaunch) work with a small edit in statusbar file
For this guide is necessary:
-SecSettings;
-SystemUI;
-Notepad++;
-apktool for decompile and compile this file.
For SecSettings:
1.Decompile SecSettings and go to smali/com/android/settings and open DisplaySettings.smali
2.Search this line: quick_launch
3.And now remove this line in .method public onCreate(Landroid/os/BundleV:
Code:
:cond_a
const-string v11, "quick_launch"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/ListPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mQuickLaunchPreference:Landroid/preference/ListPreference;
const-string v11, "quick_launch_app"
const/4 v12, 0x0
invoke-static {v8, v11, v12}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
iget-object v11, p0, Lcom/android/settings/DisplaySettings;->mQuickLaunchPreference:Landroid/preference/ListPreference;
invoke-static {v2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v12
invoke-virtual {v11, v12}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V
iget-object v11, p0, Lcom/android/settings/DisplaySettings;->mQuickLaunchPreference:Landroid/preference/ListPreference;
invoke-virtual {v11, p0}, Landroid/preference/ListPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
const/4 v1, 0x1
:try_start_0
const-string v11, "window"
invoke-static {v11}, Landroid/os/ServiceManager;->getService(Ljava/lang/String;)Landroid/os/IBinder;
move-result-object v11
invoke-static {v11}, Landroid/view/IWindowManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/view/IWindowManager;
move-result-object v10
invoke-interface {v10}, Landroid/view/IWindowManager;->hasSystemNavBar()Z
:try_end_0
.catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_1
move-result v11
if-nez v11, :cond_11
const/4 v1, 0x1
:goto_2
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_b (REMOVE THIS LINE)
if-eqz v1, :cond_c
:cond_b (REMOVE THIS LINE)
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen; (REMOVE)
move-result-object v11 (REMOVE THIS LINE)
iget-object v12, p0, Lcom/android/settings/DisplaySettings;->mQuickLaunchPreference:Landroid/preference/ListPreference; (REMOVE)
invoke-virtual {v11, v12}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z (REMOVE THIS LINE)
When you have remove this lines, you can compile this file.
For SystemUI:
Decompile SystemUI and go to res/layout/ and open this file:
tw_status_bar_expanded if you want insert this button under brightness slider in notification panel
tw_status_bar_expanded_header if you want insert this button next to date view in notification panel
For tw_status_bar_expanded add this line:
Code:
<LinearLayout android:orientation="vertical" android:id="@id/brightness_controller" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="56.0dip">
<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> UNDER THIS LINE INSERT THIS:
<com.android.systemui.statusbar.policy.QuickLaunchKeyButtonView android:id="@id/quick_launch" android:visibility="visible" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_ic_sysbar_capture" android:contentDescription="@string/accessibility_capture" />
For tw_status_bar_expanded_header:
Code:
<Space android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_weight="1.0" /> UNDER THIS LINE INSERT:
<com.android.systemui.statusbar.policy.QuickLaunchKeyButtonView android:id="@id/quick_launch" android:visibility="visible" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_ic_sysbar_capture" android:contentDescription="@string/accessibility_capture" />

And what exactly does this do?
Your rom isnt looking like a stock rom maybe a modded stock rom

krazy1101 said:
And what exactly does this do?
Your rom isnt looking like a stock rom maybe a modded stock rom
Click to expand...
Click to collapse
Is a stock rom feature, you can capture screen , shortcut to camera and search from notification panel
Try and express your preference

confirmed working flawlessly on MS1.:good: code change from v11->v12 as well as condition name change but simple enuff to find.
any systemui code line to make notification curtain collapse on the soft-key press?

Hey mate, I managed to get it to work on my i9070 but Camera and Applications doesn't work.. and Screenshot only takes the screenshot of the notification panel (which basically doesn't have much use)... But still, thanks for sharing this info

Sami Kabir said:
Hey mate, I managed to get it to work on my i9070 but Camera and Applications doesn't work.. and Screenshot only takes the screenshot of the notification panel (which basically doesn't have much use)... But still, thanks for sharing this info
Click to expand...
Click to collapse
You can add this line in tw_status_bar.xml in layout folder.
Find this line:
<com.android.systemui.statusbar.policy.Clock
and add this below:
Code:
<com.android.systemui.statusbar.policy.QuickLaunchKeyButtonView android:id="@id/quick_launch" android:visibility="visible" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_ic_sysbar_capture" android:contentDescription="@string/accessibility_capture" />
In this way, this function will be displayed to the right of the clock in the status bar
Applications is a link with the application of the launcher and camera is link of samsung camera but I do not know why you will not work.

@Vivek_Neel @_Sale_ Can you make this mod flashable for neatrom ?

Pishtaz said:
@Vivek_Neel @_Sale_ Can you make this mod flashable for neatrom ?
Click to expand...
Click to collapse
Oh am seeing now only.
Y not if I have time.
Sure.
Typed using Iphone kb and sent from my GT-I9100 using Tapatalk 2

Related

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

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.
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.
Remarkable work. Thanks so much for your contribution.
Sent from my SAMSUNG-SGH-I747 using xda premium
7th !!!
Can you make me a flashable zip?
_______
Seriously though, very nice! Thanks for sharing.
Will be doing this soon....
need help
i can not find the folder to exact that file to can some one tell where it is please and thank u
315phatboi said:
i can not find the folder to exact that file to can some one tell where it is please and thank u
Click to expand...
Click to collapse
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
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.
Idyar said:
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.
Click to expand...
Click to collapse
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.
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
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. 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
enewman17 said:
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. 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
Click to expand...
Click to collapse
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
Really appreciate the lessons. :thumbup:
Sent from my SAMSUNG-SGH-I747 using xda premium
This mod is the bomb. It works awesome. I love it. The time you spent figuring it out, then to share the "how to" is awesome. A very rare quality. Very nice... Thanks
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 . . .
Click to expand...
Click to collapse
tracelessfk said:
will this work for the sprint version? i tried everything youve said step by step, and i get and error...
Click to expand...
Click to collapse
Post your DisplaySettings.smali
Sent from my SAMSUNG-SGH-I747
loserskater said:
Post your DisplaySettings.smali
Sent from my SAMSUNG-SGH-I747
Click to expand...
Click to collapse
Okay, I'll put it up first thing after work
The smali before editing it or after?
Sent from an Anthrax infected GSIII
okay i got it... here it is, i decompiled SecSettings.apk again and uploaded the smali file
https://www.dropbox.com/s/g60u089kbrsfj1m/DisplaySettings.smali
tracelessfk said:
okay i got it... here it is, i decompiled SecSettings.apk again and uploaded the smali file
https://www.dropbox.com/s/g60u089kbrsfj1m/DisplaySettings.smali
Click to expand...
Click to collapse
I didn't try compiling it, but let me know if this works: https://dl.dropbox.com/u/5084138/DisplaySettings.smali
loserskater said:
I didn't try compiling it, but let me know if this works: https://dl.dropbox.com/u/5084138/DisplaySettings.smali
Click to expand...
Click to collapse
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
Sorry of you're busy
Sent from an Anthrax infected GSIII

[MOD][HOW-TO] Real-time notification panel background color/transparency

This will allow you to change the background color/transparency of the notification panel in real time without rebooting.
We're going to be working with the following two files:
SecSettings.apk
SystemUI.apk
KEY
REMOVE what's in BLUE
ADD what's in RED
Note:
If you've already implemented my Clock mod and added the color picker files, you'll have to replace it with what I've attached as I've changed how the color picker works. It now saves your setting instead of reverting it to default everytime you leave and come back to the menu. I'll be updating the clock mod right now.
Issues:
There is a tiny line that goes across just under the brightness slider/notification toggles that I cannot figure out how to remove. It's only noticeable when you use colors. If you're just using transparency then it's hard to tell.
SecSettings.apk
Navigate to /res/values/strings.xml
Add the following to the end of the file
Code:
<string name="notification_panel_color_title">Notification panel color</string>
<string name="notification_panel_color_summary">Change the background color of the notification panel</string>
<string name="dialog_color_picker">Color Picker</string>
<string name="press_color_to_apply">Press on Color to apply</string>
Navigate to /res/values/ids.xml
add the following to the end of the file
Code:
<item type="id" name="color_picker_view">false</item>
<item type="id" name="old_color_panel">false</item>
<item type="id" name="new_color_panel">false</item>
Navigate to /xml/display_settings.xml
Add the following line wherever you would like it to show in the menu
Code:
<com.loser.colorpicker.ColorPickerPreference android:persistent="false" android:title="@string/notification_panel_color_title" android:key="notification_panel_color" android:summary="@string/notification_panel_color_summary" android:defaultValue="0xff000000" alphaSlider="true" />
Navigate to /smali/com/android/settings/DisplaySettings.smali
Code:
.field private mMultiWindowModeObserver:Landroid/database/ContentObserver;
.field private mMultiWindowPref:Landroid/preference/CheckBoxPreference;
[COLOR="Red"].field private mNotificationPanelColor:Lcom/loser/colorpicker/ColorPickerPreference;[/COLOR]
.field private mNotificationPulse:Landroid/preference/CheckBoxPreference;
.field private mPowerSavingMode:Landroid/preference/CheckBoxPreference;
.method private updateState()V
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_4
move v0, v1
:goto_1
invoke-virtual {v3, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
[COLOR="red"]iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mNotificationPanelColor:Lcom/loser/colorpicker/ColorPickerPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "notification_panel_color"
const v5, -0xffffff
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/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
const/16 v5, 0x0
invoke-virtual {v0, v5, v3}, Lcom/loser/colorpicker/ColorPickerPreference;->onSetInitialValue(ZLjava/lang/Object;)V[/COLOR]
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"
.method public onCreate(Landroid/os/BundleV
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, "notification_panel_color"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Lcom/loser/colorpicker/ColorPickerPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mNotificationPanelColor:Lcom/loser/colorpicker/ColorPickerPreference;
iget-object v11, p0, Lcom/android/settings/DisplaySettings;->mNotificationPanelColor:Lcom/loser/colorpicker/ColorPickerPreference;
invoke-virtual {v11, p0}, Lcom/loser/colorpicker/ColorPickerPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V[/COLOR]
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 onPreferenceChange(Landroid/preference/Preference;Ljava/lang/ObjectZ
Code:
:catch_2
move-exception v0
.line 1038
const-string v1, "DisplaySettings"
const-string v2, "could not persist Touch key light setting"
invoke-static {v1, v2, v0}, Landroid/util/Log;->secE(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
goto/16 :goto_4
.line 1040
:cond_9
[COLOR="red"]const-string v2, "notification_panel_color"
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_next
invoke-static {p2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v2
const-string v1, "^#"
const-string v3, ""
invoke-virtual {v2, v1, v3}, Ljava/lang/String;->replaceFirst(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
invoke-static {v3}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v1
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "notification_panel_color"
invoke-static {v2, v3, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_4
:cond_next[/COLOR]
const-string v2, "quick_launch"
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
Now download the attached zip and extract to the root of your SecSettings folder.
Compile and then decompile and open up /res/values/public.xml
Open /smali/com/loser/colorpicker/ColorPickerDialog.smali
There should be a total of 6 id's you need to get. Make sure you're looking at the type as there's a layout and string with the same name.
That's it for SecSettings. Compile.
Now for SystemUI.apk
Navigate to /smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
.method protected updateExpandedViewPos(I)V
Code:
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
[COLOR="Red"]const/4 v6, 0x0
invoke-virtual {v9, v6}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackground(Landroid/graphics/drawable/Drawable;)V
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v6, "notification_panel_color"
const v9, -0xffffff
invoke-static {v3, v6, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Landroid/view/View;[/COLOR]
invoke-virtual {v9, v3}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackgroundColor(I)V
Simple enough? Compile and test!
loserskater said:
Issues:
There is a tiny line that goes across just under the brightness slider/notification toggles that I cannot figure out how to remove. It's only noticeable when you use colors. If you're just using transparency then it's hard to tell.
Click to expand...
Click to collapse
Great work as always.
Regarding the above issue, did you look to see if it's a PNG or a color you can make transparent? Sounds like it's a separator.
I am guessing you did, but I just thought I'd ask.
upndwn4par said:
Great work as always.
Regarding the above issue, did you look to see if it's a PNG or a color you can make transparent? Sounds like it's a separator.
I am guessing you did, but I just thought I'd ask.
Click to expand...
Click to collapse
I think something is taking up like one extra pixel than it's background so the color background shows through.
Sent from my SAMSUNG-SGH-I747
You could also include this:
Code:
\res\layout\tw_status_bar_expanded.xml
Find in red, change to blue
TWO Edits here:
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" />
<TextView android:gravity="center" android:id="@id/emergency_calls_only" android:paddingBottom="4.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<HorizontalScrollView android:id="@id/quicksetting_scroller" 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">
<LinearLayout android:orientation="vertical" android:id="@id/brightness_controller" [COLOR="Red"]android:background="#[COLOR="Blue"]00[/COLOR]000000"[/COLOR] android:visibility="visible" android:layout_width="fill_parent" android:layout_height="56.0dip">
<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 [COLOR="Red"]android:background="#[COLOR="blue"]00[/COLOR]091a24"[/COLOR] 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="fill_parent" android:layout_height="@dimen/tw_close_handle_height" android:layout_marginBottom="10.0dip" />
</RelativeLayout>
</com.android.systemui.statusbar.phone.CloseDragHandle>
</FrameLayout>
Also, in the zipa re some transparent files that go in drawable-xhdpi.
Put them into that folder, then build/compile
EDIT:
Just noticed the above post... there's that tiny line sorted for you That's the second edit.
Thank you as always Loser ! Going to try this one tomorrow... I promise I'll try to do this one without my noon questions.
I know you can't say for sure but do you think this would translate closely to 4.1.2.
Most of yours have for me but just figured I'd ask
Sent from my SAMSUNG-SGH-I747 using xda premium
hednik said:
Thank you as always Loser ! Going to try this one tomorrow... I promise I'll try to do this one without my noon questions.
I know you can't say for sure but do you think this would translate closely to 4.1.2.
Most of yours have for me but just figured I'd ask
Sent from my SAMSUNG-SGH-I747 using xda premium
Click to expand...
Click to collapse
All the code is from the tmo 4.1.2 build so you shouldn't have any issues.
loserskater said:
All the code is from the tmo 4.1.2 build so you shouldn't have any issues.
Click to expand...
Click to collapse
Almost have it working correctly. Compiled and decompiled and the public "id"s all looked correct. Flashed went to display settings. Got a force close on the option so.... I've got the Id's incorrect but I looked then over and all I saw was :
Code:
<public type="id" name="color_picker_view" id="0x7f0b03f7" />
<public type="id" name="old_color_panel" id="0x7f0b03f8" />
<public type="id" name="new_color_panel" id="0x7f0b03f9" />
These were the only "id"s i saw. I ignored the ones with "layout" or "string"
Now in the colorpickerdialog.smali I saw this:
Code:
.line 65
.local v0, inflater:Landroid/view/LayoutInflater;
const v2, 0x7f040129
const/4 v3, 0x0
invoke-virtual {v0, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v1
.line 67
.local v1, layout:Landroid/view/View;
invoke-virtual {p0, v1}, Lcom/loser/colorpicker/ColorPickerDialog;->setContentView(Landroid/view/View;)V
.line 69
const v2, 0x7f090e96
invoke-virtual {p0, v2}, Lcom/loser/colorpicker/ColorPickerDialog;->setTitle(I)V
.line 71
const v2, 0x7f0b03f7
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v2
check-cast v2, Lcom/loser/colorpicker/ColorPickerView;
iput-object v2, p0, Lcom/loser/colorpicker/ColorPickerDialog;->mColorPicker:Lcom/loser/colorpicker/ColorPickerView;
.line 72
const v2, 0x7f0b03f8
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v2
check-cast v2, Lcom/loser/colorpicker/ColorPickerPanelView;
iput-object v2, p0, Lcom/loser/colorpicker/ColorPickerDialog;->mOldColor:Lcom/loser/colorpicker/ColorPickerPanelView;
.line 73
const v2, 0x7f0b03f9
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v2
check-cast v2, Lcom/loser/colorpicker/ColorPickerPanelView;
iput-object v2, p0, Lcom/loser/colorpicker/ColorPickerDialog;->mNewColor:Lcom/loser/colorpicker/ColorPickerPanelView;
and this one further down, which is repeated from up top
Code:
method public onClick(Landroid/view/View;)V
.locals 2
.parameter "v"
.prologue
.line 122
invoke-virtual {p1}, Landroid/view/View;->getId()I
move-result v0
const v1, 0x7f0b03f9
if-ne v0, v1, :cond_0
.line 123
iget-object v0, p0, Lcom/loser/colorpicker/ColorPickerDialog;->mListener:Lcom/loser/colorpicker/ColorPickerDialog$OnColorChangedListener;
if-eqz v0, :cond_0
Here were all the id's from the colorpickerdialog.smali:
Code:
Line 88: const v2, 0x7f040129 - [COLOR="red"][B]This one was under "layout"[/B][/COLOR]
Line 101: const v2, 0x7f090e96 [COLOR="red"][B]This one wasn't in the public xml[/B][/COLOR]
Line 106: const v2, 0x7f0b03f7
Line 117: const v2, 0x7f0b03f8
Line 128: const v2, 0x7f0b03f9
Line 229: const v1, 0x7f0b03f9
As a side note the check boc was about twice the size the others ones I have as well. Thanks !
here are the files just in case I didn't make much sense in my rambling:
ColorPickerDialog.smali - 10.67 KB
public.xml - 485.77 KB
hednik said:
Almost have it working correctly. Compiled and decompiled and the public "id"s all looked correct. Flashed went to display settings. Got a force close on the option so.... I've got the Id's incorrect but I looked then over and all I saw was :
...
As a side note the check boc was about twice the size the others ones I have as well. Thanks !
here are the files just in case I didn't make much sense in my rambling:
ColorPickerDialog.smali - 10.67 KB
public.xml - 485.77 KB
Click to expand...
Click to collapse
I accidentally uploaded the colorpickerdialog that doesn't have the comments, I'll fix the upload soon
Sent from my SAMSUNG-SGH-I747
EDIT: Fixed. Download the new zip and look at ColorPickerDialog.smali
Also, yes the box is bigger. It's not a checkbox but a color box that shows the color.
loserskater said:
I accidentally uploaded the colorpickerdialog that doesn't have the comments, I'll fix the upload soon
Sent from my SAMSUNG-SGH-I747
EDIT: Fixed. Download the new zip and look at ColorPickerDialog.smali
Also, yes the box is bigger. It's not a checkbox but a color box that shows the color.
Click to expand...
Click to collapse
Thank you. You are a good man @loserskater. Thanks for supporting my habit ha
61M26173M3471522L
EDIT: works perfectly. Thank you !
Great Guide!
Did it for Galaxy Grand Duos Credits are given
Code:
http://forum.xda-developers.com/showthread.php?t=2320158
this solves the small line issue (if it lies below the brightness slider)
in values/dimens.xml
Code:
<dimen name="notification_panel_notification_top_margin">[COLOR="Red"]184.0dip[/COLOR]</dimen>
set it to 180.dip or so .
Thanks Loser :good:
You can just edit the actual xml and change it's height or visibility as I posted. Much simpler.
Kryten2k35 said:
You can just edit the actual xml and change it's height or visibility as I posted. Much simpler.
Click to expand...
Click to collapse
i just like everything on its place ^_^
first of all thanks for the mod.
ive decompiled and recompiled secsettings which is showing the options..
Before this mod my dropdown was transparent,
so...
I edited my systemUI.apk and recompiled it. my dropdown is now full BLACK (0% trans) which means i think ive recompiled systemUI.apk good??
but i cant select a color??
EDIT:
Navigated to /smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
@.method protected updateExpandedViewPos(I)V
the command at OP:
Code:
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
[COLOR="Red"]const/4 v6, 0x0
invoke-virtual {v9, v6}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackground(Landroid/graphics/drawable/Drawable;)V
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v6, "notification_panel_color"
const v9, -0xffffff
invoke-static {v3, v6, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Landroid/view/View;[/COLOR]
invoke-virtual {v9, v3}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackgroundColor(I)V
My Code (N7100):
Code:
.local v3, color:I
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
[COLOR="red"]const/4 v6, 0x0
invoke-virtual {v9, v6}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackground(Landroid/graphics/drawable/Drawable;)V
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v6, "notification_panel_color"
const v9, -0xffffff
invoke-static {v3, v6, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Landroid/view/View;[/COLOR]
invoke-virtual {v9, v3}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackgroundColor(I)V
.line 3479
.end local v3 #color:I
.end local v6 #k:F
:cond_5
const/4 v9, 0x0
move-object/from16 v0, p0
ON phone, when i hit the selected color it doesnt change, it stays on black :/???
AskinSavascisi said:
first of all thanks for the mod.
ive decompiled and recompiled secsettings which is showing the options..
Before this mod my dropdown was transparent,
so...
I edited my systemUI.apk and recompiled it. my dropdown is now full BLACK (0% trans) which means i think ive recompiled systemUI.apk good??
but i cant select a color??
EDIT:
Navigated to /smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
@.method protected updateExpandedViewPos(I)V
the command at OP:
Code:
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
[COLOR="Red"]const/4 v6, 0x0
invoke-virtual {v9, v6}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackground(Landroid/graphics/drawable/Drawable;)V
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v6, "notification_panel_color"
const v9, -0xffffff
invoke-static {v3, v6, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Landroid/view/View;[/COLOR]
invoke-virtual {v9, v3}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackgroundColor(I)V
My Code (N7100):
Code:
.local v3, color:I
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
[COLOR="red"]const/4 v6, 0x0
invoke-virtual {v9, v6}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackground(Landroid/graphics/drawable/Drawable;)V
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v6, "notification_panel_color"
const v9, -0xffffff
invoke-static {v3, v6, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Landroid/view/View;[/COLOR]
invoke-virtual {v9, v3}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackgroundColor(I)V
.line 3479
.end local v3 #color:I
.end local v6 #k:F
:cond_5
const/4 v9, 0x0
move-object/from16 v0, p0
ON phone, when i hit the selected color it doesnt change, it stays on black :/???
Click to expand...
Click to collapse
BUMP???
I'm trying to implement this mod but not in Display Settings, in my ROM settings.smali. But I've an error in OnpreferenceChange. Here's the log:
Code:
W/dalvikvm(4676): VFY: register1 v0 type 0, wanted ref
W/dalvikvm(4676): VFY: bad arg 1 (into Ljava/lang/Object;)
W/dalvikvm(4676): VFY: rejecting call to Ljava/lang/String;.equals (Ljava/lang/Object;)Z
W/dalvikvm(4676): VFY: rejecting opcode 0x6e at 0x0036
W/dalvikvm(4676): VFY: rejected Lcom/android/settings/phdsettings;.onPreferenceChange (Landroid/preference/Preference;Ljava/lang/Object;)Z
W/dalvikvm(4676): Verifier rejected class Lcom/android/settings/phdsettings;
W/dalvikvm(4676): Class init failed in newInstance call (Lcom/android/settings/phdsettings;)
D/AndroidRuntime(4676): Shutting down VM
W/dalvikvm(4676): threadid=1: thread exiting with uncaught exception (group=0x41a232a0)
What I'm doing wrong? Thanks in advance!
Anyone figure out how to get rid of the black background for notifications on MG2?
This is driving me nuts.
upndwn4par said:
Anyone figure out how to get rid of the black background for notifications on MG2?
This is driving me nuts.
Click to expand...
Click to collapse
Do you mean the background on notifcations themselves, not the actual panel? That is all in framework-res.apk I was scanning systemui.apk for hours to find out how to change those until I remembered framework-res controlled certain backgrounds in the system such as the background in secsettings.apk. If I remember correctly the files are in res/layout of framework-res.apk and they are called notification_template_xx.xml,
hope this helps bro
Danvdh said:
Do you mean the background on notifcations themselves, not the actual panel? That is all in framework-res.apk I was scanning systemui.apk for hours to find out how to change those until I remembered framework-res controlled certain backgrounds in the system such as the background in secsettings.apk. If I remember correctly the files are in res/layout of framework-res.apk and they are called notification_template_xx.xml,
hope this helps bro
Click to expand...
Click to collapse
Yes, the background of the notifications themselves. To make the notification drawer completely transparent a combination of PNGs and xmls must be changed (not the ones you mentioned). I have done this more than once. So either something has changed in the latest firmware, or I'm losing it. :cyclops:

[GUIDE] How to create two big button in notification panel like S5

In this guide, I will explain how to create a button in notification panel and giving it a function
See attachments to see the result of the guide, and any files that are needed for this change.
Requires:
- knowledge on how to compile / decompile with apktool;
- SystemUI.apk;
- Notepad++;
- brain and patience.
First decompile SystemUI, go to res/layout, open tw_status_bar_expanded.xml and add the red line:
Code:
<HorizontalScrollView android:id="@id/quicksetting_scroller" android:scrollbars="none" android:layout_width="wrap_content" android:layout_height="wrap_content">
<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>
[COLOR="Red"]<LinearLayout android:orientation="vertical" android:id="@id/sfinder_qconnect_layout" android:visibility="visible" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:paddingLeft="@dimen/finder_connect_button_padding_right" android:paddingTop="@dimen/finder_connect_button_padding_top" android:paddingRight="@dimen/finder_connect_button_padding_left" android:paddingBottom="@dimen/finder_connect_button_padding_bottom" android:layout_width="fill_parent" android:layout_height="wrap_content">
<Button android:textSize="@dimen/tw_quick_panel_sfinder_qconnect_button_text_size" android:textColor="@drawable/tw_quick_panel_sfinder_qconnect_button_text_color" android:id="@id/sfinder_button_big" android:background="@drawable/tw_quick_panel_sfinder_qconnect_button" android:layout_width="0.0dip" android:layout_height="@dimen/finder_connect_button_height" android:layout_marginRight="10.0dip" android:text="@string/big_button_barra" android:layout_weight="0.5" />
<Button android:textSize="@dimen/tw_quick_panel_sfinder_qconnect_button_text_size" android:textColor="@drawable/tw_quick_panel_sfinder_qconnect_button_text_color" android:id="@id/qconnect_button_big" android:background="@drawable/tw_quick_panel_sfinder_qconnect_button" android:layout_width="0.0dip" android:layout_height="@dimen/finder_connect_button_height" android:layout_marginLeft="10.0dip" android:text="@string/big_button_panel" android:layout_weight="0.5" />
</LinearLayout>
<View android:id="@id/sfinder_qconnect_divider" android:background="@drawable/notification_bottom_line" android:layout_width="fill_parent" android:layout_height="1.0dip" />
</LinearLayout>[/COLOR]
<LinearLayout android:orientation="vertical" android:id="@id/brightness_controller" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="56.0dip">
<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>
Now go to values folder and add this line in this files.
In ids.xml:
Code:
<item type="id" name="sfinder_qconnect_layout">false</item>
<item type="id" name="sfinder_button_big">false</item>
<item type="id" name="qconnect_button_big">false</item>
<item type="id" name="sfinder_qconnect_divider">false</item>
In dimens.xml
Code:
<dimen name="finder_connect_button_padding_top">11.0dip</dimen>
<dimen name="finder_connect_button_padding_bottom">10.0dip</dimen>
<dimen name="finder_connect_button_padding_right">20.0dip</dimen>
<dimen name="finder_connect_button_padding_left">20.0dip</dimen>
<dimen name="finder_connect_button_height">37.0dip</dimen>
<dimen name="tw_quick_panel_sfinder_qconnect_button_text_size">16.0dip</dimen>
In strings.xml
Code:
<string name="big_button_barra">Display</string>
<string name="big_button_panel">Sound</string>
Add the res files in drawable and drawable-hdpi.
Recompile SystemUI and decompile for insert the value of ids in public.xml
Now there is the smali part. Go to smali/com/android/systemui/statusbar/phone and open PhoneStatusbar.smali
Add this field in instance fields:
Code:
.field private mBigButtonListener:Landroid/view/View$OnClickListener;
.field private mBigButtonListener2:Landroid/view/View$OnClickListener;
Add the red line at the end of the .method public constructor <init>()V
Code:
[COLOR="Red"]new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$X1;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$X1;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBigButtonListener:Landroid/view/View$OnClickListener;
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$X2;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$X2;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBigButtonListener2:Landroid/view/View$OnClickListener;
[/COLOR]
return-void
.end method
Add the red line in .method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
Code:
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d0051
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSettingsButton:Landroid/view/View;
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSettingsButton:Landroid/view/View;
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSettingsButtonListener:Landroid/view/View$OnClickListener;
invoke-virtual {v9, v10}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
[COLOR="Red"]iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d01ea
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/Button;
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBigButtonListener:Landroid/view/View$OnClickListener;
invoke-virtual {v9, v10}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d01eb
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/Button;
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBigButtonListener2:Landroid/view/View$OnClickListener;
invoke-virtual {v9, v10}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V[/COLOR]
0x7f0d01ea is the public id of "sfinder_button_big"
0x7f0d01eb is the public id of "qconnect_button_big"
Now add the file of smali folder.
If you want to change the intent of the button, you must open the two smali files(PhoneStatusbar$X1 and PhoneStatusbar$X2) and change the parts highlighted in red, adding the names of the resulting applications and tasks that you want to open.
Code:
new-instance v2, Landroid/content/Intent;
invoke-direct {v2}, Landroid/content/Intent;-><init>()V
const-string v3, "android.intent.action.MAIN"
invoke-virtual {v2, v3}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
const/high16 v4, 0x1000
invoke-virtual {v2, v4}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
const-string v5, "[COLOR="red"]com.android.settings[/COLOR]"
const-string v6, "[COLOR="red"]com.android.settings.Settings$DisplaySettingsActivity[/COLOR]"
invoke-virtual {v2, v5, v6}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
move-result-object v2
invoke-virtual {v1, v2}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$X1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->animateCollapse()V
After insert the smali file, recompile SystemUI, then add the meta-inf folder and the AndroidManifest.xml from the original SystemUI or sign the file, then recompile again.
That's it all, if you have trouble commented on this thread and give you a hand to solve
@rrgrrg
Sent from my GT-I9100 using XDA Premium 4 mobile app
request bro...for custom rom cm10.1
D2Y aka E said:
request bro...for custom rom cm10.1
Click to expand...
Click to collapse
I do not use the cm so I have to give the framework and the systemui
Can you mod this for s3 mini???
Sent from my GT-I8190N using XDA Premium 4 mobile app
error in compile apk.....(an error occured plz check the log (option 21)
??!!
Nice thanks
Add the red line in .method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
i not found this line and my system ui force stoped
fargh123 said:
Add the red line in .method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
i not found this line and my system ui force stoped
Click to expand...
Click to collapse
Search the below text alone
Code:
makeStatusBarView
You can find the method.
@ gerrys2 thanks for the guide.
But I would like to suggest one thing regarding adding ids.
You can mention in your thread that after adding smali , recompile SystemUI.apk
Then again decompile the modded SystemUI.apk so that the ids for those two button they can see in public.xml
For adding them in smali
@gerryS2 good job gerry:good:
Thanks for sharing
Thanks for sharing
Caproid said:
@rrgrrg
Sent from my GT-I9100 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
i prefer this guide
as its advantages are u set the function by yourself and u can remove them when u want :angel:
"After insert the smali file, recompile SystemUI, then add the meta-inf folder and the AndroidManifest.xml from the original SystemUI or sign the file, then recompile again" i didnt understand this step
bhavstech said:
"After insert the smali file, recompile SystemUI, then add the meta-inf folder and the AndroidManifest.xml from the original SystemUI or sign the file, then recompile again" i didnt understand this step
Click to expand...
Click to collapse
After insert the smali, Recompile systemUI and sign it
Thanks
gerryS2 said:
After insert the smali, Recompile systemUI and sign it
Click to expand...
Click to collapse
it didnt work i did that
after I insert smali and sign the apk my system ui give fc
Sent from my GT-I9100 using Tapatalk
fargh123 said:
after I insert smali and sign the apk my system ui give fc
Sent from my GT-I9100 using Tapatalk
Click to expand...
Click to collapse
Me too why?

[MOD]BatteryMod | Changeable Position

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hi guys! It's been a long time. Now i present you my new mod called 'BatteryMod'. What is it? It will replace your current battery icon to my circle battery icon(oh yeah i made that icon by myself). And you can change the position left/right.
What to do?
1. Modding SystemUI
2. Install my app.
Click to expand...
Click to collapse
Step 1. Modding SystemUI
1. Download the attachment below.
2. Extract drawable folder into SystemUI folder.
3. Compile your SystemUI.
4. And Decompile your new compiled SystemUI.
5. Open public.xml, search for 'batt' & 'batt_charge'. Remember the public value!
6. Extract smali folder into SystemUI folder.
7. Open ucup.tech.batteryicon.BatteryIcon$1.smali, scroll down.
8. Replace '0x7f02009d' into your batt_charge's public value.
9. Replace '0x7f02009c' into your batt's public value.
10. Open your status_bar.xml(this will remove the clock.)
11. Replace the lines inside the first LinearLayout(id: icons) with this
Code:
<ucup.tech.batteryicon.StatusBarLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<ucup.tech.batteryicon.BatteryIcon android:id="@id/battIcon" android:gravity="center_vertical" android:layout_width="18.5px" android:layout_height="18.5px" />
<com.android.systemui.statusbar.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="6.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" />
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
</ucup.tech.batteryicon.StatusBarLayout>
12. Register the 'battIcon' in your ids.xml and public.xml(this time you don't need to remember the public values)
13. Open your com.android.systemui.statusbar.policy.StatusBarPolicy(this will remove the EDT's battery mod)
14. Replace the updateBattery method with mine.
Code:
.method private final updateBattery(Landroid/content/Intent;)V
.locals 13
.parameter "intent"
.prologue
const/4 v11, 0x3
const/4 v10, 0x1
const/4 v9, 0x0
const-string v8, "level"
const-string v12, "alarm"
.line 633
const-string v6, "icon-small"
invoke-virtual {p1, v6, v9}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
move-result v2
.line 634
.local v2, id:I
const-string v6, "level"
invoke-virtual {p1, v8, v9}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
move-result v3
.line 635
.local v3, level:I
iget-object v6, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v7, "battery"
invoke-virtual {v6, v7, v2, v3}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;II)V
[COLOR="Lime"]const v2, 0x0
invoke-virtual {v6, v7, v2}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V[/COLOR]
.line 637
const-string v6, "plugged"
invoke-virtual {p1, v6, v9}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
move-result v6
if-eqz v6, :cond_4
move v5, v10
.line 638
.local v5, plugged:Z
:goto_0
const-string v6, "level"
const/4 v6, -0x1
invoke-virtual {p1, v8, v6}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
move-result v3
.line 647
iget-boolean v4, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mBatteryPlugged:Z
.line 649
.local v4, oldPlugged:Z
iput-boolean v5, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mBatteryPlugged:Z
.line 650
iput v3, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mBatteryLevel:I
.line 652
iget-boolean v6, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mBatteryFirst:Z
if-eqz v6, :cond_0
.line 653
iput-boolean v9, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mBatteryFirst:Z
.line 667
:cond_0
iput-object p1, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mIntent:Landroid/content/Intent;
.line 669
const-string v6, "status"
invoke-virtual {p1, v6, v10}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
move-result v1
.line 670
.local v1, batteryStatus:I
const-string v6, "health"
invoke-virtual {p1, v6, v10}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
move-result v0
.line 671
.local v0, batteryHealth:I
const-string v6, "StatusBarPolicy"
new-instance v7, Ljava/lang/StringBuilder;
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
const-string v8, "BAT. S:"
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v7
const-string v8, " H:"
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v7
invoke-static {v6, v7}, Landroid/util/Slog;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 673
if-ne v1, v11, :cond_5
.line 674
iget-boolean v6, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mIsDisCharged:Z
if-eqz v6, :cond_2
.line 675
iput-boolean v9, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mIsDisCharged:Z
.line 676
iget-object v6, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mDisChargeDialog:Landroid/app/AlertDialog;
if-eqz v6, :cond_1
.line 677
iget-object v6, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mDisChargeDialog:Landroid/app/AlertDialog;
invoke-virtual {v6}, Landroid/app/AlertDialog;->dismiss()V
.line 680
:cond_1
iget-object v6, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mBattIntent:Landroid/app/PendingIntent;
if-eqz v6, :cond_2
.line 681
iget-object v6, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mContext:Landroid/content/Context;
const-string v7, "alarm"
invoke-virtual {v6, v12}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v6
check-cast v6, Landroid/app/AlarmManager;
iget-object v7, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mBattIntent:Landroid/app/PendingIntent;
invoke-virtual {v6, v7}, Landroid/app/AlarmManager;->cancel(Landroid/app/PendingIntent;)V
.line 685
:cond_2
iget-boolean v6, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mIsFullCharged:Z
if-eqz v6, :cond_3
.line 686
iput-boolean v9, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mIsFullCharged:Z
.line 687
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->removeFullChargeNotification()V
.line 717
:cond_3
:goto_1
return-void
.end local v0 #batteryHealth:I
.end local v1 #batteryStatus:I
.end local v4 #oldPlugged:Z
.end local v5 #plugged:Z
:cond_4
move v5, v9
.line 637
goto :goto_0
.line 690
.restart local v0 #batteryHealth:I
.restart local v1 #batteryStatus:I
.restart local v4 #oldPlugged:Z
.restart local v5 #plugged:Z
:cond_5
const/4 v6, 0x4
if-ne v1, v6, :cond_8
.line 691
if-eq v0, v11, :cond_6
const/4 v6, 0x7
if-ne v0, v6, :cond_3
.line 693
:cond_6
iget-boolean v6, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mIsDisCharged:Z
if-nez v6, :cond_7
iget-object v6, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mDisChargeDialog:Landroid/app/AlertDialog;
if-nez v6, :cond_7
.line 694
iget-boolean v6, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mIsDisCharged:Z
invoke-direct {p0, v6}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->showDisChargePopup(Z)V
.line 696
:cond_7
iput-boolean v10, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mIsDisCharged:Z
goto :goto_1
.line 699
:cond_8
const/4 v6, 0x5
if-ne v1, v6, :cond_9
.line 700
iget-boolean v6, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mIsFullCharged:Z
if-nez v6, :cond_3
.line 701
iput-boolean v10, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mIsFullCharged:Z
.line 702
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->addFullChargeNotification()V
goto :goto_1
.line 705
:cond_9
iget-boolean v6, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mIsDisCharged:Z
if-eqz v6, :cond_3
const/4 v6, 0x2
if-ne v0, v6, :cond_3
.line 706
iput-boolean v9, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mIsDisCharged:Z
.line 708
iget-object v6, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mDisChargeDialog:Landroid/app/AlertDialog;
if-eqz v6, :cond_a
.line 709
iget-object v6, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mDisChargeDialog:Landroid/app/AlertDialog;
invoke-virtual {v6}, Landroid/app/AlertDialog;->dismiss()V
.line 712
:cond_a
iget-object v6, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mBattIntent:Landroid/app/PendingIntent;
if-eqz v6, :cond_3
.line 713
iget-object v6, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mContext:Landroid/content/Context;
const-string v7, "alarm"
invoke-virtual {v6, v12}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v6
check-cast v6, Landroid/app/AlarmManager;
iget-object v7, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mBattIntent:Landroid/app/PendingIntent;
invoke-virtual {v6, v7}, Landroid/app/AlarmManager;->cancel(Landroid/app/PendingIntent;)V
goto :goto_1
.end method
15. Compile SystemUI and Push!
Click to expand...
Click to collapse
Step 2. Install my app.
1. Well, you know how to install an app right?
Click to expand...
Click to collapse
Screenshots:
Click to expand...
Click to collapse
FAQs:
Question: My SystemUI FC!
Answer: You know how to logcat right?
Question: This thread is awful!
Answer: I know...
Click to expand...
Click to collapse
Credits:
- OGBatteryMod's Source for get identifier from string
- Google
disclaimer:
im sorry for this long thread, im no good at english and making thread like this.
Click to expand...
Click to collapse
woah!
auliayf said:
hi guys! It's been a long time. Now i present you my new mod called 'batterymod'. What is it? It will replace your current battery icon to my circle battery icon(oh yeah i made that icon by myself). And you can change the position left/right.
Step 1. Modding systemui
step 2. Install my app.
Screenshots:
​
faqs:
Credits:
- ogbatterymod's source for get identifier from string
- google
Click to expand...
Click to collapse
nc guide sir will try it :d
if u make an update please include an option to hide the battery icon. thanks
AuliaYF said:
Hi guys! It's been a long time. Now i present you my new mod called 'BatteryMod'. What is it? It will replace your current battery icon to my circle battery icon(oh yeah i made that icon by myself). And you can change the position left/right.
Click to expand...
Click to collapse
woow .. greats job. aku suka ini pakde
+1
BLOODSTORM said:
if u make an update please include an option to hide the battery icon. thanks
Click to expand...
Click to collapse
ofcourse! thanks for this idea, im thinking about text or more battery icons.
dansoy92 said:
nc guide sir will try it :d
Click to expand...
Click to collapse
aakpSolder said:
woow .. greats job. aku suka ini pakde
+1
Click to expand...
Click to collapse
Click to expand...
Click to collapse
thanks! if you have any suggestion just tell me
AuliaYF said:
ofcourse! thanks for this idea, im thinking about text or more battery icons.
thanks! if you have any suggestion just tell me
Click to expand...
Click to collapse
Um, can you make changable battery icon tutor BTW i like it
AuliaYF said:
ofcourse! thanks for this idea, im thinking about text or more battery icons.
thanks! if you have any suggestion just tell me
Click to expand...
Click to collapse
that would be great. keep it up sir
GSculerlor said:
Um, can you make changable battery icon tutor BTW i like it
Click to expand...
Click to collapse
Later ya! But i will use this https://github.com/AuliaYF/uToggle/blob/master/src/ucup/tech/utoggle/utils/uTheme.java for the engine.
AuliaYF said:
ofcourse! thanks for this idea, im thinking about text or more battery icons.
thanks! if you have any suggestion just tell me
Click to expand...
Click to collapse
oke
its cool . Thanks Pressed Paman:good:
auliayf said:
ofcourse! Thanks for this idea, im thinking about text or more battery icons.
Thanks! If you have any suggestion just tell me
Click to expand...
Click to collapse
make battery mod on center sir :d
Working fine in my Galaxy Mini Emanon ROM v7!
Is possible to you write a similar mod to ICS+? Will be awesome too!
Thanks a lot.
notification icons are not showing
zzapz said:
notification icons are not showing
Click to expand...
Click to collapse
can you post your whole status_bar.xml here.
edit:
sorry, my mistake, i forgot about the notif icons, will fix that later. thanks.
AuliaYF said:
can you post your whole status_bar.xml here.
Click to expand...
Click to collapse
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.StatusBarView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.android.systemui.statusbar.DateView android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:textColor="#00000000" android:gravity="left|center" android:id="@id/date" android:background="#de000000" android:paddingLeft="0.0px" android:paddingRight="0.0px" android:layout_width="fill_parent" android:layout_height="fill_parent" android:singleLine="true" />
<ImageView android:background="@drawable/statusbar_background" android:layout_width="fill_parent" android:layout_height="fill_parent" />
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.potato.systemui.clocks.ClockCenter android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textStyle="normal" android:gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">
<ucup.tech.batteryicon.StatusBarLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<com.android.systemui.statusbar.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="6.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ucup.tech.batteryicon.BatteryIcon android:gravity="center_vertical" android:id="@id/battIcon" android:layout_width="18.5px" android:layout_height="18.5px" />
</ucup.tech.batteryicon.StatusBarLayout>
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageSwitcher android:id="@id/tickerIcon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginRight="8.0dip">
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="25.0dip" android:layout_height="25.0dip" />
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="25.0dip" android:layout_height="25.0dip" />
</ImageSwitcher>
<com.android.systemui.statusbar.TickerView android:id="@id/tickerText" android:paddingTop="2.0dip" android:paddingRight="10.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_weight="1.0">
<TextView android:textAppearance="@*android:style/Theme.Holo.Wallpaper" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" android:shadowColor="#ff000000" android:shadowDx="0.0" android:shadowDy="0.75" android:shadowRadius="1.0" />
<TextView android:textAppearance="@*android:style/Theme.Holo.Wallpaper" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" android:shadowColor="#ff000000" android:shadowDx="0.0" android:shadowDy="0.75" android:shadowRadius="1.0" />
</com.android.systemui.statusbar.TickerView>
</LinearLayout>
</com.android.systemui.statusbar.StatusBarView>
here
zzapz said:
...
here
Click to expand...
Click to collapse
umm sorry, it's totally my mistake, will fix this later. i forgot to rearrange the notif icons.
How long I will wait for this?
the_vanya1 said:
How long I will wait for this?
Click to expand...
Click to collapse
i'm too busy with my real life, just wait, i have something bigger. :good:

[Guide][tut] [LP/MM] Cyanogenmod Battery Styles (stock/circle dotted/percentage/cm)

Hello guys
today i would like to post a small tut battery styles
as per users request
first i would like to thank
aliv Rom, Basar and Vanya Melnechenko from MAAADR group
from their source i had ported for LP/MM with small changes
This is specially for sony ( if for any other roms Please compare system_icon.xml )
Features:
Hide/Show Stock battery
Battery Styles
Icon
Percentage
Icon with Percentage
Icon with percentage (JB style)
Circle
Circle with percentage
Dotted Circle
Dotted circle with percentage
No battery
Battery color
Circle animation speed
Percent text color
precent text charging color
apply mods
For this all you required :-
Deodexed SystemUI.apk and patience
look for post #2
Systemui ( First part )
1. Decompile SystemUI.apk
2. Download this Attchment View attachment SystemUI.zip and merge
open systemui.apk/res/arrays.xml
before </resources> add this
Code:
<integer-array name="batterymeter_color_levels_1">
<item>4</item>
<item>15</item>
<item>100</item>
</integer-array>
<array name="batterymeter_color_values_1">
<item>#ffff3300</item>
<item>#ffff3300</item>
<item>#ffffffff</item>
</array>
<integer-array name="batterymeter_inverted_bolt_points">
<item>743</item>
<item>73</item>
<item>743</item>
<item>292</item>
<item>442</item>
<item>201</item>
<item>442</item>
<item>400</item>
<item>0</item>
<item>20</item>
<item>369</item>
<item>157</item>
<item>369</item>
<item>0</item>
</integer-array>
open systemui.apk/res/attrs.xml
before </resources> add this
Code:
<attr name="batteryView" format="string" />
open systemui.apk/res/colors.xml
before </resources> add this
Code:
<color name="batterymeter_critical">#ffff3300</color>
<color name="batterymeter_low">#ffff3300</color>
<color name="batterymeter_full">#ffffffff</color>
<color name="battery_text_color">#ffffffff</color>
<color name="statusbar_clock_color">#ffffffff</color>
open systemui.apk/res/styles.xmlbefore </resources> add this
Code:
<style name="TextAppearance.StatusBar.Battery" parent="@android:style/TextAppearance.StatusBar.Icon">
<item name="android:textSize">13.0dip</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">@color/status_bar_clock_color</item>
</style>
now compile and decompile for public ids
Now open com/android/systemui/statusbar/phone/phonestatusbar.smali
find this
Code:
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$H;
before that add this line
Code:
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatterySettingsObserver;,
now look for this
Code:
.field private mBackdropInterpolator:Landroid/view/animation/Interpolator;
below that add these lines
Code:
.field private mBattery:Lcom/android/systemui/BatteryMeterViewMod;
.field private mCircleBattery:Lcom/android/systemui/BatteryCircleMeterView;
find this access code
Code:
.method static synthetic access$7800(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)Landroid/widget/ImageView;
access$7800 may differ so dont worry
above that add this
Code:
.method static synthetic access$77000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
.locals 0
.param p0, "x0" # Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
.prologue
.line 155
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateBatteryIcons()V
return-void
.end method
now look for this method
Code:
.method private updateClearAll()V
above that add this method
Code:
.method private updateBatteryIcons()V
.locals 2
.prologue
const/4 v1, 0x0
.line 723
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBattery:Lcom/android/systemui/BatteryMeterViewMod;
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCircleBattery:Lcom/android/systemui/BatteryCircleMeterView;
if-eqz v0, :cond_0
.line 724
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBattery:Lcom/android/systemui/BatteryMeterViewMod;
invoke-virtual {v0, v1}, Lcom/android/systemui/BatteryMeterViewMod;->updateSettings(Z)V
.line 725
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCircleBattery:Lcom/android/systemui/BatteryCircleMeterView;
invoke-virtual {v0, v1}, Lcom/android/systemui/BatteryCircleMeterView;->updateSettings(Z)V
.line 727
:cond_0
return-void
.end method
now look for this method
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
in that method
look for this line
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
below that line add this code
Code:
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f10021d
invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Lcom/android/systemui/BatteryMeterViewMod;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBattery:Lcom/android/systemui/BatteryMeterViewMod;
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f10021c
invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Lcom/android/systemui/BatteryCircleMeterView;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCircleBattery:Lcom/android/systemui/BatteryCircleMeterView;
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateBatteryIcons()V
change the ids compare with mine and replace with yours
now look for this method
Code:
.method public start()V
in that find this line
Code:
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;
above that line add this
Code:
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatterySettingsObserver;
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mHandler:Lcom/android/systemui/statusbar/BaseStatusBar$H;
invoke-direct {v0, p0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatterySettingsObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/os/Handler;)V
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatterySettingsObserver;->observe()V
save it and close
3. Now open com/android/systemui/R$styleable.smali
look for this
Code:
.field public static final AnalogClock:[I
below that add this
Code:
.field public static final BatteryIcon:[I
now look for this
Code:
sput-object v0, Lcom/android/systemui/R$styleable;->AnalogClock:[I
below add this
Code:
new-array v0, v3, [I
const v1, 0x7f01003c
aput v1, v0, v2
sput-object v0, Lcom/android/systemui/R$styleable;->BatteryIcon:[I
compare id from mine and replace
save it and close
compare my public ids and replace with your ids
from these files
com/android/systemui/BatteryCircleMeterView
com/android/systemui/BatteryMeterView
com/android/systemui/BatteryMeterView$BatteryTracker
and you are finally done
save it all and compile and replace
settings.apk final part editing
1. Download this app View attachment app-release.apk
2. Install the app
3. Have fun with this mod
no time to make settings
but one fine day i will add tut to add in settings app
Have fun
Dont forget to mention me if you used my work
Mod edit:
OP quote removed
wait for add to settings sir :fingers-crossed:
Work for systemui xperia X mod?
InitialL_Dee said:
wait for add to settings sir :fingers-crossed:
Click to expand...
Click to collapse
yhu dnt need to quote tha whole post just to post please.... edit please!
InitialL_Dee said:
wait for add to settings sir :fingers-crossed:
Click to expand...
Click to collapse
Hmm sure I will add but when I am free haha
Delete the quote bro
Make thread clean
vandiaz_sairavinz said:
Work for systemui xperia X mod?
Click to expand...
Click to collapse
Yes will work bro tested
@venkat kamesh thanks for the guide. I am going to have a busy weekend. ?
Sent from my SM-G935F using Tapatalk
Nice guide sir..
And By the way, did you ever try to port battery style from bliss pop 5.1..?
Screenshot please. thanks
venkat kamesh said:
vandiaz_sairavinz said:
Work for systemui xperia X mod?
Click to expand...
Click to collapse
Yes will work bro tested
Click to expand...
Click to collapse
I'm using Xperia X SystemUI, but my .smali doesn't have these lines:
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
Code:
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;
Is there something else I should be looking for?
@venkat kamesh
Hi bro
I can't find this line
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
I am using Xperia X SystemUI. U told its working with X SystemUI too.
@Bloodlvst bro same here.
Awsm mod bro ?
Any guide(mod or theming) of xperia x systemui for cm12.1 ☺
Thx bro
Bloodlvst said:
I'm using Xperia X SystemUI, but my .smali doesn't have these lines:
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
Code:
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;
Is there something else I should be looking for?
Click to expand...
Click to collapse
Rajeev said:
@venkat kamesh
Hi bro
I can't find this line
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
I am using Xperia X SystemUI. U told its working with X SystemUI too.
@Bloodlvst bro same here.
Click to expand...
Click to collapse
Instead of this
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
Search for this
Code:
invoke-virtual/range {v4 .. v9}, Landroid/content/Context;->registerReceiverAsUser(Landroid/content/BroadcastReceiver;Landroid/os/UserHandle;Landroid/content/IntentFilter;Ljava/lang/String;Landroid/os/Handler;)Landroid/content/Intent;
Instead of this
Code:
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;
Search for this
Code:
:cond_0
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->addNavigationBar()V
Just search these lines instead of those two and do all stuff as said by op.
jitz975 said:
Just search these lines instead of those two and do all stuff as said by op.
Click to expand...
Click to collapse
Gave this a shot, but I'm getting force close in SystemUI.
Couple of notes - the 2 files at the end:
BatteryMeterView
BatteryMeterView$BatteryTracker
Am I editing those or am I editing:
BatteryMeterViewMod
BatteryMeterViewMod$BatteryTracker
I ask because the puiblic ID's in BatteryMeterView don't match at all with the public(compare).xml, but the "mod" ones do. Is there a step missing?
Hopefully it's just a small issue! :fingers-crossed:
Bloodlvst said:
Gave this a shot, but I'm getting force close in SystemUI.
Couple of notes - the 2 files at the end:
BatteryMeterView
BatteryMeterView$BatteryTracker
Am I editing those or am I editing:
BatteryMeterViewMod
BatteryMeterViewMod$BatteryTracker
I ask because the puiblic ID's in BatteryMeterView don't match at all with the public(compare).xml, but the "mod" ones do. Is there a step missing?
Hopefully it's just a small issue! :fingers-crossed:
Click to expand...
Click to collapse
Bro i did this mod, only using this guide and it worked at first go.
jitz975 said:
Bro i did this mod, only using this guide and it worked at first go.
Click to expand...
Click to collapse
Did you change the ID's in:
BatteryMeterView
BatteryMeterView$BatteryTracker
Or the ones in:
BatteryMeterViewMod
BatteryMeterViewMod$BatteryTracker
I'll give it another go!
Bloodlvst said:
Did you change the ID's in:
BatteryMeterView
BatteryMeterView$BatteryTracker
Or the ones in:
BatteryMeterViewMod
BatteryMeterViewMod$BatteryTracker
I'll give it another go!
Click to expand...
Click to collapse
Yes, id's are in these two
BatteryMeterViewMod
BatteryMeterViewMod$BatteryTracker, op missed that mod part
If using Xperia X UI, you will need to replace your system_icons.xml with the following code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:id="@id/system_icons" android:layout_width="wrap_content" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<com.android.keyguard.AlphaOptimizedLinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="0.0dip" layout="@layout/signal_cluster_view" />
<com.android.systemui.BatteryMeterViewMod android:id="@+id/battery_stock" android:visibility="gone" android:layout_width="10.5dip" android:layout_height="16.0dip" android:layout_marginBottom="1.0px" android:layout_marginStart="0.0dip" systemui:batteryView="statusbar" />
<com.android.systemui.BatteryCircleMeterView android:textAppearance="@style/TextAppearance.StatusBar.Battery" android:gravity="bottom" android:id="@+id/circle_battery" android:paddingLeft="0.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" systemui:batteryView="statusbar" />
<com.android.systemui.rz.LeftLayout android:layout_width="wrap_content" android:layout_height="wrap_content" key="battery_hide">
<LinearLayout android:gravity="center_vertical" android:id="@id/battery_group" android:layout_width="wrap_content" android:layout_height="wrap_content">
<com.sonymobile.systemui.BatteryLevelView android:textSize="@dimen/battery_level_text_size" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:id="@id/battery_level" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:importantForAccessibility="noHideDescendants" />
<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="9.5dip" android:layout_height="14.5dip" android:layout_marginBottom="@dimen/battery_margin_bottom" android:layout_marginStart="@dimen/battery_margin_start" />
</LinearLayout>
</com.android.systemui.rz.LeftLayout>
</LinearLayout>
@venkat kamesh - Bro, is there any plans to make it so you don't need to restart systemUI to make changes? Or is this a limitation of Marshmallow?

Categories

Resources