Who want 4.2 quick 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"
}
Credits :
* 4.2 quickpanel was originally made by RT @SpaceCaker Here without him no-quickpanel
* Wonderful guide for AOSP ROMs about Lidroid... which helped me lot, its by @Adi Aisiteru Reborn his guide here
* @XDA.AGM for this... toggles in panel view was not possible if didnt supported by giving his mod
* Lidroid Toggls for samsung Lidroid & for jb Wanam
* Lidroid Toggls port for non-samsung roms is made by Recognized themer @serajr for grid view
* @bsuhas for new method for quick panel mod
* My friend @BOND1987 is also encouraged me
* My friend @Akhilendra1711 for animate collapse methods
* My friend @khan_frd2002 for helping me in updating thread
* Tested with MTK 4.1.1 must work with AOSP based 4.1.1 roms *
Q : there is already a guide for quickpanel and lidroid, why you made new thread ??
A : well, combining both is different from doing them separately... also lidroid files and quick panel files i have given is different from given in those guides...
more screenshots :
If you have any questions or suggestions feel free to ask... If you get any part working, post back with screenshots and device name
Things needed :
* You MUST know how to decompile & compile .jar files and .apk files
* Text editor
* SystemUI.apk
PART 1 : setup 4.2 quick panel view
if you already followed guide by Spaecaker and got it working, skip this step and follow 2nd step
Step 1 : decompile systemui.apk and open ststus_bar.xml... for MTK devices its gemini_status_bar.xml..... find
Code:
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
add this code below it..
Code:
<com.android.systemui.statusbar.StatusBarServiceLRPull android:layout_width="fill_parent" android:layout_height="wrap_content">
find
Code:
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="2.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
add this code above it..
Code:
</com.android.systemui.statusbar.StatusBarServiceLRPull>
Step 2 : Open status_bar_expanded (for MTK gemini_status_bar_expanded.xml),
Delete this line :
Code:
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
find
Code:
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
add this line above it..
Code:
<com.spacecaker.SpaceLayOut android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<include layout="@layout/quickpanel_quick_settings_space" />
</LinearLayout>
find, this
Code:
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="115.0dip" android:layout_marginBottom="8.0dip" android:overScrollMode="ifContentScrolls">
<com.android.systemui.statusbar.policy.NotificationRowLayout android:layout_gravity="bottom" android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_row_min_height" />
</ScrollView>
</FrameLayout>
add this lines below it
Code:
</com.spacecaker.SpaceLayOut>
find :
Code:
<com.spacecaker.SpaceLayOut android:layout_width="fill_parent"
add this above it :
Code:
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
</LinearLayout>
Step 3 :open StatusBar_Expanded_Header.xml search for
Code:
<ImageView android:id="@id/settings_button" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/ic_notify_quicksettings" android:scaleType="center" android:contentDescription="@string/accessibility_settings_button" />
add this below it :
Code:
<com.spacecaker.ButtonBurst android:id="@id/spacebuttonburst" android:layout_width="30.0dip" android:layout_height="30.0dip" android:layout_alignParentRight="true" />
Step 4 : open res/values/ids.xml add these at the end
Code:
<item type="id" name="spacebuttonburst">false</item>
save all and add these files in corresponding folders :
Download files here
Step 5 : compile and decompile compiled systemui.apk , open smali/com/spacecaker/ButtonBurst.smali
find const v3, 0x7f020180 replce with your id found in public.xml, search for <public type="drawable" name="btn_toggles_normal" next to it you will find id..
same way find const v3, 0x7f02017f replace id found in public.xml, search for <public type="drawable" name="btn_tg"
Step 6 : open smali/com/android/systemui/SystemUIService.smali
add this at the end :
Code:
.method public onClickPanelMethod(Landroid/view/View;)V
.locals 11
.parameter "v"
.prologue
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;
move-result-object v5
check-cast v5, Ljava/lang/String;
:try_start_0
const-string v3, ","
invoke-virtual {v5, v3}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
move-result-object v6
const/4 v4, 0x0
aget-object v4, v6, v4
const/4 v7, 0x1
aget-object v7, v6, v7
invoke-virtual {v0, v4, v7}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
const/high16 v2, 0x1000
invoke-virtual {v0, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
move-result-object v0
invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
:goto_0
const-string v1, "statusbar"
invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/StatusBarManager;
invoke-virtual {v0}, Landroid/app/StatusBarManager;->collapse()V
return-void
:catch_0
move-exception v0
.local v0, e:Ljava/lang/Exception;
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
const-string v10, "Failed to execute action :\n"
invoke-virtual {v10, v5}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object v5
const/16 v9, 0x7d0
invoke-static {p0, v5, v9}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v8
invoke-virtual {v8}, Landroid/widget/Toast;->show()V
goto :goto_0
.end method
Step 7 : save and compile.... flash/push test whether its working before adding toggles...
how to add new toggles to launch apps
open quick quickpanel_quick_settings_space.xml
to add toggle to launch app, just add
Code:
<FrameLayout android:id="@id/settings_button" android:tag="[COLOR="Red"]com.android.settings,com.android.settings.Settings$AudioProfileSettingsActivity[/COLOR]" android:background="@drawable/suvi_border_background" android:layout_width="120.0px" android:layout_height="100.0px" android:layout_weight="1.0" android:onClick="onSuviClickGenericFailOver">
note : the red code corresponds to package,activity name...
to get activity and package name, open app you want to add AndroidManifeast.xml you will get package name with package= tag
ex : for settings
Code:
<manifest android:sharedUserId="android.uid.system" android:versionCode="16" android:versionName="4.1.1-eng..1364989609" [COLOR="red"]package="com.android.settings"[/COLOR] coreApp="true"
activity name can be found by searching activity tag ex: for Wifi settings,
Code:
<activity android:label="@string/wifi_settings" [COLOR="red"]android:name="Settings$WifiSettingsActivity"[/COLOR] android:clearTaskOnLaunch="true" android:configChanges="keyboardHidden|orientation|screenSize" android:parentActivityName="Settings">
finally it will look like :
Code:
<FrameLayout android:id="@id/settings_button" android:tag="[COLOR="Red"]com.android.settings,com.android.settings.Settings$WifiSettingsActivity[/COLOR]" android:background="@drawable/[COLOR="Blue"]xyz[/COLOR]" android:layout_width="120.0px" android:layout_height="100.0px" android:layout_weight="1.0" android:onClick="onSuviClickGenericFailOver">
also put corresponding image in drawable here xyz
PART 2 : add lidroid toggles
PART 2 : add Lidroid Toggles to QuickPanel
You must have working Quick panel view before trying this mod... follow first step to add quick panel view
You may also try.... @BOND1987 guide here for them who have already implimented lidroid in normal view thanks to him...
Code:
step 1 : decompile systemUI.apk, merge the files i have given...
goto : res/values/ids.xml add these at the end :
Code:
<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">false</item>
<item type="id" name="automatic">false</item>
<item type="id" name="power_widget_button">false</item>
<item type="id" name="power_widget_button_image">false</item>
goto : res/values/strings.xml add these at the end
Code:
<string name="usb_connected_txt">USB connected</string>
<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">Sound vibration</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">Lock Now</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">USB Debugging</string>
<string name="quickpanel_usb_connection_mode_text">USB Conn. 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 Info</string>
<string name="battery_info_info">Battery Information</string>
<string name="battery_info_usage">Battery Power Usage</string>
step 2 : open smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
find :
Code:
.field mPostCollapseCleanup:Ljava/lang/Runnable;
add this below it :
Code:
.field mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
Next find this method
Code:
# virtual methods
.method public addIcon(Ljava/lang/String;IILcom/android/internal/statusbar/StatusBarIcon;)V
and Add the blue code above .return-void
Code:
invoke-virtual {v1, v0, p3, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V
[COLOR="Blue"] iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->updateWidget()V[/COLOR]
.line 826
return-void
.end method
step 3 : find line similer to these
Code:
new-instance v11, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;
iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-direct {v11, p0, v2, v12}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/content/Context;Landroid/view/View;)V
iput-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTicker:Lcom/android/systemui/statusbar/phone/Ticker;
above it you will see some thing like this,
Code:
iget-object [COLOR="red"]v11[/COLOR], p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
const/4[COLOR="red"] v12[/COLOR], 0x0
invoke-virtual {[COLOR="red"]v11, v12[/COLOR]}, Landroid/widget/ScrollView;->setVerticalScrollBarEnabled(Z)V
red lines may be different i your case..
add blue lines to give it the form , edit red colored variables to match using green line:
Code:
iget-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
const/4 v12, 0x0
[COLOR="SeaGreen"] invoke-virtual {[COLOR="red"]v11, v12[/COLOR]}, Landroid/widget/ScrollView;->setVerticalScrollBarEnabled(Z)V[/COLOR]
[COLOR="Blue"] iget-object [COLOR="red"]v11[/COLOR], p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
.line 444
const[COLOR="red"] v12[/COLOR], 0x7f0c00e9
invoke-virtual {[COLOR="Red"]v11, v12[/COLOR]}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
.line 445
move-result-object [COLOR="red"]v11[/COLOR]
check-cast [COLOR="red"]v11[/COLOR], Lcom/lidroid/systemui/quickpanel/PowerWidget;
iput-object [COLOR="red"]v11[/COLOR], p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;[/COLOR]
.line 530
new-instance v11, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;
iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-direct {v11, p0, v2, v12}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/content/Context;Landroid/view/View;)V
iput-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTicker:Lcom/android/systemui/statusbar/phone/Ticker;
step 4: find lines similer to this :
Code:
iget-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDisplayMetrics:Landroid/util/DisplayMetrics;
iget v11, v11, Landroid/util/DisplayMetrics;->heightPixels:I
iget-object v12, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
add these line above
Code:
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
step 5: open quickpanel_quick_settings_space.xml
edit it to look like this :
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
[COLOR="Red"] <com.lidroid.systemui.quickpanel.PowerWidget android:layout_marginTop="50.0dip" android:id="@id/power_widget" android:paddingTop="0.0dip" android:paddingBottom="0.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" /> [/COLOR]
<ScrollView android:id="@id/scroll" android:scrollbars="none" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="0.0dip" android:overScrollMode="never">
compile and decompile to get public ids..
Step 6: Open : res/values/public.xml keep it open, then open com/android/systemui/statusbar/phone/PhoneStatusBar.smali
search : 0x7f0c00e9 replece with id you got with <public type="id" name="power_widget"
open all smali found in smali/com/lidroid/systemui/quickpanel/
search for
Code:
0x7f
find the public name using my public.txt given
search for that name in your public.xml replace id in that smali...
step 7: Edit AndroidManifeast.xml to look like this, add red code,
Code:
[COLOR="red"]<manifest android:sharedUserId="android.uid.system" android:process="system"[/COLOR] android:versionCode="16" android:versionName="4.1.1-eng..1364989609" package="com.android.systemui" coreApp="true"
xmlns:android="http://schemas.android.com/apk/res/android">
[COLOR="red"]<uses-permission android:name="android.permission.CAMERA" />[/COLOR]
save all and compile, sign your systemui.apk as you have modified manifeast
Step 8: push/flash new systemui along with idroid_settings.apk given...
PART 3 : ADD VOLUME SLIDER TO QUICK PANEL :
This doesn't depend on Lidroid, any one with quick panel working may try it.... :highfive:
If your smali don't have some lines i mentioned... post your smali
SS :
lets proceed,
step 1 : Open res/values/ids.xml
add these below :
Code:
<item type="id" name="quickpanel_slider_ringer_volume">false</item>
<item type="id" name="quickpanel_slider_notification_volume">false</item>
<item type="id" name="quickpanel_slider_voice_call_volume">false</item>
<item type="id" name="quickpanel_slider_media_volume">false</item>
<item type="id" name="quickpanel_slider_alarm_volume">false</item>
step 2 : Open res/values/strings.xml
add these below :
Code:
<string name="quickpanel_slider_ringer_volume_text">Ringtone & notifications</string>
<string name="quickpanel_slider_notification_volume_text">Notifications</string>
<string name="quickpanel_slider_voice_call_volume_text">Voice calls</string>
<string name="quickpanel_slider_media_volume_text">Music, video, games, & other media</string>
<string name="quickpanel_slider_alarm_volume_text">Alarms</string>
Open styles.xml add these below :
Code:
<style name="TextAppearance" />
<style name="TextAppearance.QuickPanel" parent="@style/TextAppearance" />
<style name="TextAppearance.QuickPanel.TextStyle" parent="@style/TextAppearance.QuickPanel">
<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>
step 3 : Open res/layout/quickpanel_quick_settings_space.xml
compare your code with mine to get layout as in screenshot...
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"
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:layout_width="fill_parent" android:layout_height="wrap_content">
<com.lidroid.systemui.quickpanel.PowerWidget android:id="@id/adi_widget" android:paddingTop="0.0dip" android:paddingBottom="0.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="50.0dip" />
<TextView android:textSize="14.0dip" android:textStyle="bold" android:gravity="center" android:layout_gravity="top|center" android:background="#60000000" android:layout_width="fill_parent" android:layout_height="25.0dip" android:layout_marginTop="10.0dip" android:layout_marginBottom="10.0dip" android:text="Volume Panel" android:singleLine="true" style="@style/TextAppearance.QuickPanel.TextStyle" />
<ScrollView android:id="@id/scroll" android:scrollbars="none" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="0.0dip" android:layout_marginBottom="30.0dip" android:overScrollMode="never">
<LinearLayout android:gravity="left" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="10.0dip">
<FrameLayout android:background="#00ffffff" android:padding="3.0dip" android:layout_width="fill_parent" android:layout_height="65.0dip">
<TextView android:gravity="left" android:layout_gravity="top|left|center" android:layout_width="wrap_content" android:layout_height="15.0dip" android:layout_marginTop="0.0dip" android:layout_marginBottom="10.0dip" android:text="@string/quickpanel_slider_media_volume_text" android:singleLine="true" style="@style/TextAppearance.QuickPanel.TextStyle" />
<LinearLayout android:layout_gravity="bottom|center" android:orientation="horizontal" android:padding="10.0dip" android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="2.0dip">
<ImageView android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@*android:drawable/ic_media_ff" android:scaleType="center" />
<SeekBar android:id="@id/quickpanel_slider_media_volume" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="0.0dip" android:layout_centerVertical="true" />
</LinearLayout>
</FrameLayout>
<FrameLayout android:background="#00ffffff" android:padding="3.0dip" android:layout_width="fill_parent" android:layout_height="65.0dip">
<TextView android:gravity="left" android:layout_gravity="top|left|center" android:layout_width="wrap_content" android:layout_height="15.0dip" android:layout_marginTop="0.0dip" android:layout_marginBottom="10.0dip" android:text="@string/quickpanel_slider_ringer_volume_text" android:singleLine="true" style="@style/TextAppearance.QuickPanel.TextStyle" />
<LinearLayout android:layout_gravity="bottom|center" android:orientation="horizontal" android:padding="10.0dip" android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="2.0dip">
<ImageView android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@*android:drawable/ic_audio_phone" android:scaleType="center" />
<SeekBar android:id="@id/quickpanel_slider_ringer_volume" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="0.0dip" android:layout_centerVertical="true" />
</LinearLayout>
</FrameLayout>
<FrameLayout android:background="#00ffffff" android:padding="3.0dip" android:layout_width="fill_parent" android:layout_height="65.0dip">
<TextView android:gravity="left" android:layout_gravity="top|left|center" android:layout_width="wrap_content" android:layout_height="15.0dip" android:layout_marginTop="0.0dip" android:layout_marginBottom="10.0dip" android:text="@string/quickpanel_slider_alarm_volume_text" android:singleLine="true" style="@style/TextAppearance.QuickPanel.TextStyle" />
<LinearLayout android:layout_gravity="bottom|center" android:orientation="horizontal" android:padding="10.0dip" android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="2.0dip">
<ImageView android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@*android:drawable/ic_audio_alarm" android:scaleType="center" />
<SeekBar android:id="@id/quickpanel_slider_alarm_volume" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="0.0dip" android:layout_centerVertical="true" />
</LinearLayout>
</FrameLayout>
<FrameLayout android:background="#00ffffff" android:padding="3.0dip" android:layout_width="fill_parent" android:layout_height="65.0dip">
<TextView android:gravity="left" android:layout_gravity="top|left|center" android:layout_width="wrap_content" android:layout_height="15.0dip" android:layout_marginTop="0.0dip" android:layout_marginBottom="10.0dip" android:text="@string/quickpanel_slider_voice_call_volume_text" android:singleLine="true" style="@style/TextAppearance.QuickPanel.TextStyle" />
<LinearLayout android:layout_gravity="bottom|center" android:orientation="horizontal" android:padding="10.0dip" android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="2.0dip">
<ImageView android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@*android:drawable/ic_audio_ring_notif" android:scaleType="center" />
<SeekBar android:id="@id/quickpanel_slider_voice_call_volume" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="0.0dip" android:layout_centerVertical="true" />
</LinearLayout>
</FrameLayout>
<FrameLayout android:background="#00ffffff" android:padding="3.0dip" android:layout_width="fill_parent" android:layout_height="65.0dip">
<TextView android:gravity="left" android:layout_gravity="top|left|center" android:layout_width="wrap_content" android:layout_height="15.0dip" android:layout_marginTop="0.0dip" android:layout_marginBottom="10.0dip" android:text="@string/quickpanel_slider_notification_volume_text" android:singleLine="true" style="@style/TextAppearance.QuickPanel.TextStyle" />
<LinearLayout android:layout_gravity="bottom|center" android:orientation="horizontal" android:padding="10.0dip" android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="2.0dip">
<ImageView android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@*android:drawable/ic_audio_notification" android:scaleType="center" />
<SeekBar android:id="@id/quickpanel_slider_notification_volume" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="0.0dip" android:layout_centerVertical="true" />
</LinearLayout>
</FrameLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
</LinearLayout>
step 4 : save, compile and decompile
goto com\android\systemui\statusbar\phone\PhoneStatusBar.smali
find :
Code:
.field private mAnimationRuning:Z
add this below :
Code:
.field private mAudioManager:Landroid/media/AudioManager;
find : ( red code may be different in your case ignore it)
Code:
.method static synthetic access$[COLOR="Red"]200[/COLOR](Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)F
.locals 1
.parameter "x0"
.prologue
.line 118
iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSelfExpandVelocityPx:F
return v0
.end method
add this below :
Code:
.method static synthetic access$1101(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)Landroid/media/AudioManager;
.locals 1
.parameter
.prologue
.line 23
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAudioManager:Landroid/media/AudioManager;
return-object v0
.end method
.method static synthetic access$1200(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)Z
.locals 1
.parameter "x0"
.prologue
.line 97
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedVisible:Z
return v0
.end method
step 5 : Find
Code:
.method private setStatusBarLowProfile(Z)V
and this code above it :
Code:
.method private setQuickPanelVolumeSliders()V
.locals 12
.prologue
const/4 v11, 0x3
const/4 v10, 0x2
const/4 v9, 0x0
const/4 v7, 0x1
.line 54
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
const-string v6, "audio"
invoke-virtual {v5, v6}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v5
check-cast v5, Landroid/media/AudioManager;
iput-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAudioManager:Landroid/media/AudioManager;
.line 57
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v8, 0x7f0c00ec
invoke-virtual {v5, v8}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v3
check-cast v3, Landroid/widget/SeekBar;
.line 58
.local v3, ringSlider:Landroid/widget/SeekBar;
invoke-virtual {v3, v7}, Landroid/widget/SeekBar;->setKeyProgressIncrement(I)V
.line 59
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAudioManager:Landroid/media/AudioManager;
invoke-virtual {v5, v10}, Landroid/media/AudioManager;->getStreamMaxVolume(I)I
move-result v5
invoke-virtual {v3, v5}, Landroid/widget/SeekBar;->setMax(I)V
.line 60
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAudioManager:Landroid/media/AudioManager;
invoke-virtual {v5, v10}, Landroid/media/AudioManager;->getStreamVolume(I)I
move-result v5
invoke-virtual {v3, v5}, Landroid/widget/SeekBar;->setProgress(I)V
.line 61
new-instance v5, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AkashE;
invoke-direct {v5, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AkashE;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
invoke-virtual {v3, v5}, Landroid/widget/SeekBar;->setOnSeekBarChangeListener(Landroid/widget/SeekBar$OnSeekBarChangeListener;)V
.line 80
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v8, 0x7f0c00ed
invoke-virtual {v5, v8}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v2
check-cast v2, Landroid/widget/SeekBar;
.line 81
.local v2, notificationSlider:Landroid/widget/SeekBar;
invoke-virtual {v2, v7}, Landroid/widget/SeekBar;->setKeyProgressIncrement(I)V
.line 82
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAudioManager:Landroid/media/AudioManager;
const/4 v6, 0x5
invoke-virtual {v5, v6}, Landroid/media/AudioManager;->getStreamMaxVolume(I)I
move-result v5
invoke-virtual {v2, v5}, Landroid/widget/SeekBar;->setMax(I)V
.line 83
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAudioManager:Landroid/media/AudioManager;
const/4 v6, 0x5
invoke-virtual {v5, v6}, Landroid/media/AudioManager;->getStreamVolume(I)I
move-result v5
invoke-virtual {v2, v5}, Landroid/widget/SeekBar;->setProgress(I)V
.line 84
new-instance v5, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AkashD;
invoke-direct {v5, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AkashD;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
invoke-virtual {v2, v5}, Landroid/widget/SeekBar;->setOnSeekBarChangeListener(Landroid/widget/SeekBar$OnSeekBarChangeListener;)V
.line 103
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v8, 0x7f0c00ee
invoke-virtual {v5, v8}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v4
check-cast v4, Landroid/widget/SeekBar;
.line 104
.local v4, voiceCallSlider:Landroid/widget/SeekBar;
invoke-virtual {v4, v7}, Landroid/widget/SeekBar;->setKeyProgressIncrement(I)V
.line 105
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAudioManager:Landroid/media/AudioManager;
invoke-virtual {v5, v9}, Landroid/media/AudioManager;->getStreamMaxVolume(I)I
move-result v5
invoke-virtual {v4, v5}, Landroid/widget/SeekBar;->setMax(I)V
.line 106
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAudioManager:Landroid/media/AudioManager;
invoke-virtual {v5, v9}, Landroid/media/AudioManager;->getStreamVolume(I)I
move-result v5
invoke-virtual {v4, v5}, Landroid/widget/SeekBar;->setProgress(I)V
.line 107
new-instance v5, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AkashC;
invoke-direct {v5, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AkashC;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
invoke-virtual {v4, v5}, Landroid/widget/SeekBar;->setOnSeekBarChangeListener(Landroid/widget/SeekBar$OnSeekBarChangeListener;)V
.line 126
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v8, 0x7f0c00ef
invoke-virtual {v5, v8}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/SeekBar;
.line 127
.local v1, mediaSlider:Landroid/widget/SeekBar;
invoke-virtual {v1, v7}, Landroid/widget/SeekBar;->setKeyProgressIncrement(I)V
.line 128
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAudioManager:Landroid/media/AudioManager;
invoke-virtual {v5, v11}, Landroid/media/AudioManager;->getStreamMaxVolume(I)I
move-result v5
invoke-virtual {v1, v5}, Landroid/widget/SeekBar;->setMax(I)V
.line 129
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAudioManager:Landroid/media/AudioManager;
invoke-virtual {v5, v11}, Landroid/media/AudioManager;->getStreamVolume(I)I
move-result v5
invoke-virtual {v1, v5}, Landroid/widget/SeekBar;->setProgress(I)V
.line 130
new-instance v5, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AkashB;
invoke-direct {v5, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AkashB;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
invoke-virtual {v1, v5}, Landroid/widget/SeekBar;->setOnSeekBarChangeListener(Landroid/widget/SeekBar$OnSeekBarChangeListener;)V
.line 149
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v8, 0x7f0c00f0
invoke-virtual {v5, v8}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/SeekBar;
.line 150
.local v0, alarmSlider:Landroid/widget/SeekBar;
invoke-virtual {v0, v7}, Landroid/widget/SeekBar;->setKeyProgressIncrement(I)V
.line 151
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAudioManager:Landroid/media/AudioManager;
const/4 v6, 0x4
invoke-virtual {v5, v6}, Landroid/media/AudioManager;->getStreamMaxVolume(I)I
move-result v5
invoke-virtual {v0, v5}, Landroid/widget/SeekBar;->setMax(I)V
.line 152
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAudioManager:Landroid/media/AudioManager;
const/4 v6, 0x4
invoke-virtual {v5, v6}, Landroid/media/AudioManager;->getStreamVolume(I)I
move-result v5
invoke-virtual {v0, v5}, Landroid/widget/SeekBar;->setProgress(I)V
.line 153
new-instance v5, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AkashA;
invoke-direct {v5, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AkashA;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
invoke-virtual {v0, v5}, Landroid/widget/SeekBar;->setOnSeekBarChangeListener(Landroid/widget/SeekBar$OnSeekBarChangeListener;)V
.line 170
return-void
.end method
Step 6 : Find these lines : (Red lines may be different)
Code:
new-instance [COLOR="Red"]v11[/COLOR], Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;
iget-object [COLOR="red"]v12[/COLOR], p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-direct {[COLOR="red"]v11, p0, v2, v12[/COLOR]}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/content/Context;Landroid/view/View;)V
iput-object [COLOR="red"]v11[/COLOR], p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTicker:Lcom/android/systemui/statusbar/phone/Ticker;
add this above it :
Code:
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setQuickPanelVolumeSliders()V
Step 7 : Find this line
Code:
.method protected updateRecentsPanel()V
add this above :
Code:
.method public updateQuickPanelVolumeSliders()V
.locals 8
.prologue
.line 176
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v7, 0x7f0c00ec
invoke-virtual {v5, v7}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v3
check-cast v3, Landroid/widget/SeekBar;
.line 177
.local v3, ringSlider:Landroid/widget/SeekBar;
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAudioManager:Landroid/media/AudioManager;
const/4 v6, 0x2
invoke-virtual {v5, v6}, Landroid/media/AudioManager;->getStreamVolume(I)I
move-result v5
invoke-virtual {v3, v5}, Landroid/widget/SeekBar;->setProgress(I)V
.line 180
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v7, 0x7f0c00ed
invoke-virtual {v5, v7}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v2
check-cast v2, Landroid/widget/SeekBar;
.line 181
.local v2, notificationSlider:Landroid/widget/SeekBar;
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAudioManager:Landroid/media/AudioManager;
const/4 v6, 0x5
invoke-virtual {v5, v6}, Landroid/media/AudioManager;->getStreamVolume(I)I
move-result v5
invoke-virtual {v2, v5}, Landroid/widget/SeekBar;->setProgress(I)V
.line 184
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v7, 0x7f0c00ee
invoke-virtual {v5, v7}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v4
check-cast v4, Landroid/widget/SeekBar;
.line 185
.local v4, voiceCallSlider:Landroid/widget/SeekBar;
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAudioManager:Landroid/media/AudioManager;
const/4 v6, 0x0
invoke-virtual {v5, v6}, Landroid/media/AudioManager;->getStreamVolume(I)I
move-result v5
invoke-virtual {v4, v5}, Landroid/widget/SeekBar;->setProgress(I)V
.line 188
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v7, 0x7f0c00ef
invoke-virtual {v5, v7}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/SeekBar;
.line 189
.local v1, mediaSlider:Landroid/widget/SeekBar;
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAudioManager:Landroid/media/AudioManager;
const/4 v6, 0x3
invoke-virtual {v5, v6}, Landroid/media/AudioManager;->getStreamVolume(I)I
move-result v5
invoke-virtual {v1, v5}, Landroid/widget/SeekBar;->setProgress(I)V
.line 192
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v7, 0x7f0c00f0
invoke-virtual {v5, v7}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/SeekBar;
.line 193
.local v0, alarmSlider:Landroid/widget/SeekBar;
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAudioManager:Landroid/media/AudioManager;
const/4 v6, 0x4
invoke-virtual {v5, v6}, Landroid/media/AudioManager;->getStreamVolume(I)I
move-result v5
invoke-virtual {v0, v5}, Landroid/widget/SeekBar;->setProgress(I)V
.line 195
return-void
.end method
Step 8 : Find
Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
add this below value = {
Code:
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AkashA;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AkashB;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AkashC;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AkashD;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AkashE;,
Step 9 : Last step : search left code in your public.xml , search right text in your PhoneStatusBar.smali replace id with your value...
Code:
quickpanel_slider_ringer_volume ----- 0x7f0c00ec
quickpanel_slider_notification_volume ------ 0x7f0c00ed
quickpanel_slider_voice_call_volume ------ 0x7f0c00ee
quickpanel_slider_media_volume ------ 0x7f0c00ef
quickpanel_slider_alarm_volume ------ 0x7f0c00f0
Note : dont confuse with string type ie
wrong
Code:
<public type="string" name="quickpanel_slider_ringer_volume_text" id="0x7f0900d5" />
right
Code:
<public type="id" name="quickpanel_slider_ringer_volume" id="0x7f0c00ec" />
Step 10 : Actual last step, Compile push/flash/whateva
FAQ :
Actually brother,
I need some help. I have added the files given by XDA.gm. As Adi Sir told me to follow that thread. So.
No I got the everything working but the slider I got not seem to be working properly. Sorry but before you posted your guide I already started working on it.
Now please help me with the sliders and all.
""Hitting Thanks Don't Cost You Anything, then, Why You All Are Getting Bothered in Doing So. Hitting Thanks Increases My Motivation to Work for this Community....""
BOND1987 said:
Actually brother,
I need some help. I have added the files given by XDA.gm. As Adi Sir told me to follow that thread. So.
No I got the everything working but the slider I got not seem to be working properly. Sorry but before you posted your guide I already started working on it.
Now please help me with the sliders and all.
View attachment 2157379
""Hitting Thanks Don't Cost You Anything, then, Why You All Are Getting Bothered in Doing So. Hitting Thanks Increases My Motivation to Work for this Community....""
Click to expand...
Click to collapse
for sliders you need to fix ids i guess.. i will check once...
woah, i just fried my psu and wasnt able to use my pc for more than a day then when i get back i see you guys doing a lot of stuff already,,,, great work guys. up:good::good::good:
Bro , do u have any solution to this ------>
Code:
C:\Apktool_JB>apktool b SystemUI_og
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
[COLOR="Red"]C:\Apktool_JB\SystemUI_og\res\layout\quickpanel_quick_settings_space.xml:9: erro
r: Error parsing XML: mismatched tag[/COLOR]
aapt: warning: string 'data_connection_datach_timeout_error_msg' has no default
translation in C:\Apktool_JB\SystemUI_og\res; found: de es fr in it ms pt tr vi
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 16, --target-sdk-version, 16, -F, C:\Users\AKHILE~1\AppData\Local\T
emp\APKTOOL6259043626794892065.tmp, -I, C:\Users\Akhilendra\apktool\framework\1.
apk, -S, C:\Apktool_JB\SystemUI_og\res, -M, C:\Apktool_JB\SystemUI_og\AndroidMan
ifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:355)
at brut.androlib.Androlib.buildResources(Androlib.java:280)
at brut.androlib.Androlib.build(Androlib.java:203)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:214)
at brut.apktool.Main.main(Main.java:74)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 16, -F, C:
\Users\AKHILE~1\AppData\Local\Temp\APKTOOL6259043626794892065.tmp, -I, C:\Users\
Akhilendra\apktool\framework\1.apk, -S, C:\Apktool_JB\SystemUI_og\res, -M, C:\Ap
ktool_JB\SystemUI_og\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:335)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:333)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 16, --target-sdk-version, 16, -F, C:\Users\AKHILE~1\AppData\Local\Tem
p\APKTOOL6259043626794892065.tmp, -I, C:\Users\Akhilendra\apktool\framework\1.ap
k, -S, C:\Apktool_JB\SystemUI_og\res, -M, C:\Apktool_JB\SystemUI_og\AndroidManif
est.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:333)
... 6 more
in quickpanel_quick_settigns.xml it gives an error saying mismatched tag. I am not able to compile your mod with bsuhas's quickpanel code. I tried before in my mod but it didn't work around there too...
BOND1987 said:
Actually brother,
I need some help. I have added the files given by XDA.gm. As Adi Sir told me to follow that thread. So.
No I got the everything working but the slider I got not seem to be working properly. Sorry but before you posted your guide I already started working on it.
Now please help me with the sliders and all.
View attachment 2157379
""Hitting Thanks Don't Cost You Anything, then, Why You All Are Getting Bothered in Doing So. Hitting Thanks Increases My Motivation to Work for this Community....""
Click to expand...
Click to collapse
or may be, there's additional smalis for that,.,.
find additional PhoneStatusBar$xx.smali for that, or / and compare the PhoneStatusBar.smali with XDA.AGM's
Sir,
Your suggestions always help me a lot. Although it takes time but I always get through with good great results.
I'll try this also now.
Edit:- @Akhilendra1711,
Wait buddy,
I'm gonna post a guide for those who already have applied lidroid and 4.2 and want to get these layouts. It will be on this thread only.
""Hitting Thanks Don't Cost You Anything, then, Why You All Are Getting Bothered in Doing So. Hitting Thanks Increases My Motivation to Work for this Community....""
find
Code:
Code:
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="2.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
add this code above it..
Code:
Code:
</com.android.systemui.statusbar.StatusBarServiceLRPull>
corrected now...
Akash Bro I got it after some try.... the setting button doesn't work but the 4.2 button works
and no buttons and clock on 4.2 statubar full black
Edit : I have done till part 1 only and i have already done with lidroid so i have follow part 2 from step 5 only i think so.....
i attach screenshot take a look
khan_frd2002 said:
Akash Bro I got it after some try.... the setting button doesn't work but the 4.2 button works
and no buttons and clock on 4.2 statubar full black
Edit : I have done till part 1 only and i have already done with lidroid so i have follow part 2 from step 5 only i think so.....
i attach screenshot take a look
Click to expand...
Click to collapse
yup follow from step 5 but, replace old files, and re edit ids....
im checking as you should get clock in view....
Akhilendra1711 said:
Bro , do u have any solution to this ------>
in quickpanel_quick_settigns.xml it gives an error saying mismatched tag. I am not able to compile your mod with bsuhas's quickpanel code. I tried before in my mod but it didn't work around there too...
Click to expand...
Click to collapse
Akhilendra Bro You have Get mismatched tag In quickpanel_quick_settigns.xml Because there i a space before <LinearLayout Line 7
khan_frd2002 said:
Akash Bro I got it after some try.... the setting button doesn't work but the 4.2 button works
and no buttons and clock on 4.2 statubar full black
Edit : I have done till part 1 only and i have already done with lidroid so i have follow part 2 from step 5 only i think so.....
i attach screenshot take a look
Click to expand...
Click to collapse
ohh.. i missed small step bro... thanks for your replay... updating thread...
khan_frd2002 said:
Akhilendra Bro You have Get mismatched tag In quickpanel_quick_settigns.xml Because there i a space before <LinearLayout Line 7
Click to expand...
Click to collapse
Bro I adjusted the space too . But still it said mismatch tag.
Sent from my Micromax A110 using XDA Premium HD app
khan_frd2002 said:
Akhilendra Bro You have Get mismatched tag In quickpanel_quick_settigns.xml Because there i a space before <LinearLayout Line 7
Click to expand...
Click to collapse
bro check now :
Delete this line :
Code:
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
find
Code:
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
add this line above it..
Code:
<com.spacecaker.SpaceLayOut android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<include layout="@layout/quickpanel_quick_settings_space" />
</LinearLayout>
find, this
Code:
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="115.0dip" android:layout_marginBottom="8.0dip" android:overScrollMode="ifContentScrolls">
<com.android.systemui.statusbar.policy.NotificationRowLayout android:layout_gravity="bottom" android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_row_min_height" />
</ScrollView>
</FrameLayout>
add this lines below it
Code:
</com.spacecaker.SpaceLayOut>
find :
Code:
<com.spacecaker.SpaceLayOut android:layout_width="fill_parent"
add this above it :
Code:
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
</LinearLayout>
also download new files n replace quick_settings_space with new file...
Akhilendra1711 said:
Bro I adjusted the space too . But still it said mismatch tag.
Sent from my Micromax A110 using XDA Premium HD app
Click to expand...
Click to collapse
give me that xml...
Akhilendra1711 said:
Bro I adjusted the space too . But still it said mismatch tag.
Sent from my Micromax A110 using XDA Premium HD app
Click to expand...
Click to collapse
Ok brother,
Upload your quickspace. Xml.
We will look into it and can answer better.
Had any one got the sliders working.
Coz I've done every thing, corrected all id's but still same.
""Hitting Thanks Don't Cost You Anything, then, Why You All Are Getting Bothered in Doing So. Hitting Thanks Increases My Motivation to Work for this Community....""
Related
This mod is originally posted on Galaxy Wonder theme forum :
[MOD][CM10] Sense 4.0 style Multitasking - Recent apps
I have tried this mod on my Galaxy Mini with CM10.1-Balt Rom-v4.2 and work very fine!
ok lets go to Guide:
first of all need some requirment for this MOD-GUIDE
REQUIREMENT:
- BRAIN
- Patient
- Know how to decompile/recompiling Apk file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools
1.DECOMPILE, framework-res.apk
- /res/values/dimens.xml : change thumbnail size to..
Code:
<dimen name="thumbnail_height">[COLOR="Red"]240.0dip[/COLOR]</dimen>
<dimen name="thumbnail_width">[COLOR="Red"]151.0dip[/COLOR]</dimen>
Save and compile
2.DECOMPILE, SystemUI.apk
- /res/values/bools.xml
Code:
<bool name="config_recents_thumbnail_image_fits_to_xy">[COLOR="Red"]true[/COLOR]</bool>
- /res/values/strings.xml
add this line to the end
Code:
<string name="recent_apps_title">Recent apps</string>
-/res/values/ids.xml
add this line to the end
Code:
<item type="id" name="recents_transition_background" />
<item type="id" name="recents_transition_placeholder_icon" />
- /res/layout/status_bar_no_recent_apps.xml
Code:
<TextView android:textSize="20.0dip" android:textColor="@*android:color/[COLOR="Red"]white[/COLOR]" android:gravity="center_horizontal" android:layout_gravity="center" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_no_recent_apps" />
- /res/layout/status_bar_expanded_header.xml
before :
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" [COLOR="Red"]android:background="@drawable/notification_header_bg"[/COLOR] android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false"
change it to
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" [COLOR="Red"]android:background="#ff000000"[/COLOR] android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false"
- /res/layout/status_bar_recent_item.xml
Delete the whole lines, and replace with this :
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:paddingLeft="@dimen/status_bar_recents_item_padding" android:paddingRight="@dimen/status_bar_recents_item_padding" android:layout_width="wrap_content" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout android:layout_gravity="center_vertical" android:id="@id/recent_item" android:paddingTop="@*android:dimen/status_bar_height" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true">
<FrameLayout android:id="@id/app_thumbnail" android:background="#00000000" android:visibility="invisible" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="15.0dip" android:layout_marginRight="15.0dip" android:foreground="#00000000" android:layout_centerInParent="true">
<ImageView android:id="@id/app_thumbnail_image" android:layout_width="192.0dip" android:layout_height="305.0dip" android:layout_marginTop="15.0dip" android:layout_marginBottom="15.0dip" />
</FrameLayout>
<View android:id="@id/recents_callout_line" android:background="@drawable/recents_callout_line" android:layout_width="@dimen/status_bar_recents_app_label_width" android:layout_height="1.0dip" android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin" android:layout_marginTop="3.0dip" android:layout_marginRight="3.0dip" android:layout_toLeftOf="@id/app_thumbnail" android:layout_below="@id/app_label" android:layout_alignParentLeft="true" />
<ImageView android:gravity="center_horizontal" android:id="@id/app_icon" android:layout_width="192.0dip" android:layout_height="wrap_content" android:layout_marginTop="57.0dip" android:scaleType="centerInside" android:adjustViewBounds="true" android:maxWidth="@dimen/status_bar_recents_app_icon_max_width" android:maxHeight="@dimen/status_bar_recents_app_icon_max_height" android:layout_below="@id/app_thumbnail" />
<TextView android:textSize="@dimen/status_bar_recents_app_label_text_size" android:textColor="@color/status_bar_recents_app_label_color" android:ellipsize="marquee" android:gravity="center_horizontal" android:id="@id/app_label" android:paddingTop="0.0dip" android:fadingEdge="none" android:fadingEdgeLength="0.0dip" android:layout_width="192.0dip" android:layout_height="fill_parent" android:layout_marginTop="7.0dip" android:scrollHorizontally="true" android:singleLine="true" android:layout_below="@id/app_icon" android:layout_alignParentBottom="true" />
<TextView android:textSize="@dimen/status_bar_recents_app_description_text_size" android:ellipsize="marquee" android:id="@id/app_description" android:fadingEdge="horizontal" android:fadingEdgeLength="@dimen/status_bar_recents_text_fading_edge_length" android:layout_width="@dimen/status_bar_recents_app_label_width" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin" android:layout_marginTop="40.0dip" android:scrollHorizontally="true" android:singleLine="true" android:layout_below="@id/app_label" android:layout_alignParentBottom="true" />
</RelativeLayout>
</FrameLayout>
- /res/layout/status_bar_recent_panel.xml
Delete the whole lines, and replace with this :
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.recent.RecentsPanelView android:id="@id/recents_root" android:background="@drawable/sense_port" 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">
<View android:id="@id/recents_transition_background" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" />
<FrameLayout android:id="@id/recents_bg_protect" android:background="#00000000" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_centerVertical="true">
<ImageView android:id="@id/recents_transition_placeholder_icon" android:visibility="invisible" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<com.android.systemui.recent.RecentsHorizontalScrollView android:layout_gravity="bottom|left|center" android:id="@id/recents_container" android:scrollbars="none" android:fadingEdge="none" android:fadingEdgeLength="0.0dip" 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="horizontal" 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.RecentsHorizontalScrollView>
<TextView android:textSize="20.0dip" android:textColor="@color/status_bar_recents_app_label_color" android:gravity="center_horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="43.0dip" android:text="@string/recent_apps_title" />
<ImageView android:layout_gravity="top|right|center" android:id="@id/recents_clear" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_notify_clear" />
</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>
- /res/layout-land/status_bar_recent_item.xml
Delete the whole lines, and replace with this :
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:paddingLeft="@dimen/status_bar_recents_item_padding" android:paddingRight="@dimen/status_bar_recents_item_padding" android:layout_width="wrap_content" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout android:layout_gravity="center_vertical" android:id="@id/recent_item" android:paddingTop="@*android:dimen/status_bar_height" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true">
<FrameLayout android:id="@id/app_thumbnail" android:background="#00000000" android:visibility="invisible" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="15.0dip" android:layout_marginRight="15.0dip" android:foreground="#00000000" android:layout_centerInParent="true">
<ImageView android:id="@id/app_thumbnail_image" android:layout_width="137.0dip" android:layout_height="217.0dip" android:layout_marginTop="10.0dip" android:layout_marginBottom="20.0dip" />
</FrameLayout>
<ImageView android:gravity="center_horizontal" android:id="@id/app_icon" android:layout_width="50.0dip" android:layout_height="wrap_content" android:layout_marginLeft="5.0dip" android:layout_marginTop="10.0dip" android:scaleType="centerInside" android:adjustViewBounds="true" android:maxWidth="35.0dip" android:maxHeight="35.0dip" android:layout_below="@id/app_thumbnail" />
<TextView android:textSize="@dimen/status_bar_recents_app_label_text_size" android:textColor="@color/status_bar_recents_app_label_color" android:ellipsize="marquee" android:gravity="center" android:id="@id/app_label" android:paddingTop="0.0dip" android:fadingEdge="none" android:fadingEdgeLength="0.0dip" android:layout_width="70.0dip" android:layout_height="fill_parent" android:scrollHorizontally="true" android:singleLine="true" android:layout_toRightOf="@id/app_icon" android:layout_below="@id/app_thumbnail" />
<TextView android:textSize="@dimen/status_bar_recents_app_description_text_size" android:ellipsize="marquee" android:id="@id/app_description" android:visibility="gone" android:fadingEdge="horizontal" android:fadingEdgeLength="@dimen/status_bar_recents_text_fading_edge_length" android:layout_width="@dimen/status_bar_recents_app_label_width" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin" android:layout_marginTop="40.0dip" android:scrollHorizontally="true" android:singleLine="true" android:layout_below="@id/app_label" android:layout_alignParentBottom="true" />
</RelativeLayout>
</FrameLayout>
- /res/layout-land/status_bar_recent_panel.xml
Delete the whole lines, and replace with this :
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.recent.RecentsPanelView android:id="@id/recents_root" android:background="@drawable/sense_land" 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">
<View android:id="@id/recents_transition_background" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" />
<FrameLayout android:id="@id/recents_bg_protect" android:background="#00000000" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentBottom="true">
<ImageView android:id="@id/recents_transition_placeholder_icon" android:visibility="invisible" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<com.android.systemui.recent.RecentsHorizontalScrollView android:layout_gravity="bottom|right|center" android:orientation="horizontal" 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" android:layout_marginRight="@dimen/status_bar_recents_right_glow_margin" android:stackFromBottom="true" android:divider="@null">
<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>
<TextView android:textSize="20.0dip" android:textColor="@color/status_bar_recents_app_label_color" android:gravity="center_horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="5.0dip" android:text="@string/recent_apps_title" />
<ImageView android:layout_gravity="top|right|center" android:id="@id/recents_clear" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_notify_clear" />
</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>
- smali/com/android/systemui/recent/RecentsPanelView.smali
DELETE the whole line starting from this line
Code:
.method private updateThumbnail(Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;Landroid/graphics/Bitmap;ZZ)V
-
- until
-
.end method
REPLACE it with these lines :
Code:
.method private updateThumbnail(Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;Landroid/graphics/Bitmap;ZZ)V
.locals 30
.parameter "h"
.parameter "thumbnail"
.parameter "show"
.parameter "anim"
.prologue
.line 409
if-eqz p2, :cond_4
.line 413
const/16 v26, 0x4
.line 414
.local v26, reflectionGap:I
invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getWidth()I
move-result v6
.line 415
.local v6, width:I
invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getHeight()I
move-result v24
.line 417
.local v24, height:I
new-instance v8, Landroid/graphics/Matrix;
invoke-direct {v8}, Landroid/graphics/Matrix;-><init>()V
.line 418
.local v8, matrix:Landroid/graphics/Matrix;
const/high16 v3, 0x3f80
const/high16 v4, -0x4080
invoke-virtual {v8, v3, v4}, Landroid/graphics/Matrix;->preScale(FF)Z
.line 420
const/4 v4, 0x0
mul-int/lit8 v3, v24, 0x2
div-int/lit8 v5, v3, 0x3
div-int/lit8 v7, v24, 0x3
const/4 v9, 0x0
move-object/from16 v3, p2
invoke-static/range {v3 .. v9}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)Landroid/graphics/Bitmap;
move-result-object v27
.line 421
.local v27, reflectionImage:Landroid/graphics/Bitmap;
div-int/lit8 v3, v24, 0x3
add-int v3, v3, v24
sget-object v4, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;
invoke-static {v6, v3, v4}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;
move-result-object v23
.line 423
.local v23, bitmapWithReflection:Landroid/graphics/Bitmap;
new-instance v9, Landroid/graphics/Canvas;
move-object/from16 v0, v23
invoke-direct {v9, v0}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V
.line 424
.local v9, canvas:Landroid/graphics/Canvas;
const/4 v3, 0x0
const/4 v4, 0x0
const/4 v5, 0x0
move-object/from16 v0, p2
invoke-virtual {v9, v0, v3, v4, v5}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V
.line 425
new-instance v14, Landroid/graphics/Paint;
invoke-direct {v14}, Landroid/graphics/Paint;-><init>()V
.line 426
.local v14, defaultPaint:Landroid/graphics/Paint;
const/4 v10, 0x0
move/from16 v0, v24
int-to-float v11, v0
int-to-float v12, v6
add-int/lit8 v3, v24, 0x4
int-to-float v13, v3
invoke-virtual/range {v9 .. v14}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V
.line 427
const/4 v3, 0x0
add-int/lit8 v4, v24, 0x4
int-to-float v4, v4
const/4 v5, 0x0
move-object/from16 v0, v27
invoke-virtual {v9, v0, v3, v4, v5}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V
.line 429
new-instance v25, Landroid/graphics/Paint;
invoke-direct/range {v25 .. v25}, Landroid/graphics/Paint;-><init>()V
.line 430
.local v25, paint:Landroid/graphics/Paint;
new-instance v15, Landroid/graphics/LinearGradient;
const/16 v16, 0x0
invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getHeight()I
move-result v3
int-to-float v0, v3
move/from16 v17, v0
const/16 v18, 0x0
invoke-virtual/range {v23 .. v23}, Landroid/graphics/Bitmap;->getHeight()I
move-result v3
add-int/lit8 v3, v3, 0x4
int-to-float v0, v3
move/from16 v19, v0
const v20, 0x70ffffff
const v21, 0xffffff
sget-object v22, Landroid/graphics/Shader$TileMode;->CLAMP:Landroid/graphics/Shader$TileMode;
invoke-direct/range {v15 .. v22}, Landroid/graphics/LinearGradient;-><init>(FFFFIILandroid/graphics/Shader$TileMode;)V
.line 433
.local v15, shader:Landroid/graphics/LinearGradient;
move-object/from16 v0, v25
invoke-virtual {v0, v15}, Landroid/graphics/Paint;->setShader(Landroid/graphics/Shader;)Landroid/graphics/Shader;
.line 434
new-instance v3, Landroid/graphics/PorterDuffXfermode;
sget-object v4, Landroid/graphics/PorterDuff$Mode;->DST_IN:Landroid/graphics/PorterDuff$Mode;
invoke-direct {v3, v4}, Landroid/graphics/PorterDuffXfermode;-><init>(Landroid/graphics/PorterDuff$Mode;)V
move-object/from16 v0, v25
invoke-virtual {v0, v3}, Landroid/graphics/Paint;->setXfermode(Landroid/graphics/Xfermode;)Landroid/graphics/Xfermode;
.line 435
const/16 v17, 0x0
move/from16 v0, v24
int-to-float v0, v0
move/from16 v18, v0
int-to-float v0, v6
move/from16 v19, v0
invoke-virtual/range {v23 .. v23}, Landroid/graphics/Bitmap;->getHeight()I
move-result v3
add-int/lit8 v3, v3, 0x4
int-to-float v0, v3
move/from16 v20, v0
move-object/from16 v16, v9
move-object/from16 v21, v25
invoke-virtual/range {v16 .. v21}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V
.line 438
move-object/from16 v0, p1
iget-object v3, v0, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailViewImage:Landroid/widget/ImageView;
move-object/from16 v0, v23
invoke-virtual {v3, v0}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V
.line 442
move-object/from16 v0, p1
iget-object v3, v0, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailViewImageBitmap:Landroid/graphics/Bitmap;
if-eqz v3, :cond_0
move-object/from16 v0, p1
iget-object v3, v0, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailViewImageBitmap:Landroid/graphics/Bitmap;
invoke-virtual {v3}, Landroid/graphics/Bitmap;->getWidth()I
move-result v3
invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getWidth()I
move-result v4
if-ne v3, v4, :cond_0
move-object/from16 v0, p1
iget-object v3, v0, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailViewImageBitmap:Landroid/graphics/Bitmap;
invoke-virtual {v3}, Landroid/graphics/Bitmap;->getHeight()I
move-result v3
invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getHeight()I
move-result v4
if-eq v3, v4, :cond_1
.line 445
:cond_0
move-object/from16 v0, p0
iget-boolean v3, v0, Lcom/android/systemui/recent/RecentsPanelView;->mFitThumbnailToXY:Z
if-eqz v3, :cond_5
.line 446
move-object/from16 v0, p1
iget-object v3, v0, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailViewImage:Landroid/widget/ImageView;
const/high16 v4, 0x41c8
invoke-virtual {v3, v4}, Landroid/widget/ImageView;->setRotationY(F)V
.line 455
:cond_1
:goto_0
if-eqz p3, :cond_3
move-object/from16 v0, p1
iget-object v3, v0, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailView:Landroid/view/View;
invoke-virtual {v3}, Landroid/view/View;->getVisibility()I
move-result v3
if-eqz v3, :cond_3
.line 456
if-eqz p4, :cond_2
.line 457
move-object/from16 v0, p1
iget-object v3, v0, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailView:Landroid/view/View;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;
const v5, 0x7f04000f
invoke-static {v4, v5}, Landroid/view/animation/AnimationUtils;->loadAnimation(Landroid/content/Context;I)Landroid/view/animation/Animation;
move-result-object v4
invoke-virtual {v3, v4}, Landroid/view/View;->setAnimation(Landroid/view/animation/Animation;)V
.line 460
:cond_2
move-object/from16 v0, p1
iget-object v3, v0, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailView:Landroid/view/View;
const/4 v4, 0x0
invoke-virtual {v3, v4}, Landroid/view/View;->setVisibility(I)V
.line 462
:cond_3
move-object/from16 v0, p2
move-object/from16 v1, p1
iput-object v0, v1, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailViewImageBitmap:Landroid/graphics/Bitmap;
.line 464
.end local v6 #width:I
.end local v8 #matrix:Landroid/graphics/Matrix;
.end local v9 #canvas:Landroid/graphics/Canvas;
.end local v14 #defaultPaint:Landroid/graphics/Paint;
.end local v15 #shader:Landroid/graphics/LinearGradient;
.end local v23 #bitmapWithReflection:Landroid/graphics/Bitmap;
.end local v24 #height:I
.end local v25 #paint:Landroid/graphics/Paint;
.end local v26 #reflectionGap:I
.end local v27 #reflectionImage:Landroid/graphics/Bitmap;
:cond_4
return-void
.line 448
.restart local v6 #width:I
.restart local v8 #matrix:Landroid/graphics/Matrix;
.restart local v9 #canvas:Landroid/graphics/Canvas;
.restart local v14 #defaultPaint:Landroid/graphics/Paint;
.restart local v15 #shader:Landroid/graphics/LinearGradient;
.restart local v23 #bitmapWithReflection:Landroid/graphics/Bitmap;
.restart local v24 #height:I
.restart local v25 #paint:Landroid/graphics/Paint;
.restart local v26 #reflectionGap:I
.restart local v27 #reflectionImage:Landroid/graphics/Bitmap;
:cond_5
new-instance v29, Landroid/graphics/Matrix;
invoke-direct/range {v29 .. v29}, Landroid/graphics/Matrix;-><init>()V
.line 449
.local v29, scaleMatrix:Landroid/graphics/Matrix;
move-object/from16 v0, p0
iget v3, v0, Lcom/android/systemui/recent/RecentsPanelView;->mThumbnailWidth:I
int-to-float v3, v3
invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getWidth()I
move-result v4
int-to-float v4, v4
div-float v28, v3, v4
.line 450
.local v28, scale:F
move-object/from16 v0, v29
move/from16 v1, v28
move/from16 v2, v28
invoke-virtual {v0, v1, v2}, Landroid/graphics/Matrix;->setScale(FF)V
.line 451
move-object/from16 v0, p1
iget-object v3, v0, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailViewImage:Landroid/widget/ImageView;
sget-object v4, Landroid/widget/ImageView$ScaleType;->MATRIX:Landroid/widget/ImageView$ScaleType;
invoke-virtual {v3, v4}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V
.line 452
move-object/from16 v0, p1
iget-object v3, v0, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailViewImage:Landroid/widget/ImageView;
move-object/from16 v0, v29
invoke-virtual {v3, v0}, Landroid/widget/ImageView;->setImageMatrix(Landroid/graphics/Matrix;)V
goto :goto_0
.end method
- And download this : https://www.dropbox.com/s/ebk8u7traq8mh3i/drawable-nodpi.zip
extract this to /res/drawable-nodpi/
Remember to add the added strings and sources, in res/value/public.xml
CREDIT & THANKS TO :
- CyanogenMod
- XDA
- Adi_ais hiteru
- arco
- Evilisto
- mnemonyc (me)
SCREENSHOT
{
"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"
}
Send from AWMP D.C.
R: [MOD][CM10.1] Sense 4.0 style Task Manager - Recent apps [MDPI/LDPI DEVICES]
Hey guys...do u like this work? Press thanks button to do me that it is a good job!
Send from AWMP D.C.
Great job !
Tested on CM10.1 !
I got bootlop tested on slimbean 4.2.2
Not working for me LiQu OS beta-1 (base rom CM10.1), I got this in logcat
Code:
E( 562) java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.systemui/com.android.systemui.recent.RecentsActivity}: java.lang.IllegalArgumentException: missing Recents[Horizontal]ScrollView (AndroidRuntime)
E( 562) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2304) (AndroidRuntime)
E( 562) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2354) (AndroidRuntime)
E( 562) at android.app.ActivityThread.access$600(ActivityThread.java:150) (AndroidRuntime)
E( 562) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1244) (AndroidRuntime)
E( 562) at android.os.Handler.dispatchMessage(Handler.java:99) (AndroidRuntime)
E( 562) at android.os.Looper.loop(Looper.java:137) (AndroidRuntime)
E( 562) at android.app.ActivityThread.main(ActivityThread.java:5193) (AndroidRuntime)
E( 562) at java.lang.reflect.Method.invokeNative(Native Method) (AndroidRuntime)
E( 562) at java.lang.reflect.Method.invoke(Method.java:511) (AndroidRuntime)
E( 562) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795) (AndroidRuntime)
E( 562) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562) (AndroidRuntime)
E( 562) at dalvik.system.NativeStart.main(Native Method) (AndroidRuntime)
E( 562) Caused by: java.lang.IllegalArgumentException: missing Recents[Horizontal]ScrollView (AndroidRuntime)
E( 562) at com.android.systemui.recent.RecentsPanelView.onFinishInflate(RecentsPanelView.java:432) (AndroidRuntime)
E( 562) at android.view.LayoutInflater.rInflate(LayoutInflater.java:754) (AndroidRuntime)
E( 562) at android.view.LayoutInflater.inflate(LayoutInflater.java:489) (AndroidRuntime)
E( 562) at android.view.LayoutInflater.inflate(LayoutInflater.java:396) (AndroidRuntime)
E( 562) at android.view.LayoutInflater.inflate(LayoutInflater.java:352) (AndroidRuntime)
E( 562) at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270) (AndroidRuntime)
E( 562) at android.app.Activity.setContentView(Activity.java:1881) (AndroidRuntime)
E( 562) at com.android.systemui.recent.RecentsActivity.onCreate(RecentsActivity.java:177) (AndroidRuntime)
E( 562) at android.app.Activity.performCreate(Activity.java:5104) (AndroidRuntime)
E( 562) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) (AndroidRuntime)
E( 562) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2258) (AndroidRuntime)
logcat --> View attachment Log_2013-05-04_09-44-51.txt
U have done some errors on RecentPanelView.smali
Send from AWMP D.C.
i got this error when compiling..
[1659,4] missing EOF at '.line'
btw,nice work.. :good:
syakirilmam said:
i got this error when compiling..
[1659,4] missing EOF at '.line'
btw,nice work.. :good:
Click to expand...
Click to collapse
Please post in attachement the log of apktool error.
Send from AWMP D.C.
already solve that problem :fingers-crossed: but one problem found..my sytemUI doesn't have this xml
- /res/layout/status_bar_recent_item.xml
syakirilmam said:
already solve that problem :fingers-crossed: but one problem found..my sytemUI doesn't have this xml
- /res/layout/status_bar_recent_item.xml
Click to expand...
Click to collapse
But for what rom do u want do this mod??
Send from AWMP D.C.
stock samsung cm 10 rom from samsung s3 mini...
sorry for my bad english..
syakirilmam said:
stock samsung cm 10 rom from samsung s3 mini...
sorry for my bad english..
Click to expand...
Click to collapse
Sorry, I dont undertand...stock rom or cm10 rom??? And for what device??
Send from AWMP D.C.
cm 10 rom...my current device is samsung galaxy s3 mini...is it posibble to make this sense 4.0.task manager??
sorry for my attitude and my english
syakirilmam said:
cm 10 rom...my current device is samsung galaxy s3 mini...is it posibble to make this sense 4.0.task manager??
sorry for my attitude and my english
Click to expand...
Click to collapse
Follow this guide
http://forum.xda-developers.com/showthread.php?p=39047468
[MOD-GUIDE][CM10] Sense 4.0 style Multitasking with Reflection on CM10 [HDPI DEVICES]
Send from AWMP D.C.
mnemonyc said:
Follow this guide
http://forum.xda-developers.com/showthread.php?p=39047468
[MOD-GUIDE][CM10] Sense 4.0 style Multitasking with Reflection on CM10 [HDPI DEVICES]
Thank you man!!:good:
Click to expand...
Click to collapse
can this mod be done on cm10?
ive cm10 on xperia mini pro!
can i do it on my rom?
its 4.1.2 android version
MEHRDAD595 said:
can this mod be done on cm10?
ive cm10 on xperia mini pro!
can i do it on my rom?
its 4.1.2 android version
Click to expand...
Click to collapse
Yes u can!
Send from AWMP D.C.
help
mnemonyc said:
Hey guys...do u like this work? Press thanks button to do me that it is a good job!
Send from AWMP D.C.
Click to expand...
Click to collapse
hey that was great. I want some help from you if you can.
I want to change the look of the gingerbread status bar to that of the ICS(original ics that of nexus) .
Can you please give the tutorial for changing every thing in status bar like icons and background and all?
please... I searched everywhere but can't find anything related.
Requesting you to please give the tutorial......
Can I try this mod in the cm9 by maclaw for galaxy ace?
Inviato dal mio GT-S5830 con Tapatalk 2
Yes, u can
Sent from my GT-I9300 using Tapatalk 4 Beta
HOW TO PORT LIDROID TOGGLES
TO NON SAMSUNG ICS ROMS
for JB you can go here : http://forum.xda-developers.com/showthread.php?t=2381290
Credit & Thank you :
- @lidroid
- Recognized themer @serajr for some additional toggles created by him.
and we are going to port 21 Lidroid toggles :
( -Lock screen/screen-off action, -Reboot action, -Shutdown action, -Airplane mode, -Bluetoth, -Brightness, -GPS, -Flashlight, -Lockscreen, -MobileData, -Orientation, -ScreenTimeOut, -Sound, -Sync, -Wi-fi, -Wi-fi Hotspot, Battery info, Stay awake, USB Connection mode, USB Debugging, Network mode )
NOTE !! , for CyanogenMod 9 do not follow this guide, you can just flash my mod for CM9 in here http://forum.xda-developers.com/showthread.php?t=2334200
many users from different devices reported work on their phone
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
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else
1. Decomple SystemUI.apk
- res/values/ids.xml
add this to the end :
Code:
<item type="id" name="quickpanel_button">false</item>
<item type="id" name="quickpanel_button_image">false</item>
<item type="id" name="quickpanel_button_text">false</item>
<item type="id" name="quickpanel_button_indic">false</item>
<item type="id" name="adi_quickpanel">false</item>
- res/values/strings.xml
add this to the end :
Code:
<string name="quickpanel_wifi_text">WiFi</string>
<string name="quickpanel_dc_text">Data</string>
<string name="quickpanel_network_mode_text">Network</string>
<string name="quickpanel_sound_text">Ring</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">Orientation</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">Airplane</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">CWM recovery</string>
<string name="reboot_download">Download</string>
<string name="quickpanel_usb_debugging_text">USB Debugging</string>
<string name="quickpanel_usb_connection_mode_text">USB Conn. 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 Info</string>
<string name="battery_info_info">Battery Information</string>
<string name="battery_info_usage">Battery Power Usage</string>
<string name="quickpanel_wifi_ap_text">Wifi AP</string>
<string name="quickpanel_lockscreen_action_text">Lock Now</string>
- res/layout/status_bar_expanded.xml
add the red code :
MEDIATEK device
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.ExpandedView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<FrameLayout android:id="@id/toolBarSwitchPanel" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="103.0dip">
<include layout="@layout/zzz_toolbar_view" />
<include layout="@layout/zzz_toolbar_indicator" />
</FrameLayout>
<View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="2.0dip" />
<RelativeLayout android:background="@drawable/notification_header_bg" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="52.0dip">
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="left|center" android:id="@id/date" android:paddingLeft="16.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_alignParentLeft="true" />
<ImageView android:id="@id/settings_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_toRightOf="@id/date" android:contentDescription="@string/accessibility_settings_button" />
<ImageView android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_clear" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
</RelativeLayout>
[COLOR="Red"]<com.lidroid.systemui.quickpanel.PowerWidget android:id="@id/adi_quickpanel" android:layout_width="fill_parent" android:layout_height="wrap_content" />[/COLOR]
<View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="2.0dip" />
<FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
<TextView android:textAppearance="@*android:style/TextAppearance.Large" android:gravity="left" android:layout_gravity="top" android:id="@id/noNotificationsTitle" android:padding="8.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" 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_height" />
</LinearLayout>
</ScrollView>
<ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/title_bar_shadow" android:scaleType="fitXY" />
</FrameLayout>
</com.android.systemui.statusbar.phone.ExpandedView>
AOSP / XPERIA
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.ExpandedView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<RelativeLayout android:background="@drawable/notification_header_bg" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="52.0dip">
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="left|center" android:id="@id/date" android:paddingLeft="16.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_alignParentLeft="true" />
<ImageView android:id="@id/settings_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_toRightOf="@id/date" android:contentDescription="@string/accessibility_settings_button" />
<ImageView android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_clear" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
</RelativeLayout>
[COLOR="Red"]<com.lidroid.systemui.quickpanel.PowerWidget android:id="@id/adi_quickpanel" android:layout_width="fill_parent" android:layout_height="wrap_content" />[/COLOR]
<View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="2.0dip" />
<FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
<TextView android:textAppearance="@*android:style/TextAppearance.Large" android:gravity="left" android:layout_gravity="top" android:id="@id/noNotificationsTitle" android:padding="8.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" 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_height" />
</LinearLayout>
</ScrollView>
<ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/title_bar_shadow" android:scaleType="fitXY" />
</FrameLayout>
</com.android.systemui.statusbar.phone.ExpandedView>
- smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
add the blue code :
Code:
.field mPixelFormat:I
.field mPositionTmp:[I
.field mPostCollapseCleanup:Ljava/lang/Runnable;
[COLOR="Blue"].field mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;[/COLOR]
.field private mPreviousConfigFontScale:F
.field mQueueLock:Ljava/lang/Object;
.field private mRecentTasksLoader:Lcom/android/systemui/recent/RecentTasksLoader;
NEXT still in the same smali
for MEDIATEK devices
find this method
Code:
# virtual methods
.method public addIcon(Ljava/lang/String;IILcom/android/internal/statusbar/StatusBarIcon;)V
scroll down and add the blue code
Code:
invoke-virtual {v1, v0, p3, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V
[COLOR="Blue"]iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->updateWidget()V[/COLOR]
.line 601
return-void
.end method
next find this method :
Code:
.method protected makeStatusBarView()Landroid/view/View;
scroll down and add the blue code
Code:
const [COLOR="Red"]v11[/COLOR], 0x7f0e0041
invoke-virtual {[COLOR="Red"]v2, v11[/COLOR]}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object [COLOR="Red"]v11[/COLOR]
check-cast [COLOR="Red"]v11[/COLOR], Landroid/widget/ScrollView;
iput-object [COLOR="Red"]v11, p0[/COLOR], Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
[COLOR="Blue"]const [COLOR="Red"]v11[/COLOR], 0x7f0e0096
invoke-virtual {[COLOR="Red"]v2, v11[/COLOR]}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object [COLOR="Red"]v11[/COLOR]
check-cast [COLOR="Red"]v11[/COLOR], Lcom/lidroid/systemui/quickpanel/PowerWidget;
iput-object [COLOR="Red"]v11, p0[/COLOR], Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;[/COLOR]
.line 375
new-instance v11, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;
invoke-direct {v11, p0, v1, v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/content/Context;Landroid/view/View;)V
iput-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTicker:Lcom/android/systemui/statusbar/phone/Ticker;
pay attention on the red code in the part of blue code, it has to be written the same like above it/previous part
and also every mediatek device may be have diferent code,. see my another example in here : http://forum.xda-developers.com/showpost.php?p=44095535&postcount=7
next still in the same method, scroll down , and add the blue code
Code:
const-string v11, "android.intent.action.SIM_INFO_UPDATE"
invoke-virtual {v9, v11}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 450
iget-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSIMInfoReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v1, v11, v9}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
[COLOR="Blue"]iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V[/COLOR]
.line 454
return-object v6
.line 312
.end local v3 #filter:Landroid/content/IntentFilter;
.end local v4 #indicator:Lcom/android/systemui/statusbar/toolbar/ToolBarIndicator;
.end local v6 #sb:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.end local v8 #signalCluster:Lcom/android/systemui/statusbar/SignalClusterViewGemini;
.end local v9 #simInfoIntentFilter:Landroid/content/IntentFilter;
.end local v10 #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
Click to expand...
Click to collapse
for AOSP / XPERIA
find this method
Code:
# virtual methods
.method public addIcon(Ljava/lang/String;IILcom/android/internal/statusbar/StatusBarIcon;)V
scroll down and add the blue code
Code:
const-string v8, "android.intent.action.SCREEN_OFF"
invoke-virtual {v2, v8}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 373
iget-object v8, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v0, v8, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
[COLOR="Blue"]iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;
const v6, 0x7f0e0096
invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v5
check-cast v5, Lcom/lidroid/systemui/quickpanel/PowerWidget;
iput-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v6}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V[/COLOR]
.line 375
return-object v4
.line 306
.end local v2 #filter:Landroid/content/IntentFilter;
.end local v6 #signalCluster:Lcom/android/systemui/statusbar/SignalClusterView;
.end local v7 #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
:catch_0
move-exception v8
goto/16 :goto_0
.end method
Click to expand...
Click to collapse
CONTINUE TO POST #2
2. Download source_ICS_Lidroid_SytemUI.apk
Exstract it and merge to your decompiled SystemUI.apk
NOTE !! if your device has arrays.xml in res/values/here
please do check again the source_ICS_Lidroid_SytemUI.apk and adapt the arrays.xml code in it with yours
done and Recompile your SystemUI.apk
3. Decompile the newly Recompiled APK again and go to
res/values/public.xml
open it with Notepad++
leave it, but keep it open
next
- smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
with Notepad++ , control+F
MEDIATEK DEVICES
Code:
iput-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
const v11, [COLOR="Red"]0x7f0e0096[/COLOR]
invoke-virtual {v2, v11}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v11
check-cast v11, Lcom/lidroid/systemui/quickpanel/PowerWidget;
iput-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
.line 375
new-instance v11, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;
Click to expand...
Click to collapse
AOSP/XPERIA
Code:
invoke-virtual {v0, v8, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;
const v6, [COLOR="Red"]0x7f0e0096[/COLOR]
invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v5
check-cast v5, Lcom/lidroid/systemui/quickpanel/PowerWidget;
iput-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v6}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
.line 375
return-object v4
Click to expand...
Click to collapse
Replace 0x7f0e0096 with the new ids from second decompiled public.xml
Code:
<public type="id" name="[COLOR="Blue"]adi_quickpanel[/COLOR]" id="[COLOR="Red"]0x7fxxxxxx[/COLOR]" />
NEXT CONTINUE IN POST #3
4. Download ICS_Lidroid_public.xml
and open it with Notepad++
so now you have two public.xml which is opened in the Notepad++
1. second decompiled public.xml
2. ICS_Lidroid_public.xml
- go to , smali/com/lidroid/systemui/quickpanel/here...
there are a lot of smalis there
FIND ALL IDS in all that smalis THAT'S STARTED WITH
Code:
[COLOR="Red"]0x7fxxxxxx[/COLOR]
EXAMPLE :
AirplaneButton.smali
find this :
Code:
const v0, [COLOR="Red"]0x7f080089[/COLOR]
find 0x7f080089 in ICS_Lidroid_public.xml
Code:
<public type="string" name="quickpanel_lockscreen_text" id="0x7f080088" />
<public type="[COLOR="Blue"]string[/COLOR]" name="[COLOR="Green"]quickpanel_airplane_text[/COLOR]" id="[COLOR="Red"]0x7f080089[/COLOR]" />
<public type="string" name="quickpanel_flashlight_text" id="0x7f08008a" />
we find that 0x7f080089 is for string .... quickpanel_airplane_text
Next, find string .... quickpanel_airplane_text new ids in your
public.xml of second decompiled SystemUI.apk
Code:
<public type="[COLOR="Blue"]string[/COLOR]" name="[COLOR="Green"]quickpanel_airplane_text[/COLOR]" id="[COLOR="Red"]0x7fxxxxxx[/COLOR]" />
change the ids in AirplaneButton.smali with your new ids from public.xml of second decompiled systemui.apk.
Do it too, to all
Code:
[COLOR="Red"]0x7fxxxxxx[/COLOR]
in all smalis in the lidroid folder.
6. Download this QuickPanel_Settings.apk and push to system/app with right permission
Done
Additional Guide
[HOWTO] Enable 2G/3G, 2G, 3G Toggle
only for devices that support 3G/HSDPA
Go to this thread [HOWTO] Enable 2G/3G Toggle from Statusbar/Launcher
But don't follow the lidroid step, coz we have it already
or Without patching Phone.apk , but with editing Lidroid and Android.manifest
go here : http://forum.xda-developers.com/showpost.php?p=40971646&postcount=30
[Porting Guide][ICS] Mod 4.2 Statusbar tilesview (TABS, Slider, Flip Anim, Lidroid )
http://forum.xda-developers.com/showthread.php?t=2423398
Guide How to full screen Expanded Pulldown JB style
http://forum.xda-developers.com/showthread.php?p=45130177#post45130177
I think that should be done before step 2 because I have the error code in PhoneStatusBar.smali 0x7f0e0096 in step 1
{
"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"
}
I made 2 previous steps then get the code received from <public type="id" name="adi_quickpanel" id="0x7fxxxxxx" /> instead PhoneStatusBar.smali then recompile and it's ok
My device is Lenovo A390
Sorry for my bad English!
Gửi từ Lenovo A390_ROW của tôi bằng cách sử dụng Tapatalk 2
I get errors while recompiling the apk. Here's the full error http://pastebin.com/EKEVsGQh. I'm attaching my SystemUI and framework-res for reference. Please do not just mod it and give it to me, explain if you can so I can know what exactly is the problem
SystemUI.apk
framework-res.apk
try this @grvrulz
add the blue code, but don't add <-- adi_quickpanel
Code:
[COLOR="Red"]const v13, 0x7f0e0042
invoke-virtual {v3, v13}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v13
check-cast v13, Landroid/widget/ScrollView;
move-object/from16 v0, p0
iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;[/COLOR]
[B]blue lines below is basically a copy from above red lines[/B]
[COLOR="Blue"]const v13, 0x7f0e0042 <-- adi_quickpanel
invoke-virtual {v3, v13}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v13
check-cast v13, Lcom/lidroid/systemui/quickpanel/PowerWidget;
move-object/from16 v0, p0
iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;[/COLOR]
dafuqChicken said:
I think that should be done before step 2 because I have the error code in PhoneStatusBar.smali 0x7f0e0096 in step 1
View attachment 2152085
I made 2 previous steps then get the code received from <public type="id" name="adi_quickpanel" id="0x7fxxxxxx" /> instead PhoneStatusBar.smali then recompile and it's ok
View attachment 2152086
My device is Lenovo A390
Sorry for my bad English!
Gửi từ Lenovo A390_ROW của tôi bằng cách sử dụng Tapatalk 2
Click to expand...
Click to collapse
oke , how is the result now ?, is there any I can help
How to Port Lidroid Toggles to CM7
Thanks
x-dira said:
How to Port Lidroid Toggles to CM7
Thanks
Click to expand...
Click to collapse
I cannot experimenting on CM7 , coz we don't have CM7 roms on my device,.
but CM7 is Gingerbread, so I think it will be same guide like for Stok GB too
Still doesn't work
Adi Aisiteru Reborn said:
try this @grvrulz
add the blue code, but don't add <-- adi_quickpanel
Code:
[COLOR="Red"]const v13, 0x7f0e0042
invoke-virtual {v3, v13}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v13
check-cast v13, Landroid/widget/ScrollView;
move-object/from16 v0, p0
iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;[/COLOR]
[B]below is a copied from above[/B]
[COLOR="Blue"]const v13, 0x7f0e0042 <-- adi_quickpanel
invoke-virtual {v3, v13}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v13
check-cast v13, Lcom/lidroid/systemui/quickpanel/PowerWidget;
move-object/from16 v0, p0
iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;[/COLOR]
Click to expand...
Click to collapse
Thank you. I completed the whole guide with this, but the quickpanel doesn't show up. I tried rebooting a couple of times and placing the quickpanel widget at different points in the layout, but it still doesn't show up. I took a logcat with 'adb logcat -d > logcat2.txt' and I'm attaching it here for reference.
Yeah! I have done!!
Thank you for this mod!
Can you help me remove it?
Gửi từ Lenovo A390_ROW của tôi bằng cách sử dụng Tapatalk 2
grvrulz said:
Thank you. I completed the whole guide with this, but the quickpanel doesn't show up. I tried rebooting a couple of times and placing the quickpanel widget at different points in the layout, but it still doesn't show up. I took a logcat with 'adb logcat -d > logcat2.txt' and I'm attaching it here for reference.
Click to expand...
Click to collapse
can you attach me your modded PhoneStatusBar.smali ?
dafuqChicken said:
Can you help me remove it?
View attachment 2153404
Gửi từ Lenovo A390_ROW của tôi bằng cách sử dụng Tapatalk 2
Click to expand...
Click to collapse
Code:
android:layout_height="[COLOR="Red"]0.0dip[/COLOR]"
Adi Aisiteru Reborn said:
Additional Guide
[HOWTO] Enable 2G/3G, 2G, 3G Toggle
only for devices that support 3G/HSDPA
Go to this thread [HOWTO] Enable 2G/3G Toggle from Statusbar/Launcher
But don't follow the lidroid step, coz we have it already
or Without patching Phone.apk , but with editing Lidroid and Android.manifest
go here : http://forum.xda-developers.com/showpost.php?p=40971646&postcount=30
Click to expand...
Click to collapse
Additional Guide added
Adi Aisiteru Reborn said:
can you attach me your modded PhoneStatusBar.smali ?
Click to expand...
Click to collapse
Here's my Phonestatusbar.smali. It's renamed because xda doesn't accept smali files as attachments(but you probably knew it already )
grvrulz said:
Here's my Phonestatusbar.smali. It's renamed because xda doesn't accept smali files as attachments(but you probably knew it already )
Click to expand...
Click to collapse
Code:
const-string v13, "file"
invoke-virtual {v6, v13}, Landroid/content/IntentFilter;->addDataScheme(Ljava/lang/String;)V
.line 473
move-object/from16 v0, p0
iget-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mMediaEjectBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v2, v13, v6}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
[COLOR="Blue"]iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V[/COLOR]
.line 475
return-object v8
.line 320
.end local v4 #filter:Landroid/content/IntentFilter;
.end local v5 #indicator:Lcom/android/systemui/statusbar/toolbar/ToolBarIndicator;
.end local v6 #mediaEjectFilter:Landroid/content/IntentFilter;
.end local v8 #sb:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.end local v10 #signalCluster:Lcom/android/systemui/statusbar/SignalClusterViewGemini;
.end local v11 #simInfoIntentFilter:Landroid/content/IntentFilter;
.end local v12 #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
:cond_1
const v13, 0x7f030020
const/4 v14, 0x0
invoke-static {v2, v13, v14}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v8
check-cast v8, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.restart local v8 #sb:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
goto/16 :goto_0
.line 337
:catch_0
move-exception v13
goto/16 :goto_1
.end method
you havn't add the blue code
Adi Aisiteru Reborn said:
Code:
const-string v13, "file"
invoke-virtual {v6, v13}, Landroid/content/IntentFilter;->addDataScheme(Ljava/lang/String;)V
.line 473
move-object/from16 v0, p0
iget-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mMediaEjectBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v2, v13, v6}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
[COLOR="Blue"]iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V[/COLOR]
.line 475
return-object v8
.line 320
.end local v4 #filter:Landroid/content/IntentFilter;
.end local v5 #indicator:Lcom/android/systemui/statusbar/toolbar/ToolBarIndicator;
.end local v6 #mediaEjectFilter:Landroid/content/IntentFilter;
.end local v8 #sb:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.end local v10 #signalCluster:Lcom/android/systemui/statusbar/SignalClusterViewGemini;
.end local v11 #simInfoIntentFilter:Landroid/content/IntentFilter;
.end local v12 #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
:cond_1
const v13, 0x7f030020
const/4 v14, 0x0
invoke-static {v2, v13, v14}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v8
check-cast v8, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.restart local v8 #sb:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
goto/16 :goto_0
.line 337
:catch_0
move-exception v13
goto/16 :goto_1
.end method
you havn't add the blue code
Click to expand...
Click to collapse
After adding this, I get the error
Code:
[8180,1] The register number must be less than v16
I also tried adding
Code:
move-object/from16 v0, p0
just before that line but it's still the same..
grvrulz said:
After adding this, I get the error
Code:
[8180,1] The register number must be less than v16
I also tried adding
Code:
move-object/from16 v0, p0
just before that line but it's still the same..
Click to expand...
Click to collapse
try to use PhoneStatusBar.smali code for AOSP/XPERIA from OP,.
or for Touchwizz in here http://forum.xda-developers.com/showthread.php?t=1725411
but change
Code:
Lcom/wanam/systemui/quickpanel/PowerWidget;
to :
Code:
Lcom/lidroid/systemui/quickpanel/PowerWidget;
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