In this guide , I will tell "How to add Clock" option in Settings.
Will work only on 4.4
REQUIREMENTS :
1. Brain
2. Apktool (2.0.0)
3. Notepad ++
4. Knowledge on How to Decompile/Recompile the apk
Lets start ,
NOTE : Those are not having the "colorpicker" folder in Settings/smali/net/margaritov/preference and having any other colorpicker in different location then open the "status_bar_clock_style" and edit this line by changing the path of colorpicker in this line.
PHP:
<net.margaritov.preference.colorpicker.ColorPickerPreference android:title="@string/battery_bar_color" android:key="battery_bar_color" android:defaultValue="\#ffffff" alphaSlider="true" />
Those who are not having any color picker , first add that using guide whose link is given below.
http://forum.xda-developers.com/and...r-settings-t3176597/post62282065#post62282065
Settings.apk Modding
1. First Decompile your Settings.apk and merge the files (given below).
2. Now add this line in display_settings.xml or any other xml present in Settings.apk/res/xml.
PHP:
<PreferenceScreen android:title="@string/statusbar_clock" android:key="statusbar_clock" android:summary="@string/statusbar_clock_summary" android:fragment="com.android.settings.gurpreet.statusbarclock.StatusBarClockStyle" />
3. Now open strings.xml and add these lines above </resources>.
PHP:
<string name="statusbar_clock">Clock and Date</string>
<string name="statusbar_clock_summary">Change the clock and date style</string>
<string name="clock_title_enable">Alignment</string>
<string name="clock_enabled">Enabled</string>
<string name="clock_disabled">Disabled</string>
<string name="clock_color_title">Color</string>
<string name="status_bar_clock_style_reset">Reset color</string>
<string name="status_bar_show_clock_title">Show clock and date</string>
<string name="status_bar_am_pm_title">AM/PM</string>
<string name="status_bar_am_pm_info">24-hour clock is enabled</string>
<string name="enable_clock_weekday">Day of the week</string>
<string name="enable_clock_weekday_summary">Abbreviated day of the week before the time</string>
<string name="right_clock">Right clock</string>
<string name="center_clock">Center clock</string>
<string name="left_clock">Left clock</string>
<string name="dont_show">"Don't show"</string>
<string name="clock_date_display">Date</string>
<string name="clock_date_display_summary">Display custom date before the clock</string>
<string name="clock_date_style">Date style</string>
<string name="clock_date_format">Date format</string>
<string name="clock_date_string_edittext_title">Must be in DateFormat eg. MM/dd/yy</string>
<string name="clock_date_string_edittext_summary">Enter string</string>
<string name="am_pm_clock_normal">Normal font size</string>
<string name="am_pm_clock_small">Small font size</string>
<string name="am_pm_clock_none">"Don't show"</string>
<string name="clock_date_display_none">"Don't show"</string>
<string name="clock_date_display_small">Small font size</string>
<string name="clock_date_display_normal">Normal font size</string>
<string name="clock_date_style_normal">Normal</string>
<string name="clock_date_style_lowercase">Lowercase</string>
<string name="clock_date_style_uppercase">Uppercase</string>
<string name="clock_date_format_custom">Custom java format</string>
<string name="status_bar_clock_style_reset_message">Reset clock color?</string>
<string name="clock_font_style_title">Font styles</string>
<string name="clock_font_bold">Bold</string>
<string name="clock_font_condensed">Condensed</string>
<string name="clock_font_light">Light</string>
<string name="clock_font_light_italic">Light italic</string>
<string name="clock_font_normal">Normal</string>
<string name="color_default">Default</string>
<string name="clock_use_second">Enable Seconds</string>
<string name="clock_use_second_summary">Shows the seconds next to the clock</string>
4. Now open array.xml and add these lines above </resources>.
PHP:
<string-array name="clock_style_entries">
<item>@string/right_clock</item>
<item>@string/center_clock</item>
<item>@string/left_clock</item>
</string-array>
<string-array name="clock_style_values">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="entries_status_bar_am_pm">
<item>@string/am_pm_clock_none</item>
<item>@string/am_pm_clock_small</item>
<item>@string/am_pm_clock_normal</item>
</string-array>
<string-array name="values_status_bar_am_pm">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="clock_date_display_entries">
<item>@string/clock_date_display_none</item>
<item>@string/clock_date_display_small</item>
<item>@string/clock_date_display_normal</item>
</string-array>
<string-array name="clock_date_display_values">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="clock_date_style_entries">
<item>@string/clock_date_style_normal</item>
<item>@string/clock_date_style_lowercase</item>
<item>@string/clock_date_style_uppercase</item>
</string-array>
<string-array name="clock_date_style_values">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="clock_date_format_entries_values">
<item>dd/MM/yy</item>
<item>MM/dd/yy</item>
<item>yyyy-MM-dd</item>
<item>yyyy-dd-MM</item>
<item>dd-MM-yyyy</item>
<item>MM-dd-yyyy</item>
<item>MMM dd</item>
<item>MMM dd, yyyy</item>
<item>MMMM dd, yyyy</item>
<item>EEE</item>
<item>EEE dd</item>
<item>EEE dd/MM</item>
<item>EEE MM/dd</item>
<item>EEE dd MMM</item>
<item>EEE MMM dd</item>
<item>EEE MMMM dd</item>
<item>EEEE dd/MM</item>
<item>EEEE MM/dd</item>
<item>@string/clock_date_format_custom</item>
</string-array>
<string-array name="clock_font_style_entries">
<item>@string/clock_font_bold</item>
<item>@string/clock_font_condensed</item>
<item>@string/clock_font_light</item>
<item>@string/clock_font_light_italic</item>
<item>@string/clock_font_normal</item>
</string-array>
<string-array name="clock_font_style_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
</string-array>
5. Now Recompile your Settings.apk , Sign it and again Decompile it.
6. Now open StatusBarClockStyle.smali and replace the ids with the ids present in public.xml of your Settings.apk
0x7f050077
PHP:
<public type="xml" name="status_bar_clock_style"
0x7f0200cd
PHP:
<public type="drawable" name="ic_settings_clock"
0x7f0800a4
PHP:
<public type="string" name="color_default"
0x7f0800cd
PHP:
<public type="string" name="status_bar_am_pm_info"
0x7f0a0078
PHP:
<public type="array" name="clock_date_format_entries_values"
0x7f08007c
PHP:
<public type="string" name="reset"
Do this with other same id.
0x7f0800e3
PHP:
<public type="string" name="status_bar_clock_style_reset_message"
0x7f08007b
PHP:
<public type="string" name="ok"
0x7f08066e
PHP:
<public type="string" name="cancel"
0x7f0200c4
PHP:
<public type="drawable" name="ic_settings_backup"
0x7f0800d7
PHP:
<public type="string" name="clock_date_string_edittext_title"
0x7f0800d8
PHP:
<public type="string" name="clock_date_string_edittext_summary"
0x7f080bcb
PHP:
<public type="string" name="menu_save"
0x7f080bcc
PHP:
<public type="string" name="menu_cancel"
SystemUI.apk Modding
1. First Decompile your SystemUI.apk and merge the files inside it (given below).
2. Now go to SystemUI.apk\res\layout\gemini_status_bar.xml and open it.
Add these lines in the xml. Compare with the "gemini_status_bar.xml" given in the guide.
PHP:
<com.android.systemui.statusbar.policy.ClockLeft android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/left_clock" android:paddingLeft="6.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
PHP:
<com.android.systemui.statusbar.policy.ClockCenter android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@id/center_clock" android:paddingLeft="6.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
PHP:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/center_clock_layout" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.ClockCenter android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@id/center_clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
NOTE: To solve the issue of overlapping of other things with clock in statusbar , follow this.
• Find this line ,
PHP:
<LinearLayout android:orientation="horizontal" android:id="@id/notification_icon_area" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
• Replace with this line ,
PHP:
<LinearLayout android:gravity="left" android:orientation="horizontal" android:id="@id/notification_icon_area" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
• Now again find this line ,
PHP:
<LinearLayout android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="wrap_content" android:layout_height="fill_parent">
• Replace with this line ,
PHP:
<LinearLayout android:gravity="right" android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
3. Now go to SystemUI.apk\res\values\ids.xml and open it. Now add these above </resources>.
PHP:
<item type="id" name="left_clock">false</item>
<item type="id" name="clock_stock">false</item>
<item type="id" name="center_clock_layout">false</item>
<item type="id" name="center_clock">false</item>
4. Now go to SystemUI.apk\res\values\colors.xml and open it. Now add this above </resources>.
PHP:
<color name="status_bar_clock_color">#ffffffff</color>
5. Now Recompile your SystemUI.apk , Sign it and then again Decompile it.
6. Now go to SystemUI.apk\smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali
• Add this line ,
HTML:
.field mCenterClockLayout:Landroid/widget/LinearLayout;
Like this ,
HTML:
.field private mCarrierLabelVisible:Z
.field mCenterClockLayout:Landroid/widget/LinearLayout;
.field private final mCheckBarModes:Ljava/lang/Runnable;
• Now again , Add this line
HTML:
.field private mShowClock:Z
Like this ,
HTML:
.field private mShowCarrierInPanel:Z
.field private mShowClock:Z
.field private mShowSearchHoldoff:I
7. Now find this method ,
HTML:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
• Now find these lines in this method ,
HTML:
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f070052
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarContents:Landroid/widget/LinearLayout;
move-object/from16 v0, p0
• Now copy these lines and paste it below the lines that you have copied , like this
HTML:
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f070052
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarContents:Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f070052
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarContents:Landroid/widget/LinearLayout;
move-object/from16 v0, p0
• Now replace the second last line of pasted lines with this ,
HTML:
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCenterClockLayout:Landroid/widget/LinearLayout;
• The final will look like this ,
HTML:
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f070052
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarContents:Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f0?????
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCenterClockLayout:Landroid/widget/LinearLayout;
move-object/from16 v0, p0
8. Now replace this id in "PhoneStatusBar.smali" with the id present in public.xml of your SystemUI.apk
0x7f0?????
PHP:
<public type="id" name="center_clock_layout"
9. Now find this method ,
HTML:
.method public showClock(Z)V
• Now delete whole lines between these ,
HTML:
.method public showClock(Z)V
-
-
-
.end method
• Now copy these lines between these ,
HTML:
.locals 10
.prologue
const/4 v9, -0x2
const/4 v1, 0x1
const/4 v2, 0x0
const/16 v4, 0x8
.line 3874
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
if-nez v0, :cond_1
.line 3894
:cond_0
:goto_0
return-void
.line 3875
:cond_1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
.line 3876
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v5, 0x7f07005d
invoke-virtual {v0, v5}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v5
.line 3877
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v6, 0x7f0700db
invoke-virtual {v0, v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v6
.line 3878
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v7, 0x7f0700d8
invoke-virtual {v0, v7}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v7
.line 3879
const-string v0, "status_bar_clock"
invoke-static {v3, v0, v1, v9}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I
move-result v0
if-ne v0, v1, :cond_5
move v0, v1
.line 3882
:goto_1
const-string v8, "statusbar_clock_style"
invoke-static {v3, v8, v2, v9}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I
move-result v8
.line 3885
if-nez v8, :cond_2
if-eqz v5, :cond_2
.line 3886
if-eqz p1, :cond_7
if-eqz v0, :cond_6
move v3, v2
:goto_2
invoke-virtual {v5, v3}, Landroid/view/View;->setVisibility(I)V
.line 3888
:cond_2
if-ne v8, v1, :cond_3
if-eqz v6, :cond_3
.line 3889
if-eqz p1, :cond_9
if-eqz v0, :cond_8
move v1, v2
:goto_3
invoke-virtual {v6, v1}, Landroid/view/View;->setVisibility(I)V
.line 3891
:cond_3
const/4 v1, 0x2
if-ne v8, v1, :cond_0
if-eqz v7, :cond_0
.line 3892
if-eqz p1, :cond_4
if-eqz v0, :cond_4
move v4, v2
:cond_4
invoke-virtual {v7, v4}, Landroid/view/View;->setVisibility(I)V
goto :goto_0
:cond_5
move v0, v2
.line 3879
goto :goto_1
:cond_6
move v3, v4
.line 3886
goto :goto_2
:cond_7
move v3, v4
goto :goto_2
:cond_8
move v1, v4
.line 3889
goto :goto_3
:cond_9
move v1, v4
goto :goto_3
10. Now replace these ids in the above method with the ids present in public.xml of your SystemUI.apk
0x7f07005d
PHP:
<public type="id" name="clock"
0x7f0700db
PHP:
<public type="id" name="center_clock"
0x7f0700d8
PHP:
<public type="id" name="left_clock"
11. Now go to SystemUI.apk\smali\com\android\systemui\statusbar\policy\Clock.smali and open it. Now replace the id with the id present in public.xml of your SystemUI.apk
0x7f080009
PHP:
<public type="color" name="status_bar_clock_color"
12. Done , now Recompile your SystemUI.apk and Sign it.
Important Information :
• In step no. 7 , if in these lines
HTML:
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f070052
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarContents:Landroid/widget/LinearLayout;
.line 523 <--------- Like This ----------->
move-object/from16 v0, p0
• The line above line "move-object/from16 v0, p0" is having line like this (may be any no.) , then after the copying and replacing (as mentioned in step 7) , it will look like this.
HTML:
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f070052
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarContents:Landroid/widget/LinearLayout;
.line 523 <--------- 1 ----------->
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f0????? (<public type="id" name="center_clock_layout")
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCenterClockLayout:Landroid/widget/LinearLayout;
.line 523 <--------- 2 ----------->
move-object/from16 v0, p0
• Then in 2nd case , change the line number by adding 1. In this case add 1 to 523 and it will become 524. (If line 524 is already there in smali , then add 2 means 523+2 and so on). the final will look like this ,
HTML:
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f070052
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarContents:Landroid/widget/LinearLayout;
.line 523 <--------- 1 ----------->
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f0????? (<public type="id" name="center_clock_layout")
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCenterClockLayout:Landroid/widget/LinearLayout;
.line 524 <--------- 2 (Changed here)----------->
move-object/from16 v0, p0
• Now follow the above remaining steps given in guide.
Special Thanks To :
1. DU_Flo ROM (Extracted from this ROM)
2. Vanya Melnechenko
3. MAAaD
4. XDA
5. Raj Shekhar (For testing the guide & screenshots)
Screenshots
{
"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"
}
Great!thumbs up Guru
Amazing!! as always @05Gurpreet bro!!
great guides, thanx brother!
Amazing guide..
Nice! I don't need this personally since it's a defacto feature in every custom rom these days, but it's cool to see a well done guide for adding this into roms that don't have it!
remember your cm12 systemUI tweaks?
would you be able to port that to cm12.1???
Atrvscet said:
Great!thumbs up Guru
Click to expand...
Click to collapse
Thanks sir. Its all because of your support.
Thanks all for your support.
i get settings FC when i tried to open clock and date style option
Code:
I/dalvikvm( 1950): Could not find method com.android.settings.gurpreet.statusbarclock.StatusBarClockStyle$1.<init>, referenced from method com.android.settings.gurpreet.statusbarclock.StatusBarClockStyle.onPreferenceChange
W/dalvikvm( 1950): VFY: unable to resolve direct method 11406: Lcom/android/settings/gurpreet/statusbarclock/StatusBarClockStyle$1;.<init> (Lcom/android/settings/gurpreet/statusbarclock/StatusBarClockStyle;Landroid/widget/EditText;)V
D/dalvikvm( 1950): VFY: replacing opcode 0x70 at 0x01a2
D/AndroidRuntime( 1950): Shutting down VM
W/dalvikvm( 1950): threadid=1: thread exiting with uncaught exception (group=0x415abc20)
E/AndroidRuntime( 1950): FATAL EXCEPTION: main
E/AndroidRuntime( 1950): Process: com.android.settings, PID: 1950
E/AndroidRuntime( 1950): android.content.res.Resources$NotFoundException: File Hacer copia de seguridad de configuración from drawable resource ID #0x7f080ae7
E/AndroidRuntime( 1950): at android.content.res.Resources.loadDrawable(Resources.java:2255)
E/AndroidRuntime( 1950): at android.content.res.Resources.getDrawable(Resources.java:733)
E/AndroidRuntime( 1950): at android.content.res.Resources.getDrawable(Resources.java:711)
E/AndroidRuntime( 1950): at com.android.internal.view.menu.MenuItemImpl.getIcon(MenuItemImpl.java:388)
E/AndroidRuntime( 1950): at com.android.internal.view.menu.ActionMenuItemView.initialize(ActionMenuItemView.java:105)
E/AndroidRuntime( 1950): at com.android.internal.view.menu.ActionMenuPresenter.bindItemView(ActionMenuPresenter.java:179)
E/AndroidRuntime( 1950): at com.android.internal.view.menu.BaseMenuPresenter.getItemView(BaseMenuPresenter.java:178)
E/AndroidRuntime( 1950): at com.android.internal.view.menu.ActionMenuPresenter.getItemView(ActionMenuPresenter.java:165)
E/AndroidRuntime( 1950): at com.android.internal.view.menu.ActionMenuPresenter.flagActionItems(ActionMenuPresenter.java:463)
E/AndroidRuntime( 1950): at com.android.internal.view.menu.MenuBuilder.flagActionItems(MenuBuilder.java:1062)
E/AndroidRuntime( 1950): at com.android.internal.view.menu.BaseMenuPresenter.updateMenuView(BaseMenuPresenter.java:87)
E/AndroidRuntime( 1950): at com.android.internal.view.menu.ActionMenuPresenter.updateMenuView(ActionMenuPresenter.java:218)
E/AndroidRuntime( 1950): at com.android.internal.view.menu.MenuBuilder.dispatchPresenterUpdate(MenuBuilder.java:244)
E/AndroidRuntime( 1950): at com.android.internal.view.menu.MenuBuilder.onItemsChanged(MenuBuilder.java:956)
E/AndroidRuntime( 1950): at com.android.internal.view.menu.MenuBuilder.startDispatchingItemsChanged(MenuBuilder.java:979)
E/AndroidRuntime( 1950): at com.android.internal.policy.impl.PhoneWindow.preparePanel(PhoneWindow.java:532)
E/AndroidRuntime( 1950): at com.android.internal.policy.impl.PhoneWindow.doInvalidatePanelMenu(PhoneWindow.java:853)
E/AndroidRuntime( 1950): at com.android.internal.policy.impl.PhoneWindow$1.run(PhoneWindow.java:273)
E/AndroidRuntime( 1950): at android.os.Handler.handleCallback(Handler.java:733)
E/AndroidRuntime( 1950): at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime( 1950): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 1950): at android.app.ActivityThread.main(ActivityThread.java:5179)
E/AndroidRuntime( 1950): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1950): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 1950): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:732)
E/AndroidRuntime( 1950): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
E/AndroidRuntime( 1950): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 1950): Caused by: java.io.FileNotFoundException: Hacer copia de seguridad de configuración
E/AndroidRuntime( 1950): at android.content.res.AssetManager.openNonAssetNative(Native Method)
E/AndroidRuntime( 1950): at android.content.res.AssetManager.openNonAsset(AssetManager.java:427)
E/AndroidRuntime( 1950): at android.content.res.Resources.loadDrawable(Resources.java:2246)
E/AndroidRuntime( 1950): ... 26 more
W/ActivityManager( 728): Force finishing activity com.android.settings/.SubSettings
W/ActivityManager( 728): Force finishing activity com.android.settings/.SubSettings
W/ActivityManager( 728): Activity pause timeout for ActivityRecord{41db0dd8 u0 com.android.settings/.SubSettings t3 f}
I/AudioHardwareMSM72XX( 371): disabling post proc features with mask 0x0000
Amazzzzziiiiinnnnnngggggg.....
05Gurpreet said:
In this guide , I will tell "How to add Clock" option in Settings.
Will work only on 4.4
REQUIREMENTS :
1. Brain
2. Apktool (2.0.0)
3. Notepad ++
4. Knowledge on How to Decompile/Recompile the apk
Lets start ,
NOTE : Those are not having the "colorpicker" folder in Settings/smali/net/margaritov/preference and having any other colorpicker in different location then open the "status_bar_clock_style" and edit this line by changing the path of colorpicker in this line.
PHP:
<net.margaritov.preference.colorpicker.ColorPickerPreference android:title="@string/battery_bar_color" android:key="battery_bar_color" android:defaultValue="\#ffffff" alphaSlider="true" />
Those who are not having any color picker , first add that using guide whose link is given below.
http://forum.xda-developers.com/and...r-settings-t3176597/post62282065#post62282065
Settings.apk Modding
1. First Decompile your Settings.apk and merge the files (given below).
2. Now add this line in display_settings.xml or any other xml present in Settings.apk/res/xml.
PHP:
<PreferenceScreen android:title="@string/statusbar_clock" android:key="statusbar_clock" android:summary="@string/statusbar_clock_summary" android:fragment="com.android.settings.gurpreet.statusbarclock.StatusBarClockStyle" />
3. Now open strings.xml and add these lines above </resources>.
PHP:
<string name="statusbar_clock">Clock and Date</string>
<string name="statusbar_clock_summary">Change the clock and date style</string>
<string name="clock_title_enable">Alignment</string>
<string name="clock_enabled">Enabled</string>
<string name="clock_disabled">Disabled</string>
<string name="clock_color_title">Color</string>
<string name="status_bar_clock_style_reset">Reset color</string>
<string name="status_bar_show_clock_title">Show clock and date</string>
<string name="status_bar_am_pm_title">AM/PM</string>
<string name="status_bar_am_pm_info">24-hour clock is enabled</string>
<string name="enable_clock_weekday">Day of the week</string>
<string name="enable_clock_weekday_summary">Abbreviated day of the week before the time</string>
<string name="right_clock">Right clock</string>
<string name="center_clock">Center clock</string>
<string name="left_clock">Left clock</string>
<string name="dont_show">"Don't show"</string>
<string name="clock_date_display">Date</string>
<string name="clock_date_display_summary">Display custom date before the clock</string>
<string name="clock_date_style">Date style</string>
<string name="clock_date_format">Date format</string>
<string name="clock_date_string_edittext_title">Must be in DateFormat eg. MM/dd/yy</string>
<string name="clock_date_string_edittext_summary">Enter string</string>
<string name="am_pm_clock_normal">Normal font size</string>
<string name="am_pm_clock_small">Small font size</string>
<string name="am_pm_clock_none">"Don't show"</string>
<string name="clock_date_display_none">"Don't show"</string>
<string name="clock_date_display_small">Small font size</string>
<string name="clock_date_display_normal">Normal font size</string>
<string name="clock_date_style_normal">Normal</string>
<string name="clock_date_style_lowercase">Lowercase</string>
<string name="clock_date_style_uppercase">Uppercase</string>
<string name="clock_date_format_custom">Custom java format</string>
<string name="status_bar_clock_style_reset_message">Reset clock color?</string>
<string name="clock_font_style_title">Font styles</string>
<string name="clock_font_bold">Bold</string>
<string name="clock_font_condensed">Condensed</string>
<string name="clock_font_light">Light</string>
<string name="clock_font_light_italic">Light italic</string>
<string name="clock_font_normal">Normal</string>
<string name="color_default">Default</string>
<string name="clock_use_second">Enable Seconds</string>
<string name="clock_use_second_summary">Shows the seconds next to the clock</string>
4. Now open array.xml and add these lines above </resources>.
PHP:
<string-array name="clock_style_entries">
<item>@string/right_clock</item>
<item>@string/center_clock</item>
<item>@string/left_clock</item>
</string-array>
<string-array name="clock_style_values">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="entries_status_bar_am_pm">
<item>@string/am_pm_clock_none</item>
<item>@string/am_pm_clock_small</item>
<item>@string/am_pm_clock_normal</item>
</string-array>
<string-array name="values_status_bar_am_pm">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="clock_date_display_entries">
<item>@string/clock_date_display_none</item>
<item>@string/clock_date_display_small</item>
<item>@string/clock_date_display_normal</item>
</string-array>
<string-array name="clock_date_display_values">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="clock_date_style_entries">
<item>@string/clock_date_style_normal</item>
<item>@string/clock_date_style_lowercase</item>
<item>@string/clock_date_style_uppercase</item>
</string-array>
<string-array name="clock_date_style_values">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="clock_date_format_entries_values">
<item>dd/MM/yy</item>
<item>MM/dd/yy</item>
<item>yyyy-MM-dd</item>
<item>yyyy-dd-MM</item>
<item>dd-MM-yyyy</item>
<item>MM-dd-yyyy</item>
<item>MMM dd</item>
<item>MMM dd, yyyy</item>
<item>MMMM dd, yyyy</item>
<item>EEE</item>
<item>EEE dd</item>
<item>EEE dd/MM</item>
<item>EEE MM/dd</item>
<item>EEE dd MMM</item>
<item>EEE MMM dd</item>
<item>EEE MMMM dd</item>
<item>EEEE dd/MM</item>
<item>EEEE MM/dd</item>
<item>@string/clock_date_format_custom</item>
</string-array>
<string-array name="clock_font_style_entries">
<item>@string/clock_font_bold</item>
<item>@string/clock_font_condensed</item>
<item>@string/clock_font_light</item>
<item>@string/clock_font_light_italic</item>
<item>@string/clock_font_normal</item>
</string-array>
<string-array name="clock_font_style_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
</string-array>
5. Now Recompile your Settings.apk , Sign it and again Decompile it.
6. Now open StatusBarClockStyle.smali and replace the ids with the ids present in public.xml of your Settings.apk
0x7f050077
PHP:
<public type="xml" name="status_bar_clock_style"
0x7f0200cd
PHP:
<public type="drawable" name="ic_settings_clock"
0x7f0800a4
PHP:
<public type="string" name="color_default"
0x7f0800cd
PHP:
<public type="string" name="status_bar_am_pm_info"
0x7f0a0078
PHP:
<public type="array" name="clock_date_format_entries_values"
0x7f08007c
PHP:
<public type="string" name="reset"
Do this with other same id.
0x7f0800e3
PHP:
<public type="string" name="status_bar_clock_style_reset_message"
0x7f08007b
PHP:
<public type="string" name="ok"
0x7f08066e
PHP:
<public type="string" name="cancel"
0x7f0200c4
PHP:
<public type="drawable" name="ic_settings_backup"
0x7f0800d7
PHP:
<public type="string" name="clock_date_string_edittext_title"
0x7f0800d8
PHP:
<public type="string" name="clock_date_string_edittext_summary"
0x7f080bcb
PHP:
<public type="string" name="menu_save"
0x7f080bcc
PHP:
<public type="string" name="menu_cancel"
SystemUI.apk Modding
1. First Decompile your SystemUI.apk and merge the files inside it (given below).
2. Now go to SystemUI.apk\res\layout\gemini_status_bar.xml and open it.
Add these lines in the xml. Compare with the "gemini_status_bar.xml" given in the guide.
PHP:
<com.android.systemui.statusbar.policy.ClockLeft android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/left_clock" android:paddingLeft="6.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
PHP:
<com.android.systemui.statusbar.policy.ClockCenter android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@id/center_clock" android:paddingLeft="6.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
PHP:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/center_clock_layout" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.ClockCenter android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@id/center_clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
NOTE: To solve the issue of overlapping of other things with clock in statusbar , follow this.
• Find this line ,
PHP:
<LinearLayout android:orientation="horizontal" android:id="@id/notification_icon_area" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
• Replace with this line ,
PHP:
<LinearLayout android:gravity="left" android:orientation="horizontal" android:id="@id/notification_icon_area" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
• Now again find this line ,
PHP:
<LinearLayout android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="wrap_content" android:layout_height="fill_parent">
• Replace with this line ,
PHP:
<LinearLayout android:gravity="right" android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
3. Now go to SystemUI.apk\res\values\ids.xml and open it. Now add these above </resources>.
PHP:
<item type="id" name="left_clock">false</item>
<item type="id" name="clock_stock">false</item>
<item type="id" name="center_clock_layout">false</item>
<item type="id" name="center_clock">false</item>
4. Now go to SystemUI.apk\res\values\colors.xml and open it. Now add this above </resources>.
PHP:
<color name="status_bar_clock_color">#ffffffff</color>
5. Now Recompile your SystemUI.apk , Sign it and then again Decompile it.
6. Now go to SystemUI.apk\smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali
• Add this line ,
HTML:
.field mCenterClockLayout:Landroid/widget/LinearLayout;
Like this ,
HTML:
.field private mCarrierLabelVisible:Z
.field mCenterClockLayout:Landroid/widget/LinearLayout;
.field private final mCheckBarModes:Ljava/lang/Runnable;
• Now again , Add this line
HTML:
.field private mShowClock:Z
Like this ,
HTML:
.field private mShowCarrierInPanel:Z
.field private mShowClock:Z
.field private mShowSearchHoldoff:I
7. Now find this method ,
HTML:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
• Now find these lines in this method ,
HTML:
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f070052
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarContents:Landroid/widget/LinearLayout;
move-object/from16 v0, p0
• Now copy these lines and paste it below the lines that you have copied , like this
HTML:
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f070052
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarContents:Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f070052
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarContents:Landroid/widget/LinearLayout;
move-object/from16 v0, p0
• Now replace the second last line of pasted lines with this ,
HTML:
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCenterClockLayout:Landroid/widget/LinearLayout;
• The final will look like this ,
HTML:
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f070052
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarContents:Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f0?????
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCenterClockLayout:Landroid/widget/LinearLayout;
move-object/from16 v0, p0
8. Now replace this id in "PhoneStatusBar.smali" with the id present in public.xml of your SystemUI.apk
0x7f0?????
PHP:
<public type="id" name="center_clock_layout"
9. Now find this method ,
HTML:
.method public showClock(Z)V
• Now delete whole lines between these ,
HTML:
.method public showClock(Z)V
-
-
-
.end method
• Now copy these lines between these ,
HTML:
.locals 10
.prologue
const/4 v9, -0x2
const/4 v1, 0x1
const/4 v2, 0x0
const/16 v4, 0x8
.line 3874
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
if-nez v0, :cond_1
.line 3894
:cond_0
:goto_0
return-void
.line 3875
:cond_1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
.line 3876
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v5, 0x7f07005d
invoke-virtual {v0, v5}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v5
.line 3877
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v6, 0x7f0700db
invoke-virtual {v0, v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v6
.line 3878
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v7, 0x7f0700d8
invoke-virtual {v0, v7}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v7
.line 3879
const-string v0, "status_bar_clock"
invoke-static {v3, v0, v1, v9}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I
move-result v0
if-ne v0, v1, :cond_5
move v0, v1
.line 3882
:goto_1
const-string v8, "statusbar_clock_style"
invoke-static {v3, v8, v2, v9}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I
move-result v8
.line 3885
if-nez v8, :cond_2
if-eqz v5, :cond_2
.line 3886
if-eqz p1, :cond_7
if-eqz v0, :cond_6
move v3, v2
:goto_2
invoke-virtual {v5, v3}, Landroid/view/View;->setVisibility(I)V
.line 3888
:cond_2
if-ne v8, v1, :cond_3
if-eqz v6, :cond_3
.line 3889
if-eqz p1, :cond_9
if-eqz v0, :cond_8
move v1, v2
:goto_3
invoke-virtual {v6, v1}, Landroid/view/View;->setVisibility(I)V
.line 3891
:cond_3
const/4 v1, 0x2
if-ne v8, v1, :cond_0
if-eqz v7, :cond_0
.line 3892
if-eqz p1, :cond_4
if-eqz v0, :cond_4
move v4, v2
:cond_4
invoke-virtual {v7, v4}, Landroid/view/View;->setVisibility(I)V
goto :goto_0
:cond_5
move v0, v2
.line 3879
goto :goto_1
:cond_6
move v3, v4
.line 3886
goto :goto_2
:cond_7
move v3, v4
goto :goto_2
:cond_8
move v1, v4
.line 3889
goto :goto_3
:cond_9
move v1, v4
goto :goto_3
10. Now replace these ids in the above method with the ids present in public.xml of your SystemUI.apk
0x7f07005d
PHP:
<public type="id" name="clock"
0x7f0700db
PHP:
<public type="id" name="center_clock"
0x7f0700d8
PHP:
<public type="id" name="left_clock"
11. Now go to SystemUI.apk\smali\com\android\systemui\statusbar\policy\Clock.smali and open it. Now replace the id with the id present in public.xml of your SystemUI.apk
0x7f080009
PHP:
<public type="color" name="status_bar_clock_color"
12. Done , now Recompile your SystemUI.apk and Sign it.
Important Information :
• In step no. 7 , if in these lines
HTML:
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f070052
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarContents:Landroid/widget/LinearLayout;
.line 523 <--------- Like This ----------->
move-object/from16 v0, p0
• The line above line "move-object/from16 v0, p0" is having line like this (may be any no.) , then after the copying and replacing (as mentioned in step 7) , it will look like this.
HTML:
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f070052
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarContents:Landroid/widget/LinearLayout;
.line 523 <--------- 1 ----------->
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f0????? (<public type="id" name="center_clock_layout")
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCenterClockLayout:Landroid/widget/LinearLayout;
.line 523 <--------- 2 ----------->
move-object/from16 v0, p0
• Then in 2nd case , change the line number by adding 1. In this case add 1 to 523 and it will become 524. (If line 524 is already there in smali , then add 2 means 523+2 and so on). the final will look like this ,
HTML:
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f070052
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarContents:Landroid/widget/LinearLayout;
.line 523 <--------- 1 ----------->
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f0????? (<public type="id" name="center_clock_layout")
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/LinearLayout;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCenterClockLayout:Landroid/widget/LinearLayout;
.line 524 <--------- 2 (Changed here)----------->
move-object/from16 v0, p0
• Now follow the above remaining steps given in guide.
Special Thanks To :
1. DU_Flo ROM (Extracted from this ROM)
2. Vanya Melnechenko
3. MAAaD
4. XDA
5. Raj Shekhar (For testing the guide & screenshots)
Click to expand...
Click to collapse
One more amazing work @05Gurpreet bro..
Still got overlap (center clock)
This will work in lollipop? Plase anyone have the smali files for lollipop?
Enviado desde mi LG-D802 mediante Tapatalk
Thanks for the guide
Do you have/know any other for adding network traffic monitor?
renzo090513 said:
This will work in lollipop? Plase anyone have the smali files for lollipop?
Enviado desde mi LG-D802 mediante Tapatalk
Click to expand...
Click to collapse
Is working on my Galaxy J5 running lollipop 5.1.1. I have used the files from OP.
Thank you @05Gurpreet for these awesome guides.
Not working is android 4.4.2. Error
Related
Hi guys,
I would like to share a Mod/Animations that I ported from PAC man ROM.. This will enable a IME(Keyboard) Animations and you will be able to test them and change them on the fly!!
This was originally done on the VZW NOTE 2, if you wish to use my files for another phone/brand go right ahead, just PLEASE credit the people i did!
What exatcly does this mod do?
Click to expand...
Click to collapse
This mod will enable your keyboard to have all different types of Enter and Exit Animations, along with different animations for the Interpolator and speed of the animation..
Here is a video of what I mean..
I started looking into this bc I thought it was a pretty cool feature. I want to remind you that this is NOT my work. I DID NOT create these animations..All I did was port them over to TW 4.3 to make them work:laugh:
Anyone is able to use this mod, just please give proper credit to Devs of PAC Man ROM & Xylon ROM, @zst123 for open source XUI MOD Xposed Module and me if you want
ALSO I want to give a BIG THANKS to:
@dwitherell - for always being there to help and for a sounding bored (LOLLL)
@Deckoz2302 - you already know
@Stryke_the_Orc - logcat thread and a 2nd eye
And too everyone else whos guides I've used to teach me and all the things I know now and am planning to learn along the way
WARNING!!! THIS IS GUIDE IS NOT FOR NOVICE USERS/MODDERS/THEMERS ETC...THERE ARE A LOT OF EDITS IN RES FOLDERS AND SMALI!! IF YOU GET STOCK PLEASE PLEASE POST A LOG OR THE ERROR! I WILL TRY TO BE AS NOOB FRIENDLY AS POSSIBLE BUT THIS IS NOT A NOOB GUIDE/MOD!
PS:This guide may not be PERFECT.. There maybe somethings that I added that this mod may not need..or use.. But i added them for the sake of not missing anything..So if you see something and are like "Why did he add those ids, strings, layouts etc" WHATEVER..Just ignore it or don't use them.. I will try to be as accurate as possible.
So let's begin..
What you'll need:
Note Pad++
Apktool and knowledge on how to read errors
framework-res.apk
SecSettings.apk
framework.jar
PATIENCE
Let's start with SecSettings, decompile it goto res/values..
strings.xml add these:
Code:
<string name="listview_off">Off</string>
<string name="listview_wave_left">Wave (Left)</string>
<string name="listview_wave_right">Wave (Right)</string>
<string name="listview_alpha">Alpha</string>
<string name="listview_scale">Scale</string>
<string name="listview_stack_top">Stack (Top)</string>
<string name="listview_stack_bottom">Stack (Bottom)</string>
<string name="listview_unfold">Unfold</string>
<string name="listview_fold">Fold</string>
<string name="listview_translate_left">Translate (Left)</string>
<string name="listview_translate_right">Translate (Right)</string>
<string name="listview_accelerate_interpolator">Accelerate</string>
<string name="listview_decelerate_interpolator">Decelerate</string>
<string name="listview_accelerate_decelerate_interpolator">Accelerate/Decelerate</string>
<string name="listview_anticipate_interpolator">Anticipate</string>
<string name="listview_overshoot_interpolator">Overshoot</string>
<string name="listview_anticipate_overshoot_interpolator">Anticipate/Overshoot</string>
<string name="listview_bounce_interpolator">Bounce</string>
<string name="listview_cycle_interpolator">Cycle</string>
<string name="listview_linear_interpolator">Linear</string>
<string name="animation_default">Default</string>
<string name="animation_fade">Fade</string>
<string name="animation_slide_right">Slide in right</string>
<string name="animation_slide_left">Slide in left</string>
<string name="animation_slide_right_no_fade">Slide in right (No fade)</string>
<string name="animation_slide_left_no_fade">Slide in left (No fade)</string>
<string name="animation_slide_up">Slide in bottom</string>
<string name="animation_slide_down">Slide in top</string>
<string name="animation_translucent">Translucent</string>
<string name="animation_grow_shrink">Grow in (Top)</string>
<string name="animation_grow_shrink_center">Grow in (Center)</string>
<string name="animation_grow_shrink_bottom">Grow in (Bottom)</string>
<string name="animation_grow_shrink_left">Grow in (Left)</string>
<string name="animation_grow_shrink_right">Grow in (Right)</string>
<string name="ime_animation_title">IME animations</string>
<string name="ime_animation_summary">Set keyboard animations</string>
<string name="ime_animation_test_title">Test IME Animation Here</string>
<string name="ime_enter_animation_title">Enter Animation</string>
<string name="ime_exit_animation_title">Exit Animation</string>
<string name="ime_interpolator_title">Interpolator</string>
<string name="ime_duration_title">IME Duration</string>
<string name="animation_duration_title">Animation duration</string>
<string name="animation_duration_summary">Set duration</string>
<string name="animation_settings_reset_message">Reset all animation settings to default?</string>
Save..
ids.xml add these:
Code:
<item type="id" name="seekBarPrefUnitsRight">false</item>
<item type="id" name="seekBarPrefValue">false</item>
<item type="id" name="seekBarPrefUnitsLeft">false</item>
<item type="id" name="seekBarPrefBarContainer">false</item>
Save..
arrays.xml add these:
Code:
<string-array name="listview_animation_entries">
<item [user=251364]@Str[/user]ing/listview_off</item>
<item [user=251364]@Str[/user]ing/listview_wave_left</item>
<item [user=251364]@Str[/user]ing/listview_wave_right</item>
<item [user=251364]@Str[/user]ing/listview_scale</item>
<item [user=251364]@Str[/user]ing/listview_alpha</item>
<item [user=251364]@Str[/user]ing/listview_stack_top</item>
<item [user=251364]@Str[/user]ing/listview_stack_bottom</item>
<item [user=251364]@Str[/user]ing/listview_unfold</item>
<item [user=251364]@Str[/user]ing/listview_fold</item>
<item [user=251364]@Str[/user]ing/listview_translate_left</item>
<item [user=251364]@Str[/user]ing/listview_translate_right</item>
</string-array>
<string-array name="listview_animation_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
</string-array>
<string-array name="listview_interpolator_entries">
<item [user=251364]@Str[/user]ing/listview_off</item>
<item [user=251364]@Str[/user]ing/listview_accelerate_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_decelerate_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_accelerate_decelerate_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_anticipate_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_overshoot_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_anticipate_overshoot_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_bounce_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_cycle_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_linear_interpolator</item>
</string-array>
<string-array name="listview_interpolator_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
</string-array>
<string-array name="anim_controls_entries">
<item [user=251364]@Str[/user]ing/animation_default</item>
<item [user=251364]@Str[/user]ing/animation_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_right</item>
<item [user=251364]@Str[/user]ing/animation_slide_left</item>
<item [user=251364]@Str[/user]ing/animation_slide_right_no_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_left_no_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_up</item>
<item [user=251364]@Str[/user]ing/animation_slide_down</item>
<item [user=251364]@Str[/user]ing/animation_translucent</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_center</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_bottom</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_left</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_right</item>
</string-array>
<string-array name="anim_controls_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
<item>11</item>
<item>12</item>
<item>13</item>
</string-array>
Save..
attrs.xml add these:
Code:
<attr name="interval" format="integer" />
<attr name="unitsLeft" format="reference|string" />
<attr name="unitsRight" format="reference|string" />
<attr name="maximum" format="integer" />
<attr name="minimum" format="integer" />
Save..
Now go to res/xml/ and where ever you want to add the preference screen to change the animations.. I added it to a xml that we (N3bula) have specifically for keyboard mods..Add this line
Code:
<PreferenceScreen android:title= [user=251364]@Str[/user]ing/ime_animation_title" android:key="interface_animation_scroll" android:summary= [user=251364]@Str[/user]ing/ime_animation_summary" android:fragment="com.android.settings.pac.KeyboardAnimationInterfaceSettings" />
Goto android/settings/SubSettings.smali
Search
Code:
.method public constructor
add this below .end method
Code:
.method private popFragment()Z
.locals 2
.prologue
.line 46
invoke-virtual {p0}, Lcom/android/settings/SubSettings;->getFragmentManager()Landroid/app/FragmentManager;
move-result-object v0
.line 47
.local v0, "fm":Landroid/app/FragmentManager;
invoke-virtual {v0}, Landroid/app/FragmentManager;->getBackStackEntryCount()I
move-result v1
if-lez v1, :cond_0
.line 48
invoke-virtual {v0}, Landroid/app/FragmentManager;->popBackStack()V
.line 49
const/4 v1, 0x1
.line 51
:goto_0
return v1
:cond_0
const/4 v1, 0x0
goto :goto_0
.end method
Then search
Code:
# virtual methods
Add this below it:
Code:
.method protected isValidFragment(Ljava/lang/String;)Z
.locals 3
.param p1, "fragmentName" # Ljava/lang/String;
.prologue
.line 41
const-string v0, "SubSettings"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "Launching fragment "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 42
const/4 v0, 0x1
return v0
.end method
Find
Code:
.method public onNavigateUp()Z
Add blue:
Code:
.method public onNavigateUp()Z
.locals 1
.prologue
.line 27
[COLOR="Blue"]invoke-direct {p0}, Lcom/android/settings/SubSettings;->popFragment()Z
move-result v0
if-nez v0, :cond_0
[/COLOR]
invoke-virtual {p0}, Lcom/android/settings/SubSettings;->finish()V
.line 28
[COLOR="blue"]:cond_0[/COLOR]
const/4 v0, 0x1
return v0
.end method
Now extract the zip below and add all the contents to their respected folders..
SecSettings.zip
Once you have them in place compile the apk, then decompile it so you can pull your new public id's in res/values/public.xml
Here is my public.xml please go through all the smali you added and search for all the 0x7******* (public ids) When you find one search my public.xml for it, find the name, then search your NEW public.xml for that name and id. Then change the id to YOUR NEW ONE. (Please if you don't understand how to do this, then this mod is NOT for you..either that or you need to search and find out what I am talking about. I will not post every id with the name bc there are A LOT)
Now moving on, framework-res.apk, decompile it...go to res/arrays add these..
Code:
<string-array name="anim_controls_entries">
<item [user=251364]@Str[/user]ing/animation_default</item>
<item [user=251364]@Str[/user]ing/animation_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_right</item>
<item [user=251364]@Str[/user]ing/animation_slide_left</item>
<item [user=251364]@Str[/user]ing/animation_slide_right_no_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_left_no_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_up</item>
<item [user=251364]@Str[/user]ing/animation_slide_down</item>
<item [user=251364]@Str[/user]ing/animation_translucent</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_center</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_bottom</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_left</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_right</item>
</string-array>
<string-array name="anim_controls_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
<item>11</item>
<item>12</item>
<item>13</item>
</string-array>
Save..
Then go to res/strings.xml add these:
Code:
<string name="animation_fade">Fade</string>
<string name="animation_slide_right">Slide in right</string>
<string name="animation_slide_left">Slide in left</string>
<string name="animation_slide_right_no_fade">Slide in right (No fade)</string>
<string name="animation_slide_left_no_fade">Slide in left (No fade)</string>
<string name="animation_slide_up">Slide in bottom</string>
<string name="animation_slide_down">Slide in top</string>
<string name="animation_default">Default</string>
<string name="animation_translucent">Translucent</string>
<string name="animation_grow_shrink">Grow in (Top)</string>
<string name="animation_grow_shrink_center">Grow in (Center)</string>
<string name="animation_grow_shrink_bottom">Grow in (Bottom)</string>
<string name="animation_grow_shrink_left">Grow in (Left)</string>
<string name="animation_grow_shrink_right">Grow in (Right)</string>
<string name="action_null">Blank</string>
Save..
Now extract the zip below and add them in their respected folder(s)..
framework-res.zip
Compile it and then decompile it, you will need to generate a new public.xml for framework.jar which is the next step..
Goto POST#2
Now framework.jar..goto android\inputservices\InputMethodSevices.smali..
Now search
Code:
# annotations
add blue:
Code:
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroid/inputmethodservice/InputMethodService$Insets;,
Landroid/inputmethodservice/InputMethodService$InputMethodSessionImpl;,
Landroid/inputmethodservice/InputMethodService$InputMethodImpl;,
[COLOR="Blue"] Landroid/inputmethodservice/InputMethodService$SettingsObserver;[/COLOR]
}
.end annotation
Search
Code:
# instance fields
add these below
Code:
.field private mAnimationDuration:I
.field private mAnimationEnterIndex:I
.field private mAnimationExitIndex:I
.field mHandler:Landroid/os/Handler;
.field private mInterpolatorIndex:I
.field private mSettingsObserver:Landroid/inputmethodservice/InputMethodService$SettingsObserver;
.field private mWindowIme:Landroid/view/Window;
Now search
Code:
.method static synthetic
add this whole .method
Code:
.method static synthetic access$123(Landroid/inputmethodservice/InputMethodService;)V
.locals 0
.param p0, "x0" # Landroid/inputmethodservice/InputMethodService;
.prologue
.line 232
invoke-direct {p0}, Landroid/inputmethodservice/InputMethodService;->updateSettings()V
return-void
.end method
Now search
Code:
.method private sendInputViewShownState()V
Add this above it:
Code:
.method private retrieveAnimation(Z)Landroid/view/animation/Animation;
.locals 6
.param p1, "enter" # Z
.prologue
.line 1709
if-eqz p1, :cond_1
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationEnterIndex:I
:goto_0
invoke-static {v4}, Lcom/android/internal/util/aokp/AwesomeAnimationHelper;->getAnimations(I)[I
move-result-object v1
.line 1710
.local v1, "animArray":[I
if-eqz p1, :cond_2
const/4 v4, 0x1
aget v2, v1, v4
.line 1711
.local v2, "animInt":I
:goto_1
if-nez v2, :cond_3
const/4 v0, 0x0
.line 1718
:cond_0
:goto_2
return-object v0
.line 1709
.end local v1 # "animArray":[I
.end local v2 # "animInt":I
:cond_1
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationExitIndex:I
goto :goto_0
.line 1710
.restart local v1 # "animArray":[I
:cond_2
const/4 v4, 0x0
aget v2, v1, v4
goto :goto_1
.line 1712
.restart local v2 # "animInt":I
:cond_3
invoke-static {p0, v2}, Landroid/view/animation/AnimationUtils;->loadAnimation(Landroid/content/Context;I)Landroid/view/animation/Animation;
move-result-object v0
.line 1713
.local v0, "anim":Landroid/view/animation/Animation;
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mInterpolatorIndex:I
invoke-static {p0, v4}, Lcom/android/internal/util/aokp/AwesomeAnimationHelper;->getInterpolator(Landroid/content/Context;I)Landroid/view/animation/Interpolator;
move-result-object v3
.line 1714
.local v3, "intplr":Landroid/view/animation/Interpolator;
if-eqz v3, :cond_4
invoke-virtual {v0, v3}, Landroid/view/animation/Animation;->setInterpolator(Landroid/view/animation/Interpolator;)V
.line 1715
:cond_4
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationDuration:I
if-lez v4, :cond_0
.line 1716
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationDuration:I
int-to-long v4, v4
invoke-virtual {v0, v4, v5}, Landroid/view/animation/Animation;->setDuration(J)V
goto :goto_2
.end method
Next search:
Code:
# virtual methods
.method doFinishInput()V
Add this above it:
Code:
.method private updateSettings()V
.locals 4
.prologue
const/4 v3, 0x0
.line 413
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "animation_ime_enter"
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
iput v1, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationEnterIndex:I
.line 415
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "animation_ime_exit"
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
iput v1, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationExitIndex:I
.line 417
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "animation_ime_interpolator"
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
iput v1, p0, Landroid/inputmethodservice/InputMethodService;->mInterpolatorIndex:I
.line 419
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "animation_ime_duration"
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
.line 421
.local v0, "temp":I
mul-int/lit8 v1, v0, 0xf
iput v1, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationDuration:I
.line 422
return-void
.end method
Now search
Code:
.method initViews()V
Add whats is in blue:
Code:
sget-object v0, Landroid/R$styleable;->InputMethodService:[I
invoke-virtual {p0, v0}, Landroid/inputmethodservice/InputMethodService;->obtainStyledAttributes([I)Landroid/content/res/TypedArray;
move-result-object v0
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mThemeAttrs:Landroid/content/res/TypedArray;
.line 1082
iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mInflater:Landroid/view/LayoutInflater;
const v1, 0x1090063
invoke-virtual {v0, v1, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v0
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
.line 776
[COLOR="Blue"]iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
const/16 v1, 0x300
invoke-virtual {v0, v1}, Landroid/view/View;->setSystemUiVisibility(I)V[/COLOR]
.line 778
iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
iget-object v1, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
invoke-virtual {v0, v1}, Landroid/inputmethodservice/SoftInputWindow;->setContentView(Landroid/view/View;)V
.line 1085
iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
invoke-virtual {v0}, Landroid/view/View;->getViewTreeObserver()Landroid/view/ViewTreeObserver;
Next search:
Code:
const-string v1, "fancy_ime_animations"
should be just a few lines down
Add blue
Code:
const-string v1, "fancy_ime_animations"
invoke-static {v0, v1, v2}, Landroid/provider/Settings$Global;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-eqz v0, :cond_0
.line 782
[COLOR="blue"]iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
invoke-virtual {v0}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v0
const v1, 0x1030201
invoke-virtual {v0, v1}, Landroid/view/Window;->setWindowAnimations(I)V
[/COLOR]
.line 785
:cond_0
iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
const v1, 0x1020351
invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/view/ViewGroup;
Search
Code:
const-string v0, "KOR"
Add blue above like this:
Code:
invoke-virtual {v0, v4}, Landroid/widget/FrameLayout;->setVisibility(I)V
[COLOR="blue"]new-instance v0, Landroid/os/Handler;
invoke-direct {v0}, Landroid/os/Handler;-><init>()V
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mHandler:Landroid/os/Handler;[/COLOR]
.line 1113
const-string v0, "KOR"
const-string v1, "USA"
NOW search
Code:
.method public onCreate()V
Add blue:
Code:
invoke-virtual {v1}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v1
const/high16 v2, 0x1000000
invoke-virtual {v1, v2}, Landroid/view/Window;->addFlags(I)V
.line 1003
:cond_0
[COLOR="blue"] new-instance v0, Landroid/os/Handler;
invoke-direct {v0}, Landroid/os/Handler;-><init>()V
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mHandler:Landroid/os/Handler;
.line 742
new-instance v0, Landroid/inputmethodservice/InputMethodService$SettingsObserver;
iget-object v1, p0, Landroid/inputmethodservice/InputMethodService;->mHandler:Landroid/os/Handler;
invoke-direct {v0, p0, v1}, Landroid/inputmethodservice/InputMethodService$SettingsObserver;-><init>(Landroid/inputmethodservice/InputMethodService;Landroid/os/Handler;)V
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mSettingsObserver:Landroid/inputmethodservice/InputMethodService$SettingsObserver;
.line 743
iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mSettingsObserver:Landroid/inputmethodservice/InputMethodService$SettingsObserver;
invoke-virtual {v0}, Landroid/inputmethodservice/InputMethodService$SettingsObserver;->observe()V[/COLOR]
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->initViews()V
.line 1004
iget-object v1, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
invoke-virtual {v1}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v1
const/4 v2, -0x1
const/4 v3, -0x2
invoke-virtual {v1, v2, v3}, Landroid/view/Window;->setLayout(II)V
.line 1016
[COLOR="blue"] iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
invoke-virtual {v0}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v0
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mWindowIme:Landroid/view/Window;
.line 747
invoke-direct {p0}, Landroid/inputmethodservice/InputMethodService;->updateSettings()V[/COLOR]
new-instance v0, Landroid/content/IntentFilter;
invoke-direct {v0}, Landroid/content/IntentFilter;-><init>()V
.line 1017
.local v0, "filter":Landroid/content/IntentFilter;
const-string v1, "RequestAxT9Info"
invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 1018
const-string v1, "com.samsung.axt9info.close"
invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 1023
iget-object v1, p0, Landroid/inputmethodservice/InputMethodService;->mBR:Landroid/content/BroadcastReceiver;
invoke-virtual {p0, v1, v0}, Landroid/inputmethodservice/InputMethodService;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
.line 1024
const-string v1, "InputMethodService"
const-string v2, "mBR.registerReceiver()"
invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 1054
return-void
.end method
Search
Code:
.method public onWindowHidden()V
Replace whole method with this:
Code:
.method public onWindowHidden()V
.locals 6
.prologue
.line 1669
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationExitIndex:I
if-nez v4, :cond_1
.line 1670
iget-object v4, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
invoke-virtual {v4}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v4
const v5, 0x1030056
invoke-virtual {v4, v5}, Landroid/view/Window;->setWindowAnimations(I)V
.line 1706
:cond_0
:goto_0
return-void
.line 1673
:cond_1
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getWindow()Landroid/app/Dialog;
move-result-object v1
.line 1674
.local v1, "dialog":Landroid/app/Dialog;
invoke-virtual {v1}, Landroid/app/Dialog;->getWindow()Landroid/view/Window;
move-result-object v4
iput-object v4, p0, Landroid/inputmethodservice/InputMethodService;->mWindowIme:Landroid/view/Window;
.line 1675
iget-object v4, p0, Landroid/inputmethodservice/InputMethodService;->mWindowIme:Landroid/view/Window;
const/4 v5, -0x1
invoke-virtual {v4, v5}, Landroid/view/Window;->setWindowAnimations(I)V
.line 1677
new-instance v2, Landroid/os/Handler;
invoke-direct {v2}, Landroid/os/Handler;-><init>()V
.line 1678
.local v2, "handler":Landroid/os/Handler;
new-instance v3, Landroid/inputmethodservice/InputMethodService$4;
invoke-direct {v3, p0, v1}, Landroid/inputmethodservice/InputMethodService$4;-><init>(Landroid/inputmethodservice/InputMethodService;Landroid/app/Dialog;)V
.line 1685
.local v3, "runnable":Ljava/lang/Runnable;
const/4 v4, 0x0
invoke-direct {p0, v4}, Landroid/inputmethodservice/InputMethodService;->retrieveAnimation(Z)Landroid/view/animation/Animation;
move-result-object v0
.line 1686
.local v0, "anim":Landroid/view/animation/Animation;
if-eqz v0, :cond_0
.line 1687
new-instance v4, Landroid/inputmethodservice/InputMethodService$5;
invoke-direct {v4, p0, v2, v3, v1}, Landroid/inputmethodservice/InputMethodService$5;-><init>(Landroid/inputmethodservice/InputMethodService;Landroid/os/Handler;Ljava/lang/Runnable;Landroid/app/Dialog;)V
invoke-virtual {v0, v4}, Landroid/view/animation/Animation;->setAnimationListener(Landroid/view/animation/Animation$AnimationListener;)V
.line 1698
invoke-virtual {v1}, Landroid/app/Dialog;->show()V
.line 1699
iget-object v4, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
invoke-virtual {v4, v0}, Landroid/view/View;->startAnimation(Landroid/view/animation/Animation;)V
.line 1700
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationDuration:I
if-lez v4, :cond_2
.line 1701
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationDuration:I
mul-int/lit8 v4, v4, 0x2
int-to-long v4, v4
invoke-virtual {v2, v3, v4, v5}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto :goto_0
.line 1703
:cond_2
const-wide/16 v4, 0x3e8
invoke-virtual {v2, v3, v4, v5}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto :goto_0
.end method
Next search
Code:
.method public onWindowShown()V
Replace whole method with this:
Code:
.method public onWindowShown()V
.locals 4
.prologue
.line 1651
iget v2, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationEnterIndex:I
if-nez v2, :cond_1
.line 1652
iget-object v2, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
invoke-virtual {v2}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v2
const v3, 0x1030056
invoke-virtual {v2, v3}, Landroid/view/Window;->setWindowAnimations(I)V
.line 1662
:cond_0
:goto_0
return-void
.line 1655
:cond_1
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getWindow()Landroid/app/Dialog;
move-result-object v1
.line 1656
.local v1, "dialog":Landroid/app/Dialog;
invoke-virtual {v1}, Landroid/app/Dialog;->getWindow()Landroid/view/Window;
move-result-object v2
iput-object v2, p0, Landroid/inputmethodservice/InputMethodService;->mWindowIme:Landroid/view/Window;
.line 1657
iget-object v2, p0, Landroid/inputmethodservice/InputMethodService;->mWindowIme:Landroid/view/Window;
const/4 v3, -0x1
invoke-virtual {v2, v3}, Landroid/view/Window;->setWindowAnimations(I)V
.line 1658
invoke-virtual {v1}, Landroid/app/Dialog;->show()V
.line 1659
const/4 v2, 0x1
invoke-direct {p0, v2}, Landroid/inputmethodservice/InputMethodService;->retrieveAnimation(Z)Landroid/view/animation/Animation;
move-result-object v0
.line 1660
.local v0, "anim":Landroid/view/animation/Animation;
if-eqz v0, :cond_0
.line 1661
iget-object v2, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
invoke-virtual {v2, v0}, Landroid/view/View;->startAnimation(Landroid/view/animation/Animation;)V
goto :goto_0
.end method
Extract the zip and add them to their respected folder(s):
framework.jar.zip
After that YOUR DONE!!!
Make sure you have compiled everything with YOUR NEW public ids.. Then go head and transfer/flash the files..
REMINDER!! Please post a log/error if you are having problems. I will try to help as much as possible...:good:
#2
Can you give me your public from framework-res?
the_vanya1 said:
Can you give me your public from framework-res?
Click to expand...
Click to collapse
Wish i could. Dont have them at the momment. They are pretty high level resources so you should not need them
I need to know ids for framework.jar
the_vanya1 said:
I need to know ids for framework.jar
Click to expand...
Click to collapse
Did you see my post above? I do not have them, but the resources (ids) in framework.jar are pretty high level, meaning there ahould not be any difference between devices. Have you tried to compile and test it with the ones present above?
Code:
E/AndroidRuntime( 1726): FATAL EXCEPTION: main
E/AndroidRuntime( 1726): Process: com.android.settings, PID: 1726
E/AndroidRuntime( 1726): java.lang.NoClassDefFoundError: com.android.internal.util.aokp.AwesomeAnimationHelper
E/AndroidRuntime( 1726): at com.android.settings.pac.KeyboardAnimationInterfaceSettings.onCreate(KeyboardAnimationInterfaceSettings.java:74)
E/AndroidRuntime( 1726): at android.app.Fragment.performCreate(Fragment.java:1678)
E/AndroidRuntime( 1726): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:859)
E/AndroidRuntime( 1726): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1062)
E/AndroidRuntime( 1726): at android.app.BackStackRecord.run(BackStackRecord.java:698)
E/AndroidRuntime( 1726): at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1447)
E/AndroidRuntime( 1726): at android.app.Activity.performStart(Activity.java:5273)
E/AndroidRuntime( 1726): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2311)
E/AndroidRuntime( 1726): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
E/AndroidRuntime( 1726): at android.app.ActivityThread.access$800(ActivityThread.java:151)
E/AndroidRuntime( 1726): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
E/AndroidRuntime( 1726): at android.os.Handler.dispatchMessage(Handler.java:110)
E/AndroidRuntime( 1726): at android.os.Looper.loop(Looper.java:193)
E/AndroidRuntime( 1726): at android.app.ActivityThread.main(ActivityThread.java:5292)
E/AndroidRuntime( 1726): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1726): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 1726): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
E/AndroidRuntime( 1726): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
E/AndroidRuntime( 1726): at dalvik.system.NativeStart.main(Native Method)
the_vanya1 said:
Code:
E/AndroidRuntime( 1726): FATAL EXCEPTION: main
E/AndroidRuntime( 1726): Process: com.android.settings, PID: 1726
E/AndroidRuntime( 1726): java.lang.NoClassDefFoundError: com.android.internal.util.aokp.AwesomeAnimationHelper
E/AndroidRuntime( 1726): at com.android.settings.pac.KeyboardAnimationInterfaceSettings.onCreate(KeyboardAnimationInterfaceSettings.java:74)
E/AndroidRuntime( 1726): at android.app.Fragment.performCreate(Fragment.java:1678)
E/AndroidRuntime( 1726): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:859)
E/AndroidRuntime( 1726): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1062)
E/AndroidRuntime( 1726): at android.app.BackStackRecord.run(BackStackRecord.java:698)
E/AndroidRuntime( 1726): at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1447)
E/AndroidRuntime( 1726): at android.app.Activity.performStart(Activity.java:5273)
E/AndroidRuntime( 1726): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2311)
E/AndroidRuntime( 1726): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
E/AndroidRuntime( 1726): at android.app.ActivityThread.access$800(ActivityThread.java:151)
E/AndroidRuntime( 1726): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
E/AndroidRuntime( 1726): at android.os.Handler.dispatchMessage(Handler.java:110)
E/AndroidRuntime( 1726): at android.os.Looper.loop(Looper.java:193)
E/AndroidRuntime( 1726): at android.app.ActivityThread.main(ActivityThread.java:5292)
E/AndroidRuntime( 1726): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1726): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 1726): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
E/AndroidRuntime( 1726): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
E/AndroidRuntime( 1726): at dalvik.system.NativeStart.main(Native Method)
Click to expand...
Click to collapse
aokp.AwesomeAnimationHelper
Did you add this directory and smali?
yes, sir (im in cm 11)
the_vanya1 said:
yes, sir (im in cm 11)
Click to expand...
Click to collapse
Check here I think I posted it
Edit: disregard that settings publics. Not sure what to tell ya bud.
thx, sir. Success
excuse me,,, can i get your public.xml framework-res? .. so that I can match the public id proper and suitable..
thanks before
sorry for my bad english
qoejohn said:
excuse me,,, can i get your public.xml framework-res? .. so that I can match the public id proper and suitable..
thanks before
sorry for my bad english
Click to expand...
Click to collapse
I do not have access to them anymore.. You should not even need them if I remember correctly..
lacoursiere18 said:
I do not have access to them anymore.. You should not even need them if I remember correctly..
Click to expand...
Click to collapse
ok...thanks sir
Nice. Hope we can see more guides from you.
There is a framework's id in NEWSeekBarPreference.smali (settings smali) I am not sure whether this needs to be matched or as you said not required?
const v4, 0x1020016
HOW TO PORT JB 4.2 TAB AND GRID 27 LIDROID TOGGLES
FOR MTK / STOK BASE / NON CM / JB 4.2 /JB 4.3 / KK
So this time, I want to share how to port Tab n Grid Lidroid toggle for Jelly Bean 4.2 +. : MTK / STOK BASE / NON CM / JB 4.2 / JB 4.3 / KK
do not try this on CM Base rom, or you will ended with SystemUI force closes :laugh::fingers-crossed:
Credit & Thank you very much , to
- Recognized contributor @BOND1987
- Denny Mbol , Device Lenovo a316i MTK 6572
- CyanogenMod
- Recognized Developer/themer @serajr for some toggles created by him and His tabbed SystemUI codes
- [Unofficial Community] Galaxy Wonder CyanogenMod Indonesia
so we are going to port 27 Grid Lidroid toggles and its settings observer :
1. ( - Sleep, Airplane, -Recent Apps, System settings, Brightness, User (contact profile ), -Reboot action, -Shutdown action, -Bluetoth, -GPS, -Flashlight, -Lockscreen, -MobileData, -Orientation, -ScreenTimeOut, -Sound, -Sync, -Wi-fi, -Wi-fi Hotspot, Battery info, USB Connection mode, USB Debugging, PlayPause, Next track, Previous track, Network mode 2G/3G, Stay awake )
2.Settings observer to chose How many Toggles per row
ok lets go to Guide:
first of all need some requirement for this MOD-GUIDE
REQUIREMENT:
- BRAIN
- Patient
- experience
- Know how to decompile/recompiling Apk file
- Know how to decompile/recompiling jar Apk file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else
I am going to divide this thread into two different Guide :
- First guide is for you who already have Tabbed systemui or a working two layout,.
because we are going to put the Grid toggle in your second layout.
- Second guide is for you who don't have tabbed SystemUI
1. FIRST GUIDE ( ONLY FOR YOU WHO ALREADY HAVE TABBED SYSTEMUI OR A WORKING TWO LAYOUT
2. THE SECOND GUIDE ( ONLY FOR YOU WHO DON'T HAVE TABBED SYSTEMUI OR A WORKING TWO LAYOUT YET
FIRST GUIDE
STEP -1
Decompile your systemUI
add this line in your Second tab layout
Code:
<com.adi.systemui.powerwidget.PowerWidget android:id="@id/adi_widget" android:layout_width="fill_parent" android:layout_height="wrap_content" />
FIRST GUIDE
Step -2
STEP -2
SystemUI.apk/res/values/arrays.xml
add the red line to end of it before </resources>
Code:
[COLOR="Red"]<string-array name="shutdown_reboot_options">
<item>@string/reboot</item>
<item>@string/reboot_recovery</item>
<item>@string/reboot_download</item>
</string-array>
<string-array name="shutdown_reboot_actions">
<item></item>
<item>recovery</item>
<item>download</item>
</string-array>
<string-array name="usb_connection_mode_options">
<item>@string/usb_mpt_mode</item>
<item>@string/usb_msc_mode</item>
</string-array>
<string-array name="usb_connection_mode_actions">
<item>mtp</item>
<item>mass_storage</item>
</string-array>
<string-array name="battery_info_options">
<item>@string/battery_info_info</item>
<item>@string/battery_info_usage</item>
</string-array>
<string-array name="battery_info_actions">
<item>battery_info</item>
<item>battery_usage</item>
</string-array>[/COLOR]
</resources>
SystemUI.apk/res/values/colors.xml
add the red line to end of it before </resources>
Code:
[COLOR="Red"]<color name="tab_text_color_off">#ffffffff</color>
<color name="tab_text_color_on">#ff33b5e5</color>[/COLOR]
</resources>
SystemUI.apk/res/values/dimens.xml
add the red line to end of it before </resources>
Code:
[COLOR="Red"]<dimen name="power_widget_button_height">107.0dip</dimen>
<dimen name="power_widget_tabs_height">48.0dip</dimen>[/COLOR]
</resources>
SystemUI.apk/res/values/ids.xml
add the red line to end of it before </resources>
Code:
[COLOR="Red"]<item type="id" name="adi_widget">false</item>
<item type="id" name="power_widget_button_text">false</item>
<item type="id" name="power_widget_button_indic">false</item>
<item type="id" name="power_widget_button">false</item>
<item type="id" name="power_widget_button_image">false</item>
<item type="id" name="flip_to_power_widget_button">false</item>
<item type="id" name="flip_to_notifications_button">false</item>
<item type="id" name="power_widget_contents">false</item>
<item type="id" name="expanded_flipper">false</item>
<item type="id" name="power_widget_me_profile_button">false</item>
<item type="id" name="notifications_tab_contents">false</item>
<item type="id" name="show_hide_gemini_carrier">false</item>[/COLOR]
</resources>
SystemUI.apk/res/values/integers.xml
add the red line to end of it before </resources>
Code:
[COLOR="Red"]<integer name="quickpanel_scroll_threshold_port">5</integer>
<integer name="quickpanel_scroll_threshold_land">8</integer>[/COLOR]
</resources>
SystemUI.apk/res/values/strings.xml
add the red line to end of it before </resources>
Code:
[COLOR="Red"]<string name="quickpanel_wifi_text">Wi-Fi</string>
<string name="quickpanel_dc_text">Data</string>
<string name="quickpanel_network_mode_text">Network</string>
<string name="quickpanel_sound_text">Sound</string>
<string name="quickpanel_sound_vibration_text">Ring.vibrate</string>
<string name="quickpanel_silent_text">Silent</string>
<string name="quickpanel_vibration_text">Vibration</string>
<string name="quickpanel_rotation_text">Rotation</string>
<string name="quickpanel_bluetooth_text">Bluetooth</string>
<string name="quickpanel_gps_text">GPS</string>
<string name="quickpanel_autosync_text">Auto Sync</string>
<string name="quickpanel_brightness_text">Brightness</string>
<string name="quickpanel_screen_timeout_text">Timeout</string>
<string name="quickpanel_lockscreen_text">Lockscreen</string>
<string name="quickpanel_airplane_text">Flightmode</string>
<string name="quickpanel_flashlight_text">Flashlight</string>
<string name="quickpanel_reboot_text">Reboot</string>
<string name="quickpanel_shutdown_text">Shutdown</string>
<string name="airplane_mode">In Flight mode</string>
<string name="shutdown_confirm">Your phone will shut down.</string>
<string name="screen_timeout_seconds">Screen timeout set to: %d second(s)</string>
<string name="screen_timeout_minutes">Screen timeout set to: %d minute(s)</string>
<string name="screen_timeout_hours">Screen timeout set to: %d hour(s)</string>
<string name="hamster">Phone Options</string>
<string name="yes">OK</string>
<string name="no">Cancel</string>
<string name="reboot">Reboot</string>
<string name="reboot_recovery">Recovery</string>
<string name="reboot_download">Download</string>
<string name="quickpanel_nfc_text">NFC</string>
<string name="quickpanel_wifi_ap_text">Wifi AP</string>
<string name="quickpanel_lockscreen_action_text">Sleep</string>
<string name="quickpanel_androidbeam_text">Android Beam</string>
<string name="brightness_settings_automatic">AUTO</string>
<string name="brightness_settings_title" />
<string name="quickpanel_usb_debugging_text">Debugging</string>
<string name="quickpanel_usb_connection_mode_text">USB Mode</string>
<string name="quickpanel_usb_current_mtp_title">Current mode: MPT</string>
<string name="quickpanel_usb_current_msc_title">Current mode: MSC</string>
<string name="usb_mpt_mode">MPT - Media Transfer</string>
<string name="usb_msc_mode">MSC - Mass Storage</string>
<string name="quickpanel_stay_awake_plugged_text">Stay Awake</string>
<string name="quickpanel_battery_info_text">Battery</string>
<string name="battery_info_info">Battery Information</string>
<string name="battery_info_usage">Battery Power Usage</string>
<string name="quickpanel_playpause_text">Play-Pause</string>
<string name="quickpanel_next_text">Next</string>
<string name="quickpanel_previous_text">Previous</string>
<string name="quickpanel_screenshots_text">Screenshot</string>
<string name="quickpanel_system_settings_text">Settings</string>
<string name="quickpanel_recent_apps_text">Recent</string>
<string name="user_button_label">Me</string>[/COLOR]
</resources>
SystemUI.apk/res/values/styles.xml
add the red line to end of it before </resources>
Code:
[COLOR="Red"]<style name="TextAppearance.PowerWidget" parent="@style/TextAppearance" />
<style name="TextAppearance.PowerWidget.TextStyle" parent="@style/TextAppearance.PowerWidget">
<item name="android:textSize">12.0dip</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">#ffcccccc</item>
<item name="android:ellipsize">marquee</item>
<item name="android:paddingLeft">6.0dip</item>
<item name="android:paddingRight">6.0dip</item>
<item name="android:fadingEdge">horizontal</item>
<item name="android:maxLines">2</item>
<item name="android:singleLine">false</item>
<item name="android:drawablePadding">12.0dip</item>
<item name="android:textAllCaps">true</item>
</style>[/COLOR]
</resources>
FIRST GUIDE
Step -3
STEP - 3
- Download attached Grid_lidroid_JB.4.2+_SystemUI.apk, exstract it and merge to your decompiled SystemUI.apk
- Recompile your SystemUI.apk
- Decompile the newly Recompiled APK again
Next go to
res/values/public.xml
open it with Notepad++
leave it, but keep it open
- smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
add the red lines :
Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
[COLOR="Red"]Lcom/android/systemui/statusbar/phone/PhoneStatusBar$PowerWidgetRowObserver;,[/COLOR]
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$ApplicationGuideDialog;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$FastColorDrawable;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$H;
}
.end annotation
Code:
.field mPixelFormat:I
.field private mPlmnLabel:Landroid/widget/TextView;
.field mPositionTmp:[I
.field mPostCollapseCleanup:Ljava/lang/Runnable;
[COLOR="Red"].field mPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;[/COLOR]
.field mPowerWidgetContents:Landroid/view/View;
.field private mPreviousConfigFontScale:F
.field private mPrevioutConfigOrientation:I
.field mQS:Lcom/android/systemui/statusbar/phone/QuickSettings;
Code:
return-void
.end method
[COLOR="Red"].method static synthetic access$19900(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
.locals 0
.parameter "x0"
.prologue
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setUpPowerWidgetPerRow()V
return-void
.end method[/COLOR]
.method static synthetic access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)I
.locals 1
.parameter "x0"
.prologue
.line 128
iget v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mCurrentUserId:I
return v0
.end method
.method static synthetic access$100(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)Z
.locals 1
.parameter "x0"
.prologue
.line 128
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mUserSetup:Z
return v0
.end method
Code:
.line 2216
.local v0, a:Landroid/animation/Animator;
:goto_0
invoke-virtual {v0}, Landroid/animation/Animator;->start()V
.line 2218
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setAreThereNotifications()V
.line 2219
return-void
.line 2215
.end local v0 #a:Landroid/animation/Animator;
:cond_1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mLightsOnAnimation:Landroid/animation/Animator;
goto :goto_0
.end method
[COLOR="Red"].method private setUpPowerWidgetPerRow()V
.locals 7
.prologue
.line 939
const/4 v0, 0x3
.line 940
.local v0, defaultPreferenceValue:I
const/4 v4, -0x1
.line 945
.local v4, value:I
:try_start_0
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v5}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v5
const-string v6, "toggles_per_row"
invoke-static {v5, v6, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
move-result v4
.line 954
:goto_0
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;
.line 955
.local v3, finalPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;
move v2, v4
.line 956
.local v2, finalGridLayout:I
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
new-instance v6, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$999;
invoke-direct {v6, p0, v3, v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$999;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Lcom/adi/systemui/powerwidget/PowerWidget;I)V
invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->post(Ljava/lang/Runnable;)Z
.line 966
return-void
.line 947
.end local v2 #finalGridLayout:I
.end local v3 #finalPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;
:catch_0
move-exception v1
.line 949
.local v1, e:Ljava/lang/Exception;
invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_0
.end method
.method private setupPowerWidget()V
.locals 2
.prologue
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v1, [COLOR="Blue"]0x7f08012a[/COLOR]
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Lcom/adi/systemui/powerwidget/PowerWidget;
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;
invoke-virtual {v0}, Lcom/adi/systemui/powerwidget/PowerWidget;->updateWidget()V
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setUpPowerWidgetPerRow()V
return-void
.end method[/COLOR]
.method private showAlwaysAskOrInternetCall(J)V
.locals 3
.parameter "simId"
.prologue
const/4 v2, 0x0
.line 3231
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSimIndicatorIconShow:Z
.line 3232
const-wide/16 v0, -0x2
cmp-long v0, p1, v0
if-nez v0, :cond_0
.line 3233
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSimIndicatorIcon:Landroid/widget/ImageView;
const v1, 0x7f020137
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundResource(I)V
change this, 0x7f08012a according to the value you got in your own public.xml
Code:
<public type="id" name="adi_widget" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
Next, search this method
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
scroll down in that method and add the red line
Code:
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v11, v1, v12}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
.line 772
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->resetUserSetupObserver()V
[COLOR="Red"] invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupPowerWidget()V[/COLOR]
.line 774
new-instance v20, Landroid/content/IntentFilter;
invoke-direct/range {v20 .. v20}, Landroid/content/IntentFilter;-><init>()V
.line 775
.local v20, simInfoIntentFilter:Landroid/content/IntentFilter;
const-string v1, "android.intent.action.SIM_SETTING_INFO_CHANGED"
NOTE !! if in your device / os
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
doesn't have this line
Code:
move-object/from16 v0, p0
change this line
Code:
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupPowerWidget()V
to like this
Code:
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupPowerWidget()V
Next :
Code:
.method public start()V
.locals 2
.prologue
.line 373
iget-object v0, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
const-string v1, "window"
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/view/WindowManager;
invoke-interface {v0}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;
move-result-object v0
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDisplay:Landroid/view/Display;
.line 376
const-string v0, "dreams"
invoke-static {v0}, Landroid/os/ServiceManager;->checkService(Ljava/lang/String;)Landroid/os/IBinder;
move-result-object v0
invoke-static {v0}, Landroid/service/dreams/IDreamManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/service/dreams/IDreamManager;
move-result-object v0
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDreamManager:Landroid/service/dreams/IDreamManager;
.line 379
invoke-super {p0}, Lcom/android/systemui/statusbar/BaseStatusBar;->start()V
.line 381
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->addNavigationBar()V
[COLOR="Red"]new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$PowerWidgetRowObserver;
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$PowerWidgetRowObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/os/Handler;)V
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$PowerWidgetRowObserver;->observe()V[/COLOR]
.line 386
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;
iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-direct {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;-><init>(Landroid/content/Context;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mIconPolicy:Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;
.line 387
return-void
.end method
FIRST GUIDE
Step - 4
Next : Download attached Grid_and_Tab_JB4.2+_Lidroid_public.zip, and open it with Notepad++
so you have two public.xml now which is opened in the Notepad++
1. secondly decompiled public.xml
2. Grid_and_Tab_JB4.2+_Lidroid_public.xml
- go to , smali/com/adi/systemui/powerwidget/here...
there are a lot of smalis there
FIND ALL IDS in all that smalis THAT'S STARTED WITH
Code:
0x7fxxxxxx
EXAMPLE :
AutoRotateButton.smali
Code:
.method protected getText()I
.locals 1
const v0, [COLOR="Red"]0x7f0b00f9[/COLOR]
return v0
.end method
find this const v0, 0x7f0b00f9 in Grid_and_Tab_JB4.2+_Lidroid_public.xml what is calling for
and we find that is for
Code:
<public type="[COLOR="Red"]string[/COLOR]" name="[COLOR="Red"]quickpanel_rotation_text[/COLOR]" id="[COLOR="Blue"]0x7f0b00f9[/COLOR]" />
the IDS can be for strings, ids, integer, arays, drawable, or layout, so you have to pay attention to this too !!
next go to your own public.xml search for the value you got
Code:
<public type="[COLOR="Red"]string[/COLOR]" name="[COLOR="Red"]quickpanel_rotation_text[/COLOR]" id="[COLOR="Blue"]0x7f0??????[/COLOR]" />
and change the IDS in the smali with your own value
Code:
.method protected getText()I
.locals 1
const v0, [COLOR="Blue"]0x7f0??????[/COLOR]
return v0
.end method
Do it too, to all
Code:
0x7fxxxxxx
in all smalis in the Powerwidget folder.
FIRST GUIDE
Step - 5
- Disable signature check
here : http://forum.xda-developers.com/showthread.php?t=1698352
or in here : http://forum.xda-developers.com/showpost.php?p=47592101&postcount=3
- AndroidManifest.xml
add the red line
Code:
<manifest [COLOR="Red"]android:sharedUserId="android.uid.system" android:process="system"[/COLOR] android:versionCode="17" android:versionName="4.2.2-eng.njdbuild03.1389868812" package="com.android.systemui" coreApp="true"
Code:
<uses-permission android:name="android.permission.ACCESS_ALL_DOWNLOADS" />
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
[COLOR="Red"]<uses-permission android:name="android.permission.REBOOT" />
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />[/COLOR]
<application android:label="@string/app_label" android:icon="@*android:drawable/platlogo" android:allowClearUserData="false" android:persistent="true" android:allowBackup="false">
<service android:name="SystemUIService" android:exported="true" />
<service android:name=".screenshot.TakeScreenshotService" android:exported="false" android:process=":screenshot" />
Code:
<service android:label="@string/jelly_bean_dream_name" android:name=".BeanBagDream" android:enabled="false" android:exported="true">
<intent-filter>
<action android:name="android.service.dreams.DreamService" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</service>
<activity android:theme="@*android:style/Theme.Wallpaper.NoTitleBar" android:label="@string/start_dreams" android:icon="@mipmap/ic_launcher_dreams" android:name=".Somnambulator" android:exported="true" android:excludeFromRecents="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.DESK_DOCK" />
</intent-filter>
</activity>
[COLOR="Red"]<receiver android:name="com.adi.systemui.powerwidget.NetworkModeReceiver" android:process="com.android.phone">
<intent-filter>
<action android:name="com.serajr.powertoggles.POWERTOGGLES_CHANGE_NETWORK_MODE" />
<action android:name="com.serajr.powertoggles.POWERTOGGLES_NEW_NETWORK_MODE" />
</intent-filter>
</receiver>[/COLOR]
</application>
</manifest>
- Done and recompile it , don't forget to sign it,
I ussually use ApkMultitools to decompile/recompile/sign APK
so if you use ApkMultitools, you can use my signer keys
download attached file, exstract it and merge to your ApkMultitools / other / here
- Download Attached Grid_and_Tab_Powerwidget.apk and Torch.apk, push it to your system/app/reboot
- edit your build.prop , to make USB connection mode toggle working properly
Code:
ro.sys.usb.storage.type=mtp[COLOR="Red"],mass_storage[/COLOR]
Additional :
- if the Flashlight toggle force closes, try to use this Torch.apk by raffie_archildz ( Ahmad Rifai ) http://d-h.st/n99
THE SECOND GUIDE ( ONLY FOR YOU WHO DON'T HAVE TABBED SYSTEMUI OR A WORKING TWO LAYOUT YET
STEP -1
Decompile your SystemUI.apk
- Download attached Tab_n_Grid_lidroid_JB.4.2+_SystemUI.apk exstract it and merge to your decompiled systemUI.apk
Next
make change to
- SystemUI.apk/res/layout/gemini_status_bar_expanded.xml
BEFORE
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.NotificationPanelView android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="0.0dip" android:layout_height="wrap_content" 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">
<View android:id="@id/handle" android:background="@drawable/status_bar_close" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height" />
<include android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" android:layout_marginBottom="@dimen/close_handle_height" layout="@layout/gemini_carrier_label" />
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/close_handle_underlap" android:animateLayoutChanges="false">
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
<FrameLayout android:id="@id/toolBarSwitchPanel" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="103.0dip">
<include layout="@layout/toolbar_view" />
<include layout="@layout/toolbar_indicator" />
<include layout="@layout/toolbar_divider" />
</FrameLayout>
<FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
<ViewStub android:id="@id/flip_settings_stub" android:layout="@layout/flip_settings" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:overScrollMode="ifContentScrolls">
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_row_min_height" />
</ScrollView>
</FrameLayout>
</LinearLayout>
</com.android.systemui.statusbar.phone.NotificationPanelView>
AFTER
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.NotificationPanelView android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="0.0dip" android:layout_height="wrap_content" 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">
<View android:id="@id/handle" android:background="@drawable/status_bar_close" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height" />
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<ViewStub android:id="@id/flip_settings_stub" android:layout="@layout/flip_settings" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/notification_panel_header_height" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:animateLayoutChanges="false">
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
<FrameLayout android:id="@id/toolBarSwitchPanel" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="103.0dip">
<include layout="@layout/toolbar_view" />
<include layout="@layout/toolbar_indicator" />
<include layout="@layout/toolbar_divider" />
</FrameLayout>
<ViewFlipper android:id="@id/expanded_flipper" android:layout_width="fill_parent" android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network.EmergencyOnly" android:gravity="center" android:id="@id/emergency_calls_only" android:padding="4.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:overScrollMode="ifContentScrolls">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_row_min_height" />
</LinearLayout>
</ScrollView>
<ImageView android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/title_bar_shadow" android:scaleType="fitXY" />
</FrameLayout>
<include android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/flip_to_expanded_tab_power_widget" />
</ViewFlipper>
</LinearLayout>
<LinearLayout android:layout_gravity="bottom" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/close_handle_underlap">
<include android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" layout="@layout/gemini_carrier_label" />
<include android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="40.0dip" layout="@layout/tabbed_helper" />
</LinearLayout>
</com.android.systemui.statusbar.phone.NotificationPanelView>
NEXT ,
make change to
- SystemUI.apk/res/layout/gemini_carrier_label.xml
REMOVE THE RED LINE
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center" android:layout_gravity="bottom" android:orientation="horizontal" android:id="@id/carrier_label_gemini" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" [COLOR="Red"]android:layout_marginBottom="@dimen/close_handle_height"[/COLOR]
xmlns:android="http://schemas.android.com/apk/res/android">
<com.android.systemui.statusbar.phone.CarrierLabelGemini android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="center" android:id="@id/carrier1" android:paddingLeft="12.0dip" android:paddingRight="12.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
<ImageView android:layout_gravity="center" android:id="@id/carrier_divider" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/gemini_carrier_divider" />
<com.android.systemui.statusbar.phone.CarrierLabelGemini android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="center" android:id="@id/carrier2" android:paddingLeft="12.0dip" android:paddingRight="12.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
<ImageView android:layout_gravity="center" android:id="@id/carrier_divider2" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/gemini_carrier_divider" />
<com.android.systemui.statusbar.phone.CarrierLabelGemini android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="center" android:id="@id/carrier3" android:paddingLeft="12.0dip" android:paddingRight="12.0dip" android:visibility="gone" android:layout_width="0.0dip" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
<ImageView android:layout_gravity="center" android:id="@id/carrier_divider3" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/gemini_carrier_divider" />
<com.android.systemui.statusbar.phone.CarrierLabelGemini android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="center" android:id="@id/carrier4" android:paddingLeft="12.0dip" android:paddingRight="12.0dip" android:visibility="gone" android:layout_width="0.0dip" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
</LinearLayout>
NEXT ,
STEP -2
follow this : http://forum.xda-developers.com/showpost.php?p=53364253&postcount=2
STEP - 3
- Recompile your SystemUI.apk
- Decompile the newly Recompiled APK again
Next go to
res/values/public.xml
open it with Notepad++
leave it, but keep it open
- smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
add the red lines :
Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
[COLOR="Red"]Lcom/android/systemui/statusbar/phone/PhoneStatusBar$PowerWidgetRowObserver;,[/COLOR]
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$ApplicationGuideDialog;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$FastColorDrawable;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$H;
}
.end annotation
Code:
.field private mExpandMinDisplayFraction:F
.field mExpandedContents:Landroid/view/View;
[COLOR="Red"].field mExpandedFlipper:Landroid/widget/ViewFlipper;[/COLOR]
.field mExpandedVisible:Z
.field private mFlingCollapseMinVelocityPx:F
Code:
.field mFlingY:I
.field public mFlipSettingsView:Landroid/view/View;
.field mFlipSettingsViewAnim:Landroid/animation/Animator;
[COLOR="Red"].field mFlipToNotificationsButton:Landroid/view/View;
.field private mFlipToNotificationsButtonListener:Landroid/view/View$OnClickListener;
.field mFlipToPowerWidgetButton:Landroid/view/View;
.field private mFlipToPowerWidgetButtonListener:Landroid/view/View$OnClickListener;[/COLOR]
.field mFocusChangeListener:Landroid/view/View$OnFocusChangeListener;
.field private final mGestureRec:Lcom/android/systemui/statusbar/GestureRecorder;
NEXT
Code:
.field private mPlmnLabel:Landroid/widget/TextView;
.field mPositionTmp:[I
.field mPostCollapseCleanup:Ljava/lang/Runnable;
[COLOR="Red"].field mPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;
.field mPowerWidgetContents:Landroid/view/View;[/COLOR]
.field private mPreviousConfigFontScale:F
Next, add the red line inside this method
Code:
.method public constructor <init>()V
Code:
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$34;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$34;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mMediaEjectBroadcastReceiver:Landroid/content/BroadcastReceiver;
[COLOR="Red"]new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$997;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$997;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToPowerWidgetButtonListener:Landroid/view/View$OnClickListener;
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$998;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$998;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToNotificationsButtonListener:Landroid/view/View$OnClickListener;[/COLOR]
return-void
.end method
.method static synthetic access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)I
.locals 1
.parameter "x0"
.prologue
.line 128
iget v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mCurrentUserId:I
return v0
.end method
Next
Code:
[COLOR="Red"].method static synthetic access$19900(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
.locals 0
.parameter "x0"
.prologue
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setUpPowerWidgetPerRow()V
return-void
.end method[/COLOR]
.method static synthetic access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)I
.locals 1
.parameter "x0"
.prologue
.line 128
iget v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mCurrentUserId:I
return v0
.end method
Next :
Code:
.local v0, a:Landroid/animation/Animator;
:goto_0
invoke-virtual {v0}, Landroid/animation/Animator;->start()V
.line 2218
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setAreThereNotifications()V
.line 2219
return-void
.line 2215
.end local v0 #a:Landroid/animation/Animator;
:cond_1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mLightsOnAnimation:Landroid/animation/Animator;
goto :goto_0
.end method
[COLOR="Red"].method private setUpAllExpandedTabs()V
.locals 2
.prologue
.line 181
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v1, [COLOR="Blue"]0x7f080130[/COLOR]
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v0
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToNotificationsButton:Landroid/view/View;
.line 183
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToNotificationsButton:Landroid/view/View;
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToNotificationsButtonListener:Landroid/view/View$OnClickListener;
invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v1, [COLOR="Blue"]0x7f08012f[/COLOR]
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v0
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToPowerWidgetButton:Landroid/view/View;
.line 191
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToPowerWidgetButton:Landroid/view/View;
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToPowerWidgetButtonListener:Landroid/view/View$OnClickListener;
invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
return-void
.end method
.method private setUpExpandedFlipper()V
.locals 2
.prologue
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v1, [COLOR="Blue"]0x7f080132[/COLOR]
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/ViewFlipper;
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedFlipper:Landroid/widget/ViewFlipper;
return-void
.end method
.method private setUpPowerWidgetPerRow()V
.locals 7
.prologue
.line 939
const/4 v0, 0x3
.line 940
.local v0, defaultPreferenceValue:I
const/4 v4, -0x1
.line 945
.local v4, value:I
:try_start_0
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v5}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v5
const-string v6, "toggles_per_row"
invoke-static {v5, v6, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
move-result v4
.line 954
:goto_0
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;
.line 955
.local v3, finalPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;
move v2, v4
.line 956
.local v2, finalGridLayout:I
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
new-instance v6, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$999;
invoke-direct {v6, p0, v3, v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$999;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Lcom/adi/systemui/powerwidget/PowerWidget;I)V
invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->post(Ljava/lang/Runnable;)Z
.line 966
return-void
.line 947
.end local v2 #finalGridLayout:I
.end local v3 #finalPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;
:catch_0
move-exception v1
.line 949
.local v1, e:Ljava/lang/Exception;
invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_0
.end method
.method private setUpPowerWidgetTabContents()V
.locals 2
.prologue
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v1, [COLOR="Blue"]0x7f080131[/COLOR]
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v0
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidgetContents:Landroid/view/View;
return-void
.end method
.method private setUpselectInitialTab()V
.locals 2
.prologue
.line 69
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToNotificationsButton:Landroid/view/View;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Landroid/view/View;->setSelected(Z)V
return-void
.end method
.method private setupPowerWidget()V
.locals 2
.prologue
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v1, [COLOR="Blue"]0x7f08012a[/COLOR]
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Lcom/adi/systemui/powerwidget/PowerWidget;
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;
invoke-virtual {v0}, Lcom/adi/systemui/powerwidget/PowerWidget;->updateWidget()V
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setUpPowerWidgetPerRow()V
return-void
.end method[/COLOR]
.method private showAlwaysAskOrInternetCall(J)V
.locals 3
.parameter "simId"
.prologue
const/4 v2, 0x0
.line 3231
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSimIndicatorIconShow:Z
.line 3232
const-wide/16 v0, -0x2
cmp-long v0, p1, v0
if-nez v0, :cond_0
Change this lines IDS , according to the value you got in your own public.xml
0x7f080130
Code:
<public type="id" name="flip_to_notifications_button" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
0x7f08012f
Code:
<public type="id" name="flip_to_power_widget_button" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
0x7f080132
Code:
<public type="id" name="expanded_flipper" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
0x7f080131
Code:
<public type="id" name="power_widget_contents" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
0x7f08012a
Code:
<public type="id" name="adi_widget" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
Next, search this method
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
scroll down in that method and add the red line
Code:
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v11, v1, v12}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
.line 772
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->resetUserSetupObserver()V
[COLOR="Red"]invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupPowerWidget()V
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setUpAllExpandedTabs()V
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setUpExpandedFlipper()V
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setUpPowerWidgetTabContents()V
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setUpselectInitialTab()V[/COLOR]
.line 774
new-instance v20, Landroid/content/IntentFilter;
invoke-direct/range {v20 .. v20}, Landroid/content/IntentFilter;-><init>()V
.line 775
.local v20, simInfoIntentFilter:Landroid/content/IntentFilter;
const-string v1, "android.intent.action.SIM_SETTING_INFO_CHANGED"
NOTE !! if in your device / os
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
doesn't have this line
Code:
move-object/from16 v0, p0
change this line
Code:
invoke-direct/range {p0 .. p0},
to like this
Code:
invoke-direct {p0},
Next :
Code:
.method public start()V
.locals 2
.prologue
.line 373
iget-object v0, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
const-string v1, "window"
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/view/WindowManager;
invoke-interface {v0}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;
move-result-object v0
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDisplay:Landroid/view/Display;
.line 376
const-string v0, "dreams"
invoke-static {v0}, Landroid/os/ServiceManager;->checkService(Ljava/lang/String;)Landroid/os/IBinder;
move-result-object v0
invoke-static {v0}, Landroid/service/dreams/IDreamManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/service/dreams/IDreamManager;
move-result-object v0
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDreamManager:Landroid/service/dreams/IDreamManager;
.line 379
invoke-super {p0}, Lcom/android/systemui/statusbar/BaseStatusBar;->start()V
.line 381
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->addNavigationBar()V
[COLOR="Red"]new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$PowerWidgetRowObserver;
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$PowerWidgetRowObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/os/Handler;)V
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$PowerWidgetRowObserver;->observe()V[/COLOR]
.line 386
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;
iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-direct {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;-><init>(Landroid/content/Context;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mIconPolicy:Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;
.line 387
return-void
.end method
Code:
.method protected createHandler()Lcom/android/systemui/statusbar/BaseStatusBar$H;
.locals 2
.prologue
.line 1550
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$H;
const/4 v1, 0x0
invoke-direct {v0, p0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$H;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Lcom/android/systemui/statusbar/phone/PhoneStatusBar$1;)V
return-object v0
.end method
[COLOR="Red"].method public deselectAllTabs()V
.locals 2
.prologue
const/4 v1, 0x0
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToNotificationsButton:Landroid/view/View;
invoke-virtual {v0, v1}, Landroid/view/View;->setSelected(Z)V
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToPowerWidgetButton:Landroid/view/View;
invoke-virtual {v0, v1}, Landroid/view/View;->setSelected(Z)V
return-void
.end method[/COLOR]
.method public disable(I)V
.locals 12
.parameter "state"
.prologue
const/high16 v11, 0x8
const/high16 v10, 0x2
Code:
invoke-virtual {v0}, Lcom/android/systemui/statusbar/toolbar/SimSwitchPanel;->isPanelShowing()Z
move-result v0
if-eqz v0, :cond_7
.line 1791
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mToolBarSwitchPanel:Landroid/view/View;
invoke-virtual {v0, v5}, Landroid/view/View;->setVisibility(I)V
.line 1794
:cond_7
return-void
.line 1754
nop
:array_0
.array-data 0x4
0x0t 0x0t 0x0t 0x0t
0x0t 0x0t 0x80t 0x3ft
.end array-data
.line 1760
:array_1
.array-data 0x4
0x0t 0x0t 0x80t 0x3ft
0x0t 0x0t 0x0t 0x0t
.end array-data
.end method
[COLOR="Red"].method flipToNotificationsMod()V
.locals 3
.prologue
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedContents:Landroid/view/View;
.line 2259
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedFlipper:Landroid/widget/ViewFlipper;
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
const v2, [COLOR="Blue"]0x7f050016[/COLOR]
invoke-virtual {v0, v1, v2}, Landroid/widget/ViewFlipper;->setInAnimation(Landroid/content/Context;I)V
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
const v2, [COLOR="Blue"]0x7f050017[/COLOR]
invoke-virtual {v0, v1, v2}, Landroid/widget/ViewFlipper;->setOutAnimation(Landroid/content/Context;I)V
const/4 v2, 0x0
invoke-virtual {v0, v2}, Landroid/widget/ViewFlipper;->setDisplayedChild(I)V
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->deselectAllTabs()V
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToNotificationsButton:Landroid/view/View;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Landroid/view/View;->setSelected(Z)V
return-void
.end method
.method flipToPowerWidget()V
.locals 3
.prologue
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidgetContents:Landroid/view/View;
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedContents:Landroid/view/View;
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;
invoke-virtual {v0}, Lcom/adi/systemui/powerwidget/PowerWidget;->fullScroll()V
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedFlipper:Landroid/widget/ViewFlipper;
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
const v2, [COLOR="Blue"]0x7f050016[/COLOR]
invoke-virtual {v0, v1, v2}, Landroid/widget/ViewFlipper;->setInAnimation(Landroid/content/Context;I)V
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
const v2, [COLOR="Blue"]0x7f050017[/COLOR]
invoke-virtual {v0, v1, v2}, Landroid/widget/ViewFlipper;->setOutAnimation(Landroid/content/Context;I)V
const/4 v2, 0x1
invoke-virtual {v0, v2}, Landroid/widget/ViewFlipper;->setDisplayedChild(I)V
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->deselectAllTabs()V
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToPowerWidgetButton:Landroid/view/View;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Landroid/view/View;->setSelected(Z)V
return-void
.end method[/COLOR]
.method public flipToSettings()V
.locals 11
.prologue
const/high16 v10, 0x3f80
const/4 v9, 0x0
const-wide/16 v7, 0x15e
const/4 v6, 0x1
const/4 v5, 0x0
.line 1841
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mUserSetup:Z
change this lines , according to the value you got in your own public.xml
0x7f050016
Code:
<public type="anim" name="anim_grow_from_middle" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
0x7f050017
Code:
<public type="anim" name="anim_shrink_to_middle" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
Next :
search this method :
Code:
.method makeExpandedVisible(Z)V
add this red line inside that method
Code:
const/4 v1, -0x1
iput v1, v0, Landroid/view/ViewGroup$LayoutParams;->height:I
.line 1613
iget-object v1, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mWindowManager:Landroid/view/WindowManager;
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
invoke-interface {v1, v2, v0}, Landroid/view/WindowManager;->updateViewLayout(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
[COLOR="Red"]invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->flipToNotificationsMod()V[/COLOR]
.line 1617
if-eqz p1, :cond_2
.line 1622
:cond_2
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDateView:Lcom/android/systemui/statusbar/policy/DateView;
if-eqz v1, :cond_3
.line 1623
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDateView:Lcom/android/systemui/statusbar/policy/DateView;
invoke-virtual {v1}, Lcom/android/systemui/statusbar/policy/DateView;->updateClock()V
.line 1625
:cond_3
invoke-virtual {p0, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->visibilityChanged(Z)V
goto :goto_0
.end method
Next
- Follow this step http://forum.xda-developers.com/showpost.php?p=53364267&postcount=4
- And the last step , follow this http://forum.xda-developers.com/showpost.php?p=53364269&postcount=5
Screenshots
SCREENSHOTS
{
"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"
}
reserved 8
Adi Aisiteru Reborn said:
reserved 8
Click to expand...
Click to collapse
another awesome guide... good work.. :good:
sadly cant work for CM.
ninggal sendal
wowww awesome om
ॐtháńk ýőúॐ master... you're a great teacher...awesome...
Sent from my GT-I9152 using Tapatalk
Can i try this on OMNI ROM ?
Black_Eyes said:
Can i try this on OMNI ROM ?
Click to expand...
Click to collapse
Omni doesn't have powerwidget like in CM10.1 , it should work, tested it with CM10.2, CM11 which doesnt have Powerwidget anymore, but bacarefull playing with the layout gud luck
Sent from my GT-I8150 using xda app-developers app
hopefully it works with 4.1.1..
no luck.. :'(
will this work with gb???
Mrinal Roy said:
will this work with gb???
Click to expand...
Click to collapse
It's based on GINGERBREAD !
But all codes already re written / updated to be working for JB 4.2+ +, so that's mean it will not working on Gingerbred anymore Sorry Bro !
Sent from my GT-I8150 using xda app-developers app
I've tried.. but no luck on 4.1.1..
will be thankful if you could make a guide for gingerbread sir
How to added RAM PROGRESS BAR & CLEAR ALL RECENT APPS in Recent panel for JB 4.2 + +
HOW TO ADD RAM PROGRESS BAR IN RECENT PANEL for JB 4.2 + +
{
"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"
}
Let's just start it,. :good::laugh:
REQUIREMENT:
- BRAIN
- Patient
- experience
- Know how to decompile/recompiling Apk file
- Know how to decompile/recompiling jar Apk file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else
STEP - 1
- Decompile your Settings.apk
- Download attached RamBar Settings.apk , exstract it and merge to your decompiled Settings.apk
- Next, go to
Settings.apk/res/xml/display_settings.xml
add the red line
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">
[COLOR="Red"]<PreferenceScreen android:title="Ram Progress Bar" android:key="adi_vanir_settings" android:fragment="com.android.settings.adi.VanirRamProgressBar" />[/COLOR]
<com.android.settings.BrightnessPreference android:title="@string/brightness" android:key="brightness" android:dialogTitle="@string/brightness" />
<PreferenceScreen android:title="@string/wallpaper_settings_title" android:key="wallpaper" android:fragment="com.android.settings.WallpaperTypeSettings" />
<PreferenceScreen android:title="@string/display_rotation_title" android:key="display_rotation" android:fragment="com.android.settings.cyanogenmod.DisplayRotation" />
<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:entryValues="@array/screen_timeout_values" />
<PreferenceScreen android:title="@string/screensaver_settings_title" android:key="screensaver" android:fragment="com.android.settings.DreamSettings" />
<com.android.settings.WarnedListPreference android:entries="@array/entries_font_size" android:title="@string/title_font_size" android:key="font_size" android:summary="@string/summary_font_size" android:dialogTitle="@string/dialog_title_font_size" android:entryValues="@array/entryvalues_font_size" />
<PreferenceScreen android:title="@string/wifi_display_settings_title" android:key="wifi_display" android:fragment="com.android.settings.wfd.WifiDisplaySettings" />
<CheckBoxPreference android:title="@string/screen_off_animation_title" android:key="screen_off_animation" android:summary="@string/screen_off_animation_summary" android:defaultValue="true" />
<PreferenceCategory android:title="@string/display_category_wakeup_options_title" android:key="category_wakeup_options">
<CheckBoxPreference android:title="@string/pref_home_wake_title" android:key="pref_home_wake" android:summary="@string/pref_home_wake_summary" android:defaultValue="true" />
<CheckBoxPreference android:title="@string/pref_volume_wake_title" android:key="pref_volume_wake" android:summary="@string/pref_volume_wake_summary" android:defaultValue="false" />
</PreferenceCategory>
</PreferenceScreen>
- Recompile your Settings.apk
- Decompile the newly recompiled Settings.apk and go to res/values/public.xml
open it with Notepad++
leave it, but keep it open
- go to Settings.apk/smali/com/android/settings/adi/VanirRamProgressBar.smali
search for this
Code:
[COLOR="Red"]0x7f050068[/COLOR]
and change it with the IDS you got in your own public.xml
Code:
<public type="xml" name="adi_vanir_rambar" id="[COLOR="Red"]0x7f??????[/COLOR]" />
- Done, and recompile your settings.apk
- Push it to system/app with right permission / reboot
- Done reboot, open your settings app, go to settings / Display settings / and check enabled "Ram Progress Bar"
STEP -2
- Decompile your SystemUI.apk
- SystemUI.apk/res/layout/status_bar_recent_panel.xml
add the red line
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.recent.RecentsPanelView android:id="@id/recents_root" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:recentItemLayout="@layout/status_bar_recent_item"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<FrameLayout android:id="@id/recents_bg_protect" android:background="@drawable/status_bar_recents_background" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentBottom="true">
<com.android.systemui.recent.RecentsVerticalScrollView android:layout_gravity="bottom|left|center" android:id="@id/recents_container" android:scrollbars="none" android:fadingEdge="vertical" android:fadingEdgeLength="@dimen/status_bar_recents_scroll_fading_edge_length" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginRight="0.0dip" android:stackFromBottom="true" android:divider="@null">
<LinearLayout android:orientation="vertical" android:id="@id/recents_linear_layout" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</com.android.systemui.recent.RecentsVerticalScrollView>
[COLOR="Red"]<LinearLayout android:layout_gravity="top" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="5.0dip">
<TextView android:textColor="@*android:color/holo_blue_dark" android:layout_gravity="center" android:id="@id/recents_memory_text" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ProgressBar android:id="@id/recents_memory_bar" android:paddingLeft="4.0dip" android:paddingRight="4.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="@*android:dimen/preference_fragment_padding_side" android:layout_marginRight="@*android:dimen/preference_fragment_padding_side" style="?android:attr/progressBarStyleHorizontal" />
</LinearLayout>[/COLOR]
<ImageView android:layout_gravity="bottom|left|center" android:id="@id/recents_clear" android:clickable="true" android:layout_width="50.0dip" android:layout_height="50.0dip" android:src="@drawable/ic_recents_clear" android:scaleType="center" />
</FrameLayout>
<include android:id="@id/recents_no_apps" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/status_bar_no_recent_apps" />
</com.android.systemui.recent.RecentsPanelView>
- SystemUI.apk/res/layout-land/status_bar_recent_panel.xml
add the red line
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.recent.RecentsPanelView android:id="@id/recents_root" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:recentItemLayout="@layout/status_bar_recent_item"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<FrameLayout android:id="@id/recents_bg_protect" android:background="@drawable/status_bar_recents_background" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentBottom="true">
<com.android.systemui.recent.RecentsHorizontalScrollView android:layout_gravity="right" android:id="@id/recents_container" android:scrollbars="none" android:fadingEdge="horizontal" android:fadingEdgeLength="@dimen/status_bar_recents_scroll_fading_edge_length" android:layout_width="wrap_content" android:layout_height="fill_parent">
<LinearLayout android:orientation="horizontal" android:id="@id/recents_linear_layout" android:layout_width="wrap_content" android:layout_height="fill_parent" />
</com.android.systemui.recent.RecentsHorizontalScrollView>
[COLOR="Red"]<LinearLayout android:layout_gravity="top" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="5.0dip">
<TextView android:textColor="@*android:color/holo_blue_dark" android:layout_gravity="center" android:id="@id/recents_memory_text" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ProgressBar android:id="@id/recents_memory_bar" android:paddingLeft="4.0dip" android:paddingRight="4.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="@*android:dimen/preference_fragment_padding_side" android:layout_marginRight="@*android:dimen/preference_fragment_padding_side" style="?android:attr/progressBarStyleHorizontal" />
</LinearLayout>[/COLOR]
<ImageView android:layout_gravity="bottom|left|center" android:id="@id/recents_clear" android:clickable="true" android:layout_width="50.0dip" android:layout_height="50.0dip" android:src="@drawable/ic_recents_clear" android:scaleType="center" />
</FrameLayout>
<include android:id="@id/recents_no_apps" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/status_bar_no_recent_apps" />
</com.android.systemui.recent.RecentsPanelView>
- SystemUI.apk/res/values/ids.xml
add the red line to end of it before </resources>
Code:
<item type="id" name="notifications_tab_contents">false</item>
<item type="id" name="bottom_bg_helper">false</item>
[COLOR="Red"]<item type="id" name="recents_memory_bar">false</item>
<item type="id" name="recents_memory_text">false</item>[/COLOR]
</resources>
- Recompile your SystemUI.apk
- Decompile the newly Recompiled APK again
Next go to
res/values/public.xml
open it with Notepad++
leave it, but keep it open
- SystemUI.apk/smali/com/android/systemui/recent/RecentsPanelView.smali
add the red line
Code:
iget-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mPopup:Landroid/widget/PopupMenu;
invoke-virtual {v1}, Landroid/widget/PopupMenu;->dismiss()V
goto :goto_2
.end method
[COLOR="Red"].method private showMemDisplay()Z
.locals 7
.prologue
const/16 v5, 0x8
const/4 v3, 0x1
const/4 v4, 0x0
.line 994
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "adi_beanning_rom_ram_progrees_bar"
invoke-static {v0, v1, v4}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-ne v0, v3, :cond_0
move v2, v3
.line 997
:goto_0
const v0, [COLOR="Blue"]0x7f0900f0[/COLOR]
invoke-virtual {p0, v0}, Lcom/android/systemui/recent/RecentsPanelView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
.line 998
const v1, [COLOR="Blue"]0x7f0900ef[/COLOR]
invoke-virtual {p0, v1}, Lcom/android/systemui/recent/RecentsPanelView;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/ProgressBar;
.line 1000
if-nez v2, :cond_1
.line 1001
invoke-virtual {v0, v5}, Landroid/widget/TextView;->setVisibility(I)V
.line 1002
invoke-virtual {v1, v5}, Landroid/widget/ProgressBar;->setVisibility(I)V
.line 1015
:goto_1
return v4
:cond_0
move v2, v4
.line 994
goto :goto_0
.line 1006
:cond_1
invoke-virtual {v0, v4}, Landroid/widget/TextView;->setVisibility(I)V
.line 1007
invoke-virtual {v1, v4}, Landroid/widget/ProgressBar;->setVisibility(I)V
.line 1009
invoke-virtual {p0}, Lcom/android/systemui/recent/RecentsPanelView;->getTotalMemory()I
move-result v2
.line 1010
invoke-virtual {v1, v2}, Landroid/widget/ProgressBar;->setMax(I)V
.line 1012
invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->getAvailMemory()Ljava/lang/String;
move-result-object v4
invoke-static {v4}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v4
.line 1013
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
const-string v6, "Free RAM: "
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-static {v4}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v6
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
const-string v6, "MB"
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v5
invoke-virtual {v0, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 1014
sub-int v0, v2, v4
invoke-virtual {v1, v0}, Landroid/widget/ProgressBar;->setProgress(I)V
move v4, v3
.line 1015
goto :goto_1
.end method[/COLOR]
.method private startApplicationDetailsActivity(Ljava/lang/String;)V
.locals 4
.parameter "packageName"
.prologue
.line 742
new-instance v0, Landroid/content/Intent;
const-string v1, "android.settings.APPLICATION_DETAILS_SETTINGS"
const-string v2, "package"
Change this 0x7f0900f0
with the IDS value you got in your public.xml
Code:
<public type="id" name="recents_memory_text" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
and this 0x7f0900ef with
<public type="id" name="recents_memory_bar" id="0x7f??????" />
- Next
Search this method
Code:
.method public handleSwipe(Landroid/view/View;)V
scroll down in that method and add the red line
Code:
.method public handleSwipe(Landroid/view/View;)V
.locals 7
.parameter "view"
.prologue
const/4 v4, 0x1
.line 709
invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;
iget-object v0, v2, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->taskDescription:Lcom/android/systemui/recent/TaskDescription;
.line 710
.local v0, ad:Lcom/android/systemui/recent/TaskDescription;
if-nez v0, :cond_1
.line 711
const-string v2, "RecentsPanelView"
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "Not able to find activity description for swiped task; view="
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v3
const-string v4, " tag="
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
.line 739
:cond_0
:goto_0
return-void
.line 716
:cond_1
iget-object v2, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentTaskDescriptions:Ljava/util/ArrayList;
invoke-virtual {v2, v0}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z
.line 717
iget-object v2, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentTasksLoader:Lcom/android/systemui/recent/RecentTasksLoader;
invoke-virtual {v2, v0}, Lcom/android/systemui/recent/RecentTasksLoader;->remove(Lcom/android/systemui/recent/TaskDescription;)V
.line 722
iget-object v2, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentTaskDescriptions:Ljava/util/ArrayList;
invoke-virtual {v2}, Ljava/util/ArrayList;->size()I
move-result v2
if-nez v2, :cond_2
.line 723
invoke-virtual {p0}, Lcom/android/systemui/recent/RecentsPanelView;->dismissAndGoBack()V
.line 728
:cond_2
iget-object v2, p0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;
const-string v3, "activity"
invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroid/app/ActivityManager;
.line 730
.local v1, am:Landroid/app/ActivityManager;
if-eqz v1, :cond_0
.line 731
iget v2, v0, Lcom/android/systemui/recent/TaskDescription;->persistentTaskId:I
invoke-virtual {v1, v2, v4}, Landroid/app/ActivityManager;->removeTask(II)Z
.line 734
iget-object v2, p0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;
const v3, 0x7f0a00ba
new-array v4, v4, [Ljava/lang/Object;
const/4 v5, 0x0
invoke-virtual {v0}, Lcom/android/systemui/recent/TaskDescription;->getLabel()Ljava/lang/CharSequence;
move-result-object v6
aput-object v6, v4, v5
invoke-virtual {v2, v3, v4}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v2
invoke-virtual {p0, v2}, Lcom/android/systemui/recent/RecentsPanelView;->setContentDescription(Ljava/lang/CharSequence;)V
.line 736
const/4 v2, 0x4
invoke-virtual {p0, v2}, Lcom/android/systemui/recent/RecentsPanelView;->sendAccessibilityEvent(I)V
.line 737
const/4 v2, 0x0
invoke-virtual {p0, v2}, Lcom/android/systemui/recent/RecentsPanelView;->setContentDescription(Ljava/lang/CharSequence;)V
[COLOR="Red"] invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->showMemDisplay()Z[/COLOR]
goto :goto_0
.end method
- Next
Search this method
Code:
.method public show(ZLjava/util/ArrayList;ZZ)V
scroll down in that method and add the red line
Code:
.method public show(ZLjava/util/ArrayList;ZZ)V
.locals 1
.parameter "show"
.parameter
.parameter "firstScreenful"
.parameter "animateIconOfFirstTask"
.annotation system Ldalvik/annotation/Signature;
value = {
"(Z",
"Ljava/util/ArrayList",
"<",
"Lcom/android/systemui/recent/TaskDescription;",
">;ZZ)V"
}
.end annotation
.prologue
.line 302
.local p2, recentTaskDescriptions:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/android/systemui/recent/TaskDescription;>;"
iput-boolean p4, p0, Lcom/android/systemui/recent/RecentsPanelView;->mAnimateIconOfFirstTask:Z
.line 303
iput-boolean p4, p0, Lcom/android/systemui/recent/RecentsPanelView;->mWaitingForWindowAnimation:Z
.line 304
if-eqz p1, :cond_0
.line 305
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mWaitingToShow:Z
.line 306
invoke-direct {p0, p2, p3}, Lcom/android/systemui/recent/RecentsPanelView;->refreshRecentTasksList(Ljava/util/ArrayList;Z)V
.line 307
invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->showIfReady()V
[COLOR="Red"] invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->showMemDisplay()Z[/COLOR]
.line 311
:goto_0
return-void
.line 309
:cond_0
const/4 v0, 0x0
invoke-direct {p0, v0}, Lcom/android/systemui/recent/RecentsPanelView;->showImpl(Z)V
goto :goto_0
.end method
- Next
add the red method
Code:
.method public dispatchHoverEvent(Landroid/view/MotionEvent;)Z
.locals 3
.parameter "event"
.prologue
.line 394
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result v2
float-to-int v0, v2
.line 395
.local v0, x:I
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
move-result v2
float-to-int v1, v2
.line 396
.local v1, y:I
if-ltz v0, :cond_0
invoke-virtual {p0}, Lcom/android/systemui/recent/RecentsPanelView;->getWidth()I
move-result v2
if-ge v0, v2, :cond_0
if-ltz v1, :cond_0
invoke-virtual {p0}, Lcom/android/systemui/recent/RecentsPanelView;->getHeight()I
move-result v2
if-ge v1, v2, :cond_0
.line 397
invoke-super {p0, p1}, Landroid/widget/FrameLayout;->dispatchHoverEvent(Landroid/view/MotionEvent;)Z
move-result v2
.line 399
:goto_0
return v2
:cond_0
const/4 v2, 0x1
goto :goto_0
.end method
[COLOR="Red"].method public getTotalMemory()I
.locals 4
.prologue
.line 1027
const-string v1, "/proc/meminfo"
.line 1030
const/4 v0, 0x0
.line 1032
:try_start_0
new-instance v2, Ljava/io/FileReader;
invoke-direct {v2, v1}, Ljava/io/FileReader;-><init>(Ljava/lang/String;)V
.line 1033
new-instance v1, Ljava/io/BufferedReader;
const/16 v3, 0x2000
invoke-direct {v1, v2, v3}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;I)V
.line 1034
invoke-virtual {v1}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
move-result-object v2
.line 1035
const-string v3, "\\s+"
invoke-virtual {v2, v3}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
move-result-object v2
.line 1036
const/4 v3, 0x1
aget-object v2, v2, v3
invoke-static {v2}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I
move-result v0
mul-int/lit16 v0, v0, 0x400
.line 1037
invoke-virtual {v1}, Ljava/io/BufferedReader;->close()V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
.line 1040
:goto_0
const/high16 v1, 0x10
div-int/2addr v0, v1
return v0
.line 1038
:catch_0
move-exception v1
goto :goto_0
.end method[/COLOR]
.method public handleLongPress(Landroid/view/View;Landroid/view/View;Landroid/view/View;)V
.locals 4
.parameter "selectedView"
.parameter "anchorView"
.parameter "thumbnailView"
.prologue
.line 759
const/4 v1, 0x1
invoke-virtual {p3, v1}, Landroid/view/View;->setSelected(Z)V
.line 760
new-instance v0, Landroid/widget/PopupMenu;
iget-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;
if-nez p2, :cond_0
move-object p2, p1
.end local p2
:cond_0
invoke-direct {v0, v1, p2}, Landroid/widget/PopupMenu;-><init>(Landroid/content/Context;Landroid/view/View;)V
- Next and the last
Add the red codes
Code:
.method private createCustomAnimations(Landroid/animation/LayoutTransition;)V
.locals 3
.parameter "transitioner"
.prologue
.line 475
const-wide/16 v0, 0xc8
invoke-virtual {p1, v0, v1}, Landroid/animation/LayoutTransition;->setDuration(J)V
.line 476
const/4 v0, 0x1
const-wide/16 v1, 0x0
invoke-virtual {p1, v0, v1, v2}, Landroid/animation/LayoutTransition;->setStartDelay(IJ)V
.line 477
const/4 v0, 0x3
const/4 v1, 0x0
invoke-virtual {p1, v0, v1}, Landroid/animation/LayoutTransition;->setAnimator(ILandroid/animation/Animator;)V
.line 478
return-void
.end method
[COLOR="Red"].method private getAvailMemory()Ljava/lang/String;
.locals 8
.prologue
.line 1019
new-instance v3, Landroid/app/ActivityManager$MemoryInfo;
invoke-direct {v3}, Landroid/app/ActivityManager$MemoryInfo;-><init>()V
.line 1020
.local v3, memInfo:Landroid/app/ActivityManager$MemoryInfo;
iget-object v4, p0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;
const-string v5, "activity"
invoke-virtual {v4, v5}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/ActivityManager;
.line 1021
.local v0, am:Landroid/app/ActivityManager;
invoke-virtual {v0, v3}, Landroid/app/ActivityManager;->getMemoryInfo(Landroid/app/ActivityManager$MemoryInfo;)V
.line 1022
iget-wide v4, v3, Landroid/app/ActivityManager$MemoryInfo;->availMem:J
const-wide/32 v6, 0x100000
div-long v1, v4, v6
.line 1023
.local v1, availableMem:J
invoke-static {v1, v2}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
move-result-object v4
return-object v4
.end method[/COLOR]
.method private pointInside(IILandroid/view/View;)Z
.locals 5
.parameter "x"
.parameter "y"
.parameter "v"
.prologue
.line 278
invoke-virtual {p3}, Landroid/view/View;->getLeft()I
move-result v1
.line 279
.local v1, l:I
invoke-virtual {p3}, Landroid/view/View;->getRight()I
- Done and recompile your SystemUI.apk
Credit to :
- CyanogenMod
- Vanir KK AOSP ROM
- [Unofficial Community] Galaxy Wonder CyanogenMod Indonesia
How to add samsung clear all button, google launch button , task manager button,
HOW TO ADD SAMSUNG
CLEAR ALL RECENT APPS BUTTON, GOOGLE LAUNCH BUTTON , TASK MANAGER BUTTON, IN RECENT PANEL
STEP -1
- Decompile your SystemUI.apk
- Download attached ClearAll-SystemUI.apk.zip, exstract it and merge it to you decompiled SystemUI.apk
- SystemUI.apk/res/layout/status_bar_recent_panel.xml
add the red line
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.recent.RecentsPanelView android:id="@id/recents_root" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:recentItemLayout="@layout/status_bar_recent_item"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<FrameLayout android:id="@id/recents_bg_protect" android:background="@drawable/status_bar_recents_background" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentBottom="true">
<com.android.systemui.recent.RecentsVerticalScrollView android:layout_gravity="bottom|left|center" android:id="@id/recents_container" android:scrollbars="none" android:fadingEdge="vertical" android:fadingEdgeLength="@dimen/status_bar_recents_scroll_fading_edge_length" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginRight="0.0dip" android:stackFromBottom="true" android:divider="@null">
<LinearLayout android:orientation="vertical" android:id="@id/recents_linear_layout" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</com.android.systemui.recent.RecentsVerticalScrollView>
<LinearLayout android:layout_gravity="top" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="5.0dip">
<TextView android:textColor="@*android:color/holo_blue_dark" android:layout_gravity="center" android:id="@id/recents_memory_text" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ProgressBar android:id="@id/recents_memory_bar" android:paddingLeft="4.0dip" android:paddingRight="4.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="@*android:dimen/preference_fragment_padding_side" android:layout_marginRight="@*android:dimen/preference_fragment_padding_side" style="?android:attr/progressBarStyleHorizontal" />
</LinearLayout>
[COLOR="Red"]<LinearLayout android:layout_gravity="bottom" android:orientation="horizontal" android:background="@drawable/tw_ab_bottom_transparent_dark_holo" android:layout_width="fill_parent" android:layout_height="45.0dip" android:layout_weight="1.0">
<ImageButton android:id="@id/asteroid_recents_task_manager_button" android:background="@drawable/tw_recent_panel_button_forphone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/tw_recent_panel_ic_task_manager_holo_dark" android:layout_weight="1.0" android:contentDescription="@string/status_bar_recent_launch_task_manager_title" style="?android:attr/buttonStyle" />
<LinearLayout android:layout_gravity="center_vertical" android:background="@drawable/tw_divider_vertical_holo_dark" android:layout_width="1.0dip" android:layout_height="29.0dip" />
<ImageButton android:id="@id/asteroid_recents_google_button" android:background="@drawable/tw_recent_panel_button_forphone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/tw_recent_panel_ic_google_holo_dark" android:layout_weight="1.0" android:contentDescription="@string/status_bar_recent_launch_google_button" style="?android:attr/buttonStyle" />
<LinearLayout android:layout_gravity="center_vertical" android:background="@drawable/tw_divider_vertical_holo_dark" android:layout_width="1.0dip" android:layout_height="29.0dip" />
<ImageButton android:id="@id/asteroid_recents_clear_all_button" android:background="@drawable/tw_recent_panel_button_forphone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/tw_recent_panel_ic_delete_holo_dark" android:layout_weight="1.0" android:contentDescription="@string/status_bar_recent_remove_all_button" style="?android:attr/buttonStyle" />
</LinearLayout>[/COLOR]
</FrameLayout>
<include android:id="@id/recents_no_apps" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/status_bar_no_recent_apps" />
</com.android.systemui.recent.RecentsPanelView>
- SystemUI.apk/res/layout-land/status_bar_recent_panel.xml
add the red line
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.recent.RecentsPanelView android:id="@id/recents_root" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:recentItemLayout="@layout/status_bar_recent_item"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<FrameLayout android:id="@id/recents_bg_protect" android:background="@drawable/status_bar_recents_background" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentBottom="true">
<com.android.systemui.recent.RecentsHorizontalScrollView android:layout_gravity="right" android:id="@id/recents_container" android:scrollbars="none" android:fadingEdge="horizontal" android:fadingEdgeLength="@dimen/status_bar_recents_scroll_fading_edge_length" android:clipChildren="false" android:clipToPadding="false" android:layout_width="wrap_content" android:layout_height="fill_parent">
<LinearLayout android:orientation="horizontal" android:id="@id/recents_linear_layout" android:clipChildren="false" android:clipToPadding="false" android:layout_width="wrap_content" android:layout_height="fill_parent" />
</com.android.systemui.recent.RecentsHorizontalScrollView>
<LinearLayout android:layout_gravity="top" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="5.0dip">
<TextView android:textColor="@*android:color/holo_blue_dark" android:layout_gravity="center" android:id="@id/recents_memory_text" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ProgressBar android:id="@id/recents_memory_bar" android:paddingLeft="4.0dip" android:paddingRight="4.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="@*android:dimen/preference_fragment_padding_side" android:layout_marginRight="@*android:dimen/preference_fragment_padding_side" style="?android:attr/progressBarStyleHorizontal" />
</LinearLayout>
[COLOR="Red"]<LinearLayout android:layout_gravity="bottom" android:orientation="horizontal" android:background="@drawable/tw_ab_bottom_transparent_dark_holo" android:layout_width="fill_parent" android:layout_height="45.0dip" android:layout_weight="1.0">
<ImageButton android:id="@id/asteroid_recents_task_manager_button" android:background="@drawable/tw_recent_panel_button_forphone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/tw_recent_panel_ic_task_manager_holo_dark" android:layout_weight="1.0" android:contentDescription="@string/status_bar_recent_launch_task_manager_title" style="?android:attr/buttonStyle" />
<LinearLayout android:layout_gravity="center_vertical" android:background="@drawable/tw_divider_vertical_holo_dark" android:layout_width="1.0dip" android:layout_height="29.0dip" />
<ImageButton android:id="@id/asteroid_recents_google_button" android:background="@drawable/tw_recent_panel_button_forphone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/tw_recent_panel_ic_google_holo_dark" android:layout_weight="1.0" android:contentDescription="@string/status_bar_recent_launch_google_button" style="?android:attr/buttonStyle" />
<LinearLayout android:layout_gravity="center_vertical" android:background="@drawable/tw_divider_vertical_holo_dark" android:layout_width="1.0dip" android:layout_height="29.0dip" />
<ImageButton android:id="@id/asteroid_recents_clear_all_button" android:background="@drawable/tw_recent_panel_button_forphone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/tw_recent_panel_ic_delete_holo_dark" android:layout_weight="1.0" android:contentDescription="@string/status_bar_recent_remove_all_button" style="?android:attr/buttonStyle" />
</LinearLayout>[/COLOR]
</FrameLayout>
<include android:id="@id/recents_no_apps" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/status_bar_no_recent_apps" />
</com.android.systemui.recent.RecentsPanelView>
- SystemUI.apk/res/values/ids.xml
add the red line to end of it before </resources>
Code:
<item type="id" name="recents_memory_bar">false</item>
<item type="id" name="recents_memory_text">false</item>
[COLOR="Red"]<item type="id" name="asteroid_recents_task_manager_button">false</item>
<item type="id" name="asteroid_recents_google_button">false</item>
<item type="id" name="asteroid_recents_clear_all_button">false</item>[/COLOR]
</resources>
- SystemUI.apk/res/values/strings.xml
add the red line to end of it before </resources>
Code:
<string name="status_bar_help_text">"Access them anytime by swiping down.
Swipe down again for system controls."</string>
<string name="shutdown_prompt_title">Shutdown</string>
<string name="shutdown_prompt_message">Low battery and then will be auto shutdown</string>
<string name="shutdown_prompt_message_before">Low battery ! Your phone will shutdown in</string>
<string name="shutdown_prompt_message_after">seconds</string>
[COLOR="Red"]<string name="status_bar_recent_launch_task_manager_title">Task manager</string>
<string name="status_bar_recent_launch_google_button">Google</string>
<string name="status_bar_recent_remove_all_button">Remove all</string>[/COLOR]
</resources>
- Recompile your SystemUI.apk
STEP - 2
- Decompile the newly Recompiled APK again
Next go to
res/values/public.xml
open it with Notepad++
leave it, but keep it open
- SystemUI.apk/smali/com/android/systemui/recent/RecentsPanelView.smali
add the red line
Code:
# instance fields
.field private mAnimateIconOfFirstTask:Z
.field private mFitThumbnailToXY:Z
[COLOR="Red"].field private mGoogleButton:Landroid/widget/ImageButton;[/COLOR]
.field private mHighEndGfx:Z
Code:
.end annotation
.end field
.field private mRecentTasksLoader:Lcom/android/systemui/recent/RecentTasksLoader;
[COLOR="Red"].field private mRecentsClearAllButton:Landroid/widget/ImageButton;[/COLOR]
.field private mRecentsContainer:Landroid/view/ViewGroup;
.field private mRecentsNoApps:Landroid/view/View;
.field private mRecentsScrim:Landroid/view/View;
.field private mShowing:Z
.field private mStatusBarTouchProxy:Lcom/android/systemui/recent/StatusBarTouchProxy;
[COLOR="Red"].field private mTaskManagerButton:Landroid/widget/ImageButton;[/COLOR]
.field private mThumbnailWidth:I
.field private mWaitingForWindowAnimation:Z
Code:
iput v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentItemLayoutId:I
.line 267
invoke-static {p1}, Lcom/android/systemui/recent/RecentTasksLoader;->getInstance(Landroid/content/Context;)Lcom/android/systemui/recent/RecentTasksLoader;
move-result-object v1
iput-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentTasksLoader:Lcom/android/systemui/recent/RecentTasksLoader;
.line 268
invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V
.line 269
return-void
.end method
[COLOR="Red"].method private AsteroidClearAllRecentApps()V
.locals 8
.prologue
const/4 v7, 0x1
const/4 v6, 0x0
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;
const-string v1, "activity"
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/ActivityManager;
iget-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentTaskDescriptions:Ljava/util/ArrayList;
invoke-virtual {v1}, Ljava/util/ArrayList;->isEmpty()Z
move-result v1
if-nez v1, :cond_1
iget-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentTaskDescriptions:Ljava/util/ArrayList;
invoke-virtual {v1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v2
:goto_0
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_0
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/android/systemui/recent/TaskDescription;
iget v3, v1, Lcom/android/systemui/recent/TaskDescription;->persistentTaskId:I
invoke-virtual {v0, v3, v7}, Landroid/app/ActivityManager;->removeTask(II)Z
iget-object v3, p0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;
const v4, [COLOR="Blue"]0x7f0b00a5[/COLOR]
new-array v5, v7, [Ljava/lang/Object;
invoke-virtual {v1}, Lcom/android/systemui/recent/TaskDescription;->getLabel()Ljava/lang/CharSequence;
move-result-object v1
aput-object v1, v5, v6
invoke-virtual {v3, v4, v5}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
invoke-virtual {p0, v1}, Lcom/android/systemui/recent/RecentsPanelView;->setContentDescription(Ljava/lang/CharSequence;)V
const/4 v1, 0x4
invoke-virtual {p0, v1}, Lcom/android/systemui/recent/RecentsPanelView;->sendAccessibilityEvent(I)V
const/4 v1, 0x0
invoke-virtual {p0, v1}, Lcom/android/systemui/recent/RecentsPanelView;->setContentDescription(Ljava/lang/CharSequence;)V
goto :goto_0
:cond_0
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentTaskDescriptions:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
:cond_1
invoke-virtual {p0}, Lcom/android/systemui/recent/RecentsPanelView;->dismissAndGoBack()V
return-void
.end method
.method static synthetic access$177777700(Lcom/android/systemui/recent/RecentsPanelView;)V
.locals 0
.parameter "x0"
.prologue
.line 75
invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->AsteroidClearAllRecentApps()V
return-void
.end method[/COLOR]
.method static synthetic access$000(Lcom/android/systemui/recent/RecentsPanelView;)Ljava/util/ArrayList;
.locals 1
.parameter "x0"
.prologue
.line 73
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentTaskDescriptions:Ljava/util/ArrayList;
return-object v0
.end method
.method static synthetic access$100(Lcom/android/systemui/recent/RecentsPanelView;)I
.locals 1
.parameter "x0"
.prologue
.line 73
iget v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentItemLayoutId:I
Change this 0x7f0b00a5
with the IDS value you got in your public.xml
Code:
<public type="string" name="accessibility_recents_item_dismissed" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
NEXT
find this method
Code:
.method protected onFinishInflate()V
scroll down in that method and add the red codes above return-void
Code:
invoke-virtual {v1, v2}, Landroid/view/View;->setBackground(Landroid/graphics/drawable/Drawable;)V
.line 488
:cond_0
:goto_0
[COLOR="Red"]const v1, [COLOR="Blue"]0x7f08012e[/COLOR]
invoke-virtual {p0, v1}, Lcom/android/systemui/recent/RecentsPanelView;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/ImageButton;
iput-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentsClearAllButton:Landroid/widget/ImageButton;
.line 499
iget-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentsClearAllButton:Landroid/widget/ImageButton;
new-instance v2, Lcom/android/systemui/recent/RecentsPanelView$AsteroidClearAll;
invoke-direct {v2, p0}, Lcom/android/systemui/recent/RecentsPanelView$AsteroidClearAll;-><init>(Lcom/android/systemui/recent/RecentsPanelView;)V
invoke-virtual {v1, v2}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V
const v1, [COLOR="Blue"]0x7f08012c[/COLOR]
invoke-virtual {p0, v1}, Lcom/android/systemui/recent/RecentsPanelView;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/ImageButton;
iput-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mTaskManagerButton:Landroid/widget/ImageButton;
iget-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mTaskManagerButton:Landroid/widget/ImageButton;
new-instance v2, Lcom/android/systemui/recent/RecentsPanelView$AsteroidTaskManagerHelper;
invoke-direct {v2, p0}, Lcom/android/systemui/recent/RecentsPanelView$AsteroidTaskManagerHelper;-><init>(Lcom/android/systemui/recent/RecentsPanelView;)V
invoke-virtual {v1, v2}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V
const v1, [COLOR="Blue"]0x7f08012d[/COLOR]
invoke-virtual {p0, v1}, Lcom/android/systemui/recent/RecentsPanelView;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/ImageButton;
iput-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mGoogleButton:Landroid/widget/ImageButton;
iget-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mGoogleButton:Landroid/widget/ImageButton;
new-instance v2, Lcom/android/systemui/recent/RecentsPanelView$AsteroidGoogleHelper;
invoke-direct {v2, p0}, Lcom/android/systemui/recent/RecentsPanelView$AsteroidGoogleHelper;-><init>(Lcom/android/systemui/recent/RecentsPanelView;)V
invoke-virtual {v1, v2}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V[/COLOR]
[COLOR="Blue"]return-void[/COLOR]
.line 473
.end local v0 #scrollView:Lcom/android/systemui/recent/RecentsPanelView$RecentsScrollView;
:cond_1
new-instance v1, Ljava/lang/IllegalArgumentException;
const-string v2, "missing Recents[Horizontal]ScrollView"
invoke-direct {v1, v2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v1
.line 483
.restart local v0 #scrollView:Lcom/android/systemui/recent/RecentsPanelView$RecentsScrollView;
Change this 0x7f08012e
with the IDS value you got in your public.xml
Code:
<public type="id" name="asteroid_recents_clear_all_button" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
this 0x7f08012c with
Code:
<public type="id" name="asteroid_recents_task_manager_button" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
and this 0x7f08012d with
Code:
<public type="id" name="asteroid_recents_google_button" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
- Done and recompile your systemUI.apk
- Download attached Asteroid_taskmanager.apk and
- Quicksearcbox.apk ( skip this if you already have velvet / google search installed )
- Push them together to your system/app/reboot
- Done
Additional
for JB 4.1.2
change this from the guide
Code:
invoke-virtual {p0}, Lcom/android/systemui/recent/RecentsPanelView;->dismissAndGoBack()V
to like this
Code:
invoke-virtual {p0, v6}, Lcom/android/systemui/recent/RecentsPanelView;->hide(Z)V
Adi Aisiteru Reborn said:
HOW TO ADD RAM PROGRESS BAR IN RECENT PANEL for JB 4.2 + +
Let's just start it,. :good::laugh:
REQUIREMENT:
- BRAIN
- Patient
- experience
- Know how to decompile/recompiling Apk file
- Know how to decompile/recompiling jar Apk file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else
STEP - 1
- Decompile your Settings.apk
- Download attached RamBar Settings.apk , exstract it and merge to your decompiled Settings.apk
- Next, go to
Settings.apk/res/xml/display_settings.xml
add the red line
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">
[COLOR="Red"]<PreferenceScreen android:title="Ram Progress Bar" android:key="adi_vanir_settings" android:fragment="com.android.settings.adi.VanirRamProgressBar" />[/COLOR]
<com.android.settings.BrightnessPreference android:title="@string/brightness" android:key="brightness" android:dialogTitle="@string/brightness" />
<PreferenceScreen android:title="@string/wallpaper_settings_title" android:key="wallpaper" android:fragment="com.android.settings.WallpaperTypeSettings" />
<PreferenceScreen android:title="@string/display_rotation_title" android:key="display_rotation" android:fragment="com.android.settings.cyanogenmod.DisplayRotation" />
<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:entryValues="@array/screen_timeout_values" />
<PreferenceScreen android:title="@string/screensaver_settings_title" android:key="screensaver" android:fragment="com.android.settings.DreamSettings" />
<com.android.settings.WarnedListPreference android:entries="@array/entries_font_size" android:title="@string/title_font_size" android:key="font_size" android:summary="@string/summary_font_size" android:dialogTitle="@string/dialog_title_font_size" android:entryValues="@array/entryvalues_font_size" />
<PreferenceScreen android:title="@string/wifi_display_settings_title" android:key="wifi_display" android:fragment="com.android.settings.wfd.WifiDisplaySettings" />
<CheckBoxPreference android:title="@string/screen_off_animation_title" android:key="screen_off_animation" android:summary="@string/screen_off_animation_summary" android:defaultValue="true" />
<PreferenceCategory android:title="@string/display_category_wakeup_options_title" android:key="category_wakeup_options">
<CheckBoxPreference android:title="@string/pref_home_wake_title" android:key="pref_home_wake" android:summary="@string/pref_home_wake_summary" android:defaultValue="true" />
<CheckBoxPreference android:title="@string/pref_volume_wake_title" android:key="pref_volume_wake" android:summary="@string/pref_volume_wake_summary" android:defaultValue="false" />
</PreferenceCategory>
</PreferenceScreen>
- Recompile your Settings.apk
- Decompile the newly recompiled Settings.apk and go to res/values/public.xml
open it with Notepad++
leave it, but keep it open
- go to Settings.apk/smali/com/android/settings/adi/VanirRamProgressBar.smali
search for this
Code:
[COLOR="Red"]0x7f050068[/COLOR]
and change it with the IDS you got in your own public.xml
Code:
<public type="xml" name="adi_vanir_rambar" id="[COLOR="Red"]0x7f??????[/COLOR]" />
- Done, and recompile your settings.apk
- Push it to system/app with right permission / reboot
- Done reboot, open your settings app, go to settings / Display settings / and check enabled "Ram Progress Bar"
STEP -2
- Decompile your SystemUI.apk
- SystemUI.apk/res/layout/status_bar_recent_panel.xml
add the red line
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.recent.RecentsPanelView android:id="@id/recents_root" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:recentItemLayout="@layout/status_bar_recent_item"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<FrameLayout android:id="@id/recents_bg_protect" android:background="@drawable/status_bar_recents_background" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentBottom="true">
<com.android.systemui.recent.RecentsVerticalScrollView android:layout_gravity="bottom|left|center" android:id="@id/recents_container" android:scrollbars="none" android:fadingEdge="vertical" android:fadingEdgeLength="@dimen/status_bar_recents_scroll_fading_edge_length" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginRight="0.0dip" android:stackFromBottom="true" android:divider="@null">
<LinearLayout android:orientation="vertical" android:id="@id/recents_linear_layout" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</com.android.systemui.recent.RecentsVerticalScrollView>
[COLOR="Red"]<LinearLayout android:layout_gravity="top" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="5.0dip">
<TextView android:textColor="@*android:color/holo_blue_dark" android:layout_gravity="center" android:id="@id/recents_memory_text" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ProgressBar android:id="@id/recents_memory_bar" android:paddingLeft="4.0dip" android:paddingRight="4.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="@*android:dimen/preference_fragment_padding_side" android:layout_marginRight="@*android:dimen/preference_fragment_padding_side" style="?android:attr/progressBarStyleHorizontal" />
</LinearLayout>[/COLOR]
<ImageView android:layout_gravity="bottom|left|center" android:id="@id/recents_clear" android:clickable="true" android:layout_width="50.0dip" android:layout_height="50.0dip" android:src="@drawable/ic_recents_clear" android:scaleType="center" />
</FrameLayout>
<include android:id="@id/recents_no_apps" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/status_bar_no_recent_apps" />
</com.android.systemui.recent.RecentsPanelView>
- SystemUI.apk/res/layout-land/status_bar_recent_panel.xml
add the red line
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.recent.RecentsPanelView android:id="@id/recents_root" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:recentItemLayout="@layout/status_bar_recent_item"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<FrameLayout android:id="@id/recents_bg_protect" android:background="@drawable/status_bar_recents_background" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentBottom="true">
<com.android.systemui.recent.RecentsHorizontalScrollView android:layout_gravity="right" android:id="@id/recents_container" android:scrollbars="none" android:fadingEdge="horizontal" android:fadingEdgeLength="@dimen/status_bar_recents_scroll_fading_edge_length" android:layout_width="wrap_content" android:layout_height="fill_parent">
<LinearLayout android:orientation="horizontal" android:id="@id/recents_linear_layout" android:layout_width="wrap_content" android:layout_height="fill_parent" />
</com.android.systemui.recent.RecentsHorizontalScrollView>
[COLOR="Red"]<LinearLayout android:layout_gravity="top" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="5.0dip">
<TextView android:textColor="@*android:color/holo_blue_dark" android:layout_gravity="center" android:id="@id/recents_memory_text" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ProgressBar android:id="@id/recents_memory_bar" android:paddingLeft="4.0dip" android:paddingRight="4.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="@*android:dimen/preference_fragment_padding_side" android:layout_marginRight="@*android:dimen/preference_fragment_padding_side" style="?android:attr/progressBarStyleHorizontal" />
</LinearLayout>[/COLOR]
<ImageView android:layout_gravity="bottom|left|center" android:id="@id/recents_clear" android:clickable="true" android:layout_width="50.0dip" android:layout_height="50.0dip" android:src="@drawable/ic_recents_clear" android:scaleType="center" />
</FrameLayout>
<include android:id="@id/recents_no_apps" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/status_bar_no_recent_apps" />
</com.android.systemui.recent.RecentsPanelView>
- SystemUI.apk/res/layout-land/status_bar_recent_panel.xml
add the red line to end of it before </resources>
Code:
<item type="id" name="notifications_tab_contents">false</item>
<item type="id" name="bottom_bg_helper">false</item>
[COLOR="Red"]<item type="id" name="recents_memory_bar">false</item>
<item type="id" name="recents_memory_text">false</item>[/COLOR]
</resources>
- Recompile your SystemUI.apk
- Decompile the newly Recompiled APK again
Next go to
res/values/public.xml
open it with Notepad++
leave it, but keep it open
- SystemUI.apk/smali/com/android/systemui/recent/RecentsPanelView.smali
add the red line
Code:
iget-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mPopup:Landroid/widget/PopupMenu;
invoke-virtual {v1}, Landroid/widget/PopupMenu;->dismiss()V
goto :goto_2
.end method
[COLOR="Red"].method private showMemDisplay()Z
.locals 7
.prologue
const/16 v5, 0x8
const/4 v3, 0x1
const/4 v4, 0x0
.line 994
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "adi_beanning_rom_ram_progrees_bar"
invoke-static {v0, v1, v4}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-ne v0, v3, :cond_0
move v2, v3
.line 997
:goto_0
const v0, [COLOR="Blue"]0x7f0900f0[/COLOR]
invoke-virtual {p0, v0}, Lcom/android/systemui/recent/RecentsPanelView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
.line 998
const v1, [COLOR="Blue"]0x7f0900ef[/COLOR]
invoke-virtual {p0, v1}, Lcom/android/systemui/recent/RecentsPanelView;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/ProgressBar;
.line 1000
if-nez v2, :cond_1
.line 1001
invoke-virtual {v0, v5}, Landroid/widget/TextView;->setVisibility(I)V
.line 1002
invoke-virtual {v1, v5}, Landroid/widget/ProgressBar;->setVisibility(I)V
.line 1015
:goto_1
return v4
:cond_0
move v2, v4
.line 994
goto :goto_0
.line 1006
:cond_1
invoke-virtual {v0, v4}, Landroid/widget/TextView;->setVisibility(I)V
.line 1007
invoke-virtual {v1, v4}, Landroid/widget/ProgressBar;->setVisibility(I)V
.line 1009
invoke-virtual {p0}, Lcom/android/systemui/recent/RecentsPanelView;->getTotalMemory()I
move-result v2
.line 1010
invoke-virtual {v1, v2}, Landroid/widget/ProgressBar;->setMax(I)V
.line 1012
invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->getAvailMemory()Ljava/lang/String;
move-result-object v4
invoke-static {v4}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v4
.line 1013
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
const-string v6, "Free RAM: "
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-static {v4}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v6
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
const-string v6, "MB"
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v5
invoke-virtual {v0, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 1014
sub-int v0, v2, v4
invoke-virtual {v1, v0}, Landroid/widget/ProgressBar;->setProgress(I)V
move v4, v3
.line 1015
goto :goto_1
.end method[/COLOR]
.method private startApplicationDetailsActivity(Ljava/lang/String;)V
.locals 4
.parameter "packageName"
.prologue
.line 742
new-instance v0, Landroid/content/Intent;
const-string v1, "android.settings.APPLICATION_DETAILS_SETTINGS"
const-string v2, "package"
Change this 0x7f0900f0
with the IDS value you got in your public.xml
Code:
<public type="id" name="recents_memory_text" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
and this 0x7f0900ef with
<public type="id" name="recents_memory_bar" id="0x7f??????" />
- Next
Search this method
Code:
.method public handleSwipe(Landroid/view/View;)V
scroll down in that method and add the red line
Code:
.method public handleSwipe(Landroid/view/View;)V
.locals 7
.parameter "view"
.prologue
const/4 v4, 0x1
.line 709
invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;
iget-object v0, v2, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->taskDescription:Lcom/android/systemui/recent/TaskDescription;
.line 710
.local v0, ad:Lcom/android/systemui/recent/TaskDescription;
if-nez v0, :cond_1
.line 711
const-string v2, "RecentsPanelView"
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "Not able to find activity description for swiped task; view="
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v3
const-string v4, " tag="
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
.line 739
:cond_0
:goto_0
return-void
.line 716
:cond_1
iget-object v2, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentTaskDescriptions:Ljava/util/ArrayList;
invoke-virtual {v2, v0}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z
.line 717
iget-object v2, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentTasksLoader:Lcom/android/systemui/recent/RecentTasksLoader;
invoke-virtual {v2, v0}, Lcom/android/systemui/recent/RecentTasksLoader;->remove(Lcom/android/systemui/recent/TaskDescription;)V
.line 722
iget-object v2, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentTaskDescriptions:Ljava/util/ArrayList;
invoke-virtual {v2}, Ljava/util/ArrayList;->size()I
move-result v2
if-nez v2, :cond_2
.line 723
invoke-virtual {p0}, Lcom/android/systemui/recent/RecentsPanelView;->dismissAndGoBack()V
.line 728
:cond_2
iget-object v2, p0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;
const-string v3, "activity"
invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroid/app/ActivityManager;
.line 730
.local v1, am:Landroid/app/ActivityManager;
if-eqz v1, :cond_0
.line 731
iget v2, v0, Lcom/android/systemui/recent/TaskDescription;->persistentTaskId:I
invoke-virtual {v1, v2, v4}, Landroid/app/ActivityManager;->removeTask(II)Z
.line 734
iget-object v2, p0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;
const v3, 0x7f0a00ba
new-array v4, v4, [Ljava/lang/Object;
const/4 v5, 0x0
invoke-virtual {v0}, Lcom/android/systemui/recent/TaskDescription;->getLabel()Ljava/lang/CharSequence;
move-result-object v6
aput-object v6, v4, v5
invoke-virtual {v2, v3, v4}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v2
invoke-virtual {p0, v2}, Lcom/android/systemui/recent/RecentsPanelView;->setContentDescription(Ljava/lang/CharSequence;)V
.line 736
const/4 v2, 0x4
invoke-virtual {p0, v2}, Lcom/android/systemui/recent/RecentsPanelView;->sendAccessibilityEvent(I)V
.line 737
const/4 v2, 0x0
invoke-virtual {p0, v2}, Lcom/android/systemui/recent/RecentsPanelView;->setContentDescription(Ljava/lang/CharSequence;)V
[COLOR="Red"] invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->showMemDisplay()Z[/COLOR]
goto :goto_0
.end method
- Next
Search this method
Code:
.method public show(ZLjava/util/ArrayList;ZZ)V
scroll down in that method and add the red line
Code:
.method public show(ZLjava/util/ArrayList;ZZ)V
.locals 1
.parameter "show"
.parameter
.parameter "firstScreenful"
.parameter "animateIconOfFirstTask"
.annotation system Ldalvik/annotation/Signature;
value = {
"(Z",
"Ljava/util/ArrayList",
"<",
"Lcom/android/systemui/recent/TaskDescription;",
">;ZZ)V"
}
.end annotation
.prologue
.line 302
.local p2, recentTaskDescriptions:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/android/systemui/recent/TaskDescription;>;"
iput-boolean p4, p0, Lcom/android/systemui/recent/RecentsPanelView;->mAnimateIconOfFirstTask:Z
.line 303
iput-boolean p4, p0, Lcom/android/systemui/recent/RecentsPanelView;->mWaitingForWindowAnimation:Z
.line 304
if-eqz p1, :cond_0
.line 305
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mWaitingToShow:Z
.line 306
invoke-direct {p0, p2, p3}, Lcom/android/systemui/recent/RecentsPanelView;->refreshRecentTasksList(Ljava/util/ArrayList;Z)V
.line 307
invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->showIfReady()V
[COLOR="Red"] invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->showMemDisplay()Z[/COLOR]
.line 311
:goto_0
return-void
.line 309
:cond_0
const/4 v0, 0x0
invoke-direct {p0, v0}, Lcom/android/systemui/recent/RecentsPanelView;->showImpl(Z)V
goto :goto_0
.end method
- Next
add the red method
Code:
.method public dispatchHoverEvent(Landroid/view/MotionEvent;)Z
.locals 3
.parameter "event"
.prologue
.line 394
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result v2
float-to-int v0, v2
.line 395
.local v0, x:I
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
move-result v2
float-to-int v1, v2
.line 396
.local v1, y:I
if-ltz v0, :cond_0
invoke-virtual {p0}, Lcom/android/systemui/recent/RecentsPanelView;->getWidth()I
move-result v2
if-ge v0, v2, :cond_0
if-ltz v1, :cond_0
invoke-virtual {p0}, Lcom/android/systemui/recent/RecentsPanelView;->getHeight()I
move-result v2
if-ge v1, v2, :cond_0
.line 397
invoke-super {p0, p1}, Landroid/widget/FrameLayout;->dispatchHoverEvent(Landroid/view/MotionEvent;)Z
move-result v2
.line 399
:goto_0
return v2
:cond_0
const/4 v2, 0x1
goto :goto_0
.end method
[COLOR="Red"].method public getTotalMemory()I
.locals 4
.prologue
.line 1027
const-string v1, "/proc/meminfo"
.line 1030
const/4 v0, 0x0
.line 1032
:try_start_0
new-instance v2, Ljava/io/FileReader;
invoke-direct {v2, v1}, Ljava/io/FileReader;-><init>(Ljava/lang/String;)V
.line 1033
new-instance v1, Ljava/io/BufferedReader;
const/16 v3, 0x2000
invoke-direct {v1, v2, v3}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;I)V
.line 1034
invoke-virtual {v1}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
move-result-object v2
.line 1035
const-string v3, "\\s+"
invoke-virtual {v2, v3}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
move-result-object v2
.line 1036
const/4 v3, 0x1
aget-object v2, v2, v3
invoke-static {v2}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I
move-result v0
mul-int/lit16 v0, v0, 0x400
.line 1037
invoke-virtual {v1}, Ljava/io/BufferedReader;->close()V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
.line 1040
:goto_0
const/high16 v1, 0x10
div-int/2addr v0, v1
return v0
.line 1038
:catch_0
move-exception v1
goto :goto_0
.end method[/COLOR]
.method public handleLongPress(Landroid/view/View;Landroid/view/View;Landroid/view/View;)V
.locals 4
.parameter "selectedView"
.parameter "anchorView"
.parameter "thumbnailView"
.prologue
.line 759
const/4 v1, 0x1
invoke-virtual {p3, v1}, Landroid/view/View;->setSelected(Z)V
.line 760
new-instance v0, Landroid/widget/PopupMenu;
iget-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;
if-nez p2, :cond_0
move-object p2, p1
.end local p2
:cond_0
invoke-direct {v0, v1, p2}, Landroid/widget/PopupMenu;-><init>(Landroid/content/Context;Landroid/view/View;)V
- Next and the last
Add the red codes
Code:
.method private createCustomAnimations(Landroid/animation/LayoutTransition;)V
.locals 3
.parameter "transitioner"
.prologue
.line 475
const-wide/16 v0, 0xc8
invoke-virtual {p1, v0, v1}, Landroid/animation/LayoutTransition;->setDuration(J)V
.line 476
const/4 v0, 0x1
const-wide/16 v1, 0x0
invoke-virtual {p1, v0, v1, v2}, Landroid/animation/LayoutTransition;->setStartDelay(IJ)V
.line 477
const/4 v0, 0x3
const/4 v1, 0x0
invoke-virtual {p1, v0, v1}, Landroid/animation/LayoutTransition;->setAnimator(ILandroid/animation/Animator;)V
.line 478
return-void
.end method
[COLOR="Red"].method private getAvailMemory()Ljava/lang/String;
.locals 8
.prologue
.line 1019
new-instance v3, Landroid/app/ActivityManager$MemoryInfo;
invoke-direct {v3}, Landroid/app/ActivityManager$MemoryInfo;-><init>()V
.line 1020
.local v3, memInfo:Landroid/app/ActivityManager$MemoryInfo;
iget-object v4, p0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;
const-string v5, "activity"
invoke-virtual {v4, v5}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/ActivityManager;
.line 1021
.local v0, am:Landroid/app/ActivityManager;
invoke-virtual {v0, v3}, Landroid/app/ActivityManager;->getMemoryInfo(Landroid/app/ActivityManager$MemoryInfo;)V
.line 1022
iget-wide v4, v3, Landroid/app/ActivityManager$MemoryInfo;->availMem:J
const-wide/32 v6, 0x100000
div-long v1, v4, v6
.line 1023
.local v1, availableMem:J
invoke-static {v1, v2}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
move-result-object v4
return-object v4
.end method[/COLOR]
.method private pointInside(IILandroid/view/View;)Z
.locals 5
.parameter "x"
.parameter "y"
.parameter "v"
.prologue
.line 278
invoke-virtual {p3}, Landroid/view/View;->getLeft()I
move-result v1
.line 279
.local v1, l:I
invoke-virtual {p3}, Landroid/view/View;->getRight()I
- Done and recompile your SystemUI.apk
Credit to :
- CyanogenMod
- Vanir KK AOSP ROM
- [Unofficial Community] Galaxy Wonder CyanogenMod Indonesia
- Mediatek Android Art and Dev Indonesia
Click to expand...
Click to collapse
Nice Guide Sir
Sent from my GT-B5330 using xda premium
nice om...thanks
can it use in 4.1?
待8缘 said:
can it use in 4.1?
Click to expand...
Click to collapse
sure you can try it,
and I think The ram progress bar will read/detect the same activity in every framewrok
guud luck
Adi Aisiteru Reborn said:
reserved
Click to expand...
Click to collapse
I just want to show free RAM on statusbar, could u write the guide to do it?
Oohhlala said:
I just want to show free RAM on statusbar, could u write the guide to do it?
Click to expand...
Click to collapse
I dont know yet
Sent from my GT-I8150 using xda app-developers app
Adi Aisiteru Reborn said:
I dont know yet
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
Me FC sir
06-14 01:07:27.064 E/AndroidRuntime(2942): java.lang.NullPointerException
06-14 01:07:27.064 E/AndroidRuntime(2942): at com.android.systemui.recent.RecentsPanelView.showMemDisplay(RecentsPanelView.java:1001)
06-14 01:07:27.064 E/AndroidRuntime(2942): at com.android.systemui.recent.RecentsPanelView.show(RecentsPanelView.java:421)
06-14 01:07:27.064 E/AndroidRuntime(2942): at com.android.systemui.recent.RecentsPanelView.showIfReady(RecentsPanelView.java:391)
06-14 01:07:27.064 E/AndroidRuntime(2942): at com.android.systemui.recent.RecentsPanelView.onTasksLoaded(RecentsPanelView.java:1016)
06-14 01:07:27.064 E/AndroidRuntime(2942): at com.android.systemui.recent.RecentTasksLoader$1.onProgressUpdate(RecentTasksLoader.java:292)
I use 2 recent panel, original & sense with setting....
what because that's what makes a stop??
Thanks
Sent from my GT-B5330 using xda premium
Then Try itvin stock @andrim3
Sent from my GT-I8150 using xda app-developers app
Adi Aisiteru Reborn said:
Then Try itvin stock @andrim3
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
OK sir...
I will try it later...
Thank you soo much...
Sent from my GT-B5330 using xda premium
another awesome guides from you master...ॐtháńk ýőúॐ so much...
Sent from my GT-I9152 using Tapatalk
thread updated !
added
HOW TO ADD SAMSUNG
CLEAR ALL RECENT APPS BUTTON, GOOGLE LAUNCH BUTTON , TASK MANAGER BUTTON, IN RECENT PANEL
thanks
Adi Aisiteru Reborn said:
thread updated !
added
HOW TO ADD SAMSUNG
CLEAR ALL RECENT APPS BUTTON, GOOGLE LAUNCH BUTTON , TASK MANAGER BUTTON, IN RECENT PANEL
thanks
Click to expand...
Click to collapse
Awesome guide again om :victory:
thank's sir...
Thanx sifu Adi ram bar is works on my Cross a88 MT6589
_/|\_
Sir. I've tried this on the stock UI. results remain the same.
Can you check what my mistake.
This my logcat
Code:
E/AndroidRuntime( 7222): at com.android.systemui.recent.RecentsPanelView.showMemDisplay(RecentsPanelView.java:1001)
06-15 23:17:19.435 E/AndroidRuntime ( 7222): at com.android.systemui.recent.RecentsPanelView.show
(RecentsPanelView.java:380)
06-15 23:17:19.435 E/AndroidRuntime( 7222): at com.android.systemui.statusbar.BaseStatusBar
$H.handleMessage(BaseStatusBar.java:772)
06-15 23:17:19.435 E/AndroidRuntime( 7222): at com.android.systemui.statusbar.phone.PhoneStatusBar
$H.handleMessage(PhoneStatusBar.java:1846)
And this my smali
https://www.dropbox.com/s/ie6pubb57yjthfk/RecentsPanelView.smali
Thanks before sir...
Sent from my GT-B5330 using xda premium
sorry bro am on mobile now, can't look into your file, but seeing logcat it point to method ShowMemory display, find your mistake there,
Sent from my GT-I8150 using xda app-developers app
How to change task manager button? I want to launch other task manager, but if i change activity in RecentsPanelView$AsteroidTaskManagerHelper I have FC :c
E/AndroidRuntime( 675): FATAL EXCEPTION: main
E/AndroidRuntime( 675): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.omichsoft.taskmanager.Main flg=0x10000000 }
E/AndroidRuntime( 675): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1551)
E/AndroidRuntime( 675): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1422)
E/AndroidRuntime( 675): at android.app.ContextImpl.startActivity(ContextImpl.java:947)
E/AndroidRuntime( 675): at android.app.ContextImpl.startActivity(ContextImpl.java:936)
E/AndroidRuntime( 675): at android.content.ContextWrapper.startActivity(ContextWrapper.java:276)
E/AndroidRuntime( 675): at com.android.systemui.recent.RecentsPanelView$AsteroidTaskManagerHelper.onClick(RecentsPanelView.java:2336)
E/AndroidRuntime( 675): at android.view.View.performClick(View.java:4091)
E/AndroidRuntime( 675): at android.view.View$PerformClick.run(View.java:17072)
E/AndroidRuntime( 675): at android.os.Handler.handleCallback(Handler.java:615)
E/AndroidRuntime( 675): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 675): at android.os.Looper.loop(Looper.java:153)
E/AndroidRuntime( 675): at android.app.ActivityThread.main(ActivityThread.java:5086)
E/AndroidRuntime( 675): at java.lang.reflect.Method.invokeNative(NativeMethod)
E/AndroidRuntime( 675): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 675): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
E/AndroidRuntime( 675): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
E/AndroidRuntime( 675): at dalvik.system.NativeStart.main(Native Method)
Just to inform, i have tested your guide in AOSP Android 4.0.4 and all is working fine:laugh:
Awesome guide, thank you very much for this!
HOW TO ADD AOSP RAM LINEAR COLOR BAR, IN RECENT PANEL
{
"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"
}
NOTE !! , This Mod guide is a continue from this thread, How to added RAM PROGRESS BAR & CLEAR ALL RECENT APPS in Recent panel for JB 4.2 + +
so to understand this Mod guide you have to already clean done that guide first !!
TRY AT YOUR OWN RISK !!!
THANKS :laugh::good:
STEP -1
Decompile your SystemUI.apk
- Download attached LinearColorRamBar_SystemUI.apk.zip exstract it and merge to your decompiled systemui.apk
- SystemUI.apk/res/layout/status_bar_recent_panel.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.recent.RecentsPanelView android:id="@id/recents_root" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:recentItemLayout="@layout/status_bar_recent_item"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<LinearLayout android:orientation="vertical" android:background="@drawable/status_bar_recents_background" android:layout_width="fill_parent" android:layout_height="fill_parent">
<view android:orientation="horizontal" android:id="@id/asteroid_ram_usage_bar" android:paddingLeft="4.0dip" android:paddingTop="10.0dip" android:paddingRight="4.0dip" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="@*android:dimen/preference_fragment_padding_side" android:layout_marginTop="-5.0dip" android:layout_marginRight="@*android:dimen/preference_fragment_padding_side" class="com.android.systemui.recent.LinearColorBar">
<TextView android:textAppearance="?android:textAppearanceSmallInverse" android:textColor="#ff000000" android:gravity="bottom|left|center" android:id="@id/asteroid_usedMemText" android:focusable="true" android:layout_width="0.0px" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
<TextView android:textAppearance="?android:textAppearanceSmallInverse" android:textColor="#ff000000" android:gravity="center" android:id="@id/asteroid_ramText" android:focusable="true" android:layout_width="0.0px" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
<TextView android:textAppearance="?android:textAppearanceSmallInverse" android:textColor="#ff000000" android:gravity="bottom|right|center" android:layout_gravity="right|center" android:id="@id/asteroid_freeMemText" android:focusable="true" android:layout_width="0.0px" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
</view>
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textColor="@*android:color/holo_blue_dark" android:layout_gravity="center" android:id="@id/recents_memory_text" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ProgressBar android:id="@id/recents_memory_bar" android:paddingLeft="4.0dip" android:paddingRight="4.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="@*android:dimen/preference_fragment_padding_side" android:layout_marginRight="@*android:dimen/preference_fragment_padding_side" style="?android:attr/progressBarStyleHorizontal" />
</LinearLayout>
<FrameLayout android:id="@id/recents_bg_protect" android:fitsSystemWindows="true" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentBottom="true">
<com.android.systemui.recent.RecentsVerticalScrollView android:layout_gravity="bottom|left|center" android:id="@id/recents_container" android:scrollbars="none" android:fadingEdge="vertical" android:fadingEdgeLength="@dimen/status_bar_recents_scroll_fading_edge_length" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginRight="0.0dip" android:stackFromBottom="true" android:divider="@null">
<LinearLayout android:orientation="vertical" android:id="@id/recents_linear_layout" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</com.android.systemui.recent.RecentsVerticalScrollView>
<include android:layout_gravity="center" android:id="@id/recents_no_apps" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/status_bar_no_recent_apps" />
<LinearLayout android:layout_gravity="bottom" android:orientation="horizontal" android:background="@drawable/tw_ab_bottom_transparent_dark_holo" android:layout_width="fill_parent" android:layout_height="45.0dip" android:layout_weight="1.0">
<ImageButton android:id="@id/asteroid_recents_task_manager_button" android:background="@drawable/tw_recent_panel_button_forphone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/tw_recent_panel_ic_task_manager_holo_dark" android:layout_weight="1.0" android:contentDescription="@string/status_bar_recent_launch_task_manager_title" style="?android:attr/buttonStyle" />
<LinearLayout android:layout_gravity="center_vertical" android:background="@drawable/tw_divider_vertical_holo_dark" android:layout_width="1.0dip" android:layout_height="29.0dip" />
<ImageButton android:id="@id/asteroid_recents_google_button" android:background="@drawable/tw_recent_panel_button_forphone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/tw_recent_panel_ic_google_holo_dark" android:layout_weight="1.0" android:contentDescription="@string/status_bar_recent_launch_google_button" style="?android:attr/buttonStyle" />
<LinearLayout android:layout_gravity="center_vertical" android:background="@drawable/tw_divider_vertical_holo_dark" android:layout_width="1.0dip" android:layout_height="29.0dip" />
<ImageButton android:id="@id/asteroid_recents_clear_all_button" android:background="@drawable/tw_recent_panel_button_forphone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/tw_recent_panel_ic_delete_holo_dark" android:layout_weight="1.0" android:contentDescription="@string/status_bar_recent_remove_all_button" style="?android:attr/buttonStyle" />
</LinearLayout>
</FrameLayout>
</LinearLayout>
</com.android.systemui.recent.RecentsPanelView>
- SystemUI.apk/res/layout-land/status_bar_recent_panel.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.recent.RecentsPanelView android:id="@id/recents_root" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:recentItemLayout="@layout/status_bar_recent_item"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<LinearLayout android:orientation="vertical" android:background="@drawable/status_bar_recents_background" android:layout_width="fill_parent" android:layout_height="fill_parent">
<view android:orientation="horizontal" android:id="@id/asteroid_ram_usage_bar" android:paddingLeft="4.0dip" android:paddingTop="10.0dip" android:paddingRight="4.0dip" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="@*android:dimen/preference_fragment_padding_side" android:layout_marginTop="-5.0dip" android:layout_marginRight="@*android:dimen/preference_fragment_padding_side" class="com.android.systemui.recent.LinearColorBar">
<TextView android:textAppearance="?android:textAppearanceSmallInverse" android:textColor="#ff000000" android:gravity="bottom|left|center" android:id="@id/asteroid_usedMemText" android:focusable="true" android:layout_width="0.0px" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
<TextView android:textAppearance="?android:textAppearanceSmallInverse" android:textColor="#ff000000" android:gravity="center" android:id="@id/asteroid_ramText" android:focusable="true" android:layout_width="0.0px" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
<TextView android:textAppearance="?android:textAppearanceSmallInverse" android:textColor="#ff000000" android:gravity="bottom|right|center" android:layout_gravity="right|center" android:id="@id/asteroid_freeMemText" android:focusable="true" android:layout_width="0.0px" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
</view>
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textColor="@*android:color/holo_blue_dark" android:layout_gravity="center" android:id="@id/recents_memory_text" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ProgressBar android:id="@id/recents_memory_bar" android:paddingLeft="4.0dip" android:paddingRight="4.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="@*android:dimen/preference_fragment_padding_side" android:layout_marginRight="@*android:dimen/preference_fragment_padding_side" style="?android:attr/progressBarStyleHorizontal" />
</LinearLayout>
<FrameLayout android:id="@id/recents_bg_protect" android:fitsSystemWindows="true" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentBottom="true">
<com.android.systemui.recent.RecentsHorizontalScrollView android:layout_gravity="right" android:id="@id/recents_container" android:scrollbars="none" android:fadingEdge="horizontal" android:fadingEdgeLength="@dimen/status_bar_recents_scroll_fading_edge_length" android:clipChildren="false" android:clipToPadding="false" android:layout_width="wrap_content" android:layout_height="fill_parent">
<LinearLayout android:orientation="horizontal" android:id="@id/recents_linear_layout" android:clipChildren="false" android:clipToPadding="false" android:layout_width="wrap_content" android:layout_height="fill_parent" />
</com.android.systemui.recent.RecentsHorizontalScrollView>
<include android:layout_gravity="center" android:id="@id/recents_no_apps" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/status_bar_no_recent_apps" />
<LinearLayout android:layout_gravity="bottom" android:orientation="horizontal" android:background="@drawable/tw_ab_bottom_transparent_dark_holo" android:layout_width="fill_parent" android:layout_height="45.0dip" android:layout_weight="1.0">
<ImageButton android:id="@id/asteroid_recents_task_manager_button" android:background="@drawable/tw_recent_panel_button_forphone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/tw_recent_panel_ic_task_manager_holo_dark" android:layout_weight="1.0" android:contentDescription="@string/status_bar_recent_launch_task_manager_title" style="?android:attr/buttonStyle" />
<LinearLayout android:layout_gravity="center_vertical" android:background="@drawable/tw_divider_vertical_holo_dark" android:layout_width="1.0dip" android:layout_height="29.0dip" />
<ImageButton android:id="@id/asteroid_recents_google_button" android:background="@drawable/tw_recent_panel_button_forphone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/tw_recent_panel_ic_google_holo_dark" android:layout_weight="1.0" android:contentDescription="@string/status_bar_recent_launch_google_button" style="?android:attr/buttonStyle" />
<LinearLayout android:layout_gravity="center_vertical" android:background="@drawable/tw_divider_vertical_holo_dark" android:layout_width="1.0dip" android:layout_height="29.0dip" />
<ImageButton android:id="@id/asteroid_recents_clear_all_button" android:background="@drawable/tw_recent_panel_button_forphone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/tw_recent_panel_ic_delete_holo_dark" android:layout_weight="1.0" android:contentDescription="@string/status_bar_recent_remove_all_button" style="?android:attr/buttonStyle" />
</LinearLayout>
</FrameLayout>
</LinearLayout>
</com.android.systemui.recent.RecentsPanelView>
- SystemUI.apk/res/values/ids.xml
Code:
<item type="id" name="asteroid_recents_google_button">false</item>
<item type="id" name="asteroid_recents_clear_all_button">false</item>
[COLOR="Red"]<item type="id" name="asteroid_ram_usage_bar">false</item>
<item type="id" name="asteroid_usedMemText">false</item>
<item type="id" name="asteroid_ramText">false</item>
<item type="id" name="asteroid_freeMemText">false</item>[/COLOR]
</resources>
- SystemUI.apk/res/values/strings.xml
Code:
<string name="status_bar_recent_launch_task_manager_title">Task manager</string>
<string name="status_bar_recent_launch_google_button">Google</string>
<string name="status_bar_recent_remove_all_button">Remove all</string>
[COLOR="Red"]<string name="memory">RAM</string>
<string name="service_free_mem">%1$s free</string>
<string name="service_used_mem">%1$s used</string>[/COLOR]
</resources>
- Recompile your SystemUI.apk
STEP -2
Decompile the newly Recompiled APK again
Next go to
res/values/public.xml
open it with Notepad++
leave it, but keep it open
- SystemUI.apk/smali/com/android/systemui/recent/RecentsPanelView.smali
add the red line
Code:
# instance fields
[COLOR="Red"].field private mActiveMemory:J[/COLOR]
.field private mAnimateIconOfFirstTask:Z
[COLOR="Red"].field private mCachedMemory:J[/COLOR]
.field private mFitThumbnailToXY:Z
[COLOR="Red"].field mFreeMemText:Landroid/widget/TextView;[/COLOR]
[COLOR="Red"].field private mFreeMemory:J[/COLOR]
.field private mGoogleButton:Landroid/widget/ImageButton;
.field private mHighEndGfx:Z
.field private mItemToAnimateInWhenWindowAnimationIsFinished:Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;
.field private mListAdapter:Lcom/android/systemui/recent/RecentsPanelView$TaskDescriptionAdapter;
[COLOR="Red"].field mMemInfoReader:Lcom/android/internal/util/MemInfoReader;[/COLOR]
.field private mPopup:Landroid/widget/PopupMenu;
[COLOR="Red"].field mRamText:Landroid/widget/TextView;[/COLOR]
[COLOR="Red"].field private mRamUsageBar:Lcom/android/systemui/recent/LinearColorBar;[/COLOR]
.field private mRecentItemLayoutId:I
.field private mRecentTaskDescriptions:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList",
"<",
"Lcom/android/systemui/recent/TaskDescription;",
">;"
}
.end annotation
.end field
.field private mRecentTasksLoader:Lcom/android/systemui/recent/RecentTasksLoader;
.field private mRecentsClearAllButton:Landroid/widget/ImageButton;
.field private mRecentsContainer:Landroid/view/ViewGroup;
.field private mRecentsNoApps:Landroid/view/View;
.field private mRecentsScrim:Landroid/view/View;
.field private mShowing:Z
.field private mStatusBarTouchProxy:Lcom/android/systemui/recent/StatusBarTouchProxy;
.field private mTaskManagerButton:Landroid/widget/ImageButton;
.field private mThumbnailWidth:I
[COLOR="Red"].field private mTotalMemory:J[/COLOR]
[COLOR="Red"].field mUsedMemText:Landroid/widget/TextView;[/COLOR]
.field private mWaitingForWindowAnimation:Z
.field private mWaitingToShow:Z
.field private mWindowAnimationStartTime:J
Code:
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.locals 3
.parameter "context"
.parameter "attrs"
.parameter "defStyle"
.prologue
const/4 v2, 0x0
.line 260
invoke-direct {p0, p1, p2, p3}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
[COLOR="Red"]new-instance v1, Lcom/android/internal/util/MemInfoReader;
invoke-direct {v1}, Lcom/android/internal/util/MemInfoReader;-><init>()V
iput-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mMemInfoReader:Lcom/android/internal/util/MemInfoReader;[/COLOR]
.line 261
invoke-virtual {p0}, Lcom/android/systemui/recent/RecentsPanelView;->updateValuesFromResources()V
.line 263
sget-object v1, Lcom/android/systemui/R$styleable;->RecentsPanelView:[I
invoke-virtual {p1, p2, v1, p3, v2}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray;
move-result-object v0
Code:
.method static synthetic access$1102(Lcom/android/systemui/recent/RecentsPanelView;Landroid/widget/PopupMenu;)Landroid/widget/PopupMenu;
.locals 0
.parameter "x0"
.parameter "x1"
.prologue
.line 73
iput-object p1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mPopup:Landroid/widget/PopupMenu;
return-object p1
.end method
[COLOR="Red"].method static synthetic access$11400(Lcom/android/systemui/recent/RecentsPanelView;)Landroid/content/Context;
.locals 1
.parameter "x0"
.prologue
.line 85
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;
return-object v0
.end method[/COLOR]
.method static synthetic access$177777700(Lcom/android/systemui/recent/RecentsPanelView;)V
.locals 0
.parameter "x0"
.prologue
.line 75
invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->AsteroidClearAllRecentApps()V
return-void
.end method
.method static synthetic access$200(Lcom/android/systemui/recent/RecentsPanelView;)Lcom/android/systemui/recent/RecentTasksLoader;
Code:
.method private pointInside(IILandroid/view/View;)Z
.locals 5
.parameter "x"
.parameter "y"
.parameter "v"
.prologue
.line 282
invoke-virtual {p3}, Landroid/view/View;->getLeft()I
move-result v1
.line 283
.local v1, l:I
invoke-virtual {p3}, Landroid/view/View;->getRight()I
move-result v2
.line 284
.local v2, r:I
invoke-virtual {p3}, Landroid/view/View;->getTop()I
move-result v3
.line 285
.local v3, t:I
invoke-virtual {p3}, Landroid/view/View;->getBottom()I
move-result v0
.line 286
.local v0, b:I
if-lt p1, v1, :cond_0
if-ge p1, v2, :cond_0
if-lt p2, v3, :cond_0
if-ge p2, v0, :cond_0
const/4 v4, 0x1
:goto_0
return v4
:cond_0
const/4 v4, 0x0
goto :goto_0
.end method
[COLOR="Red"].method private static readLine(Ljava/lang/String;I)Ljava/lang/String;
.locals 4
.parameter "filename"
.parameter "line"
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.prologue
.line 1190
new-instance v1, Ljava/io/BufferedReader;
new-instance v2, Ljava/io/FileReader;
invoke-direct {v2, p0}, Ljava/io/FileReader;-><init>(Ljava/lang/String;)V
const/16 v3, 0x100
invoke-direct {v1, v2, v3}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;I)V
.line 1192
.local v1, reader:Ljava/io/BufferedReader;
const/4 v0, 0x1
.local v0, i:I
:goto_0
if-ge v0, p1, :cond_0
.line 1193
:try_start_0
invoke-virtual {v1}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
.line 1192
add-int/lit8 v0, v0, 0x1
goto :goto_0
.line 1195
:cond_0
invoke-virtual {v1}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
move-result-object v2
.line 1197
invoke-virtual {v1}, Ljava/io/BufferedReader;->close()V
return-object v2
:catchall_0
move-exception v2
invoke-virtual {v1}, Ljava/io/BufferedReader;->close()V
throw v2
.end method[/COLOR]
.method private refreshRecentTasksList(Ljava/util/ArrayList;Z)V
.locals 1
.parameter
.parameter "firstScreenful"
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/ArrayList",
"<",
"Lcom/android/systemui/recent/TaskDescription;",
">;Z)V"
}
.end annotation
.prologue
.line 646
.local p1, recentTasksList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/android/systemui/recent/TaskDescription;>;"
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentTaskDescriptions:Ljava/util/ArrayList;
if-nez v0, :cond_0
Code:
iget-object v0, p1, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->iconView:Landroid/widget/ImageView;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V
.line 515
:cond_1
return-void
.end method
[COLOR="Red"].method private updateMemoryInfo()V
.locals 7
.prologue
const/4 v6, 0x3
const-wide/16 v0, 0x0
:try_start_0
const-string v2, "/proc/meminfo"
const/4 v3, 0x1
invoke-static {v2, v3}, Lcom/android/systemui/recent/RecentsPanelView;->readLine(Ljava/lang/String;I)Ljava/lang/String;
move-result-object v2
if-eqz v2, :cond_0
const-string v3, "\\s+"
invoke-virtual {v2, v3}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
move-result-object v2
array-length v3, v2
if-ne v3, v6, :cond_0
const/4 v3, 0x1
aget-object v2, v2, v3
invoke-static {v2}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
move-result-wide v2
const-wide/16 v4, 0x400
div-long v0, v2, v4
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_3
:cond_0
:goto_0
iput-wide v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mTotalMemory:J
:try_start_1
const-string v2, "/proc/meminfo"
const/4 v3, 0x2
invoke-static {v2, v3}, Lcom/android/systemui/recent/RecentsPanelView;->readLine(Ljava/lang/String;I)Ljava/lang/String;
move-result-object v2
if-eqz v2, :cond_1
const-string v3, "\\s+"
invoke-virtual {v2, v3}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
move-result-object v2
array-length v3, v2
if-ne v3, v6, :cond_1
const/4 v3, 0x1
aget-object v2, v2, v3
invoke-static {v2}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
move-result-wide v2
const-wide/16 v4, 0x400
div-long v0, v2, v4
:try_end_1
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_2
:cond_1
:goto_1
iput-wide v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mFreeMemory:J
:try_start_2
const-string v2, "/proc/meminfo"
const/4 v3, 0x6
invoke-static {v2, v3}, Lcom/android/systemui/recent/RecentsPanelView;->readLine(Ljava/lang/String;I)Ljava/lang/String;
move-result-object v2
if-eqz v2, :cond_2
const-string v3, "\\s+"
invoke-virtual {v2, v3}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
move-result-object v2
array-length v3, v2
if-ne v3, v6, :cond_2
const/4 v3, 0x1
aget-object v2, v2, v3
invoke-static {v2}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
move-result-wide v2
const-wide/16 v4, 0x400
div-long v0, v2, v4
:try_end_2
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_1
:cond_2
:goto_2
iput-wide v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mActiveMemory:J
:try_start_3
const-string v2, "/proc/meminfo"
const/4 v3, 0x4
invoke-static {v2, v3}, Lcom/android/systemui/recent/RecentsPanelView;->readLine(Ljava/lang/String;I)Ljava/lang/String;
move-result-object v2
if-eqz v2, :cond_3
const-string v3, "\\s+"
invoke-virtual {v2, v3}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
move-result-object v2
array-length v3, v2
if-ne v3, v6, :cond_3
const/4 v3, 0x1
aget-object v2, v2, v3
invoke-static {v2}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
move-result-wide v2
const-wide/16 v4, 0x400
div-long v0, v2, v4
:try_end_3
.catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_0
:cond_3
:goto_3
iput-wide v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mCachedMemory:J
return-void
:catch_0
move-exception v2
goto :goto_3
:catch_1
move-exception v2
goto :goto_2
:catch_2
move-exception v2
goto :goto_1
:catch_3
move-exception v2
goto :goto_0
.end method
.method private updateRamBar()V
.locals 15
.prologue
const-wide/16 v1, 0x0
const/4 v10, 0x1
const/4 v9, 0x0
const v0, [COLOR="Blue"]0x7f08012f[/COLOR]
invoke-virtual {p0, v0}, Lcom/android/systemui/recent/RecentsPanelView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Lcom/android/systemui/recent/LinearColorBar;
iput-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRamUsageBar:Lcom/android/systemui/recent/LinearColorBar;
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v3, "recents_ram_bar_mode"
invoke-static {v0, v3, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-eqz v3, :cond_1
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRamUsageBar:Lcom/android/systemui/recent/LinearColorBar;
if-eqz v0, :cond_1
new-instance v4, Landroid/util/DisplayMetrics;
invoke-direct {v4}, Landroid/util/DisplayMetrics;-><init>()V
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;
const-string v5, "window"
invoke-virtual {v0, v5}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/view/WindowManager;
invoke-interface {v0}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;
move-result-object v0
invoke-virtual {v0, v4}, Landroid/view/Display;->getMetrics(Landroid/util/DisplayMetrics;)V
iget v0, v4, Landroid/util/DisplayMetrics;->density:F
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRamUsageBar:Lcom/android/systemui/recent/LinearColorBar;
invoke-virtual {v0, v9}, Lcom/android/systemui/recent/LinearColorBar;->setVisibility(I)V
invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->updateMemoryInfo()V
packed-switch v3, :pswitch_data_0
move-wide v3, v1
:goto_0
const v0, [COLOR="Blue"]0x7f080130[/COLOR]
invoke-virtual {p0, v0}, Lcom/android/systemui/recent/RecentsPanelView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
iput-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mUsedMemText:Landroid/widget/TextView;
const v0, [COLOR="Blue"]0x7f080132[/COLOR]
invoke-virtual {p0, v0}, Lcom/android/systemui/recent/RecentsPanelView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
iput-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mFreeMemText:Landroid/widget/TextView;
const v0, [COLOR="Blue"]0x7f080131[/COLOR]
invoke-virtual {p0, v0}, Lcom/android/systemui/recent/RecentsPanelView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
iput-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRamText:Landroid/widget/TextView;
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mUsedMemText:Landroid/widget/TextView;
invoke-virtual {p0}, Lcom/android/systemui/recent/RecentsPanelView;->getResources()Landroid/content/res/Resources;
move-result-object v5
const v6, [COLOR="Blue"]0x7f0b00f7[/COLOR]
new-array v7, v10, [Ljava/lang/Object;
new-instance v8, Ljava/lang/StringBuilder;
invoke-direct {v8}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v8, v3, v4}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v3
const-string v4, " MB"
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
aput-object v3, v7, v9
invoke-virtual {v5, v6, v7}, Landroid/content/res/Resources;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v3
invoke-virtual {v0, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mFreeMemText:Landroid/widget/TextView;
invoke-virtual {p0}, Lcom/android/systemui/recent/RecentsPanelView;->getResources()Landroid/content/res/Resources;
move-result-object v3
const v4, [COLOR="Blue"]0x7f0b00f6[/COLOR]
new-array v5, v10, [Ljava/lang/Object;
new-instance v6, Ljava/lang/StringBuilder;
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v6, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v1
const-string v2, " MB"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
aput-object v1, v5, v9
invoke-virtual {v3, v4, v5}, Landroid/content/res/Resources;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRamText:Landroid/widget/TextView;
invoke-virtual {p0}, Lcom/android/systemui/recent/RecentsPanelView;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v2, [COLOR="Blue"]0x7f0b00f5[/COLOR]
invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
iget-wide v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mTotalMemory:J
long-to-float v0, v0
iget-wide v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mTotalMemory:J
iget-wide v3, p0, Lcom/android/systemui/recent/RecentsPanelView;->mFreeMemory:J
sub-long/2addr v1, v3
iget-wide v3, p0, Lcom/android/systemui/recent/RecentsPanelView;->mCachedMemory:J
sub-long/2addr v1, v3
iget-wide v3, p0, Lcom/android/systemui/recent/RecentsPanelView;->mActiveMemory:J
sub-long/2addr v1, v3
long-to-float v1, v1
div-float/2addr v1, v0
iget-wide v2, p0, Lcom/android/systemui/recent/RecentsPanelView;->mActiveMemory:J
long-to-float v2, v2
div-float/2addr v2, v0
iget-wide v3, p0, Lcom/android/systemui/recent/RecentsPanelView;->mCachedMemory:J
long-to-float v3, v3
div-float v0, v3, v0
iget-object v3, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRamUsageBar:Lcom/android/systemui/recent/LinearColorBar;
invoke-virtual {v3, v1, v0, v2}, Lcom/android/systemui/recent/LinearColorBar;->setRatios(FFF)V
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRamUsageBar:Lcom/android/systemui/recent/LinearColorBar;
new-instance v1, Lcom/android/systemui/recent/RecentsPanelView$AsteroidRunningServices;
invoke-direct {v1, p0}, Lcom/android/systemui/recent/RecentsPanelView$AsteroidRunningServices;-><init>(Lcom/android/systemui/recent/RecentsPanelView;)V
invoke-virtual {v0, v1}, Lcom/android/systemui/recent/LinearColorBar;->setOnClickListener(Landroid/view/View$OnClickListener;)V
:cond_0
:goto_1
return-void
:pswitch_0
iget-wide v2, p0, Lcom/android/systemui/recent/RecentsPanelView;->mActiveMemory:J
iget-wide v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mTotalMemory:J
iget-wide v4, p0, Lcom/android/systemui/recent/RecentsPanelView;->mActiveMemory:J
sub-long/2addr v0, v4
move-wide v11, v0
move-wide v13, v2
move-wide v3, v13
move-wide v1, v11
goto/16 :goto_0
:pswitch_1
iget-wide v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mActiveMemory:J
iget-wide v2, p0, Lcom/android/systemui/recent/RecentsPanelView;->mCachedMemory:J
add-long/2addr v2, v0
iget-wide v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mTotalMemory:J
iget-wide v4, p0, Lcom/android/systemui/recent/RecentsPanelView;->mActiveMemory:J
sub-long/2addr v0, v4
iget-wide v4, p0, Lcom/android/systemui/recent/RecentsPanelView;->mCachedMemory:J
sub-long/2addr v0, v4
move-wide v11, v0
move-wide v13, v2
move-wide v3, v13
move-wide v1, v11
goto/16 :goto_0
:pswitch_2
iget-wide v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mTotalMemory:J
iget-wide v2, p0, Lcom/android/systemui/recent/RecentsPanelView;->mFreeMemory:J
sub-long v2, v0, v2
iget-wide v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mFreeMemory:J
move-wide v11, v0
move-wide v13, v2
move-wide v3, v13
move-wide v1, v11
goto/16 :goto_0
:cond_1
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRamUsageBar:Lcom/android/systemui/recent/LinearColorBar;
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRamUsageBar:Lcom/android/systemui/recent/LinearColorBar;
const/16 v1, 0x8
invoke-virtual {v0, v1}, Lcom/android/systemui/recent/LinearColorBar;->setVisibility(I)V
goto :goto_1
nop
:pswitch_data_0
.packed-switch 0x1
:pswitch_0
:pswitch_1
:pswitch_2
.end packed-switch
.end method[/COLOR]
.method private updateThumbnail(Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;Landroid/graphics/Bitmap;ZZ)V
.locals 5
.parameter "h"
.parameter "thumbnail"
.parameter "show"
.parameter "anim"
Change this IDS with the value you got in your own public.xml
- 0x7f08012f
Code:
<public type="id" name="asteroid_ram_usage_bar" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
Click to expand...
Click to collapse
-- 0x7f080130
Code:
<public type="id" name="asteroid_usedMemText" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
Click to expand...
Click to collapse
-- 0x7f080132
Code:
<public type="id" name="asteroid_freeMemText" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
Click to expand...
Click to collapse
-- 0x7f080131
Code:
<public type="id" name="asteroid_ramText" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
Click to expand...
Click to collapse
-- 0x7f0b00f7
Code:
<public type="string" name="service_used_mem" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
Click to expand...
Click to collapse
-- 0x7f0b00f6
Code:
<public type="string" name="service_free_mem" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
Click to expand...
Click to collapse
-- 0x7f0b00f5
Code:
<public type="string" name="memory" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
Click to expand...
Click to collapse
NEXT,
add the red line
Code:
.method public clearRecentTasksList()V
.locals 1
.prologue
.line 611
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentTaskDescriptions:Ljava/util/ArrayList;
if-eqz v0, :cond_0
.line 612
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentTasksLoader:Lcom/android/systemui/recent/RecentTasksLoader;
invoke-virtual {v0, p0}, Lcom/android/systemui/recent/RecentTasksLoader;->cancelLoadingThumbnailsAndIcons(Lcom/android/systemui/recent/RecentsPanelView;)V
.line 613
invoke-virtual {p0}, Lcom/android/systemui/recent/RecentsPanelView;->onTaskLoadingCancelled()V
.line 615
:cond_0
[COLOR="Red"] invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->updateRamBar()V[/COLOR]
return-void
.end method
find this method, and add the red line above goto :goto_0
Code:
.method public handleSwipe(Landroid/view/View;)V
Code:
.line 770
const/4 v2, 0x0
invoke-virtual {p0, v2}, Lcom/android/systemui/recent/RecentsPanelView;->setContentDescription(Ljava/lang/CharSequence;)V
invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->showMemDisplay()Z
[COLOR="Red"] invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->updateRamBar()V[/COLOR]
[COLOR="Blue"]goto :goto_0[/COLOR]
.end method
.method public isInContentArea(II)Z
.locals 2
.parameter "x"
.parameter "y"
.prologue
const/4 v0, 0x1
Next, find this method
Code:
.method protected onFinishInflate()V
and add the red line above return-void
Code:
invoke-direct {v2, p0}, Lcom/android/systemui/recent/RecentsPanelView$AsteroidGoogleHelper;-><init>(Lcom/android/systemui/recent/RecentsPanelView;)V
invoke-virtual {v1, v2}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V
[COLOR="Red"]invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->updateRamBar()V[/COLOR]
[COLOR="Blue"]return-void[/COLOR]
.line 473
.end local v0 #scrollView:Lcom/android/systemui/recent/RecentsPanelView$RecentsScrollView;
:cond_1
new-instance v1, Ljava/lang/IllegalArgumentException;
const-string v2, "missing Recents[Horizontal]ScrollView"
Next
Code:
.method public onTaskLoadingCancelled()V
.locals 1
.prologue
.line 619
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentTaskDescriptions:Ljava/util/ArrayList;
if-eqz v0, :cond_0
.line 620
const/4 v0, 0x0
iput-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentTaskDescriptions:Ljava/util/ArrayList;
.line 621
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mListAdapter:Lcom/android/systemui/recent/RecentsPanelView$TaskDescriptionAdapter;
invoke-virtual {v0}, Lcom/android/systemui/recent/RecentsPanelView$TaskDescriptionAdapter;->notifyDataSetInvalidated()V
.line 623
:cond_0
[COLOR="Red"]invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->updateRamBar()V[/COLOR]
return-void
.end method
.method onTaskThumbnailLoaded(Lcom/android/systemui/recent/TaskDescription;)V
.locals 7
Next and the last
Code:
.method public refreshViews()V
.locals 1
.prologue
.line 626
iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mListAdapter:Lcom/android/systemui/recent/RecentsPanelView$TaskDescriptionAdapter;
invoke-virtual {v0}, Lcom/android/systemui/recent/RecentsPanelView$TaskDescriptionAdapter;->notifyDataSetInvalidated()V
.line 627
invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->updateUiElements()V
.line 628
invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->showIfReady()V
[COLOR="Red"] invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->updateRamBar()V[/COLOR]
.line 629
return-void
.end method
Done and recompile
Download attached AsteroidRAMbar.apk, push to system/app/with right permission
CREDIT & THANKS :
- AOKP ROM
- SLIMROM
- CARBON ROM
- CYANOGENMOD
- Ficeto colorpicker
- magaritnov colorpicker
- [Unofficial Community] Galaxy Wonder CyanogenMod Indonesia
wew...
thanks sir...:laugh::good:
mantap
Adi Aisiteru Reborn said:
CREDIT & THANKS :
- AOKP ROM
- SLIMROM
- CARBON ROM
- CYANOGENMOD
- Ficeto colorpicker
- magaritnov colorpicker
- [Unofficial Community] Galaxy Wonder CyanogenMod Indonesia
Click to expand...
Click to collapse
sir, i met this issue when recompile, tell me what is this and how to fix
I: Smaling...
[48,4] Error for input '.param': Invalid directive
[49,4] Error for input '.param': Invalid directive
[50,4] Error for input '.param': Invalid directive
[48,11] mismatched input 'p1' expecting END_METHOD_DIRECTIVE
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: c:\TickleMyAndroid\_WorkArea1\_working\SystemUI.apk\smali\com\android\systemui\BeanBag$Board$1.smali
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:66)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:50)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:37)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:257)
at brut.androlib.Androlib.buildSources(Androlib.java:214)
at brut.androlib.Androlib.build(Androlib.java:205)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
----------------
Recompile Not Successful!
Oohhlala said:
sir, i met this issue when recompile, tell me what is this and how to fix
I: Smaling...
[48,4] Error for input '.param': Invalid directive
[49,4] Error for input '.param': Invalid directive
[50,4] Error for input '.param': Invalid directive
[48,11] mismatched input 'p1' expecting END_METHOD_DIRECTIVE
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: c:\TickleMyAndroid\_WorkArea1\_working\SystemUI.apk\smali\com\android\systemui\BeanBag$Board$1.smali
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:66)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:50)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:37)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:257)
at brut.androlib.Androlib.buildSources(Androlib.java:214)
at brut.androlib.Androlib.build(Androlib.java:205)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
----------------
Recompile Not Successful!
Click to expand...
Click to collapse
Try with apktool 1.5 xx
Sent from my GT-I8150 using XDA Free mobile app
Adi Aisiteru Reborn said:
Try with apktool 1.5 xx
Sent from my GT-I8150 using XDA Free mobile app
Click to expand...
Click to collapse
that error log from apktool 1.5.2
Oohhlala said:
that error log from apktool 1.5.2
Click to expand...
Click to collapse
I see that you are using Tikle my android tool, then you can read this ? http://forum.xda-developers.com/showthread.php?p=53839770
Adi Aisiteru Reborn said:
I see that you are using Tikle my android tool, then you can read this ? http://forum.xda-developers.com/showthread.php?p=53839770
Click to expand...
Click to collapse
Sir, what is this issue? I just did following this guide, i didnt do following your first guide.
Oohhlala said:
Sir, what is this issue? I just did following this guide, i didnt do following your first guide.
Click to expand...
Click to collapse
have you check enabled show on Recents ram bar mod
Adi Aisiteru Reborn said:
have you check enabled show on Recents ram bar mod
Click to expand...
Click to collapse
of course, this is issue of smali file or xml file ?
Oohhlala said:
of course, this is issue of smali file or xml file ?
Click to expand...
Click to collapse
I don't understand, but this mod confirmed work on XM JB4.3
Sent from my GT-I8150 using XDA Free mobile app
Adi Aisiteru Reborn said:
I don't understand, but this mod confirmed work on XM JB4.3
Sent from my GT-I8150 using XDA Free mobile app
Click to expand...
Click to collapse
i meant this is problem with editing smali file or xml layout, and can u check my recenpanelview.smali ? or need to do this mod with your first guide
Oohhlala said:
i meant this is problem with editing smali file or xml layout, and can u check my recenpanelview.smali ? or need to do this mod with your first guide
Click to expand...
Click to collapse
The layout is fine, but the smali not run
Sent from my GT-I8150 using XDA Free mobile app
Adi Aisiteru Reborn said:
The layout is fine, but the smali not run
Sent from my GT-I8150 using XDA Free mobile app
Click to expand...
Click to collapse
here is my recentpanelview.smali file, plz check for me
Adi Aisiteru Reborn said:
The layout is fine, but the smali not run
Sent from my GT-I8150 using XDA Free mobile app
Click to expand...
Click to collapse
- 0x7f08012f
Code:
<public type="id" name="asteroid_ram_usage_bar" id="0x7f??????" />
Click to expand...
Click to collapse
bro, plz explain me this step. i have to replace the ID in public.xml by your ID ( in smali ) or replace the ID in smali by one in public.xml ?
Oohhlala said:
bro, plz explain me this step. i have to replace the ID in public.xml by your ID ( in smali ) or replace the ID in smali by one in public.xml ?
Click to expand...
Click to collapse
you will get the value of the questions marks in your secondly decompiled SystemUI.Apk/res/values/publc.xml
Code:
<public type="[COLOR="Red"]id[/COLOR]" name="[COLOR="Red"]asteroid_ram_usage_bar[/COLOR]" id="0x7f[COLOR="Blue"]??????[/COLOR]" />
Next , change this 0x7f08012f in my smali with that . I think am clear enough
Adi Aisiteru Reborn said:
you will get the value of the questions marks in your secondly decompiled SystemUI.Apk/res/values/publc.xml
Code:
<public type="[COLOR="Red"]id[/COLOR]" name="[COLOR="Red"]asteroid_ram_usage_bar[/COLOR]" id="0x7f[COLOR="Blue"]??????[/COLOR]" />
Next , change this 0x7f08012f in my smali with that . I think am clear enough
Click to expand...
Click to collapse
Finally i got it, thank in advance :good:
Btw i tried to add this mod to other area ( notification panel) but it just shows the bar background, doesn't show the values
HOW TO ADD SCREENSHOT TOGGLE TO NOTIFICATION PANEL
AOSP / CM / MTK JB 4.2 ++
{
"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 :victory::laugh::silly:
This mod is actually already in most of Open Source Rom Quicksettings Tiles view, but I change the code little bit to put the toggle on notification panel
Credit & thanks ;
- Carbon Rom, AOKP, cRdroid AOSP , CyanogenMod, BeanStalk
- [Unofficial Community] Galaxy Wonder CyanogenMod Indonesia
Feature :
- On click will take screenshot anywhere
- On long click will delay screenshot in 5 seconds
REQUIREMENT:
- BRAIN
- Patient
- experience
- Know how to decompile/recompiling Apk file
- Know how to decompile/recompiling jar Apk file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else
STEP - 1
- Decompile your SystemUI.apk
- Download attached SCREENSHOT-SystemUI.zip exstract it and merge it to your decompiled SystemUI.apk
- SystemUI.apk/res/layout/status_bar_expanded_header.xml
add the red code
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/header" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" android:baselineAligned="false"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<RelativeLayout android:enabled="false" android:id="@id/datetime" android:background="@drawable/ic_notify_button_bg" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock" android:id="@id/clock" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="8.0dip" android:singleLine="true" android:layout_centerVertical="true" />
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:id="@id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/clock" android:layout_centerVertical="true" />
</RelativeLayout>
[COLOR="Red"]<ImageButton android:id="@id/asteroid_screenshot_button" android:background="@drawable/asteroid_screenshot_button_bg" android:paddingTop="3.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_asteroid_screenshot" android:layout_toRightOf="@id/date" android:paddingStart="7.0dip" />[/COLOR]
<Space android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_weight="1.0" />
<TextView android:textSize="11.0dip" android:textStyle="bold" android:textColor="#ff00a040" android:layout_gravity="center_vertical" android:id="@id/header_debug_info" android:padding="2.0dip" android:visibility="invisible" android:layout_width="wrap_content" android:layout_height="wrap_content" android:fontFamily="sans-serif-condensed" />
<ImageView android:id="@id/clear_all_button" android:layout_width="50.0dip" android:layout_height="50.0dip" android:src="@drawable/ic_notify_clear" android:scaleType="center" android:contentDescription="@string/accessibility_clear_all" />
<FrameLayout android:id="@id/settings_button_holder" android:layout_width="50.0dip" android:layout_height="50.0dip" android:layout_marginLeft="12.0dip">
<ImageView android:id="@id/settings_button" android:layout_width="50.0dip" android:layout_height="50.0dip" android:src="@drawable/ic_notify_settings" android:scaleType="center" android:contentDescription="@string/accessibility_desc_quick_settings" />
<ImageView android:id="@id/notification_button" android:visibility="gone" android:layout_width="50.0dip" android:layout_height="50.0dip" android:src="@drawable/ic_notifications" android:scaleType="center" android:contentDescription="@string/accessibility_notifications_button" />
</FrameLayout>
</LinearLayout>
- SystemUI.apk/res/values/strings.xml
add the red line to end of it before </resources>
Code:
<string name="status_bar_help_title">Notifications appear here</string>
<string name="status_bar_help_text">"Access them anytime by swiping down.
Swipe down again for system controls."</string>
[COLOR="Red"]<string name="permdesc_screenshot">Capture screenshot</string>
<string name="permlab_screenshot">Allows the app to cature a screenshot. This is protected by SystemUI.</string>
<string name="screenshot_toast">Screenshot in %1$d seconds</string>[/COLOR]
</resources>
- SystemUI.apk/res/values/ids.xml
add the red line to end of it before </resources>
Code:
<item type="id" name="notification_inspect_item">false</item>
<item type="id" name="recent_remove_item">false</item>
<item type="id" name="recent_inspect_item">false</item>
[COLOR="Red"]<item type="id" name="asteroid_screenshot_button">false</item>[/COLOR]
</resources>
- Recompile your SystemUI.apk
STEP - 2
- Decompile the newly Recompiled APK again
Next go to
res/values/public.xml
open it with Notepad++
leave it, but keep it open
- smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
add the red lines :
Code:
.field mAnimY:F
.field mAnimating:Z
.field mAnimatingReveal:Z
[COLOR="Red"].field mAsteroidScreenshotButton:Landroid/widget/ImageButton;[/COLOR]
.field mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
.field mBluetoothController:Lcom/android/systemui/statusbar/policy/BluetoothController;
Code:
.field mFlipSettingsViewAnim:Landroid/animation/Animator;
.field mFocusChangeListener:Landroid/view/View$OnFocusChangeListener;
.field private final mGestureRec:Lcom/android/systemui/statusbar/GestureRecorder;
[COLOR="Red"].field public mHandler:Landroid/os/Handler;[/COLOR]
.field private mHasDockBattery:Z
.field mHasFlipSettings:Z
Code:
.field mQS:Lcom/android/systemui/statusbar/phone/QuickSettingsController;
.field mQueueLock:Ljava/lang/Object;
.field private final mRecentsClickListener:Landroid/view/View$OnClickListener;
.field private mRecreating:Z
[COLOR="Red"].field private mRunnable:Ljava/lang/Runnable;[/COLOR]
.field private mScreenWidth:F
.field mScrollView:Landroid/widget/ScrollView;
.field mScrollViewAnim:Landroid/animation/Animator;
- NEXT, Search this method
Code:
.method public constructor <init>()V
and add the red code
Code:
iput v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDisabled:I
iput v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSystemUiVisibility:I
[COLOR="Red"]new-instance v0, Landroid/os/Handler;
invoke-direct {v0}, Landroid/os/Handler;-><init>()V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mHandler:Landroid/os/Handler;[/COLOR]
new-instance v0, Landroid/util/DisplayMetrics;
invoke-direct {v0}, Landroid/util/DisplayMetrics;-><init>()V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDisplayMetrics:Landroid/util/DisplayMetrics;
iput-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mGestureRec:Lcom/android/systemui/statusbar/GestureRecorder;
iput v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNavigationIconHints:I
- NEXT, still in the same method,
add the red code above return-void
Code:
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$32;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$32;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStartTracing:Ljava/lang/Runnable;
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$33;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$33;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStopTracing:Ljava/lang/Runnable;
[COLOR="Red"]new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AsteroidSrcreenshot5;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AsteroidSrcreenshot5;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mRunnable:Ljava/lang/Runnable;[/COLOR]
[COLOR="Blue"]return-void[/COLOR]
.end method
.method static synthetic access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;I)V
.locals 0
.parameter "x0"
.parameter "x1"
.prologue
.line 116
invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->adjustBrightness(I)V
return-void
.end method
- NEXT, add new access
Code:
return-void
.end method
[COLOR="Red"].method static synthetic access$130000000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)Ljava/lang/Runnable;
.locals 1
.parameter "x0"
.prologue
.line 34
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mRunnable:Ljava/lang/Runnable;
return-object v0
.end method[/COLOR]
.method static synthetic access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;I)V
NEXT
Code:
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mLightsOnAnimation:Landroid/animation/Animator;
goto :goto_0
.end method
[COLOR="Red"].method private setupAsteroidScreenshotButton()V
.locals 3
.prologue
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v1, [COLOR="Blue"]0x7f0900e5[/COLOR]
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/ImageButton;
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAsteroidScreenshotButton:Landroid/widget/ImageButton;
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAsteroidScreenshotButton:Landroid/widget/ImageButton;
new-instance v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AsteroidSrcreenshot3;
invoke-direct {v1, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AsteroidSrcreenshot3;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
invoke-virtual {v0, v1}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAsteroidScreenshotButton:Landroid/widget/ImageButton;
new-instance v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AsteroidSrcreenshot4;
invoke-direct {v1, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AsteroidSrcreenshot4;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
invoke-virtual {v0, v1}, Landroid/widget/ImageButton;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V
return-void
.end method[/COLOR]
.method private updateShowSearchHoldoff()V
.locals 2
.prologue
.line 1133
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const v1, 0x7f0d0001
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getInteger(I)I
move-result v0
iput v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mShowSearchHoldoff:I
.line 1135
return-void
.end method
Change this 0x7f0900e5, according to the value you got in your own public.xml
Code:
<public type="id" name="asteroid_screenshot_button" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
Click to expand...
Click to collapse
NEXT, find this method
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
and add the red code
Code:
const-string v1, "android.intent.action.SCREEN_ON"
invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 775
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v4, v1, v0}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
.line 778
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->resetUserSetupObserver()V
[COLOR="Red"] invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupAsteroidScreenshotButton()V[/COLOR]
.line 780
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/android/systemui/statusbar/powerwidget/PowerWidget;
invoke-virtual {v0}, Lcom/android/systemui/statusbar/powerwidget/PowerWidget;->setupWidget()V
.line 781
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/android/systemui/statusbar/powerwidget/PowerWidget;
invoke-virtual {v0}, Lcom/android/systemui/statusbar/powerwidget/PowerWidget;->updateVisibility()V
.method public static viewInfo(Landroid/view/View;)Ljava/lang/String;
.locals 2
.parameter
OR MEDIATEK DEVICES
Code:
const-string v1, "android.intent.action.ACTION_BOOT_IPO"
invoke-virtual {v12, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 768
const-string v1, "android.provider.Telephony.SPN_STRINGS_UPDATED"
invoke-virtual {v12, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 769
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v11, v1, v12}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
.line 772
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->resetUserSetupObserver()V
[COLOR="Red"]invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupAsteroidScreenshotButton()V[/COLOR]
.line 774
new-instance v20, Landroid/content/IntentFilter;
invoke-direct/range {v20 .. v20}, Landroid/content/IntentFilter;-><init>()V
.line 775
.local v20, simInfoIntentFilter:Landroid/content/IntentFilter;
const-string v1, "android.intent.action.SIM_SETTING_INFO_CHANGED"
NEXT,
go to,.
- smali/com/android/systemui/statusbar/phone/PhoneStatusBar$AsteroidSrcreenshot4.smali
search for this
Code:
const v4, [COLOR="Blue"]0x7f0a00f8[/COLOR]
Change this 0x7f0a00f8, according to the value you got in your own public.xml
Code:
<public type="string" name="screenshot_toast" id="[COLOR="Blue"]0x7f??????[/COLOR]" />
- NEXT
- Disable signature check
here : http://forum.xda-developers.com/showthread.php?t=1698352
or in here : http://forum.xda-developers.com/showpost.php?p=47592101&postcount=3
- AndroidManifest.xml
Add The RED CODE , and
REMOVE the BLUE CODE
Code:
<uses-permission android:name="android.permission.READ_DREAM_STATE" />
<uses-permission android:name="android.permission.WRITE_DREAM_STATE" />
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
[COLOR="Red"]<protected-broadcast android:name="android.permission.SCREENSHOT" />
<protected-broadcast android:name="android.intent.action.SCREENSHOT" />
<permission android:label="@string/permlab_screenshot" android:name="android.permission.SCREENSHOT" android:protectionLevel="signatureOrSystem" android:description="@string/permdesc_screenshot" />[/COLOR]
<application android:label="@string/app_label" android:icon="@*android:drawable/platlogo" android:allowClearUserData="false" android:persistent="true" android:allowBackup="false" android:hardwareAccelerated="true">
<service android:name="SystemUIService" android:exported="true" />
[COLOR="Red"]<service android:name=".screenshot.TakeScreenshotService" android:permission="android.permission.SCREENSHOT" android:exported="false" android:process=":screenshot">
<intent-filter>
<android name="android.intent.action.SCREENSHOT" />
</intent-filter>
</service>[/COLOR]
[COLOR="Blue"]<service android:name=".screenshot.TakeScreenshotService" android:exported="false" android:process=":screenshot" />[/COLOR]
<service android:name=".LoadAverageService" android:exported="true" />
<service android:name=".ImageWallpaper" android:permission="android.permission.BIND_WALLPAPER" android:exported="true" />
<receiver android:name=".BootReceiver" androidprv:primaryUserOnly="true">
- RECOMPILE YOUR SYSTEMUI.APK and SIGN it
- I ussually use ApkMultitools to decompile/recompile/sign APK
so if you use ApkMultitools, you can use my signer keys
download attached file, exstract it and merge to your ApkMultitools / other / here
STEP - 3
- Decompile / Baksmali your android.policy.jar
- Download attached PhoneWindowManager$AsteroidScreenshotReceiver.zip, exstract it and merge to your decompiled android.policy.jar
- NEXT,
go to com/android/internal/policy/impl/PhoneWindowManager.smali
add the red line
Code:
[COLOR="Red"]Lcom/android/internal/policy/impl/PhoneWindowManager$AsteroidScreenshotReceiver;,[/COLOR]
Lcom/android/internal/policy/impl/PhoneWindowManager$ScreenLockTimeout;,
Lcom/android/internal/policy/impl/PhoneWindowManager$HideNavInputEventReceiver;,
Lcom/android/internal/policy/impl/PhoneWindowManager$MyOrientationListener;,
Lcom/android/internal/policy/impl/PhoneWindowManager$SettingsObserver;,
Lcom/android/internal/policy/impl/PhoneWindowManager$PolicyHandler;,
Lcom/android/internal/policy/impl/PhoneWindowManager$PointerLocationInputEventReceiver;
Code:
.field mAppLaunchTimeEnabled:Z
.field mAssistKeyLongPressed:Z
[COLOR="Red"].field private mAsteroidScreenshotReceiver:Lcom/android/internal/policy/impl/PhoneWindowManager$AsteroidScreenshotReceiver;[/COLOR]
.field mBootMsgDialog:Landroid/app/ProgressDialog;
.field mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;
Code:
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mScreenLockTimeout:Lcom/android/internal/policy/impl/PhoneWindowManager$ScreenLockTimeout;
return-void
.end method
[COLOR="Red"].method static synthetic access$50000000(Lcom/android/internal/policy/impl/PhoneWindowManager;)Lcom/android/internal/policy/impl/PhoneWindowManager$AsteroidScreenshotReceiver;
.registers 2
.parameter "x0"
.prologue
.line 136
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mAsteroidScreenshotReceiver:Lcom/android/internal/policy/impl/PhoneWindowManager$AsteroidScreenshotReceiver;
return-object v0
.end method
.method static synthetic access$333330000000(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
.registers 1
.parameter "x0"
.prologue
.line 184
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->takeScreenshot()V
return-void
.end method[/COLOR]
.method static synthetic access$000(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
.registers 1
.parameter "x0"
.prologue
.line 173
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->enablePointerLocation()V
next find this method
Code:
.method public init(Landroid/content/Context;Landroid/view/IWindowManager;Landroid/view/WindowManagerPolicy$WindowManagerFuncs;)V
scroll down in that method , add the red code above return-void
Code:
const-string v4, "persist.applaunchtime.enable"
invoke-static {v4, v6}, Landroid/os/SystemProperties;->getInt(Ljava/lang/String;I)I
move-result v4
if-ne v5, v4, :cond_216
move v4, v5
:goto_20e
iput-boolean v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mAppLaunchTimeEnabled:Z
[COLOR="Red"]new-instance v4, Lcom/android/internal/policy/impl/PhoneWindowManager$AsteroidScreenshotReceiver;
invoke-direct {v4, p0, p1}, Lcom/android/internal/policy/impl/PhoneWindowManager$AsteroidScreenshotReceiver;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;Landroid/content/Context;)V
iput-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mAsteroidScreenshotReceiver:Lcom/android/internal/policy/impl/PhoneWindowManager$AsteroidScreenshotReceiver;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mAsteroidScreenshotReceiver:Lcom/android/internal/policy/impl/PhoneWindowManager$AsteroidScreenshotReceiver;
#calls: Lcom/android/internal/policy/impl/PhoneWindowManager$AsteroidScreenshotReceiver;->registerSelf()V
invoke-static {v4}, Lcom/android/internal/policy/impl/PhoneWindowManager$AsteroidScreenshotReceiver;->access$700(Lcom/android/internal/policy/impl/PhoneWindowManager$AsteroidScreenshotReceiver;)V
[/COLOR]
[COLOR="Blue"] return-void[/COLOR]
.line 1127
:cond_211
const/4 v4, 0x2
invoke-virtual {p0, v4}, Lcom/android/internal/policy/impl/PhoneWindowManager;->screenTurnedOff(I)V
goto :goto_205
:cond_216
move v4, v6
.line 1130
goto :goto_20e
.line 1030
.end local v0 #filter:Landroid/content/IntentFilter;
- That's it :victory:
reserved 2
reserved 3
pertamax om .... that is added to the power widget in cm10.1 if I can .. I want to add to the power widget in cm10.1 thanks explanation ...
Will try it om
thread Updated,. sorry wrong code for PhoneWindowManager.smali,.in this part :
Code:
[COLOR="Red"] new-instance v4, Lcom/android/internal/policy/impl/PhoneWindowManager$AsteroidScreenshotReceiver;
invoke-direct {v4, p0, p1}, Lcom/android/internal/policy/impl/PhoneWindowManager$AsteroidScreenshotReceiver;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;Landroid/content/Context;)V
iput-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mAsteroidScreenshotReceiver:Lcom/android/internal/policy/impl/PhoneWindowManager$AsteroidScreenshotReceiver;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mAsteroidScreenshotReceiver:Lcom/android/internal/policy/impl/PhoneWindowManager$AsteroidScreenshotReceiver;
#calls: Lcom/android/internal/policy/impl/PhoneWindowManager$AsteroidScreenshotReceiver;->registerSelf()V
invoke-static {v4}, Lcom/android/internal/policy/impl/PhoneWindowManager$AsteroidScreenshotReceiver;->access$700(Lcom/android/internal/policy/impl/PhoneWindowManager$AsteroidScreenshotReceiver;)V[/COLOR]
[COLOR="Blue"] return-void[/COLOR]
Gook work sir @Adi Aisiteru Reborn
Keep it up for wonderfull guide... :good:
Need Help
Sir @Adi Aisiteru Reborn, in step 2, i see that your method ".method public constructor <init>()V" doesn't have code like ".line_318, .line_320, etc", and i have it in my smali in that method. this my smali code
Code:
.line 318
iput v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSystemUiVisibility:I
.line 320
new-instance v0, Landroid/util/DisplayMetrics;
invoke-direct {v0}, Landroid/util/DisplayMetrics;-><init>()V
so my question is, should I put code ".line" above your red code or not?
How to add in ICS Status Bar?
Pocket Fan said:
How to add in ICS Status Bar?
Click to expand...
Click to collapse
See OP title post, it's for JB 4.2++, so not for ICS device
ask OP to make it for ICS, or you can compare it to ICS, may be it work. i haven't try it
blu3m4n said:
Sir @Adi Aisiteru Reborn, in step 2, i see that your method ".method public constructor <init>()V" doesn't have code like ".line_318, .line_320, etc", and i have it in my smali in that method. this my smali code
Code:
.line 318
iput v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSystemUiVisibility:I
.line 320
new-instance v0, Landroid/util/DisplayMetrics;
invoke-direct {v0}, Landroid/util/DisplayMetrics;-><init>()V
so my question is, should I put code ".line" above your red code or not?
Click to expand...
Click to collapse
don't care about the .line xxx
Code:
.line 318
[COLOR="Blue"]iput v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSystemUiVisibility:I[/COLOR]
[COLOR="Red"]JUST ADD MY CODE HEREE ![/COLOR]
.line 320
[COLOR="Blue"]new-instance v0, Landroid/util/DisplayMetrics;
invoke-direct {v0}, Landroid/util/DisplayMetrics;-><init>()V[/COLOR]
Adi Aisiteru Reborn said:
don't care about the .line xxx
Code:
.line 318
[COLOR="Blue"]iput v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSystemUiVisibility:I[/COLOR]
[COLOR="Red"]JUST ADD MY CODE HEREE ![/COLOR]
.line 320
[COLOR="Blue"]new-instance v0, Landroid/util/DisplayMetrics;
invoke-direct {v0}, Landroid/util/DisplayMetrics;-><init>()V[/COLOR]
Click to expand...
Click to collapse
Thanks sir, i've solved the issue before
Greaat work sir, keep it up :good:
About add to ICS. Need help!!
Hi, OP @Adi Aisiteru Reborn
Yestoday I saw your six tab ui for Galaxy W CM9. So I contrast and extract some resource in this ui.
Now I have finished the transplantation of the screenshot button.
But when I press screenshot button, the device will be force reboot...
I think may be the step of android.policy.jar was wrong.
So can you help me to solve it?
This is my PhoneWindowManager.smali, hope you can help me to change it something.
I really appreciate your help.
https://www.dropbox.com/s/eyikfib2r3npww7/PhoneWindowManager.smali
so how to fix it?
yesssssss...
now i can take ss without use my vol(-)+power again...:laugh:
Lollipop work?
another feedback suhu, thanx a lot
Who cant help me? There is an error with it. Shw-m440s (s3-3g) android 4.3, please