Related
Here is another guide for cm9/10
its adding the samsung taskmanager button to recent panels
stuff you need:-
apktool 1.5.0/1.4.3/1.4.2
notepad++
stuff we gonna modify :-
Systemui.apk
res/layout/status_bar_no_recent_apps.xml
res/layout/system_bar_recent_panel.xml
res/layout-land/status_bar_recent_panel.xml
res/layout-port/status_bar_recent_panel.xml
smali/com/android/systemui/SystemUIService.smali
1. we gonna modify res/layout/status_bar_no_recent_apps.xml
it looks like this
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<TextView android:textSize="20.0dip" android:textColor="#ffffffff" 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" />
</FrameLayout>
add :-
<Button android:gravity="center" android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Task Manager" androidnClick="openTaskManager" />
Click to expand...
Click to collapse
so it would look like :-
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<TextView android:textSize="20.0dip" android:textColor="#ffffffff" 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" />
<Button android:gravity="center" android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Task Manager" android:onClick="openTaskManager" />
</FrameLayout>
2.we modify res/layout/system_bar_recent_panel.xml
it looks like this :-
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.recent.RecentsPanelView android:id="@id/recents_root" android:clipChildren="false" android:clipToPadding="false" android:layout_width="wrap_content" android:layout_height="fill_parent" systemui:recentItemLayout="@layout/system_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="@drawable/recents_bg_protect_tile" android:clipChildren="false" android:clipToPadding="false" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginBottom="@android:dimen/system_bar_height" 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.RecentsVerticalScrollView android:layout_gravity="bottom|left|center" android:id="@id/recents_container" android:scrollbars="none" android:fadingEdge="vertical" android:fadingEdgeLength="20.0dip" android:clipChildren="false" android:clipToPadding="false" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="@dimen/status_bar_recents_right_glow_margin" 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="wrap_content" android:layout_height="wrap_content" />
</com.android.systemui.recent.RecentsVerticalScrollView>
<include android:id="@id/recents_no_apps" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="58.0dip" android:layout_marginBottom="36.0dip" layout="@layout/system_bar_no_recent_apps" />
</FrameLayout>
<com.android.systemui.recent.StatusBarTouchProxy android:id="@id/status_bar_touch_proxy" android:layout_width="fill_parent" android:layout_height="@android:dimen/system_bar_height" android:layout_alignParentLeft="true" android:layout_alignParentBottom="true" />
</com.android.systemui.recent.RecentsPanelView>
add:-
<Button android:gravity="center" android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Task Manager" androidnClick="openTaskManager" />
Click to expand...
Click to collapse
so it would look like :-
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.recent.RecentsPanelView android:id="@id/recents_root" android:clipChildren="false" android:clipToPadding="false" android:layout_width="wrap_content" android:layout_height="fill_parent" systemui:recentItemLayout="@layout/system_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="@drawable/recents_bg_protect_tile" android:clipChildren="false" android:clipToPadding="false" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginBottom="@android:dimen/system_bar_height" 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.RecentsVerticalScrollView android:layout_gravity="bottom|left|center" android:id="@id/recents_container" android:scrollbars="none" android:fadingEdge="vertical" android:fadingEdgeLength="20.0dip" android:clipChildren="false" android:clipToPadding="false" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="@dimen/status_bar_recents_right_glow_margin" 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="wrap_content" android:layout_height="wrap_content" />
</com.android.systemui.recent.RecentsVerticalScrollView>
<include android:id="@id/recents_no_apps" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="58.0dip" android:layout_marginBottom="36.0dip" layout="@layout/system_bar_no_recent_apps" />
</FrameLayout>
<com.android.systemui.recent.StatusBarTouchProxy android:id="@id/status_bar_touch_proxy" android:layout_width="fill_parent" android:layout_height="@android:dimen/system_bar_height" android:layout_alignParentLeft="true" android:layout_alignParentBottom="true" />
<Button android:gravity="center" android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Task Manager" android:onClick="openTaskManager" />
</com.android.systemui.recent.RecentsPanelView>
3. we modify res/layout-land/status_bar_recent_panel.xml
it looks like
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">
<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="@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">
<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>
</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>
add :-
<Button android:gravity="center" android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Task Manager" androidnClick="openTaskManager" />
Click to expand...
Click to collapse
so it would look like :-
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">
<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="@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">
<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>
</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" />
<Button android:gravity="center" android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Task Manager" android:onClick="openTaskManager" />
</com.android.systemui.recent.RecentsPanelView>
4. we modify res/layout-port/status_bar_recent_panel.xml
it looks like this :-
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.recent.RecentsPanelView android:id="@id/recents_root" android:clipChildren="false" android:clipToPadding="false" android:layout_width="wrap_content" android:layout_height="fill_parent" systemui:recentItemLayout="@layout/system_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="@drawable/recents_bg_protect_tile" android:clipChildren="false" android:clipToPadding="false" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginBottom="@android:dimen/system_bar_height" 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.RecentsVerticalScrollView android:layout_gravity="bottom|left|center" android:id="@id/recents_container" android:scrollbars="none" android:fadingEdge="vertical" android:fadingEdgeLength="20.0dip" android:clipChildren="false" android:clipToPadding="false" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="@dimen/status_bar_recents_right_glow_margin" 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="wrap_content" android:layout_height="wrap_content" />
</com.android.systemui.recent.RecentsVerticalScrollView>
<include android:id="@id/recents_no_apps" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="58.0dip" android:layout_marginBottom="36.0dip" layout="@layout/system_bar_no_recent_apps" />
</FrameLayout>
<com.android.systemui.recent.StatusBarTouchProxy android:id="@id/status_bar_touch_proxy" android:layout_width="fill_parent" android:layout_height="@android:dimen/system_bar_height" android:layout_alignParentLeft="true" android:layout_alignParentBottom="true" />
</com.android.systemui.recent.RecentsPanelView>
add:-
<Button android:gravity="center" android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Task Manager" androidnClick="openTaskManager" />
Click to expand...
Click to collapse
so it would look like :-
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.recent.RecentsPanelView android:id="@id/recents_root" android:clipChildren="false" android:clipToPadding="false" android:layout_width="wrap_content" android:layout_height="fill_parent" systemui:recentItemLayout="@layout/system_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="@drawable/recents_bg_protect_tile" android:clipChildren="false" android:clipToPadding="false" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginBottom="@android:dimen/system_bar_height" 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.RecentsVerticalScrollView android:layout_gravity="bottom|left|center" android:id="@id/recents_container" android:scrollbars="none" android:fadingEdge="vertical" android:fadingEdgeLength="20.0dip" android:clipChildren="false" android:clipToPadding="false" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="@dimen/status_bar_recents_right_glow_margin" 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="wrap_content" android:layout_height="wrap_content" />
</com.android.systemui.recent.RecentsVerticalScrollView>
<include android:id="@id/recents_no_apps" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="58.0dip" android:layout_marginBottom="36.0dip" layout="@layout/system_bar_no_recent_apps" />
</FrameLayout>
<com.android.systemui.recent.StatusBarTouchProxy android:id="@id/status_bar_touch_proxy" android:layout_width="fill_parent" android:layout_height="@android:dimen/system_bar_height" android:layout_alignParentLeft="true" android:layout_alignParentBottom="true" />
<Button android:gravity="center" android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Task Manager" android:onClick="openTaskManager" />
</com.android.systemui.recent.RecentsPanelView>
5. Now we are going to do some small smali
open smali/com/android/systemui/SystemUIService.smali
go to last line and add
Code:
.method public openTaskManager(Landroid/view/View;)V
.locals 5
.parameter "view"
.prologue
.line 99
.line 100
:try_start_0
new-instance v1, Landroid/content/Intent;
invoke-direct {v1}, Landroid/content/Intent;-><init>()V
.line 102
.local v1, intent:Landroid/content/Intent;
const-string v2, "android.intent.action.MAIN"
invoke-virtual {v1, v2}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
.line 105
const/high16 v2, 0x1000
invoke-virtual {v1, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
.line 107
const-string v2, "com.sec.android.app.controlpanel"
const-string v3, "com.sec.android.app.controlpanel.activity.JobManagerActivity"
invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
invoke-virtual {p0, v1}, Lcom/android/systemui/SystemUIService;->startActivity(Landroid/content/Intent;)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.line 109
.line 112
.end local v1 #intent:Landroid/content/Intent;
:goto_0
return-void
.line 115
:catch_0
move-exception v0
.line 117
.local v0, e:Ljava/lang/Exception;
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_0
.end method
and then compile
7. add the taskmanager.apk in system/app otherwise FC
*Resource is added to attachement *
8. Done
How Can i Do This In 14 Toggles as None of The Files and Smali Exist?
SnowPluralism said:
How Can i Do This In 14 Toggles as None of The Files and Smali Exist?
Click to expand...
Click to collapse
how do u mean in 14 toggles ?
Sent from my GT-S5830 using xda premium
step 2.we modify res/layout/system_bar_recent_panel.xml
...
res/layout/ for me do not file system_bar_recen_panel.xml?
Thanks
x-dira said:
step 2.we modify res/layout/system_bar_recent_panel.xml
...
res/layout/ for me do not file system_bar_recen_panel.xml?
Thanks
Click to expand...
Click to collapse
recent panel xml u need to find
Sent from my GT-S5830 using xda premium
SpaceCaker said:
recent panel xml u need to find
Sent from my GT-S5830 using xda premium
Click to expand...
Click to collapse
In SystemUI with 14 toggles none of those files exist.
Sent from my PROUD GT-S5830 using xda premium
thats because this is for ics / jellybean
and not for GB
stock sysemui with 14 toggles already has taskmanager button in recent apps
Sent from my GT-S5830 using xda premium
SpaceCaker said:
thats because this is for ics / jellybean
and not for GB
stock sysemui with 14 toggles already has taskmanager button in recent apps
Sent from my GT-S5830 using xda premium
Click to expand...
Click to collapse
Forget about this ...
Sent from my Galaxy ACE using xda premium
can u mod Kill All Tasks MOD?
http://forum.xda-developers.com/showthread.php?t=1949753
Thanks
x-dira said:
can u mod Kill All Tasks MOD?
http://forum.xda-developers.com/showthread.php?t=1949753
Thanks
Click to expand...
Click to collapse
will try
Sent from my GT-S5830 using xda premium
x-dira said:
can u mod Kill All Tasks MOD?
http://forum.xda-developers.com/showthread.php?t=1949753
Thanks
Click to expand...
Click to collapse
Till now not succesfull
Sent from my GT-S5830 using xda premium
SpaceCaker said:
Till now not succesfull
Sent from my GT-S5830 using xda premium
Click to expand...
Click to collapse
hope can help you
http://forum.xda-developers.com/showpost.php?p=25790178&postcount=97
SpaceCaker said:
will try
Sent from my GT-S5830 using xda premium
Click to expand...
Click to collapse
> Did i missed something? I had the task manager buttons o recent app.. but when I press it nothing happens?
neko95 said:
> Did i missed something? I had the task manager buttons o recent app.. but when I press it nothing happens?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=1879903
neko95 said:
> Did i missed something? I had the task manager buttons o recent app.. but when I press it nothing happens?
Click to expand...
Click to collapse
U need to add taskmanager and the smali
Sent from my GT-S5830 using xda premium
Task Manager Doesn't Open
SpaceCaker said:
U need to add taskmanager and the smali
Click to expand...
Click to collapse
i Am Trying To Do This Method On
Sony Xperia S Running CM10 FXP206a
I Have Added
TaskManager.apk And SystemUI.apk
To /System/App
And Changed Permission To (rw--r--r--)
And Here Is My SystemUIService.smali Looks
HTML:
.class public Lcom/android/systemui/SystemUIService;
.super Landroid/app/Service;
.source "SystemUIService.java"
# instance fields
.field final SERVICES:[Ljava/lang/Object;
.field mServices:[Lcom/android/systemui/SystemUI;
# direct methods
.method public constructor <init>()V
.locals 3
.prologue
const/4 v2, 0x0
.line 35
invoke-direct {p0}, Landroid/app/Service;-><init>()V
.line 41
const/4 v0, 0x3
new-array v0, v0, [Ljava/lang/Object;
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v2
const/4 v1, 0x1
const-class v2, Lcom/android/systemui/power/PowerUI;
aput-object v2, v0, v1
const/4 v1, 0x2
const-class v2, Lcom/android/systemui/media/RingtonePlayer;
aput-object v2, v0, v1
iput-object v0, p0, Lcom/android/systemui/SystemUIService;->SERVICES:[Ljava/lang/Object;
return-void
.end method
.method private chooseClass(Ljava/lang/Object;)Ljava/lang/Class;
.locals 5
.parameter "o"
.prologue
.line 53
instance-of v2, p1, Ljava/lang/Integer;
if-eqz v2, :cond_0
.line 54
check-cast p1, Ljava/lang/Integer;
.end local p1
invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I
move-result v2
invoke-virtual {p0, v2}, Lcom/android/systemui/SystemUIService;->getString(I)Ljava/lang/String;
move-result-object v0
.line 56
.local v0, cl:Ljava/lang/String;
:try_start_0
invoke-virtual {p0}, Lcom/android/systemui/SystemUIService;->getClassLoader()Ljava/lang/ClassLoader;
move-result-object v2
invoke-virtual {v2, v0}, Ljava/lang/ClassLoader;->loadClass(Ljava/lang/String;)Ljava/lang/Class;
:try_end_0
.catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
move-result-object p1
.line 61
.end local v0 #cl:Ljava/lang/String;
:goto_0
return-object p1
.line 57
.restart local v0 #cl:Ljava/lang/String;
:catch_0
move-exception v1
.line 58
.local v1, ex:Ljava/lang/ClassNotFoundException;
new-instance v2, Ljava/lang/RuntimeException;
invoke-direct {v2, v1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw v2
.line 60
.end local v0 #cl:Ljava/lang/String;
.end local v1 #ex:Ljava/lang/ClassNotFoundException;
.restart local p1
:cond_0
instance-of v2, p1, Ljava/lang/Class;
if-eqz v2, :cond_1
.line 61
check-cast p1, Ljava/lang/Class;
goto :goto_0
.line 63
:cond_1
new-instance v2, Ljava/lang/RuntimeException;
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "Unknown system ui service: "
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
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-direct {v2, v3}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw v2
.end method
# virtual methods
.method protected dump(Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V
.locals 8
.parameter "fd"
.parameter "pw"
.parameter "args"
.prologue
.line 116
if-eqz p3, :cond_0
array-length v6, p3
if-nez v6, :cond_1
.line 117
:cond_0
iget-object v0, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;
.local v0, arr$:[Lcom/android/systemui/SystemUI;
array-length v2, v0
.local v2, len$:I
const/4 v1, 0x0
.local v1, i$:I
:goto_0
if-ge v1, v2, :cond_3
aget-object v5, v0, v1
.line 118
.local v5, ui:Lcom/android/systemui/SystemUI;
new-instance v6, Ljava/lang/StringBuilder;
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
const-string v7, "dumping service: "
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v5}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v7
invoke-virtual {v7}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v7
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v6
invoke-virtual {p2, v6}, Ljava/io/PrintWriter;->println(Ljava/lang/String;)V
.line 119
invoke-virtual {v5, p1, p2, p3}, Lcom/android/systemui/SystemUI;->dump(Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V
.line 117
add-int/lit8 v1, v1, 0x1
goto :goto_0
.line 122
.end local v0 #arr$:[Lcom/android/systemui/SystemUI;
.end local v1 #i$:I
.end local v2 #len$:I
.end local v5 #ui:Lcom/android/systemui/SystemUI;
:cond_1
const/4 v6, 0x0
aget-object v4, p3, v6
.line 123
.local v4, svc:Ljava/lang/String;
iget-object v0, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;
.restart local v0 #arr$:[Lcom/android/systemui/SystemUI;
array-length v2, v0
.restart local v2 #len$:I
const/4 v1, 0x0
.restart local v1 #i$:I
:goto_1
if-ge v1, v2, :cond_3
aget-object v5, v0, v1
.line 124
.restart local v5 #ui:Lcom/android/systemui/SystemUI;
invoke-virtual {v5}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v3
.line 125
.local v3, name:Ljava/lang/String;
invoke-virtual {v3, v4}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z
move-result v6
if-eqz v6, :cond_2
.line 126
invoke-virtual {v5, p1, p2, p3}, Lcom/android/systemui/SystemUI;->dump(Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V
.line 123
:cond_2
add-int/lit8 v1, v1, 0x1
goto :goto_1
.line 130
.end local v3 #name:Ljava/lang/String;
.end local v4 #svc:Ljava/lang/String;
.end local v5 #ui:Lcom/android/systemui/SystemUI;
:cond_3
return-void
.end method
.method public onBind(Landroid/content/Intent;)Landroid/os/IBinder;
.locals 1
.parameter "intent"
.prologue
.line 111
const/4 v0, 0x0
return-object v0
.end method
.method public onConfigurationChanged(Landroid/content/res/Configuration;)V
.locals 4
.parameter "newConfig"
.prologue
.line 101
iget-object v0, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;
.local v0, arr$:[Lcom/android/systemui/SystemUI;
array-length v2, v0
.local v2, len$:I
const/4 v1, 0x0
.local v1, i$:I
:goto_0
if-ge v1, v2, :cond_0
aget-object v3, v0, v1
.line 102
.local v3, ui:Lcom/android/systemui/SystemUI;
invoke-virtual {v3, p1}, Lcom/android/systemui/SystemUI;->onConfigurationChanged(Landroid/content/res/Configuration;)V
.line 101
add-int/lit8 v1, v1, 0x1
goto :goto_0
.line 104
.end local v3 #ui:Lcom/android/systemui/SystemUI;
:cond_0
return-void
.end method
.method public onCreate()V
.locals 9
.prologue
.line 70
const-string v6, "window"
invoke-static {v6}, Landroid/os/ServiceManager;->getService(Ljava/lang/String;)Landroid/os/IBinder;
move-result-object v6
invoke-static {v6}, Landroid/view/IWindowManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/view/IWindowManager;
move-result-object v5
.line 73
.local v5, wm:Landroid/view/IWindowManager;
:try_start_0
iget-object v7, p0, Lcom/android/systemui/SystemUIService;->SERVICES:[Ljava/lang/Object;
const/4 v8, 0x0
invoke-interface {v5}, Landroid/view/IWindowManager;->hasSystemNavBar()Z
move-result v6
if-eqz v6, :cond_0
const v6, 0x7f090001
:goto_0
invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v6
aput-object v6, v7, v8
:try_end_0
.catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
.line 80
:goto_1
iget-object v6, p0, Lcom/android/systemui/SystemUIService;->SERVICES:[Ljava/lang/Object;
array-length v0, v6
.line 81
.local v0, N:I
new-array v6, v0, [Lcom/android/systemui/SystemUI;
iput-object v6, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;
.line 82
const/4 v4, 0x0
.local v4, i:I
:goto_2
if-ge v4, v0, :cond_1
.line 83
iget-object v6, p0, Lcom/android/systemui/SystemUIService;->SERVICES:[Ljava/lang/Object;
aget-object v6, v6, v4
invoke-direct {p0, v6}, Lcom/android/systemui/SystemUIService;->chooseClass(Ljava/lang/Object;)Ljava/lang/Class;
move-result-object v1
.line 84
.local v1, cl:Ljava/lang/Class;
const-string v6, "SystemUIService"
new-instance v7, Ljava/lang/StringBuilder;
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
const-string v8, "loading: "
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v7
invoke-static {v6, v7}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 86
:try_start_1
iget-object v7, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;
invoke-virtual {v1}, Ljava/lang/Class;->newInstance()Ljava/lang/Object;
move-result-object v6
check-cast v6, Lcom/android/systemui/SystemUI;
aput-object v6, v7, v4
:try_end_1
.catch Ljava/lang/IllegalAccessException; {:try_start_1 .. :try_end_1} :catch_1
.catch Ljava/lang/InstantiationException; {:try_start_1 .. :try_end_1} :catch_2
.line 92
iget-object v6, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;
aget-object v6, v6, v4
iput-object p0, v6, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
.line 93
const-string v6, "SystemUIService"
new-instance v7, Ljava/lang/StringBuilder;
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
const-string v8, "running: "
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
iget-object v8, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;
aget-object v8, v8, v4
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v7
invoke-static {v6, v7}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 95
iget-object v6, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;
aget-object v6, v6, v4
invoke-virtual {v6}, Lcom/android/systemui/SystemUI;->start()V
.line 82
add-int/lit8 v4, v4, 0x1
goto :goto_2
.line 73
.end local v0 #N:I
.end local v1 #cl:Ljava/lang/Class;
.end local v4 #i:I
:cond_0
const/high16 v6, 0x7f09
goto :goto_0
.line 76
:catch_0
move-exception v2
.line 77
.local v2, e:Landroid/os/RemoteException;
const-string v6, "SystemUIService"
const-string v7, "Failing checking whether status bar can hide"
invoke-static {v6, v7, v2}, Landroid/util/Slog;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
goto :goto_1
.line 87
.end local v2 #e:Landroid/os/RemoteException;
.restart local v0 #N:I
.restart local v1 #cl:Ljava/lang/Class;
.restart local v4 #i:I
:catch_1
move-exception v3
.line 88
.local v3, ex:Ljava/lang/IllegalAccessException;
new-instance v6, Ljava/lang/RuntimeException;
invoke-direct {v6, v3}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw v6
.line 89
.end local v3 #ex:Ljava/lang/IllegalAccessException;
:catch_2
move-exception v3
.line 90
.local v3, ex:Ljava/lang/InstantiationException;
new-instance v6, Ljava/lang/RuntimeException;
invoke-direct {v6, v3}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw v6
.line 97
.end local v1 #cl:Ljava/lang/Class;
.end local v3 #ex:Ljava/lang/InstantiationException;
:cond_1
return-void
.end method
.method public openTaskManager(Landroid/view/View;)V
.locals 5
.parameter "view"
.prologue
.line 99
.line 100
:try_start_0
new-instance v1, Landroid/content/Intent;
invoke-direct {v1}, Landroid/content/Intent;-><init>()V
.line 102
.local v1, intent:Landroid/content/Intent;
const-string v2, "android.intent.action.MAIN"
invoke-virtual {v1, v2}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
.line 105
const/high16 v2, 0x1000
invoke-virtual {v1, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
.line 107
const-string v2, "com.sec.android.app.controlpanel"
const-string v3, "com.sec.android.app.controlpanel.activity.JobManagerActivity"
invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
invoke-virtual {p0, v1}, Lcom/android/systemui/SystemUIService;->startActivity(Landroid/content/Intent;)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.line 109
.line 112
.end local v1 #intent:Landroid/content/Intent;
:goto_0
return-void
.line 115
:catch_0
move-exception v0
.line 117
.local v0, e:Ljava/lang/Exception;
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_0
.end method
And Here Is ScreenShot From My Phone
{
"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"
}
When Press On Task manger Button Nothing Happen
M.WeWe said:
i Am Trying To Do This Method On
Sony Xperia S Running CM10 FXP206a
I Have Added
TaskManager.apk And SystemUI.apk
To /System/App
And Changed Permission To (rw--r--r--)
And Here Is My SystemUIService.smali Looks
HTML:
.class public Lcom/android/systemui/SystemUIService;
.super Landroid/app/Service;
.source "SystemUIService.java"
# instance fields
.field final SERVICES:[Ljava/lang/Object;
.field mServices:[Lcom/android/systemui/SystemUI;
# direct methods
.method public constructor <init>()V
.locals 3
.prologue
const/4 v2, 0x0
.line 35
invoke-direct {p0}, Landroid/app/Service;-><init>()V
.line 41
const/4 v0, 0x3
new-array v0, v0, [Ljava/lang/Object;
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v2
const/4 v1, 0x1
const-class v2, Lcom/android/systemui/power/PowerUI;
aput-object v2, v0, v1
const/4 v1, 0x2
const-class v2, Lcom/android/systemui/media/RingtonePlayer;
aput-object v2, v0, v1
iput-object v0, p0, Lcom/android/systemui/SystemUIService;->SERVICES:[Ljava/lang/Object;
return-void
.end method
.method private chooseClass(Ljava/lang/Object;)Ljava/lang/Class;
.locals 5
.parameter "o"
.prologue
.line 53
instance-of v2, p1, Ljava/lang/Integer;
if-eqz v2, :cond_0
.line 54
check-cast p1, Ljava/lang/Integer;
.end local p1
invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I
move-result v2
invoke-virtual {p0, v2}, Lcom/android/systemui/SystemUIService;->getString(I)Ljava/lang/String;
move-result-object v0
.line 56
.local v0, cl:Ljava/lang/String;
:try_start_0
invoke-virtual {p0}, Lcom/android/systemui/SystemUIService;->getClassLoader()Ljava/lang/ClassLoader;
move-result-object v2
invoke-virtual {v2, v0}, Ljava/lang/ClassLoader;->loadClass(Ljava/lang/String;)Ljava/lang/Class;
:try_end_0
.catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
move-result-object p1
.line 61
.end local v0 #cl:Ljava/lang/String;
:goto_0
return-object p1
.line 57
.restart local v0 #cl:Ljava/lang/String;
:catch_0
move-exception v1
.line 58
.local v1, ex:Ljava/lang/ClassNotFoundException;
new-instance v2, Ljava/lang/RuntimeException;
invoke-direct {v2, v1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw v2
.line 60
.end local v0 #cl:Ljava/lang/String;
.end local v1 #ex:Ljava/lang/ClassNotFoundException;
.restart local p1
:cond_0
instance-of v2, p1, Ljava/lang/Class;
if-eqz v2, :cond_1
.line 61
check-cast p1, Ljava/lang/Class;
goto :goto_0
.line 63
:cond_1
new-instance v2, Ljava/lang/RuntimeException;
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "Unknown system ui service: "
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
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-direct {v2, v3}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw v2
.end method
# virtual methods
.method protected dump(Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V
.locals 8
.parameter "fd"
.parameter "pw"
.parameter "args"
.prologue
.line 116
if-eqz p3, :cond_0
array-length v6, p3
if-nez v6, :cond_1
.line 117
:cond_0
iget-object v0, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;
.local v0, arr$:[Lcom/android/systemui/SystemUI;
array-length v2, v0
.local v2, len$:I
const/4 v1, 0x0
.local v1, i$:I
:goto_0
if-ge v1, v2, :cond_3
aget-object v5, v0, v1
.line 118
.local v5, ui:Lcom/android/systemui/SystemUI;
new-instance v6, Ljava/lang/StringBuilder;
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
const-string v7, "dumping service: "
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v5}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v7
invoke-virtual {v7}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v7
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v6
invoke-virtual {p2, v6}, Ljava/io/PrintWriter;->println(Ljava/lang/String;)V
.line 119
invoke-virtual {v5, p1, p2, p3}, Lcom/android/systemui/SystemUI;->dump(Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V
.line 117
add-int/lit8 v1, v1, 0x1
goto :goto_0
.line 122
.end local v0 #arr$:[Lcom/android/systemui/SystemUI;
.end local v1 #i$:I
.end local v2 #len$:I
.end local v5 #ui:Lcom/android/systemui/SystemUI;
:cond_1
const/4 v6, 0x0
aget-object v4, p3, v6
.line 123
.local v4, svc:Ljava/lang/String;
iget-object v0, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;
.restart local v0 #arr$:[Lcom/android/systemui/SystemUI;
array-length v2, v0
.restart local v2 #len$:I
const/4 v1, 0x0
.restart local v1 #i$:I
:goto_1
if-ge v1, v2, :cond_3
aget-object v5, v0, v1
.line 124
.restart local v5 #ui:Lcom/android/systemui/SystemUI;
invoke-virtual {v5}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v3
.line 125
.local v3, name:Ljava/lang/String;
invoke-virtual {v3, v4}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z
move-result v6
if-eqz v6, :cond_2
.line 126
invoke-virtual {v5, p1, p2, p3}, Lcom/android/systemui/SystemUI;->dump(Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V
.line 123
:cond_2
add-int/lit8 v1, v1, 0x1
goto :goto_1
.line 130
.end local v3 #name:Ljava/lang/String;
.end local v4 #svc:Ljava/lang/String;
.end local v5 #ui:Lcom/android/systemui/SystemUI;
:cond_3
return-void
.end method
.method public onBind(Landroid/content/Intent;)Landroid/os/IBinder;
.locals 1
.parameter "intent"
.prologue
.line 111
const/4 v0, 0x0
return-object v0
.end method
.method public onConfigurationChanged(Landroid/content/res/Configuration;)V
.locals 4
.parameter "newConfig"
.prologue
.line 101
iget-object v0, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;
.local v0, arr$:[Lcom/android/systemui/SystemUI;
array-length v2, v0
.local v2, len$:I
const/4 v1, 0x0
.local v1, i$:I
:goto_0
if-ge v1, v2, :cond_0
aget-object v3, v0, v1
.line 102
.local v3, ui:Lcom/android/systemui/SystemUI;
invoke-virtual {v3, p1}, Lcom/android/systemui/SystemUI;->onConfigurationChanged(Landroid/content/res/Configuration;)V
.line 101
add-int/lit8 v1, v1, 0x1
goto :goto_0
.line 104
.end local v3 #ui:Lcom/android/systemui/SystemUI;
:cond_0
return-void
.end method
.method public onCreate()V
.locals 9
.prologue
.line 70
const-string v6, "window"
invoke-static {v6}, Landroid/os/ServiceManager;->getService(Ljava/lang/String;)Landroid/os/IBinder;
move-result-object v6
invoke-static {v6}, Landroid/view/IWindowManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/view/IWindowManager;
move-result-object v5
.line 73
.local v5, wm:Landroid/view/IWindowManager;
:try_start_0
iget-object v7, p0, Lcom/android/systemui/SystemUIService;->SERVICES:[Ljava/lang/Object;
const/4 v8, 0x0
invoke-interface {v5}, Landroid/view/IWindowManager;->hasSystemNavBar()Z
move-result v6
if-eqz v6, :cond_0
const v6, 0x7f090001
:goto_0
invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v6
aput-object v6, v7, v8
:try_end_0
.catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
.line 80
:goto_1
iget-object v6, p0, Lcom/android/systemui/SystemUIService;->SERVICES:[Ljava/lang/Object;
array-length v0, v6
.line 81
.local v0, N:I
new-array v6, v0, [Lcom/android/systemui/SystemUI;
iput-object v6, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;
.line 82
const/4 v4, 0x0
.local v4, i:I
:goto_2
if-ge v4, v0, :cond_1
.line 83
iget-object v6, p0, Lcom/android/systemui/SystemUIService;->SERVICES:[Ljava/lang/Object;
aget-object v6, v6, v4
invoke-direct {p0, v6}, Lcom/android/systemui/SystemUIService;->chooseClass(Ljava/lang/Object;)Ljava/lang/Class;
move-result-object v1
.line 84
.local v1, cl:Ljava/lang/Class;
const-string v6, "SystemUIService"
new-instance v7, Ljava/lang/StringBuilder;
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
const-string v8, "loading: "
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v7
invoke-static {v6, v7}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 86
:try_start_1
iget-object v7, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;
invoke-virtual {v1}, Ljava/lang/Class;->newInstance()Ljava/lang/Object;
move-result-object v6
check-cast v6, Lcom/android/systemui/SystemUI;
aput-object v6, v7, v4
:try_end_1
.catch Ljava/lang/IllegalAccessException; {:try_start_1 .. :try_end_1} :catch_1
.catch Ljava/lang/InstantiationException; {:try_start_1 .. :try_end_1} :catch_2
.line 92
iget-object v6, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;
aget-object v6, v6, v4
iput-object p0, v6, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
.line 93
const-string v6, "SystemUIService"
new-instance v7, Ljava/lang/StringBuilder;
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
const-string v8, "running: "
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
iget-object v8, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;
aget-object v8, v8, v4
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v7
invoke-static {v6, v7}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 95
iget-object v6, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;
aget-object v6, v6, v4
invoke-virtual {v6}, Lcom/android/systemui/SystemUI;->start()V
.line 82
add-int/lit8 v4, v4, 0x1
goto :goto_2
.line 73
.end local v0 #N:I
.end local v1 #cl:Ljava/lang/Class;
.end local v4 #i:I
:cond_0
const/high16 v6, 0x7f09
goto :goto_0
.line 76
:catch_0
move-exception v2
.line 77
.local v2, e:Landroid/os/RemoteException;
const-string v6, "SystemUIService"
const-string v7, "Failing checking whether status bar can hide"
invoke-static {v6, v7, v2}, Landroid/util/Slog;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
goto :goto_1
.line 87
.end local v2 #e:Landroid/os/RemoteException;
.restart local v0 #N:I
.restart local v1 #cl:Ljava/lang/Class;
.restart local v4 #i:I
:catch_1
move-exception v3
.line 88
.local v3, ex:Ljava/lang/IllegalAccessException;
new-instance v6, Ljava/lang/RuntimeException;
invoke-direct {v6, v3}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw v6
.line 89
.end local v3 #ex:Ljava/lang/IllegalAccessException;
:catch_2
move-exception v3
.line 90
.local v3, ex:Ljava/lang/InstantiationException;
new-instance v6, Ljava/lang/RuntimeException;
invoke-direct {v6, v3}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw v6
.line 97
.end local v1 #cl:Ljava/lang/Class;
.end local v3 #ex:Ljava/lang/InstantiationException;
:cond_1
return-void
.end method
.method public openTaskManager(Landroid/view/View;)V
.locals 5
.parameter "view"
.prologue
.line 99
.line 100
:try_start_0
new-instance v1, Landroid/content/Intent;
invoke-direct {v1}, Landroid/content/Intent;-><init>()V
.line 102
.local v1, intent:Landroid/content/Intent;
const-string v2, "android.intent.action.MAIN"
invoke-virtual {v1, v2}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
.line 105
const/high16 v2, 0x1000
invoke-virtual {v1, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
.line 107
const-string v2, "com.sec.android.app.controlpanel"
const-string v3, "com.sec.android.app.controlpanel.activity.JobManagerActivity"
invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
invoke-virtual {p0, v1}, Lcom/android/systemui/SystemUIService;->startActivity(Landroid/content/Intent;)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.line 109
.line 112
.end local v1 #intent:Landroid/content/Intent;
:goto_0
return-void
.line 115
:catch_0
move-exception v0
.line 117
.local v0, e:Ljava/lang/Exception;
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_0
.end method
And Here Is ScreenShot From My Phone
When Press On Task manger Button Nothing Happen
Click to expand...
Click to collapse
U added taskmanager app in system/app and setted permissions ?
Sent from my ST25i using xda app-developers app
SpaceCaker said:
U added taskmanager app in system/app and setted permissions ?
Click to expand...
Click to collapse
yes And I Can Open The Task Manger App From App Drawer
Sent from my Xperia S using xda app-developers app
M.WeWe said:
yes And I Can Open The Task Manger App From App Drawer
Sent from my Xperia S using xda app-developers app
Click to expand...
Click to collapse
Hmm weird
:/
Will have a look and try it on my XU Stock rom
To see if it works on Sony
Sent from my ST25i using xda app-developers app
Any good news
Sent from my Xperia S using xda app-developers app
This will allow you to enable and disable the brightness slider right from the settings menu.
No more flashing extra zips, or having to build another SystemUI!
Let's get to it!
The two files we'll be working with are:
SecSettings.apk
SystemUI.apk
First let's start with SecSettings.apk
Navigate to res/values/string.xml
And add the following lines to the bottom:
Code:
<string name="brightness_slider_title">Display brightness slider</string>
<string name="brightness_slider_summary">Show brightness slider in notification panel</string>
Next navigate to res/xml/display_settings.xml
Add the line in red:
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/display_settings"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<PreferenceCategory android:title="@string/tts_general_section_title" />
<PreferenceScreen android:title="@string/wallpaper" android:key="wallpaper" android:fragment="com.android.settings.WallpaperSettings" />
<PreferenceScreen android:title="@string/led_indicator_settings" android:key="led_indicator_settings" android:fragment="com.android.settings.LedIndicatorSettings" />
<SwitchPreferenceScreen android:title="@string/page_buddy" android:key="contextualpage_settings" android:summary="@string/page_buddy_summary" android:fragment="com.android.settings.ContextualPageSettings" />
<PreferenceCategory android:title="@string/display_label" android:key="screen_category" />
<PreferenceScreen android:title="@string/screen_mode_setting" android:key="mode" android:summary="@string/screen_mode_summary">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.ModePreview" />
</PreferenceScreen>
<com.android.settings.BrightnessPreference android:title="@string/brightness" android:key="brightness" android:widgetLayout="@layout/round_more_icon" android:dialogTitle="@string/brightness" />
<CheckBoxPreference android:title="@string/accelerometer_title_second" android:key="accelerometer_second" />
<CheckBoxPreference android:title="@string/accelerometer_title" android:key="accelerometer" />
<ListPreference android:persistent="false" android:entries="@array/screen_timeout_entries" android:title="@string/screen_timeout" android:key="screen_timeout" android:summary="@string/screen_timeout_summary" android:widgetLayout="@layout/round_more_icon" android:entryValues="@array/screen_timeout_values" />
<PreferenceScreen android:title="@string/screensaver_settings_title" android:key="screensaver" android:fragment="com.android.settings.DreamSettings" />
[COLOR="Red"]<CheckBoxPreference android:title="@string/brightness_slider_title" android:key="display_brightness_slider" android:summary="@string/brightness_slider_summary" />[/COLOR]
<PreferenceCategory android:title="@string/features_category_title" android:key="features_category" />
<CheckBoxPreference android:title="@string/intelligent_rotation_title" android:key="intelligent_rotation" android:summary="@string/intelligent_rotation_summary" />
<CheckBoxPreference android:title="@string/intelligent_sleep_title" android:key="intelligent_sleep" android:summary="@string/intelligent_sleep_summary" />
<PreferenceCategory android:title="@string/font" />
<com.android.settings.flipfont.FontListPreference android:title="@string/monotype_preference_title" android:key="MONOTYPE" android:summary="@string/monotype_preference_summary" android:widgetLayout="@layout/round_more_icon" />
<com.android.settings.FontSizeListPreference android:entries="@array/entries_font_size" android:title="@string/title_font_size" android:key="font_size" android:summary="@string/summary_font_size" android:widgetLayout="@layout/round_more_icon" android:dialogTitle="@string/dialog_title_font_size" android:entryValues="@array/entryvalues_font_size" />
<PreferenceCategory android:title="@string/more_settings" android:key="more_settings" />
<ListPreference android:persistent="false" android:entries="@array/quick_launch_entries" android:title="@string/quick_launch_title" android:key="quick_launch" android:summary="@string/screen_quick_launch_summary" android:widgetLayout="@layout/round_more_icon" android:entryValues="@array/quick_launch_values" />
<CheckBoxPreference android:title="@string/sub_lcd_auto_lock" android:key="sub_lcd_auto_lock" android:summary="@string/sub_lcd_auto_lock_summary" />
<CheckBoxPreference android:title="@string/key_night_mode" android:key="key_night_mode" />
<ListPreference android:persistent="false" android:entries="@array/key_backlight_entries" android:title="@string/key_backlight" android:key="key_backlight" android:widgetLayout="@layout/round_more_icon" android:entryValues="@array/key_backlight_values" />
<ListPreference android:persistent="false" android:entries="@array/touch_key_light_entries" android:title="@string/touch_key_light" android:key="touch_key_light" android:summary="@string/touch_key_light_summary" android:widgetLayout="@layout/round_more_icon" android:entryValues="@array/touch_key_light_values" />
<CheckBoxPreference android:persistent="false" android:title="@string/display_battery_percentage" android:key="display_battery_level" android:summary="@string/display_battery_percentage_summary" />
<CheckBoxPreference android:persistent="false" android:title="@string/display_saving" android:key="power_saving_mode" android:summary="@string/display_saving_mode_summary" />
<CheckBoxPreference android:persistent="false" android:title="@string/notification_pulse_title" android:key="notification_pulse" />
<CheckBoxPreference android:title="@string/edgezoom_title" android:key="edgezoom_toggle" android:summary="@string/edgezoom_summary" />
</PreferenceScreen>
Next navigate to smali/com/android/settings/DisplaySettings.smali
Add the following in red:
Code:
.field private mBrightness:Lcom/android/settings/BrightnessPreference;
.field private mBrightnessPreference:Lcom/android/settings/BrightnessPreference;
[COLOR="red"].field private mBrightnessSliderPreference:Landroid/preference/CheckBoxPreference;[/COLOR]
.field private mContextualPage:Landroid/preference/SwitchPreferenceScreen;
.field protected mContextualPageUncheckerHandler:Landroid/os/Handler;
.method private updateState
Add the sections in red
Code:
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v4, "display_battery_percentage"
invoke-static {v0, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-eqz v0, :cond_3
move v0, v1
:goto_2
invoke-virtual {v3, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
[COLOR="red"]iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mBrightnessSliderPreference:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v4, "display_brightness_slider"
invoke-static {v0, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-eqz v0, :cond_bs
move v0, v1
:goto_bs
invoke-virtual {v3, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V[/COLOR]
.line 807
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mTouchKeyLight:Landroid/preference/ListPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "button_key_light"
const/16 v5, 0x5dc
invoke-static {v3, v4, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
invoke-static {v3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v3
invoke-virtual {v0, v3}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V
Code:
:cond_2
move v0, v2
.line 802
goto :goto_1
:cond_3
move v0, v2
.line 805
goto :goto_2
[COLOR="red"]:cond_bs
move v0, v2
goto :goto_bs[/COLOR]
:cond_4
move v0, v2
.line 811
goto :goto_3
:cond_5
move v1, v2
.line 812
goto :goto_4
.end method
.method public onCreate
Add the parts in red:
Code:
const-string v11, "display_battery_level"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/CheckBoxPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
[COLOR="red"]const-string v11, "display_brightness_slider"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/CheckBoxPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mBrightnessSliderPreference:Landroid/preference/CheckBoxPreference;[/COLOR]
.line 398
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getActivity()Landroid/app/Activity;
move-result-object v11
invoke-static {v11}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
move-result v11
if-eqz v11, :cond_6
.method public onPreferenceTreeClick
Add the parts in red
Code:
:cond_4
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_6
.line 875
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 876
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "display_battery_percentage"
if-eqz v0, :cond_5
move v2, v1
:cond_5
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto :goto_2
.line 878
:cond_6
[COLOR="red"]iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBrightnessSliderPreference:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_next
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBrightnessSliderPreference:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "display_brightness_slider"
if-eqz v0, :cond_bright
move v2, v1
:cond_bright
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto :goto_2
:cond_next[/COLOR]
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mNotificationPulse:Landroid/preference/CheckBoxPreference;
if-ne p2, v0, :cond_8
.line 879
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mNotificationPulse:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
That's it for SecSettings. Recompile and move on to SystemUI.
SystemUI
Navigate to res/layout/tw_statusbar_expanded.xml
Modify the line in blue.
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="@dimen/notification_panel_margin_left"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
<include android:layout_width="fill_parent" android:layout_height="@dimen/tw_notification_panel_header_height" layout="@layout/tw_status_bar_expanded_header" />
<com.wanam.systemui.quickpanel.PowerWidget android:id="@id/exp_power_stat" android:layout_width="wrap_content" android:layout_height="@dimen/quick_setting_button_height" android:layout_marginTop="@dimen/tw_notification_panel_header_height" />
<HorizontalScrollView android:id="@id/quicksetting_scroller" android:visibility="gone" android:scrollbars="none" android:layout_width="wrap_content" android:layout_height="@dimen/quick_setting_button_height" android:layout_marginTop="@dimen/tw_notification_panel_header_height">
<com.android.systemui.statusbar.policy.quicksetting.QuickSettingPanel android:orientation="horizontal" android:id="@id/quicksetting_container" android:layout_width="wrap_content" android:layout_height="wrap_content" android:divider="@drawable/tw_black_bg" android:showDividers="middle" />
</HorizontalScrollView>
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="@dimen/notification_panel_quicksettingbtn_height" android:overScrollMode="ifContentScrolls">
<LinearLayout android:orientation="vertical" android:id="@id/scrollCart" android:layout_width="fill_parent" android:layout_height="wrap_content">
[COLOR="Blue"]<LinearLayout android:orientation="vertical" android:id="@id/brightness_controller" android:background="#ff000000" android:visibility="visible" android:layout_width="fill_parent" android:layout_height="56.0dip">[/COLOR]
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="55.0dip">
<ImageView android:id="@id/brightness_icon" android:clickable="true" android:layout_width="25.0dip" android:layout_height="fill_parent" android:layout_marginLeft="13.0dip" android:src="@drawable/ic_sysbar_brightness" android:contentDescription="@string/accessibility_brightness_icon" />
<FrameLayout android:id="@id/brightness_group" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/auto_brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
</FrameLayout>
</LinearLayout>
<View android:background="#ff091a24" android:layout_width="fill_parent" android:layout_height="1.0dip" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:id="@id/noNotificationsTitle" android:focusable="true" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/noNotificationsText" android:paddingLeft="11.0dip" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height" android:text="@string/status_bar_no_notifications_title" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:id="@id/onGoingCart" android:background="#ff293945" android:focusable="true" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/onGoingNotificationText" android:paddingLeft="11.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:text="@string/status_bar_ongoing_events_title" />
</LinearLayout>
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/onGoingItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
<LinearLayout android:orientation="vertical" android:id="@id/notificationCart" android:background="#ff293945" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
<RelativeLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/latestNotificationText" android:paddingLeft="11.0dip" android:layout_width="180.0dip" android:layout_height="fill_parent" android:text="@string/status_bar_latest_events_title" android:layout_alignParentLeft="true" />
<TextView android:textSize="@dimen/status_bar_expanded_notification_clear_button_text_size" android:textColor="@color/tw_status_bar_clear_btn_text" android:gravity="center" android:id="@id/clear_all_button" android:background="@drawable/tw_btn_default_small" android:padding="0.100000024dip" android:focusable="true" android:clickable="true" android:layout_width="@dimen/status_bar_expanded_clear_button_width" android:layout_height="fill_parent" android:layout_marginRight="4.0dip" android:text="@string/status_bar_clear_all_button" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
</RelativeLayout>
</LinearLayout>
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/notificationItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
</LinearLayout>
</ScrollView>
</FrameLayout>
<com.android.systemui.statusbar.phone.CloseDragHandle android:layout_gravity="bottom" android:orientation="vertical" android:id="@id/close" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height">
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageView android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height" android:src="@drawable/tw_status_bar_close" android:scaleType="fitXY" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="bottom" android:id="@id/carrier_label" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_marginBottom="0.0dip" />
</RelativeLayout>
</com.android.systemui.statusbar.phone.CloseDragHandle>
</FrameLayout>
Next Navigate to smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
Add the parts in red:
Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;,
[COLOR="Red"]Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BrightnessSliderObserver;,[/COLOR]
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$FastColorDrawable;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$NotificationClicker;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$H;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$ExpandedDialog;
}
.end annotation
Code:
.field private mBatteryTextObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;
.field mBrightness:Lcom/android/systemui/statusbar/policy/BrightnessController;
[COLOR="red"].field private mBrightnessSlider:Landroid/widget/LinearLayout;
.field private mBrightnessSliderObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BrightnessSliderObserver;[/COLOR]
.field private mBroadcastReceiver:Landroid/content/BroadcastReceiver;
.field private mCallOnGoingView:Landroid/view/View;
.field private mCarrierLabel:Landroid/widget/TextView;
.method public constructor
Code:
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryTextObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;
[COLOR="red"]new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BrightnessSliderObserver;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BrightnessSliderObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSliderObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BrightnessSliderObserver;[/COLOR]
.line 3912
return-void
.end method
Add the following method in red:
Code:
.method static synthetic access$600(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)Lcom/android/systemui/statusbar/BaseStatusBar$H;
.locals 1
.parameter "x0"
.prologue
.line 154
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mHandler:Lcom/android/systemui/statusbar/BaseStatusBar$H;
return-object v0
.end method
[COLOR="red"].method static synthetic access$6000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)Landroid/widget/LinearLayout;
.locals 1
.parameter "x0"
.prologue
.line 154
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSlider:Landroid/widget/LinearLayout;
return-object v0
.end method[/COLOR]
.method static synthetic access$700(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)Lcom/android/systemui/statusbar/BaseStatusBar$H;
.locals 1
.parameter "x0"
.prologue
.line 154
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mHandler:Lcom/android/systemui/statusbar/BaseStatusBar$H;
return-object v0
.end method
.method protected makeStatusBarView
Add the parts in red:
NOTE: Make sure you look at this section. You have to match an ID from res/values/public.xml
Code:
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
const/4 v10, 0x0
invoke-virtual {v9, v10}, Landroid/widget/ScrollView;->setVerticalScrollBarEnabled(Z)V
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d011f
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/wanam/systemui/quickpanel/PowerWidget;
move-object/from16 v0, p0
iput-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/wanam/systemui/quickpanel/PowerWidget;
[COLOR="red"]iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d00e4 [B]#Match with res/values/public.xml - brightness_controller[/B]
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/LinearLayout;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSlider:Landroid/widget/LinearLayout;
iget-object v9, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-virtual {v9}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v9
const-string v10, "display_brightness_slider"
invoke-static {v10}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v10
const/4 v11, 0x0
iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSliderObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BrightnessSliderObserver;
invoke-virtual {v9, v10, v11, v12}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSlider:Landroid/widget/LinearLayout;
iget-object v9, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-virtual {v9}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v9
const-string v11, "display_brightness_slider"
const/4 v12, 0x0
invoke-static {v9, v11, v12}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v9
const/4 v11, 0x1
if-ne v9, v11, :cond_bright
const/4 v9, 0x0
:goto_bright
invoke-virtual {v10, v9}, Landroid/widget/LinearLayout;->setVisibility(I)V[/COLOR]
.line 735
new-instance v9, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-direct {v9, p0, v1, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/content/Context;Landroid/view/View;)V
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTicker:Lcom/android/systemui/statusbar/phone/Ticker;
.line 737
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v10, 0x7f0d0040
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Lcom/android/systemui/statusbar/phone/TickerView;
Code:
iget-object v9, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedContents:Landroid/view/View;
goto/16 :goto_5
.line 730
:cond_e
const/4 v9, 0x4
goto/16 :goto_6
[COLOR="red"]:cond_bright
const/16 v9, 0x8
goto/16 :goto_bright[/COLOR]
.line 762
.restart local v8 #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
:cond_f
const/16 v9, 0x8
goto/16 :goto_7
.line 786
.restart local v7 #signalCluster:Lcom/android/systemui/statusbar/SignalClusterView;
:cond_10
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNetworkController:Lcom/android/systemui/statusbar/policy/NetworkController;
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCarrierLabel:Landroid/widget/TextView;
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/policy/NetworkController;->addCombinedLabelView(Landroid/widget/TextView;)V
goto/16 :goto_8
Now download the file attached and extract to smali/com/android/systemui/statusbar/phone
That's it recompile and test it out.
Remarkable work. Thanks so much for your contribution.
Sent from my SAMSUNG-SGH-I747 using xda premium
7th !!!
Can you make me a flashable zip?
_______
Seriously though, very nice! Thanks for sharing.
Will be doing this soon....
need help
i can not find the folder to exact that file to can some one tell where it is please and thank u
315phatboi said:
i can not find the folder to exact that file to can some one tell where it is please and thank u
Click to expand...
Click to collapse
Not trying to insult you, please do not take this the wrong way. But if you need to ask that question then this thread is not for you. This will require editing smali, and xml. It is not a drag and drop type of mod.
Besides in the directions he had told you exactly where it goes.
Sent from my SAMSUNG-SGH-I747 using xda premium
You are the man I have had to build 2 systemui for every build this will save me a tonne of work.
Thanks again, I think our ROM is like 50% mods by you at this point lol.
Idyar said:
You are the man I have had to build 2 systemui for every build this will save me a tonne of work.
Thanks again, I think our ROM is like 50% mods by you at this point lol.
Click to expand...
Click to collapse
Just wanted to add a silly mistake I made while putting this in. When searching for the correct value in public.xml make sure you use brightness_controller not brightness_controller_height (LOL) Took me like 15 mins to figure out haha.
Thanks again Loser, you are exactly the kind of person that makes this community great.
If you are not using the 23 toggle mod, makeStatusBarView needs to look like this (add the code in red).
smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
.method protected makeStatusBarView
Code:
.line 733
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
const/4 v10, 0x0
invoke-virtual {v9, v10}, Landroid/widget/ScrollView;->setVerticalScrollBarEnabled(Z)V
[COLOR="Red"] iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/androidsystemustatusbar/phone/StatusBarWindowView;
const v10, 0x7f0d00e4 #Match with res/values/public.xml - brightness_controller
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/LinearLayout;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSlider:Landroid/widget/LinearLayout;
iget-object v9, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-virtual {v9}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v9
const-string v10, "display_brightness_slider"
invoke-static {v10}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v10
const/4 v11, 0x0
iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSliderObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BrightnessSliderObserver;
invoke-virtual {v9, v10, v11, v12}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBrightnessSlider:Landroid/widget/LinearLayout;
iget-object v9, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-virtual {v9}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v9
const-string v11, "display_brightness_slider"
const/4 v12, 0x0
invoke-static {v9, v11, v12}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v9
const/4 v11, 0x1
if-ne v9, v11, :cond_bright
const/4 v9, 0x0
:goto_bright
invoke-virtual {v10, v9}, Landroid/widget/LinearLayout;->setVisibility(I)V[/COLOR]
.line 735
new-instance v9, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-direct {v9, p0, v1, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/content/Context;Landroid/view/View;)V
This was a doosy, but this really makes a perfect edition to total customization. I love this along with Didact74 battery mod. You've made so many happy with your work. And I'm so proud of myself I actually got it right the first time. I'm grinning ear to ear man. I'm starting to understand the language better. Still a ways off from doing something like this myself but one mod at a time right.
Sent from my SAMSUNG-SGH-I747 using xda premium
enewman17 said:
This was a doosy, but this really makes a perfect edition to total customization. I love this along with Didact74 battery mod. You've made so many happy with your work. And I'm so proud of myself I actually got it right the first time. I'm grinning ear to ear man. I'm starting to understand the language better. Still a ways off from doing something like this myself but one mod at a time right.
Sent from my SAMSUNG-SGH-I747 using xda premium
Click to expand...
Click to collapse
You should have seen my grin when I got it working. It makes me so happy when it works out. And it's even better seeing people enjoy using it.
Sent from my SAMSUNG-SGH-I747
Really appreciate the lessons. :thumbup:
Sent from my SAMSUNG-SGH-I747 using xda premium
This mod is the bomb. It works awesome. I love it. The time you spent figuring it out, then to share the "how to" is awesome. A very rare quality. Very nice... Thanks
will this work for the sprint version? i tried everything youve said step by step, and i get and error...
I: Smaling...
[3192,4] All register args must fit in 4 bits
[3198,4] The register number must be less than v16
[3198,37] mismatched tree node: Lcom/android/setti
ngs/DisplaySettings; expecting I_CATCHES
Exception in thread "main" brut.androlib.AndrolibE
xception: Could not smali file: C:\TickleMyAndroid
\_working\SecSettings.apk\smali\com\android\settin
gs\DisplaySettings.smali
at brut.androlib.src.DexFileBuilder.addSma
liFile(DexFileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSma
liFile(DexFileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFil
e(SmaliBuilder.java:66)
at brut.androlib.src.SmaliBuilder.build(Sm
aliBuilder.java:50)
at brut.androlib.src.SmaliBuilder.build(Sm
aliBuilder.java:37)
at brut.androlib.Androlib.buildSourcesSmal
i(Androlib.java:257)
at brut.androlib.Androlib.buildSources(And
rolib.java:214)
at brut.androlib.Androlib.build(Androlib.j
ava:205)
at brut.androlib.Androlib.build(Androlib.j
ava:176)
at brut.apktool.Main.cmdBuild(Main.java:22
8)
at brut.apktool.Main.main(Main.java:79)
Press any key to continue . . .
Click to expand...
Click to collapse
tracelessfk said:
will this work for the sprint version? i tried everything youve said step by step, and i get and error...
Click to expand...
Click to collapse
Post your DisplaySettings.smali
Sent from my SAMSUNG-SGH-I747
loserskater said:
Post your DisplaySettings.smali
Sent from my SAMSUNG-SGH-I747
Click to expand...
Click to collapse
Okay, I'll put it up first thing after work
The smali before editing it or after?
Sent from an Anthrax infected GSIII
okay i got it... here it is, i decompiled SecSettings.apk again and uploaded the smali file
https://www.dropbox.com/s/g60u089kbrsfj1m/DisplaySettings.smali
tracelessfk said:
okay i got it... here it is, i decompiled SecSettings.apk again and uploaded the smali file
https://www.dropbox.com/s/g60u089kbrsfj1m/DisplaySettings.smali
Click to expand...
Click to collapse
I didn't try compiling it, but let me know if this works: https://dl.dropbox.com/u/5084138/DisplaySettings.smali
loserskater said:
I didn't try compiling it, but let me know if this works: https://dl.dropbox.com/u/5084138/DisplaySettings.smali
Click to expand...
Click to collapse
okay secsettings compiled successfully... (thank you!)
then i got to the systemui and was doing good until i got to the .method protected makeStatusBarView part.. i cant find a place to add them... i have a bunch of v13 and the lines in your box has a bunch of v9... thats just got me all confused and im afraid to just put them anywhere because itll probably just get another erorr again
Sorry of you're busy
Sent from an Anthrax infected GSIII
This is an expansion on Didact's mods, so if you haven't already, you MUST implement his clock mod found here:
[MOD][GUIDE] Clock Statusbar Mod v2.0
It would help, but is not necessary to implement Didact's statusbar transparency mod found here:
[MOD][GUIDE] Real Time Statusbar Transparency Settings
I used the open source ColorPickerPreference found HERE
Note:
While you're going through SecSettings, you can remove everything involving statusbar transparency as the new mod has a color picker with an alpha (transparency) bar.
I've added the necessary code if you haven't implemented the transparency setting. It's only code in SystemUI.apk, so you don't need to change anything in SecSettings.apk.
What do these mods cover?
Added Left Clock
Fixed overlapping notifications on Center Clock
Change the color of the clock no matter the location
Change the color of the statusbar (transparency still works!)
We're going to be working with the following two files:
SecSettings.apk
SystemUI.apk
KEY
REMOVE what's in BLUE
ADD what's in RED
MODIFY what's in GREEN
Updates:
6-01-13
Updated ColorPicker so it keeps your color instead of reverting it when you leave and come back to the menu.
Moved all clock stuff to Display Settings to make it easier to change clock and statusbar color together.
You can revert your date_time_prefs.xml and DateTimeSettings.smali
Fixed issues with center/left clock causing the device/SystemUI to freeze when screen is turned off.
4-15-13
I've now added a ColorPicker so you can set any color/transparency you want!
Added code if you haven't implemented Didact's transparency mod.
First up, SecSettings.apk
Navigate to /res/values/arrays.xml
Code:
<string-array name="clock_style_entries">
<item>Right clock</item>
<item>Center clock</item>[COLOR="Red"]
<item>Left clock</item>[/COLOR]
<item>No clock</item>
</string-array>
<string-array name="clock_style_values">
<item>1</item>
<item>2</item>[COLOR="red"]
<item>3</item>[/COLOR]
<item>0</item>
</string-array>
Navigate to /res/values/ids.xml
Code:
[COLOR="Red"]<item type="id" name="color_picker_view">false</item>
<item type="id" name="old_color_panel">false</item>
<item type="id" name="new_color_panel">false</item>[/COLOR]
Next navigate to /res/values/strings.xml
Code:
[COLOR="red"]<string name="clock_cat">Clock options</string>
<string name="clock_color_title">Clock Color</string>
<string name="clock_color_summary">Change the color of the clock</string>
<string name="statusbar_color_title">Statusbar Color</string>
<string name="statusbar_color_summary">Change the color of the statusbar</string>
<string name="dialog_color_picker">Color Picker</string>
<string name="press_color_to_apply">Press on Color to apply</string>[/COLOR]
Navigate to /res/xml/display_settings.xml
Add the following wherever you would like it to show up in the menu
Code:
<com.loser.colorpicker.ColorPickerPreference android:persistent="false" android:title="@string/statusbar_color_title" android:key="statusbar_color" android:summary="@string/statusbar_color_summary" android:defaultValue="0xff000000" alphaSlider="true" />
<PreferenceCategory android:title="@string/clock_cat" android:key="clock_category" />
<ListPreference android:entries="@array/clock_style_entries" android:title="@string/clock_title_enable" android:key="clock_style" android:widgetLayout="@layout/round_more_icon" android:entryValues="@array/clock_style_values" />
<ListPreference android:entries="@array/clock_ampm_entries" android:title="@string/title_clock_ampm_entries" android:key="clock_am_pm_style" android:widgetLayout="@layout/round_more_icon" android:entryValues="@array/clock_ampm_values" />
<ListPreference android:entries="@array/clock_weekday_entries" android:title="@string/enable_clock_weekday" android:key="clock_weekday" android:summary="@string/enable_clock_weekday_summary" android:widgetLayout="@layout/round_more_icon" android:entryValues="@array/clock_weekday_values" />
<com.loser.colorpicker.ColorPickerPreference android:persistent="false" android:title="@string/clock_color_title" android:key="clock_color" android:summary="@string/clock_color_summary" android:defaultValue="0xffffffff" alphaSlider="true" />
Navigate to /smali/com/android/settings/DisplaySettings.smali
Code:
.field private mBrightnessPreference:Lcom/android/settings/BrightnessPreference;
.field private mBrightnessSliderPreference:Landroid/preference/CheckBoxPreference;
[COLOR="Red"].field mClockAmPmstyle:Landroid/preference/ListPreference;
.field mClockColor:Lcom/loser/colorpicker/ColorPickerPreference;
.field mClockStyle:Landroid/preference/ListPreference;
.field mClockWeekday:Landroid/preference/ListPreference;[/COLOR]
.field private mContextualPage:Landroid/preference/SwitchPreferenceScreen;
.field protected mContextualPageUncheckerHandler:Landroid/os/Handler;
Code:
.field private mSmartRotationAnimationImage:[I
.field private mSmartStayAnimationImage:[I
[COLOR="red"].field mStatusbarColor:Lcom/loser/colorpicker/ColorPickerPreference;[/COLOR]
.field mSupportFolderType:Z
.field private mTouchKeyLight:Landroid/preference/ListPreference;
.method private updateState()V
There's two sections here, make sure you scroll to the bottom.
Code:
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v4, "display_battery_percentage"
invoke-static {v0, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-eqz v0, :cond_4
move v0, v1
:goto_1
invoke-virtual {v3, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
[COLOR="red"]iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mStatusbarColor:Lcom/loser/colorpicker/ColorPickerPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "statusbar_color"
const v5, -0xffffff
invoke-static {v3, v4, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
const/16 v5, 0x0
invoke-virtual {v0, v5, v3}, Lcom/loser/colorpicker/ColorPickerPreference;->onSetInitialValue(ZLjava/lang/Object;)V
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mClockColor:Lcom/loser/colorpicker/ColorPickerPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "clock_color"
const v5, -0x000000
invoke-static {v3, v4, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
const/16 v5, 0x0
invoke-virtual {v0, v5, v3}, Lcom/loser/colorpicker/ColorPickerPreference;->onSetInitialValue(ZLjava/lang/Object;)V[/COLOR]
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mTouchKeyLight:Landroid/preference/ListPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "button_key_light"
const/16 v5, 0x5dc
invoke-static {v3, v4, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
invoke-static {v3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v3
invoke-virtual {v0, v3}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V
[COLOR="red"]iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mClockStyle:Landroid/preference/ListPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "clock_style"
const/16 v5, 0x0
invoke-static {v3, v4, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
invoke-static {v3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v3
invoke-virtual {v0, v3}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mClockAmPmstyle:Landroid/preference/ListPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "clock_am_pm_style"
const/16 v5, 0x0
invoke-static {v3, v4, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
invoke-static {v3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v3
invoke-virtual {v0, v3}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mClockWeekday:Landroid/preference/ListPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "clock_weekday"
const/16 v5, 0x0
invoke-static {v3, v4, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
invoke-static {v3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v3
invoke-virtual {v0, v3}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V[/COLOR]
.line 809
iget-boolean v0, p0, Lcom/android/settings/DisplaySettings;->mSupportFolderType:Z
if-eqz v0, :cond_0
.line 854
invoke-direct {p0}, Lcom/android/settings/DisplaySettings;->updateAccelerometerRotationSecondCheckbox()V
.method public onCreate(Landroid/os/BundleV
Code:
const-string v11, "font_size"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/ListPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mFontSizePref:Landroid/preference/ListPreference;
.line 409
iget-object v11, p0, Lcom/android/settings/DisplaySettings;->mFontSizePref:Landroid/preference/ListPreference;
invoke-virtual {v11, p0}, Landroid/preference/ListPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
[COLOR="red"]const-string v11, "statusbar_color"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Lcom/loser/colorpicker/ColorPickerPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mStatusbarColor:Lcom/loser/colorpicker/ColorPickerPreference;
iget-object v11, p0, Lcom/android/settings/DisplaySettings;->mStatusbarColor:Lcom/loser/colorpicker/ColorPickerPreference;
const-string v11, "clock_color"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Lcom/loser/colorpicker/ColorPickerPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mClockColor:Lcom/loser/colorpicker/ColorPickerPreference;
iget-object v11, p0, Lcom/android/settings/DisplaySettings;->mClockColor:Lcom/loser/colorpicker/ColorPickerPreference;
invoke-virtual {v11, p0}, Lcom/loser/colorpicker/ColorPickerPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
const-string v11, "clock_style"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/ListPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mClockStyle:Landroid/preference/ListPreference;
iget-object v11, p0, Lcom/android/settings/DisplaySettings;->mClockStyle:Landroid/preference/ListPreference;
invoke-virtual {v11, p0}, Landroid/preference/ListPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
const-string v11, "clock_am_pm_style"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/ListPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mClockAmPmstyle:Landroid/preference/ListPreference;
iget-object v11, p0, Lcom/android/settings/DisplaySettings;->mClockAmPmstyle:Landroid/preference/ListPreference;
invoke-virtual {v11, p0}, Landroid/preference/ListPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
const-string v11, "clock_weekday"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/ListPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mClockWeekday:Landroid/preference/ListPreference;
iget-object v11, p0, Lcom/android/settings/DisplaySettings;->mClockWeekday:Landroid/preference/ListPreference;
invoke-virtual {v11, p0}, Landroid/preference/ListPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V[/COLOR]
.line 398
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getActivity()Landroid/app/Activity;
move-result-object v11
invoke-static {v11}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
move-result v11
.method public onPreferenceChange(Landroid/preference/Preference;Ljava/lang/ObjectZ
Code:
:catch_2
move-exception v0
.line 1038
const-string v1, "DisplaySettings"
const-string v2, "could not persist Touch key light setting"
invoke-static {v1, v2, v0}, Landroid/util/Log;->secE(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
goto/16 :goto_4
.line 1040
:cond_9
[COLOR="red"]const-string v2, "statusbar_color"
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_stat
invoke-static {p2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v2
const-string v1, "^#"
const-string v3, ""
invoke-virtual {v2, v1, v3}, Ljava/lang/String;->replaceFirst(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
invoke-static {v3}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v1
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "statusbar_color"
invoke-static {v2, v3, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_4
:cond_stat
const-string v2, "clock_am_pm_style"
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_ampm
.line 986
check-cast p2, Ljava/lang/String;
invoke-static {p2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v0
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "clock_am_pm_style"
invoke-static {v1, v2, v0}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
.line 989
iget-object v1, p0, Lcom/android/settings/DisplaySettings;->mClockAmPmstyle:Landroid/preference/ListPreference;
invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v0
invoke-virtual {v1, v0}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mClockAmPmstyle:Landroid/preference/ListPreference;
iget-object v1, p0, Lcom/android/settings/DisplaySettings;->mClockAmPmstyle:Landroid/preference/ListPreference;
invoke-virtual {v1}, Landroid/preference/ListPreference;->getEntry()Ljava/lang/CharSequence;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/preference/ListPreference;->setSummary(Ljava/lang/CharSequence;)V
goto/16 :goto_4
.line 993
:cond_ampm
const-string v2, "clock_style"
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_style
.line 986
check-cast p2, Ljava/lang/String;
invoke-static {p2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v0
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "clock_style"
invoke-static {v1, v2, v0}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
.line 989
iget-object v1, p0, Lcom/android/settings/DisplaySettings;->mClockStyle:Landroid/preference/ListPreference;
invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v0
invoke-virtual {v1, v0}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mClockStyle:Landroid/preference/ListPreference;
iget-object v1, p0, Lcom/android/settings/DisplaySettings;->mClockStyle:Landroid/preference/ListPreference;
invoke-virtual {v1}, Landroid/preference/ListPreference;->getEntry()Ljava/lang/CharSequence;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/preference/ListPreference;->setSummary(Ljava/lang/CharSequence;)V
goto/16 :goto_4
.line 993
:cond_style
const-string v2, "clock_weekday"
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_week
.line 986
check-cast p2, Ljava/lang/String;
invoke-static {p2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v0
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "clock_weekday"
invoke-static {v1, v2, v0}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
.line 989
iget-object v1, p0, Lcom/android/settings/DisplaySettings;->mClockWeekday:Landroid/preference/ListPreference;
invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v0
invoke-virtual {v1, v0}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mClockWeekday:Landroid/preference/ListPreference;
iget-object v1, p0, Lcom/android/settings/DisplaySettings;->mClockWeekday:Landroid/preference/ListPreference;
invoke-virtual {v1}, Landroid/preference/ListPreference;->getEntry()Ljava/lang/CharSequence;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/preference/ListPreference;->setSummary(Ljava/lang/CharSequence;)V
goto/16 :goto_4
.line 993
:cond_week
const-string v2, "clock_color"
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_color
invoke-static {p2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v2
const-string v1, "^#"
const-string v3, ""
invoke-virtual {v2, v1, v3}, Ljava/lang/String;->replaceFirst(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
invoke-static {v3}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v1
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "clock_color"
invoke-static {v2, v3, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_4
:cond_color[/COLOR]
const-string v2, "quick_launch"
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
Now download the zip attached to this post and copy the smali and res folders. It should merge but not overwrite anything.
Now you're going to need to get some ids!!! Compile and then decompile.
Open /smali/com/loser/colorpicker/ColorPickerDialog.smali
There should be a total of 6 id's you need to get. Make sure you're looking at the type as there's a layout and string with the same name.
Look for them in /res/values/public.xml. You should now be good to go.
Now for SystemUI.apk
Navigate to /res/layout/tw_status_bar.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.PhoneStatusBarView android:orientation="vertical" android:id="@id/status_bar" android:background="@drawable/status_bar_background" android:focusable="true" android:fitsSystemWindows="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<ImageView android:id="@id/notification_lights_out" android:paddingLeft="6.0dip" android:paddingBottom="2.0dip" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" />
[COLOR="SeaGreen"]<RelativeLayout android:id="@id/icons" android:paddingLeft="0.0dip" android:paddingRight="2.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent">[/COLOR]
[COLOR="Red"]<com.android.systemui.statusbar.policy.ClockLeft android:textSize="@dimen/status_bar_clock_text_size" android:textColor="#ff9a9a9a" android:ellipsize="none" android:gravity="left|center" android:id="@id/left_clock" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" android:layout_alignParentLeft="true" />[/COLOR]
[COLOR="SeaGreen"]<LinearLayout android:orientation="horizontal" android:id="@id/left_icons" android:paddingLeft="4.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_toLeftOf="@id/center_clock" android:layout_toRightOf="@id/left_clock" android:layout_alignWithParentIfMissing="true">[/COLOR]
<TextView android:textSize="15.0dip" android:gravity="center_vertical" android:id="@id/carrierLabel" android:visibility="visible" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
<ImageView android:id="@id/operatorLogoIcon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_stat_notify_operator_logo" />
<ImageView android:id="@id/doNotDisturbIcon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/tw_dnd" android:alpha="0.7" android:scaleX="0.85" android:scaleY="0.85" />
<com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
<com.android.systemui.statusbar.phone.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentLeft="true" />
</LinearLayout>
[COLOR="Red"]<com.android.systemui.statusbar.policy.ClockCenter android:textSize="@dimen/status_bar_clock_text_size" android:textColor="#ff9a9a9a" android:ellipsize="none" android:gravity="left|center" android:id="@id/center_clock" android:paddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_centerInParent="true" />[/COLOR]
<LinearLayout android:orientation="horizontal" android:id="@id/right_icons" android:paddingRight="4.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true">
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/tw_signal_cluster_view" />
<include android:id="@id/battery_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/battery_cluster_view" />
<TextView android:textSize="18.0dip" android:textColor="#ff9a9a9a" android:layout_gravity="center" android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_network_name_separator" />
<ImageView android:gravity="center" android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
<com.android.systemui.statusbar.policy.Clock android:textSize="@dimen/status_bar_clock_text_size" android:textColor="#ff9a9a9a" android:ellipsize="none" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" />
</LinearLayout>
[COLOR="SeaGreen"]</RelativeLayout>[/COLOR]
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageSwitcher android:id="@id/tickerIcon" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:layout_marginRight="4.0dip">
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="centerInside" />
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="centerInside" />
</ImageSwitcher>
<com.android.systemui.statusbar.phone.TickerView android:id="@id/tickerText" android:paddingTop="2.0dip" android:paddingRight="10.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_weight="1.0">
<TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" android:id="@id/ticker_text_view_old" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" android:id="@id/ticker_text_view_new" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
</com.android.systemui.statusbar.phone.TickerView>
</LinearLayout>
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
Navigate to /red/values/ids.xml
Remove the line in blue and add the line in red:
Code:
[COLOR="Blue"]<item type="id" name="center_clock_layout">false</item>[/COLOR]
[COLOR="Red"]<item type="id" name="left_clock">false</item>[/COLOR]
STOP!!!!
STOP!!!!
We need to grab some IDs before we continue.
Try to compile. If it fails, try adding in the blue line from the step above (center_clock_layout).
Now decompile again and navigate to /res/values/public.xml.
Search for the following three ID's:
(Make sure you're getting the ones with type="id")
Code:
clock
center_clock
left_clock
Now copy the id's somewhere.
Ok, let's continue...
Navigate to /smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
Code:
.field private mCarrierLabelHeight:I
.field private mCarrierLabelVisible:Z
[COLOR="Blue"]
.field mCenterClockLayout:Landroid/widget/LinearLayout;
[/COLOR]
.field mChoreographer:Landroid/view/Choreographer;
.field mClearButton:Landroid/view/View;
method makeStatusBarView:
Code:
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v10, 0x7f0d0035
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/LinearLayout;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mIcons:Landroid/widget/LinearLayout;
[COLOR="blue"]iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v10, 0x7f0d0121
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/LinearLayout;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCenterClockLayout:Landroid/widget/LinearLayout;[/COLOR]
.line 622
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v10, 0x7f0d003e
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTickerView:Landroid/view/View;
method showClock
REPLACE THE ENTIRE METHOD WITH THIS:
Code:
.method public showClock(Z)V
.locals 11
.parameter "show"
.prologue
const/16 v8, 0x8
const/4 v7, 0x0
const/4 v6, 0x1
.line 146
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
if-nez v9, :cond_1
.line 165
:cond_0
:goto_0
return-void
.line 147
:cond_1
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v10, 0x7f0d003f # "clock"
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v2
.line 148
.local v2, clock:Landroid/view/View;
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v10, 0x7f0d0124 # "center_clock"
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v0
.line 149
.local v0, cclock:Landroid/view/View;
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v10, 0x7f0d0123 # "left_clock"
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v3
.line 150
.local v3, lclock:Landroid/view/View;
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v9}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v9
const-string v10, "clock_style"
invoke-static {v9, v10, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v9
if-ne v9, v6, :cond_4
move v5, v6
.line 152
.local v5, rightClock:Z
:goto_1
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v9}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v9
const-string v10, "clock_style"
invoke-static {v9, v10, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v9
.line 153
const/4 v10, 0x2
.line 152
if-ne v9, v10, :cond_5
move v1, v6
.line 154
.local v1, centerClock:Z
:goto_2
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v9}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v9
const-string v10, "clock_style"
invoke-static {v9, v10, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v9
.line 155
const/4 v10, 0x3
.line 154
if-ne v9, v10, :cond_6
move v4, v6
.line 156
.local v4, leftClock:Z
:goto_3
if-eqz v5, :cond_2
if-eqz v2, :cond_2
.line 157
if-eqz p1, :cond_7
move v6, v7
:goto_4
invoke-virtual {v2, v6}, Landroid/view/View;->setVisibility(I)V
.line 159
:cond_2
if-eqz v1, :cond_3
if-eqz v0, :cond_3
.line 160
if-eqz p1, :cond_8
move v6, v7
:goto_5
invoke-virtual {v0, v6}, Landroid/view/View;->setVisibility(I)V
.line 162
:cond_3
if-eqz v4, :cond_0
if-eqz v3, :cond_0
.line 163
if-eqz p1, :cond_9
:goto_6
invoke-virtual {v3, v7}, Landroid/view/View;->setVisibility(I)V
goto :goto_0
.end local v1 #centerClock:Z
.end local v4 #leftClock:Z
.end local v5 #rightClock:Z
:cond_4
move v5, v7
.line 150
goto :goto_1
.restart local v5 #rightClock:Z
:cond_5
move v1, v7
.line 152
goto :goto_2
.restart local v1 #centerClock:Z
:cond_6
move v4, v7
.line 154
goto :goto_3
.restart local v4 #leftClock:Z
:cond_7
move v6, v8
.line 157
goto :goto_4
.line 160
:cond_8
const/4 v6, 0x4
goto :goto_5
:cond_9
move v7, v8
.line 163
goto :goto_6
.end method
WAIT!!!
WAIT!!!
Remeber those id's you grabbed earlier? Here's where we put them. Look through the method you just added and replace the id's with the ones you copied!
Now search for
Code:
mIcons:Landroid/widget/LinearLayout;
and replace every instance with
Code:
mIcons:Landroid/widget/RelativeLayout;
method makeStatusBarView
Code:
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationIcons:Lcom/android/systemui/statusbar/phone/IconMerger;
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mMoreIcon:Landroid/view/View;
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/IconMerger;->setOverflowIndicator(Landroid/view/View;)V
.line 621
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v10, 0x7f0d0035
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
[COLOR="red"]check-cast v9, Landroid/widget/RelativeLayout;[/COLOR]
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mIcons:Landroid/widget/RelativeLayout;
.line 622
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v10, 0x7f0d003e
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
Navigate to /smali/com/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker.smali
Now search for
Code:
mIcons:Landroid/widget/LinearLayout;
and replace every instance with
Code:
mIcons:Landroid/widget/RelativeLayout;
Navigate to /smali/com/android/systemui/statusbar/phone/PhoneStatusBarView.smali
Search for
Code:
leftIconsControl:Landroid/widget/LinearLayout$LayoutParams;
and replace every instance with
Code:
leftIconsControl:Landroid/widget/RelativeLayout$LayoutParams;
Do the same thing and replace
Code:
rightIconsControl:Landroid/widget/LinearLayout$LayoutParams;
with
Code:
rightIconsControl:Landroid/widget/RelativeLayout$LayoutParams;
One last one. Replace
Code:
check-cast v0, Landroid/widget/LinearLayout$LayoutParams;
with
Code:
check-cast v0, Landroid/widget/RelativeLayout$LayoutParams;
Navigate to /smali/com/android/systemui/statusbar/BaseStatusBar.smali
If you haven't implemented the trancparency mod, place the following method after ".method public setMaxBrightness(I)V"
method setStatusBarParams
REPLACE THE ENTIRE METHOD WITH THIS:
Code:
.method protected setStatusBarParams(Landroid/view/View;)V
.locals 4
iget-object v1, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "statusbar_color"
const/high16 v3, -0x100
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
invoke-virtual {p1, v0}, Landroid/view/View;->setBackgroundColor(I)V
return-void
.end method
Now download the zip attached to this post and copy the smali folder, overwriting if it asks.
If you haven't implemented the transparency mod, You only need to add a couple things.
Navigate to /smali/com/android/systemui/statusbar/phone/PhoneStatusbar.smali
Code:
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BrightnessEnableObserver;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$FastColorDrawable;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;,
[COLOR="Red"]Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;,[/COLOR]
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$NotificationClicker;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$H;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$ExpandedDialog;
Code:
.method static synthetic access$3400(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;ILandroid/view/animation/Animation$AnimationListener;)Landroid/view/animation/Animation;
.locals 1
invoke-direct {p0, p1, p2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->loadAnim(ILandroid/view/animation/Animation$AnimationListener;)Landroid/view/animation/Animation;
move-result-object v0
return-object v0
.end method
[COLOR="Red"].method static synthetic access$3401(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/view/View;)V
.locals 0
invoke-virtual {p0, p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setStatusBarParams(Landroid/view/View;)V
return-void
.end method[/COLOR]
.method static synthetic access$3500(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
.locals 0
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->playTraySound()V
return-void
.end method
method updateResources
Code:
invoke-virtual {v0, v3}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;
move-result-object v3
invoke-virtual {v2, v3}, Landroid/view/View;->setContentDescription(Ljava/lang/CharSequence;)V
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->loadDimens()V
[COLOR="Red"]iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-virtual {p0, v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setStatusBarParams(Landroid/view/View;)V[/COLOR]
return-void
.end method
method makeStatusBarView
Code:
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/policy/NotificationRowLayout;->setLongPressListener(Landroid/view/View$OnLongClickListener;)V
iget-object v9, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedContents:Landroid/view/View;
[COLOR="Red"]new-instance v9, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;
new-instance v10, Landroid/os/Handler;
invoke-direct {v10}, Landroid/os/Handler;-><init>()V
invoke-direct {v9, p0, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/os/Handler;)V
invoke-virtual {v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;->observe()V[/COLOR]
goto/16 :goto_5
:cond_f
const/16 v9, 0x8
goto/16 :goto_6
method public start()V
Code:
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mWindowManager:Landroid/view/IWindowManager;
invoke-super {p0}, Lcom/android/systemui/statusbar/BaseStatusBar;->start()V
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->addNavigationBar()V
[COLOR="red"]new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;
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$SettingsObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/os/Handler;)V
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;->observe()V[/COLOR]
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;
return-void
.end method
Awesome. Thanks!
I assume this is for 4.1.1?
upndwn4par said:
Awesome. Thanks!
I assume this is for 4.1.1?
Click to expand...
Click to collapse
It's pretty involved, but let me know how it goes for you. I may have missed something. It should work for 4.1.2 but it's built from 4.1.1
loserskater said:
Now download the zip attached to this post and place the files in the following folders:
Code:
ClockLeft.smali /smali/com/android/systemui/statusbar/policy/
PhoneStatusBar$MyTicker.smali /smali/com/android/systemui/statusbar/phone/
[/hide]
Click to expand...
Click to collapse
I hated editing MyTicker.smali lol
Good work on these MODs dude. We should bounce ideas off each other from time to time. Hit me up on Gtalk...sent you a PM.
Didact74 said:
I hated editing MyTicker.smali lol
Good work on these MODs dude. We should bounce ideas off each other from time to time. Hit me up on Gtalk...sent you a PM.
Click to expand...
Click to collapse
That was a good idea though. Getting the center clock centered between the two sets of icons was a pain, so I can see just having it overlap being much easier.
I don't really get how I'm supposed to do this? I have the Intergalactic ROM and I go to download the Clock Statusbar Mod 2.0 and there is a "multimod" which has all the features. So I downloaded that and I go to SecSettings.apk and there is not even a /res/values folder? Can you make a flashable zip or something that works with your ROM?
geoldr said:
I don't really get how I'm supposed to do this? I have the Intergalactic ROM and I go to download the Clock Statusbar Mod 2.0 and there is a "multimod" which has all the features. So I downloaded that and I go to SecSettings.apk and there is not even a /res/values folder? Can you make a flashable zip or something that works with your ROM?
Click to expand...
Click to collapse
I'm working on something similar for the next version of Intergalactic. It's a different method of doing things than this, but you'll be able to change the status bar to any hex value or transparency that you want using a popup color changer apk.
Thanks for yours and Didact's work, loser.
Sent from my SAMSUNG-SGH-I747 using xda premium
Oh by the way, your code is a real jokester and a tease...but then it reassures me with a wink. Lol
Sent from my SAMSUNG-SGH-I747 using xda premium
I think I'm missing something... but where are the attached files?
Code:
ClockLeft.smali /smali/com/android/systemui/statusbar/policy/
PhoneStatusBar$MyTicker.smali /smali/com/android/systemui/statusbar/phone/
stratatak7 said:
I'm working on something similar for the next version of Intergalactic. It's a different method of doing things than this, but you'll be able to change the status bar to any hex value or transparency that you want using a popup color changer apk.
Thanks for yours and Didact's work, loser.
Sent from my SAMSUNG-SGH-I747 using xda premium
Click to expand...
Click to collapse
Sounds good. But can you also implement center clock? I think that and battery icons are essential.
Thanks man
geoldr said:
Sounds good. But can you also implement center clock? I think that and battery icons are essential.
Thanks man
Click to expand...
Click to collapse
Everything will be customizable. Don't worry.
Sent from my SAMSUNG-SGH-I747 using xda premium
Too much work involved
stratatak7 said:
I'm working on something similar for the next version of Intergalactic. It's a different method of doing things than this, but you'll be able to change the status bar to any hex value or transparency that you want using a popup color changer apk.
Thanks for yours and Didact's work, loser.
Sent from my SAMSUNG-SGH-I747 using xda premium
Click to expand...
Click to collapse
I was going to go that route, but wanted to get this done first. Sharing that color changer apk would be awesome!
Kryten2k35 said:
I think I'm missing something... but where are the attached files?
Code:
ClockLeft.smali /smali/com/android/systemui/statusbar/policy/
PhoneStatusBar$MyTicker.smali /smali/com/android/systemui/statusbar/phone/
Click to expand...
Click to collapse
Sorry about that. Files are up!
loserskater said:
I was going to go that route, but wanted to get this done first. Sharing that color changer apk would be awesome!
Sorry about that. Files are up!
Click to expand...
Click to collapse
Thanks mate!
---------- Post added at 11:25 PM ---------- Previous post was at 10:48 PM ----------
Well, this worked great
The only issue I can notice is that to set the statusbar colour, you must pick the colour, then pick the transparency.
Not a big deal though!
Thanks loserskater!
Kryten2k35 said:
Thanks mate!
---------- Post added at 11:25 PM ---------- Previous post was at 10:48 PM ----------
Well, this worked great
The only issue I can notice is that to set the statusbar colour, you must pick the colour, then pick the transparency.
Not a big deal though!
Thanks loserskater!
Click to expand...
Click to collapse
It works just fine for me. Post your BaseStatusBar
Sent from my SAMSUNG-SGH-I747
Ok
It's not a massive deal though.
loserskater said:
I was going to go that route, but wanted to get this done first. Sharing that color changer apk would be awesome!
Click to expand...
Click to collapse
I think you have to be part of The Family for that.
I also get this now:
Code:
W/BroadcastQueue( 2707): Failure sending broadcast Intent { act=android.intent.action.SCREEN_OFF flg=0x50000010 }
W/BroadcastQueue( 2707): android.os.DeadObjectException
W/BroadcastQueue( 2707): at android.os.BinderProxy.transact(Native Method)
W/BroadcastQueue( 2707): at android.content.IIntentReceiver$Stub$Proxy.performReceive(IIntentReceiver.java)
W/BroadcastQueue( 2707): at com.android.server.am.BroadcastQueue.performReceiveLocked(BroadcastQueue.java)
W/BroadcastQueue( 2707): at com.android.server.am.BroadcastQueue.deliverToRegisteredReceiverLocked(BroadcastQueue.java)
W/BroadcastQueue( 2707): at com.android.server.am.BroadcastQueue.processNextBroadcast(BroadcastQueue.java)
W/BroadcastQueue( 2707): at com.android.server.am.ActivityManagerService.finishReceiver(ActivityManagerService.java)
W/BroadcastQueue( 2707): at android.content.BroadcastReceiver$PendingResult.sendFinished(BroadcastReceiver.java)
W/BroadcastQueue( 2707): at android.content.BroadcastReceiver$PendingResult.finish(BroadcastReceiver.java)
W/BroadcastQueue( 2707): at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java)
W/BroadcastQueue( 2707): at android.os.Handler.handleCallback(Handler.java)
W/BroadcastQueue( 2707): at android.os.Handler.dispatchMessage(Handler.java)
W/BroadcastQueue( 2707): at android.os.Looper.loop(Looper.java)
W/BroadcastQueue( 2707): at com.android.server.ServerThread.run(SystemServer.java)
W/BroadcastQueue( 2707): Failure sending broadcast Intent { act=android.intent.action.SCREEN_OFF flg=0x50000010 }
W/BroadcastQueue( 2707): android.os.DeadObjectException
W/BroadcastQueue( 2707): at android.os.BinderProxy.transact(Native Method)
W/BroadcastQueue( 2707): at android.content.IIntentReceiver$Stub$Proxy.performReceive(IIntentReceiver.java)
W/BroadcastQueue( 2707): at com.android.server.am.BroadcastQueue.performReceiveLocked(BroadcastQueue.java)
W/BroadcastQueue( 2707): at com.android.server.am.BroadcastQueue.deliverToRegisteredReceiverLocked(BroadcastQueue.java)
W/BroadcastQueue( 2707): at com.android.server.am.BroadcastQueue.processNextBroadcast(BroadcastQueue.java)
W/BroadcastQueue( 2707): at com.android.server.am.ActivityManagerService.finishReceiver(ActivityManagerService.java)
W/BroadcastQueue( 2707): at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java)
W/BroadcastQueue( 2707): at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java)
W/BroadcastQueue( 2707): at android.os.Binder.execTransact(Binder.java)
W/BroadcastQueue( 2707): at dalvik.system.NativeStart.run(Native Method)
W/AlarmManager( 2707): FACTORY_ON= 0
D/dalvikvm( 2707): GC_CONCURRENT freed 310K, 57% free 18664K/43015K, paused 13ms+13ms, total 164ms
E/Trace ( 8497): error opening trace file: No such file or directory (2)
E/JavaBinder( 8497): *** Uncaught remote exception! (Exceptions are not yet supported across processes.)
E/JavaBinder( 8497): java.lang.RuntimeException: android.os.DeadObjectException
E/JavaBinder( 8497): at android.os.Parcel.writeException(Parcel.java)
E/JavaBinder( 8497): at android.os.Binder.execTransact(Binder.java)
E/JavaBinder( 8497): at dalvik.system.NativeStart.run(Native Method)
E/JavaBinder( 8497): Caused by: android.os.DeadObjectException
E/JavaBinder( 8497): at android.os.BinderProxy.transact(Native Method)
E/JavaBinder( 8497): at android.content.IIntentReceiver$Stub$Proxy.performReceive(IIntentReceiver.java)
E/JavaBinder( 8497): at android.app.ActivityThread$ApplicationThread.scheduleRegisteredReceiver(ActivityThread.java)
E/JavaBinder( 8497): at android.app.ApplicationThreadNative.onTransact(ApplicationThreadNative.java)
E/JavaBinder( 8497): ... 2 more
Whenever the screen turns off, the wallpaper and statusbar die and then come back. It also happens sometimes when changing the clock, and sometimes the left and center clocks shot together :/
Very odd because it worked great last night!
i get this when trying to compile..can anyone help please
[2932,4] ALL REGISTER ARGS MUST FIT 4 BITS
[2938,4] THE REGISTER NUMBER MUST BE LESS THAN V16
[2940,4] MISMATCHED TREE NODE ....
[2942,4] MISMATCHED TREE NODE ....
Click to expand...
Click to collapse
THANKS
This will allow you to change the background color/transparency of the notification panel in real time without rebooting.
We're going to be working with the following two files:
SecSettings.apk
SystemUI.apk
KEY
REMOVE what's in BLUE
ADD what's in RED
Note:
If you've already implemented my Clock mod and added the color picker files, you'll have to replace it with what I've attached as I've changed how the color picker works. It now saves your setting instead of reverting it to default everytime you leave and come back to the menu. I'll be updating the clock mod right now.
Issues:
There is a tiny line that goes across just under the brightness slider/notification toggles that I cannot figure out how to remove. It's only noticeable when you use colors. If you're just using transparency then it's hard to tell.
SecSettings.apk
Navigate to /res/values/strings.xml
Add the following to the end of the file
Code:
<string name="notification_panel_color_title">Notification panel color</string>
<string name="notification_panel_color_summary">Change the background color of the notification panel</string>
<string name="dialog_color_picker">Color Picker</string>
<string name="press_color_to_apply">Press on Color to apply</string>
Navigate to /res/values/ids.xml
add the following to the end of the file
Code:
<item type="id" name="color_picker_view">false</item>
<item type="id" name="old_color_panel">false</item>
<item type="id" name="new_color_panel">false</item>
Navigate to /xml/display_settings.xml
Add the following line wherever you would like it to show in the menu
Code:
<com.loser.colorpicker.ColorPickerPreference android:persistent="false" android:title="@string/notification_panel_color_title" android:key="notification_panel_color" android:summary="@string/notification_panel_color_summary" android:defaultValue="0xff000000" alphaSlider="true" />
Navigate to /smali/com/android/settings/DisplaySettings.smali
Code:
.field private mMultiWindowModeObserver:Landroid/database/ContentObserver;
.field private mMultiWindowPref:Landroid/preference/CheckBoxPreference;
[COLOR="Red"].field private mNotificationPanelColor:Lcom/loser/colorpicker/ColorPickerPreference;[/COLOR]
.field private mNotificationPulse:Landroid/preference/CheckBoxPreference;
.field private mPowerSavingMode:Landroid/preference/CheckBoxPreference;
.method private updateState()V
Code:
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v4, "display_battery_percentage"
invoke-static {v0, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-eqz v0, :cond_4
move v0, v1
:goto_1
invoke-virtual {v3, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
[COLOR="red"]iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mNotificationPanelColor:Lcom/loser/colorpicker/ColorPickerPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "notification_panel_color"
const v5, -0xffffff
invoke-static {v3, v4, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
const/16 v5, 0x0
invoke-virtual {v0, v5, v3}, Lcom/loser/colorpicker/ColorPickerPreference;->onSetInitialValue(ZLjava/lang/Object;)V[/COLOR]
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mTouchKeyLight:Landroid/preference/ListPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "button_key_light"
.method public onCreate(Landroid/os/BundleV
Code:
const-string v11, "display_battery_level"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/CheckBoxPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
[COLOR="red"]const-string v11, "notification_panel_color"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Lcom/loser/colorpicker/ColorPickerPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mNotificationPanelColor:Lcom/loser/colorpicker/ColorPickerPreference;
iget-object v11, p0, Lcom/android/settings/DisplaySettings;->mNotificationPanelColor:Lcom/loser/colorpicker/ColorPickerPreference;
invoke-virtual {v11, p0}, Lcom/loser/colorpicker/ColorPickerPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V[/COLOR]
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getActivity()Landroid/app/Activity;
move-result-object v11
invoke-static {v11}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
move-result v11
if-eqz v11, :cond_6
.method public onPreferenceChange(Landroid/preference/Preference;Ljava/lang/ObjectZ
Code:
:catch_2
move-exception v0
.line 1038
const-string v1, "DisplaySettings"
const-string v2, "could not persist Touch key light setting"
invoke-static {v1, v2, v0}, Landroid/util/Log;->secE(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
goto/16 :goto_4
.line 1040
:cond_9
[COLOR="red"]const-string v2, "notification_panel_color"
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_next
invoke-static {p2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v2
const-string v1, "^#"
const-string v3, ""
invoke-virtual {v2, v1, v3}, Ljava/lang/String;->replaceFirst(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
invoke-static {v3}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v1
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "notification_panel_color"
invoke-static {v2, v3, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_4
:cond_next[/COLOR]
const-string v2, "quick_launch"
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
Now download the attached zip and extract to the root of your SecSettings folder.
Compile and then decompile and open up /res/values/public.xml
Open /smali/com/loser/colorpicker/ColorPickerDialog.smali
There should be a total of 6 id's you need to get. Make sure you're looking at the type as there's a layout and string with the same name.
That's it for SecSettings. Compile.
Now for SystemUI.apk
Navigate to /smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
.method protected updateExpandedViewPos(I)V
Code:
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
[COLOR="Red"]const/4 v6, 0x0
invoke-virtual {v9, v6}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackground(Landroid/graphics/drawable/Drawable;)V
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v6, "notification_panel_color"
const v9, -0xffffff
invoke-static {v3, v6, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Landroid/view/View;[/COLOR]
invoke-virtual {v9, v3}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackgroundColor(I)V
Simple enough? Compile and test!
loserskater said:
Issues:
There is a tiny line that goes across just under the brightness slider/notification toggles that I cannot figure out how to remove. It's only noticeable when you use colors. If you're just using transparency then it's hard to tell.
Click to expand...
Click to collapse
Great work as always.
Regarding the above issue, did you look to see if it's a PNG or a color you can make transparent? Sounds like it's a separator.
I am guessing you did, but I just thought I'd ask.
upndwn4par said:
Great work as always.
Regarding the above issue, did you look to see if it's a PNG or a color you can make transparent? Sounds like it's a separator.
I am guessing you did, but I just thought I'd ask.
Click to expand...
Click to collapse
I think something is taking up like one extra pixel than it's background so the color background shows through.
Sent from my SAMSUNG-SGH-I747
You could also include this:
Code:
\res\layout\tw_status_bar_expanded.xml
Find in red, change to blue
TWO Edits here:
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="@dimen/notification_panel_margin_left"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
<include android:layout_width="fill_parent" android:layout_height="@dimen/tw_notification_panel_header_height" layout="@layout/tw_status_bar_expanded_header" />
<TextView android:gravity="center" android:id="@id/emergency_calls_only" android:paddingBottom="4.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<HorizontalScrollView android:id="@id/quicksetting_scroller" android:scrollbars="none" android:layout_width="wrap_content" android:layout_height="@dimen/quick_setting_button_height" android:layout_marginTop="@dimen/tw_notification_panel_header_height">
<com.android.systemui.statusbar.policy.quicksetting.QuickSettingPanel android:orientation="horizontal" android:id="@id/quicksetting_container" android:layout_width="wrap_content" android:layout_height="wrap_content" android:divider="@drawable/tw_black_bg" android:showDividers="middle" />
</HorizontalScrollView>
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="@dimen/notification_panel_quicksettingbtn_height" android:overScrollMode="ifContentScrolls">
<LinearLayout android:orientation="vertical" android:id="@id/scrollCart" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:orientation="vertical" android:id="@id/brightness_controller" [COLOR="Red"]android:background="#[COLOR="Blue"]00[/COLOR]000000"[/COLOR] android:visibility="visible" android:layout_width="fill_parent" android:layout_height="56.0dip">
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="55.0dip">
<ImageView android:id="@id/brightness_icon" android:clickable="true" android:layout_width="25.0dip" android:layout_height="fill_parent" android:layout_marginLeft="13.0dip" android:src="@drawable/ic_sysbar_brightness" android:contentDescription="@string/accessibility_brightness_icon" />
<FrameLayout android:id="@id/brightness_group" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/auto_brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
</FrameLayout>
</LinearLayout>
<View [COLOR="Red"]android:background="#[COLOR="blue"]00[/COLOR]091a24"[/COLOR] android:layout_width="fill_parent" android:layout_height="1.0dip" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:id="@id/noNotificationsTitle" android:focusable="true" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/noNotificationsText" android:paddingLeft="11.0dip" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height" android:text="@string/status_bar_no_notifications_title" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:id="@id/onGoingCart" android:background="#ff293945" android:focusable="true" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/onGoingNotificationText" android:paddingLeft="11.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:text="@string/status_bar_ongoing_events_title" />
</LinearLayout>
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/onGoingItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
<LinearLayout android:orientation="vertical" android:id="@id/notificationCart" android:background="#ff293945" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
<RelativeLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/latestNotificationText" android:paddingLeft="11.0dip" android:layout_width="180.0dip" android:layout_height="fill_parent" android:text="@string/status_bar_latest_events_title" android:layout_alignParentLeft="true" />
<TextView android:textSize="@dimen/status_bar_expanded_notification_clear_button_text_size" android:textColor="@color/tw_status_bar_clear_btn_text" android:gravity="center" android:id="@id/clear_all_button" android:background="@drawable/tw_btn_default_small" android:padding="0.100000024dip" android:focusable="true" android:clickable="true" android:layout_width="@dimen/status_bar_expanded_clear_button_width" android:layout_height="fill_parent" android:layout_marginRight="4.0dip" android:text="@string/status_bar_clear_all_button" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
</RelativeLayout>
</LinearLayout>
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/notificationItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
</LinearLayout>
</ScrollView>
</FrameLayout>
<com.android.systemui.statusbar.phone.CloseDragHandle android:layout_gravity="bottom" android:orientation="vertical" android:id="@id/close" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height">
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageView android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height" android:src="@drawable/tw_status_bar_close" android:scaleType="fitXY" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="bottom" android:id="@id/carrier_label" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height" android:layout_marginBottom="10.0dip" />
</RelativeLayout>
</com.android.systemui.statusbar.phone.CloseDragHandle>
</FrameLayout>
Also, in the zipa re some transparent files that go in drawable-xhdpi.
Put them into that folder, then build/compile
EDIT:
Just noticed the above post... there's that tiny line sorted for you That's the second edit.
Thank you as always Loser ! Going to try this one tomorrow... I promise I'll try to do this one without my noon questions.
I know you can't say for sure but do you think this would translate closely to 4.1.2.
Most of yours have for me but just figured I'd ask
Sent from my SAMSUNG-SGH-I747 using xda premium
hednik said:
Thank you as always Loser ! Going to try this one tomorrow... I promise I'll try to do this one without my noon questions.
I know you can't say for sure but do you think this would translate closely to 4.1.2.
Most of yours have for me but just figured I'd ask
Sent from my SAMSUNG-SGH-I747 using xda premium
Click to expand...
Click to collapse
All the code is from the tmo 4.1.2 build so you shouldn't have any issues.
loserskater said:
All the code is from the tmo 4.1.2 build so you shouldn't have any issues.
Click to expand...
Click to collapse
Almost have it working correctly. Compiled and decompiled and the public "id"s all looked correct. Flashed went to display settings. Got a force close on the option so.... I've got the Id's incorrect but I looked then over and all I saw was :
Code:
<public type="id" name="color_picker_view" id="0x7f0b03f7" />
<public type="id" name="old_color_panel" id="0x7f0b03f8" />
<public type="id" name="new_color_panel" id="0x7f0b03f9" />
These were the only "id"s i saw. I ignored the ones with "layout" or "string"
Now in the colorpickerdialog.smali I saw this:
Code:
.line 65
.local v0, inflater:Landroid/view/LayoutInflater;
const v2, 0x7f040129
const/4 v3, 0x0
invoke-virtual {v0, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v1
.line 67
.local v1, layout:Landroid/view/View;
invoke-virtual {p0, v1}, Lcom/loser/colorpicker/ColorPickerDialog;->setContentView(Landroid/view/View;)V
.line 69
const v2, 0x7f090e96
invoke-virtual {p0, v2}, Lcom/loser/colorpicker/ColorPickerDialog;->setTitle(I)V
.line 71
const v2, 0x7f0b03f7
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v2
check-cast v2, Lcom/loser/colorpicker/ColorPickerView;
iput-object v2, p0, Lcom/loser/colorpicker/ColorPickerDialog;->mColorPicker:Lcom/loser/colorpicker/ColorPickerView;
.line 72
const v2, 0x7f0b03f8
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v2
check-cast v2, Lcom/loser/colorpicker/ColorPickerPanelView;
iput-object v2, p0, Lcom/loser/colorpicker/ColorPickerDialog;->mOldColor:Lcom/loser/colorpicker/ColorPickerPanelView;
.line 73
const v2, 0x7f0b03f9
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v2
check-cast v2, Lcom/loser/colorpicker/ColorPickerPanelView;
iput-object v2, p0, Lcom/loser/colorpicker/ColorPickerDialog;->mNewColor:Lcom/loser/colorpicker/ColorPickerPanelView;
and this one further down, which is repeated from up top
Code:
method public onClick(Landroid/view/View;)V
.locals 2
.parameter "v"
.prologue
.line 122
invoke-virtual {p1}, Landroid/view/View;->getId()I
move-result v0
const v1, 0x7f0b03f9
if-ne v0, v1, :cond_0
.line 123
iget-object v0, p0, Lcom/loser/colorpicker/ColorPickerDialog;->mListener:Lcom/loser/colorpicker/ColorPickerDialog$OnColorChangedListener;
if-eqz v0, :cond_0
Here were all the id's from the colorpickerdialog.smali:
Code:
Line 88: const v2, 0x7f040129 - [COLOR="red"][B]This one was under "layout"[/B][/COLOR]
Line 101: const v2, 0x7f090e96 [COLOR="red"][B]This one wasn't in the public xml[/B][/COLOR]
Line 106: const v2, 0x7f0b03f7
Line 117: const v2, 0x7f0b03f8
Line 128: const v2, 0x7f0b03f9
Line 229: const v1, 0x7f0b03f9
As a side note the check boc was about twice the size the others ones I have as well. Thanks !
here are the files just in case I didn't make much sense in my rambling:
ColorPickerDialog.smali - 10.67 KB
public.xml - 485.77 KB
hednik said:
Almost have it working correctly. Compiled and decompiled and the public "id"s all looked correct. Flashed went to display settings. Got a force close on the option so.... I've got the Id's incorrect but I looked then over and all I saw was :
...
As a side note the check boc was about twice the size the others ones I have as well. Thanks !
here are the files just in case I didn't make much sense in my rambling:
ColorPickerDialog.smali - 10.67 KB
public.xml - 485.77 KB
Click to expand...
Click to collapse
I accidentally uploaded the colorpickerdialog that doesn't have the comments, I'll fix the upload soon
Sent from my SAMSUNG-SGH-I747
EDIT: Fixed. Download the new zip and look at ColorPickerDialog.smali
Also, yes the box is bigger. It's not a checkbox but a color box that shows the color.
loserskater said:
I accidentally uploaded the colorpickerdialog that doesn't have the comments, I'll fix the upload soon
Sent from my SAMSUNG-SGH-I747
EDIT: Fixed. Download the new zip and look at ColorPickerDialog.smali
Also, yes the box is bigger. It's not a checkbox but a color box that shows the color.
Click to expand...
Click to collapse
Thank you. You are a good man @loserskater. Thanks for supporting my habit ha
61M26173M3471522L
EDIT: works perfectly. Thank you !
Great Guide!
Did it for Galaxy Grand Duos Credits are given
Code:
http://forum.xda-developers.com/showthread.php?t=2320158
this solves the small line issue (if it lies below the brightness slider)
in values/dimens.xml
Code:
<dimen name="notification_panel_notification_top_margin">[COLOR="Red"]184.0dip[/COLOR]</dimen>
set it to 180.dip or so .
Thanks Loser :good:
You can just edit the actual xml and change it's height or visibility as I posted. Much simpler.
Kryten2k35 said:
You can just edit the actual xml and change it's height or visibility as I posted. Much simpler.
Click to expand...
Click to collapse
i just like everything on its place ^_^
first of all thanks for the mod.
ive decompiled and recompiled secsettings which is showing the options..
Before this mod my dropdown was transparent,
so...
I edited my systemUI.apk and recompiled it. my dropdown is now full BLACK (0% trans) which means i think ive recompiled systemUI.apk good??
but i cant select a color??
EDIT:
Navigated to /smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
@.method protected updateExpandedViewPos(I)V
the command at OP:
Code:
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
[COLOR="Red"]const/4 v6, 0x0
invoke-virtual {v9, v6}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackground(Landroid/graphics/drawable/Drawable;)V
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v6, "notification_panel_color"
const v9, -0xffffff
invoke-static {v3, v6, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Landroid/view/View;[/COLOR]
invoke-virtual {v9, v3}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackgroundColor(I)V
My Code (N7100):
Code:
.local v3, color:I
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
[COLOR="red"]const/4 v6, 0x0
invoke-virtual {v9, v6}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackground(Landroid/graphics/drawable/Drawable;)V
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v6, "notification_panel_color"
const v9, -0xffffff
invoke-static {v3, v6, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Landroid/view/View;[/COLOR]
invoke-virtual {v9, v3}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackgroundColor(I)V
.line 3479
.end local v3 #color:I
.end local v6 #k:F
:cond_5
const/4 v9, 0x0
move-object/from16 v0, p0
ON phone, when i hit the selected color it doesnt change, it stays on black :/???
AskinSavascisi said:
first of all thanks for the mod.
ive decompiled and recompiled secsettings which is showing the options..
Before this mod my dropdown was transparent,
so...
I edited my systemUI.apk and recompiled it. my dropdown is now full BLACK (0% trans) which means i think ive recompiled systemUI.apk good??
but i cant select a color??
EDIT:
Navigated to /smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
@.method protected updateExpandedViewPos(I)V
the command at OP:
Code:
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
[COLOR="Red"]const/4 v6, 0x0
invoke-virtual {v9, v6}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackground(Landroid/graphics/drawable/Drawable;)V
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v6, "notification_panel_color"
const v9, -0xffffff
invoke-static {v3, v6, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Landroid/view/View;[/COLOR]
invoke-virtual {v9, v3}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackgroundColor(I)V
My Code (N7100):
Code:
.local v3, color:I
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
[COLOR="red"]const/4 v6, 0x0
invoke-virtual {v9, v6}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackground(Landroid/graphics/drawable/Drawable;)V
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v6, "notification_panel_color"
const v9, -0xffffff
invoke-static {v3, v6, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Landroid/view/View;[/COLOR]
invoke-virtual {v9, v3}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackgroundColor(I)V
.line 3479
.end local v3 #color:I
.end local v6 #k:F
:cond_5
const/4 v9, 0x0
move-object/from16 v0, p0
ON phone, when i hit the selected color it doesnt change, it stays on black :/???
Click to expand...
Click to collapse
BUMP???
I'm trying to implement this mod but not in Display Settings, in my ROM settings.smali. But I've an error in OnpreferenceChange. Here's the log:
Code:
W/dalvikvm(4676): VFY: register1 v0 type 0, wanted ref
W/dalvikvm(4676): VFY: bad arg 1 (into Ljava/lang/Object;)
W/dalvikvm(4676): VFY: rejecting call to Ljava/lang/String;.equals (Ljava/lang/Object;)Z
W/dalvikvm(4676): VFY: rejecting opcode 0x6e at 0x0036
W/dalvikvm(4676): VFY: rejected Lcom/android/settings/phdsettings;.onPreferenceChange (Landroid/preference/Preference;Ljava/lang/Object;)Z
W/dalvikvm(4676): Verifier rejected class Lcom/android/settings/phdsettings;
W/dalvikvm(4676): Class init failed in newInstance call (Lcom/android/settings/phdsettings;)
D/AndroidRuntime(4676): Shutting down VM
W/dalvikvm(4676): threadid=1: thread exiting with uncaught exception (group=0x41a232a0)
What I'm doing wrong? Thanks in advance!
Anyone figure out how to get rid of the black background for notifications on MG2?
This is driving me nuts.
upndwn4par said:
Anyone figure out how to get rid of the black background for notifications on MG2?
This is driving me nuts.
Click to expand...
Click to collapse
Do you mean the background on notifcations themselves, not the actual panel? That is all in framework-res.apk I was scanning systemui.apk for hours to find out how to change those until I remembered framework-res controlled certain backgrounds in the system such as the background in secsettings.apk. If I remember correctly the files are in res/layout of framework-res.apk and they are called notification_template_xx.xml,
hope this helps bro
Danvdh said:
Do you mean the background on notifcations themselves, not the actual panel? That is all in framework-res.apk I was scanning systemui.apk for hours to find out how to change those until I remembered framework-res controlled certain backgrounds in the system such as the background in secsettings.apk. If I remember correctly the files are in res/layout of framework-res.apk and they are called notification_template_xx.xml,
hope this helps bro
Click to expand...
Click to collapse
Yes, the background of the notifications themselves. To make the notification drawer completely transparent a combination of PNGs and xmls must be changed (not the ones you mentioned). I have done this more than once. So either something has changed in the latest firmware, or I'm losing it. :cyclops:
Hello guys..
I want to share the sense recent app which I mod for my I9505 (XXUBMF8).
This should be able to apply on all other firmwares on the I9505 (not tested yet).
but first, you need:
1. Apktool
2. Some knowledge about compiling and decompiling
3. 7zip
4. notepad++
5. backsmali
P.S. I won't make mods for any other ROM versions. I've provided enough info.
For Dev cookers, you are allowed to use this mod in your project. Give proper credits and thanks.
Let's get started...
1. Decompile framework-res.apk,
- /res/values/dimens.xml : change thumbnail size to:
<dimen name="thumbnail_height">267.0dip</dimen>
<dimen name="thumbnail_width">168.0dip</dimen>
Click to expand...
Click to collapse
You can change the dip values the way you want.
Compile back as this is the only change needs to be done in framework-res.apk.
2. Decompile SystemUI.apk,
- /res/values/bools.xml and make the changes below:
<bool name="config_recents_thumbnail_image_fits_to_xy">true</bool>
Click to expand...
Click to collapse
- /res/values/strings.xml:
add this line at the of the file
<string name="recent_apps_title">Recent apps</string>
Click to expand...
Click to collapse
--/res/values/ids.xml:
add this line at the of the file
<item type="id" name="recents_transition_background" />
<item type="id" name="recents_transition_placeholder_icon" />
<item type="id" name="recents_clear" />
Click to expand...
Click to collapse
- /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:
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:background=[COLOR="Red"]"#ff000000"[/COLOR] android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false"
- /res/layout/status_bar_recent_item.xml and make the following changes:
Code:
<?xml version="1.0" encoding="utf-8"?>
[COLOR="Red"]<FrameLayout android:paddingTop="@dimen/status_bar_recents_item_padding" android:paddingBottom="@dimen/status_bar_recents_item_padding" android:layout_width="fill_parent" android:layout_height="wrap_content"
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>
<ImageView android:gravity="center_horizontal" android:id="@id/app_icon" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="405.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" />
<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="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="3.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" />[/COLOR]
</RelativeLayout>
</FrameLayout>
- /res/layout/tw_status_bar_recent_panel.xml:
Code:
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
[COLOR="Red"]<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_centerVertical="true">
<ImageView android:gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="0.0dip" android:src="@drawable/status_bar_recents_background" />
<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="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" />[/COLOR]
<LinearLayout android:layout_gravity.......................
- /res/layout-land/status_bar_recent_item.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
[COLOR="Red"]<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:paddingTop="40.0dip" android:layout_width="192.0dip" android:layout_height="305.0dip" android:scaleType="centerInside" />
</FrameLayout>
<ImageView android:gravity="center_horizontal" android:id="@id/app_icon" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="225.0dip" android:scaleType="centerInside" android:adjustViewBounds="true" android:maxWidth="20.0dip" android:maxHeight="20.0dip" />
<TextView android:textSize="12.0dip" 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="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="0.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="none" android:fadingEdgeLength="0.0dip" 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="3.0dip" android:scrollHorizontally="true" android:singleLine="true" android:layout_below="@id/app_label" android:layout_alignParentBottom="true" />[/COLOR]
</RelativeLayout>
</FrameLayout>
- /res/layout-land/tw_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">
[COLOR="Red"]<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_centerVertical="true">
<ImageView android:gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="0.0dip" android:src="@drawable/status_bar_recents_background" />
<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="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" />[/COLOR]
<LinearLayout android:layout_gravity..........................
Download the png files needed for the background wallpaper recent app here.
Extract them to /res/drawable-nodpi/.
3. - smali/com/android/systemui/recent/RecentsPanelView.smali:
Inspect and make the following changes - (only in 4.2.2 firmwares)
(For 4.3 firmwares, refer to link below)
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 783
if-eqz p2, :cond_4
.line 787
const/16 v26, 0x4
.line 789
.local v26, reflectionGap:I
invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getWidth()I
move-result v6
.line 780
.local v6, width:I
invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getHeight()I
move-result v24
.line 782
.local v24, height:I
new-instance v8, Landroid/graphics/Matrix;
invoke-direct {v8}, Landroid/graphics/Matrix;-><init>()V
.line 783
.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 785
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 786
.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 788
.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 789
.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 800
new-instance v14, Landroid/graphics/Paint;
invoke-direct {v14}, Landroid/graphics/Paint;-><init>()V
.line 801
.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 802
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 804
new-instance v25, Landroid/graphics/Paint;
invoke-direct/range {v25 .. v25}, Landroid/graphics/Paint;-><init>()V
.line 805
.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 808
.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 809
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 810
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 813
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 817
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 820
:cond_0
move-object/from16 v0, p0
iget-boolean v3, v0, Lcom/android/systemui/recent/RecentsPanelView;->mFitThumbnailToXY:Z
if-eqz v3, :cond_5
.line 821
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 830
: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 831
if-eqz p4, :cond_2
.line 833
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, 0x7f05000c
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 837
: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 839
: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 841
.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 823
.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 824
.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 825
.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 826
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 827
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
For 4.3 firmwares, go here: http://forum.xda-developers.com/showpost.php?p=48163246&postcount=15
Compile back the SystemUI.apk and flash the 2 files.
That's it.
Special thanks to mnemonyc and grgsiocl for the informative guides in CM10.1 and note 2.
Press the thanks button if this mod has made your day.
{
"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"
}
@Maanz, thank you very much for this detailed guide on how to do this! I had this mod on my S2 with ICS, great to have it back on S4 with JellyBean!
Thanks a lot!!
Getting there... But not yet quite yet... I got it to work fine in landscape, but in portrait it shows only one app and the scrolling is up/down wards instead of sideways..
Maanz, you have any idea?
The smalicode changes must be ok, I must have forgot something in layout files:silly:
I'm waiting for: [How-to] HTC Sense on S4 .Good job anyway.
Ok, I got it to work fully. The reason it didn't work before was because I forgot a part in layout/tw_status_bar_recent_panel.xml
Also I want to point out the systemui wouldn't recompile, because android:id="@id/recents_clear" was added by you in tw_status_bar_recent_panel.xml and tw_status_bar_recent_panel.xml, but wasn't added as an id in values/ids.
So I added it there and then the apk did recompile.
But there's no "clears recents" button, so
I guess it's just an old leftover id, leftover from ICS perhaps..
Solution from above, adding <item type="id" name="recents_clear" /> to res/values/ids solves the compiling error..
Thanks again for this great guide!!
The Undertakerr said:
Ok, I got it to work fully. The reason it didn't work before was because I forgot a part in layout/tw_status_bar_recent_panel.xml
Also I want to point out the systemui wouldn't recompile, because android:id="@id/recents_clear" was added by you in tw_status_bar_recent_panel.xml and tw_status_bar_recent_panel.xml, but wasn't added as an id in values/ids.
So I added it there and then the apk did recompile.
But there's no "clears recents" button, so
I guess it's just an old leftover id, leftover from ICS perhaps..
Solution from above, adding <item type="id" name="recents_clear" /> to res/values/ids solves the compiling error..
Thanks again for this great guide!!
Click to expand...
Click to collapse
Thanks for pointing that, mate. I forgotten to add that to OP
I have added above..
Cheers.
It also works very beautifully with MGA 3minit3.1.1
I did set status_bar_recents_background to #00000000 to make background transparent. Looks nice! See here:
Thanks again for the guide, very happy with it!!
The Undertakerr said:
It also works very beautifully with MGA 3minit3.1.1
I did set status_bar_recents_background to #00000000 to make background transparent. Looks nice! See here:
Thanks again for the guide, very happy with it!!
Click to expand...
Click to collapse
:good:
I have been doing this mod on my S2 project (see my signature).
but anyways, glad u like it, mate.
maanz said:
:good:
I have been doing this mod on my S2 project (see my signature).
but anyways, glad u like it, mate.
Click to expand...
Click to collapse
Like it a lot, can't thank you enough for this detailed guide!
You did made my "android" day like you said you would in first post!!
Verstuurd van mijn GT-I9505 met Tapatalk
Is there any possibility to add these two modified files to op as a download as there are many of us who are not able to compile and/or decompile?
Is this guide only working in TW rom or Google SE too?
Gesendet von meinem GT-I9505G mit Tapatalk 2
Amazing guide. Great work Maanz.
Sent from my GT-I9505 using xda premium
xcsvxangelx said:
Is there any possibility to add these two modified files to op as a download as there are many of us who are not able to compile and/or decompile?
Is this guide only working in TW rom or Google SE too?
Gesendet von meinem GT-I9505G mit Tapatalk 2
Click to expand...
Click to collapse
u have to diffs the files on both roms.
sorry to ask as this is not my device but thought you maybe able to help plz. i have a i9500 so its close and im on mk8 4.3 and almost got this working. on landscape it works fine but vertical recent apps still come from top to bottom. any advice plz
bombaybadboy said:
sorry to ask as this is not my device but thought you maybe able to help plz. i have a i9500 so its close and im on mk8 4.3 and almost got this working. on landscape it works fine but vertical recent apps still come from top to bottom. any advice plz
Click to expand...
Click to collapse
Hi.
I havent test and mod on 4.3 firmwares yet.
I will start doing later today and update OP when I finish testing.
Cheers.
Sent from my GT-I9505 using Tapatalk
Update...
For 4.3 firmwares:
3. - smali/com/android/systemui/recent/RecentsPanelView.smali:
Inspect and make the following changes - (only in 4.3 firmwares)
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 825
if-eqz p2, :cond_4
.line 830
const/16 v26, 0x4
.line 833
.local v26, reflectionGap:I
invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getWidth()I
move-result v6
.line 834
.local v6, width:I
invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getHeight()I
move-result v24
.line 836
.local v24, height:I
new-instance v8, Landroid/graphics/Matrix;
invoke-direct {v8}, Landroid/graphics/Matrix;-><init>()V
.line 837
.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 839
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 840
.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 842
.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 843
.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 844
new-instance v14, Landroid/graphics/Paint;
invoke-direct {v14}, Landroid/graphics/Paint;-><init>()V
.line 845
.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 846
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 848
new-instance v25, Landroid/graphics/Paint;
invoke-direct/range {v25 .. v25}, Landroid/graphics/Paint;-><init>()V
.line 849
.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 853
.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 854
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 855
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 858
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 862
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 865
:cond_0
move-object/from16 v0, p0
iget-boolean v3, v0, Lcom/android/systemui/recent/RecentsPanelView;->mFitThumbnailToXY:Z
if-eqz v3, :cond_5
.line 866
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 875
: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 876
if-eqz p4, :cond_2
.line 878
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, 0x7f05000c
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 882
: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 885
: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 887
.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 868
.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 869
.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 870
.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 871
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 872
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
The steps in 1 and 2 remain unchanged.
@bombaybadboy
I have tested and it works well on my MJ9 rom.
I have just posted new RecentPanelView smali guide for 4.3 firmwares.
There may be an error in yr res\layout\tw_status_bar_recent_panel_.xml.
Please re-inspect the files again.
Cheers.
maanz "L" said:
@bombaybadboy
I have tested and it works well on my MJ9 rom.
I have just posted new RecentPanelView smali guide for 4.3 firmwares.
There may be an error in yr res\layout\tw_status_bar_recent_panel_.xml.
Please re-inspect the files again.
Cheers.
Click to expand...
Click to collapse
Thankyou for taking the time to help me maanz and when I get on my pc later today I will try again. Everything looked fine except vertical scrolled down instead of across. Im sure its a mistake I have made somewhere due to slightly different code on my i9500.
edit working now thankyou
Sent from my GT-I9500
can you share modified SystemUI with Sense Recent App to us, please.. i need it to compare the source code in smali file to my T311..
faruqmunshif said:
can you share modified SystemUI with Sense Recent App to us, please.. i need it to compare the source code in smali file to my T311..
Click to expand...
Click to collapse
Hi.
The smali file for the RecentsPanelView is in the OP.
U can diffs it with yr T311 RecentsPanelView.smali.
Cheers.
Flat thumbnails (no 3D)
Hi guys,
First thanks a lot Mannz "L" for this tutorial !
However, in my case, the thumbnails appear flat when your snapshots show them in "3D"...
Any idea what I did wrong, and in which modified file should I look at ?
Also I guess my thumnbails are smaller than yours... (I checked the dimens.xml was changed correctly)
Thanks and regards