[Tutorial] Sense 5 Prism Mods [All Themers Post your Prism Mods] - One (M7) Themes and Apps

Hey what's up everyone? I've just picked up my One & started modding right away. Here's some mods you can do to Prism.apk ( Sense Launcher ).​
first off you need to learn to use apktool or apkmanager, google search & learn how to mod apps first.
First mod is a custom image as your app drawer background
Decompile prism.apk and go to​
res/layout/all_apps_pagedview.xml
look for this line
Code:
<com.htc.launcher.pageview.AllAppsPagedView android:id="@id/all_apps_paged_view"
add a background tag like this
Code:
<com.htc.launcher.pageview.AllAppsPagedView android:background="@drawable/appdrawer_background" android:id="@id/all_apps_paged_view"
next put your custom image named appdrawer_background.png into the drawable-xxhdpi folder & recompile your apk
*****************************************
Next is Transparent app drawer background
This one is kinda difficult, but there is an easier method posted here http://forum.xda-developers.com/showpost.php?p=40555206&postcount=16
thanks Ajthescot for sharing
4.1.2 method
decompile Prism.apk and go to /smali/com/htc/launcher
find Launcher.Smali
and look for this method
Code:
.method public updateWallpaperVisibility(Z)V
.locals 8
const/4 v3, 0x0
const/high16 v2, 0x10
iget-boolean v4, p0, Lcom/htc/launcher/Launcher;->m_bAttached:Z
if-nez v4, :cond_1
const-string v2, "Launcher"
const-string v3, "updateWallpaperVisibility - not attached"
invoke-static {v2, v3}, Lcom/htc/launcher/util/Logger;->d(Ljava/lang/String;Ljava/lang/String;)V
:cond_0
:goto_0
return-void
:cond_1
invoke-virtual {p0}, Lcom/htc/launcher/Launcher;->isAddToHomeVisible()Z
move-result v4
if-eqz v4, :cond_2
const/4 p1, 0x1
:cond_2
if-eqz p1, :cond_3
move v1, v2
:goto_1
invoke-virtual {p0}, Lcom/htc/launcher/Launcher;->getWindow()Landroid/view/Window;
move-result-object v4
invoke-virtual {v4}, Landroid/view/Window;->getAttributes()Landroid/view/WindowManager$LayoutParams;
move-result-object v4
iget v4, v4, Landroid/view/WindowManager$LayoutParams;->flags:I
and-int v0, v4, v2
if-eq v1, v0, :cond_0
const-string v4, "Launcher"
const-string v5, "updateWallpaperVisibility: %s"
const/4 v6, 0x1
new-array v6, v6, [Ljava/lang/Object;
invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v7
aput-object v7, v6, v3
invoke-static {v4, v5, v6}, Lcom/htc/launcher/util/Logger;->i(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
invoke-virtual {p0}, Lcom/htc/launcher/Launcher;->getWindow()Landroid/view/Window;
move-result-object v3
invoke-virtual {v3, v1, v2}, Landroid/view/Window;->setFlags(II)V
goto :goto_0
:cond_3
move v1, v3
goto :goto_1
.end method
delete this entire method, next use notepad ++ to search for
Code:
updateWallpaperVisibility
remove all lines containing that
example :
Code:
invoke-virtual {v0, v4}, Lcom/htc/launcher/Launcher;->updateWallpaperVisibility(Z)V
next go to Launcher$20.Smali
and again search for
Code:
updateWallpaperVisibility
remove all lines like this
Code:
invoke-virtual {v0, v4}, Lcom/htc/launcher/Launcher;->updateWallpaperVisibility(Z)V
next go to Launcher$24.Smali
do the same as the above file
next go to Workspace.smali
do the same as the above two files
last file in smali is
DragLayer.Smali
search for this
Code:
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 5
const/4 v4, 0x0
const/4 v3, 0x0
invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
const/4 v1, 0x2
new-array v1, v1, [I
iput-object v1, p0, Lcom/htc/launcher/DragLayer;->m_naTmpXY:[I
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
iput-object v1, p0, Lcom/htc/launcher/DragLayer;->m_resizeFrames:Ljava/util/ArrayList;
iput-object v3, p0, Lcom/htc/launcher/DragLayer;->m_dropAnim:Landroid/animation/ValueAnimator;
iput-object v3, p0, Lcom/htc/launcher/DragLayer;->m_fadeOutAnim:Landroid/animation/ValueAnimator;
new-instance v1, Landroid/view/animation/DecelerateInterpolator;
const/high16 v2, 0x3fc0
invoke-direct {v1, v2}, Landroid/view/animation/DecelerateInterpolator;-><init>(F)V
iput-object v1, p0, Lcom/htc/launcher/DragLayer;->m_cubicEaseOutInterpolator:Landroid/animation/TimeInterpolator;
iput-object v3, p0, Lcom/htc/launcher/DragLayer;->m_dropView:Lcom/htc/launcher/DragView;
iput v4, p0, Lcom/htc/launcher/DragLayer;->m_nAnchorViewInitialScrollX:I
iput-object v3, p0, Lcom/htc/launcher/DragLayer;->m_anchorView:Landroid/view/View;
iput-boolean v4, p0, Lcom/htc/launcher/DragLayer;->m_bHoverPointClosesFolder:Z
new-instance v1, Landroid/graphics/Rect;
invoke-direct {v1}, Landroid/graphics/Rect;-><init>()V
iput-object v1, p0, Lcom/htc/launcher/DragLayer;->m_rectHit:Landroid/graphics/Rect;
const/4 v1, 0x1
iput-boolean v1, p0, Lcom/htc/launcher/DragLayer;->m_bHotseatVisible:Z
const/high16 v1, 0x3f80
iput v1, p0, Lcom/htc/launcher/DragLayer;->m_fBackgroundAlpha:F
new-instance v1, Landroid/graphics/Rect;
invoke-direct {v1}, Landroid/graphics/Rect;-><init>()V
iput-object v1, p0, Lcom/htc/launcher/DragLayer;->m_rectBackground:Landroid/graphics/Rect;
new-instance v0, Lcom/htc/launcher/FillColorFastBitmapDrawable;
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v2, 0x7f020002
invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v1
check-cast v1, Landroid/graphics/drawable/BitmapDrawable;
invoke-virtual {v1}, Landroid/graphics/drawable/BitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;
move-result-object v1
const/high16 v2, -0x100
invoke-direct {v0, v1, v2}, Lcom/htc/launcher/FillColorFastBitmapDrawable;-><init>(Landroid/graphics/Bitmap;I)V
invoke-virtual {p0, v0}, Lcom/htc/launcher/DragLayer;->setBackground(Landroid/graphics/drawable/Drawable;)V
invoke-virtual {p0, v4}, Lcom/htc/launcher/DragLayer;->setMotionEventSplittingEnabled(Z)V
return-void
.end method
look for the line I have marked here & change it as I have Told
Code:
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 5
const/4 v4, 0x0
const/4 v3, 0x0
invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
const/4 v1, 0x2
new-array v1, v1, [I
iput-object v1, p0, Lcom/htc/launcher/DragLayer;->m_naTmpXY:[I
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
iput-object v1, p0, Lcom/htc/launcher/DragLayer;->m_resizeFrames:Ljava/util/ArrayList;
iput-object v3, p0, Lcom/htc/launcher/DragLayer;->m_dropAnim:Landroid/animation/ValueAnimator;
iput-object v3, p0, Lcom/htc/launcher/DragLayer;->m_fadeOutAnim:Landroid/animation/ValueAnimator;
new-instance v1, Landroid/view/animation/DecelerateInterpolator;
const/high16 v2, 0x3fc0
invoke-direct {v1, v2}, Landroid/view/animation/DecelerateInterpolator;-><init>(F)V
iput-object v1, p0, Lcom/htc/launcher/DragLayer;->m_cubicEaseOutInterpolator:Landroid/animation/TimeInterpolator;
iput-object v3, p0, Lcom/htc/launcher/DragLayer;->m_dropView:Lcom/htc/launcher/DragView;
iput v4, p0, Lcom/htc/launcher/DragLayer;->m_nAnchorViewInitialScrollX:I
iput-object v3, p0, Lcom/htc/launcher/DragLayer;->m_anchorView:Landroid/view/View;
iput-boolean v4, p0, Lcom/htc/launcher/DragLayer;->m_bHoverPointClosesFolder:Z
new-instance v1, Landroid/graphics/Rect;
invoke-direct {v1}, Landroid/graphics/Rect;-><init>()V
iput-object v1, p0, Lcom/htc/launcher/DragLayer;->m_rectHit:Landroid/graphics/Rect;
const/4 v1, 0x1
iput-boolean v1, p0, Lcom/htc/launcher/DragLayer;->m_bHotseatVisible:Z
const/high16 v1, 0x3f80
iput v1, p0, Lcom/htc/launcher/DragLayer;->m_fBackgroundAlpha:F
new-instance v1, Landroid/graphics/Rect;
invoke-direct {v1}, Landroid/graphics/Rect;-><init>()V
iput-object v1, p0, Lcom/htc/launcher/DragLayer;->m_rectBackground:Landroid/graphics/Rect;
new-instance v0, Lcom/htc/launcher/FillColorFastBitmapDrawable;
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v2, 0x7f020002
invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v1
check-cast v1, Landroid/graphics/drawable/BitmapDrawable;
invoke-virtual {v1}, Landroid/graphics/drawable/BitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;
move-result-object v1
>>>>>>>>> const/high16 v2, -0x100 <<<< Change from ORIGINAL VALUE to this const/high16 v2, 0x0 >>>>
invoke-direct {v0, v1, v2}, Lcom/htc/launcher/FillColorFastBitmapDrawable;-><init>(Landroid/graphics/Bitmap;I)V
invoke-virtual {p0, v0}, Lcom/htc/launcher/DragLayer;->setBackground(Landroid/graphics/drawable/Drawable;)V
invoke-virtual {p0, v4}, Lcom/htc/launcher/DragLayer;->setMotionEventSplittingEnabled(Z)V
return-void
.end method
Next on to the easy part
res/layouts/feed_view.xml
top line add a background tag like this
Code:
<com.htc.launcher.feeds.view.FeedScrollView android:background="@drawable/blinkfeed_background" android:layout_width="fill_parent" android:layout_height="fill_parent"
add blinkfeed_background.png in drawable-xxhdpi set as you like (mine is solid black)
res/layout/all_apps_pagedview.xml
look for this line
Code:
<com.htc.launcher.pageview.AllAppsPagedView android:id="@id/all_apps_paged_view"
add a background tag like this
Code:
<com.htc.launcher.pageview.AllAppsPagedView android:background="@drawable/appdrawer_background" android:id="@id/all_apps_paged_view"
next put your custom image that is set to your desired level of transparency named appdrawer_background.png into the drawable-xxhdpi folder.
last thing is find automotive_common_app_bkg_top.jpeg & make it 100% transparent & save as a png, then delete the jpeg copy out of the apk
*
For 4.2.2 you can use my method above or Aj's method, both work fine BUT you need to add a tiny bit more code to make it look 100%
go to smali/com/htc/launcher/pageview/AllAppsPagedViewHost.smali find line 85 where it says
Code:
const/high16 v2, -0x100
change it to
Code:
const/high16 v2, 0x0
now recompile your app & Enjoy your transparent app drawer
**************************************************
Next mod, have 7 pages set for use
first go to res/layout/Workspace_page_thumbnail_container.xml
add this to it twice
Code:
<include layout="@layout/workspace_page_thumbnail" />
<include layout="@layout/workspace_page_thumbnail" />
next go to Workspace_pages.xml
add this
Code:
<include android:id="@id/cell0" layout="@layout/workspace_screen" />
and
Code:
<include android:id="@id/cell5" layout="@layout/workspace_screen" />
Next go to res/layout/workspace_page_protected.xml
add this
Code:
<include android:id="@id/cell5" layout="@layout/workspace_screen" />
next go to res/values/ids.xml
add this
Code:
<item type="id" name="cell5">false</item>
next go to smali/com/htc/launcher/model/PagesManager.Smali
find this method & change it as I have marked
Code:
.method private constructor <init>(Landroid/content/Context;)V
.locals 2
const/4 v1, 0x0
invoke-direct/range {p0 .. p0}, Ljava/lang/Object;-><init>()V
iput v1, p0, Lcom/htc/launcher/model/PagesManager;->m_nHomeIndex:I
<<<< const/4 v0, 0x6 <<<<< original value const/4 v0, 0x4 >>>>>>>>>>
iput v0, p0, Lcom/htc/launcher/model/PagesManager;->m_nPageCount:I
iput v1, p0, Lcom/htc/launcher/model/PagesManager;->m_nFeedIndex:I
const/4 v0, 0x1
iput v0, p0, Lcom/htc/launcher/model/PagesManager;->m_nWorkspaceId:I
sget-object v0, Lcom/htc/launcher/model/PagesManager$DefaultViewMode;->Feed:Lcom/htc/launcher/model/PagesManager$DefaultViewMode;
iput-object v0, p0, Lcom/htc/launcher/model/PagesManager;->m_defaultViewMode:Lcom/htc/launcher/model/PagesManager$DefaultViewMode;
const/4 v0, 0x0
iput-object v0, p0, Lcom/htc/launcher/model/PagesManager;->m_Handler:Landroid/os/Handler;
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lcom/htc/launcher/model/PagesManager;->m_observerList:Ljava/util/List;
iput-object p1, p0, Lcom/htc/launcher/model/PagesManager;->m_context:Landroid/content/Context;
new-instance v0, Landroid/os/Handler;
invoke-direct {v0}, Landroid/os/Handler;-><init>()V
iput-object v0, p0, Lcom/htc/launcher/model/PagesManager;->m_Handler:Landroid/os/Handler;
return-void
.end method
next method
Code:
.method public getMaxPageCount()I
.locals 1
const/4 v0, 0x7 <<<<<<<< change from const/4 v0, 0x5 >>>>>>
return v0
.end method
next go to smali/com/htc/launcher/model/WorkspaceConfiguration.smali
find this
Code:
.field public static final DEFAULT_PAGE_COUNT:I = 0x4
change it to this
Code:
.field public static final DEFAULT_PAGE_COUNT:I = 0x6
find this
Code:
.field private static final MAX_PAGES:I = 0x5
change it to this
Code:
.field private static final MAX_PAGES:I = 0x7
Now find this method & change it as I have marked
Code:
.method public constructor <init>()V
.locals 2
const/4 v1, 0x0
invoke-direct/range {p0 .. p0}, Ljava/lang/Object;-><init>()V
<< const/4 v0, 0x6 <<<< original value is this const/4 v0, 0x4
iput v0, p0, Lcom/htc/launcher/model/WorkspaceConfiguration;->m_nPageCount:I
iput v1, p0, Lcom/htc/launcher/model/WorkspaceConfiguration;->m_nHomeIndex:I
iput v1, p0, Lcom/htc/launcher/model/WorkspaceConfiguration;->m_nFeedIndex:I
return-void
.end method
last method for this file
Code:
.method public getMaxPageCount()I
.locals 1
const/4 v0, 0x7 <<<< Change from original of const/4 v0, 0x5 >>>>>
return v0
.end method
last edit go to smali/com/htc/launcher/Launcher.smali
change this
Code:
.field static final SCREEN_COUNT:I = 0x5
to this
Code:
.field static final SCREEN_COUNT:I = 0x7
recompile your apk & enjoy 7 pages of widgets
That's all I have for now, I'll update the thread as I learn more
CREDITS
Onepagebook
*Ajthescot
​

Thanks, a lot of people don't like to share their knowledge these days

Rayford, will you theme an upcoming Viper Rom ?
PS: Please do !

Great job!!!!!

nice bro, there are still a lot
I just got my home pages turned to 7..
Should you need to declare drawable ID in public.xml for the appdrawer back ground?

Onepagebook said:
nice bro, there are still a lot
I just got my home pages turned to 7..
Should you need to declare drawable ID in public.xml for the appdrawer back ground?
Click to expand...
Click to collapse
Share your findings on the apk, I'll add it to the op And no need to add any public id, it will build it's id when it compiles.

rayford85 said:
Share your findings on the apk, I'll add it to the op And no need to add any public id, it will build it's id when it compiles.
Click to expand...
Click to collapse
YGPM bro

Kevin & Nick @ it again love you guys, and as always love your work.

yeah..still more to come, I receive lots of help from Nick and my TW friend, ici, as well. Thanks buddy

added a mod to have 7 pages set for widgets etc. instead of the default 5. Thanks to Onepagebook.

wich programs we need to decomplie apk ?
I like to have trasparent prism for my ARHD rom and read your instruction ....
I don't think to be able
but ... wanna try
hope you help me
tks mate

jonata said:
wich programs we need to decomplie apk ?
I like to have trasparent prism for my ARHD rom and read your instruction ....
I don't think to be able
but ... wanna try
hope you help me
tks mate
Click to expand...
Click to collapse
I'm not gonna teach you how to do it.
No one taught me. You just gotta keep messing with it till you figure it out. Here is a link to get you started http://forum.xda-developers.com/showthread.php?t=1891686 thats just one guide, google search for other ones. There all over the web.

rayford85 said:
I'm not gonna teach you how to do it.
No one taught me. You just gotta keep messing with it till you figure it out. Here is a link to get you started http://forum.xda-developers.com/showthread.php?t=1891686 thats just one guide, google search for other ones. There all over the web.
Click to expand...
Click to collapse
ok , try to learn

lex_is300 dased14 and myself have done the transparent app drawer we have taken some slack for not releasing it yet but we were trying to perfect it before releasing.
5x6 layouts needed a bit of dimen tweakage to stop icons overlaping dock icons
the custom bg did not fill dock area if you have trans dock
thats fixed.
i shall post my method here in a few as lex_is300 and dased14 have different setups.
in the meantime
heres my dock setup
i use 5 icons plus appdrawer icon
increase docked icon count
my layout
values integers.xml
Code:
<integer name="hotseat_cell_count">5</integer>
changed to
Code:
<integer name="hotseat_cell_count">6</integer>
values/dimens.xml
reduce padding
Code:
<dimen name="button_bar_width_left_padding">16.0dip</dimen>
<dimen name="button_bar_width_right_padding">16.0dip</dimen>
changed to
Code:
<dimen name="button_bar_width_left_padding">2.0dip</dimen>
<dimen name="button_bar_width_right_padding">2.0dip</dimen>
move dock icon position
values integers.xml
Code:
<integer name="hotseat_all_apps_index">4</integer>
changed to
Code:
<integer name="hotseat_all_apps_index">5</integer>
{
"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"
}

Ajthescot said:
lex_is300 dased14 and myself have done the transparent app drawer we have taken some slack for not releasing it yet but we were trying to perfect it before releasing.
5x6 layouts needed a bit of dimen tweakage to stop icons overlaping dock icons
the custom bg did not fill dock area if you have trans dock
thats fixed.
i shall post my method here in a few as lex_is300 and dased14 have different setups.
in the meantime
heres my dock setup
i use 5 icons plus appdrawer icon
increase docked icon count
my layout
values integers.xml
Code:
<integer name="hotseat_cell_count">5</integer>
changed to
Code:
<integer name="hotseat_cell_count">6</integer>
values/dimens.xml
reduce padding
Code:
<dimen name="button_bar_width_left_padding">16.0dip</dimen>
<dimen name="button_bar_width_right_padding">16.0dip</dimen>
changed to
Code:
<dimen name="button_bar_width_left_padding">2.0dip</dimen>
<dimen name="button_bar_width_right_padding">2.0dip</dimen>
move dock icon position
values integers.xml
Code:
<integer name="hotseat_all_apps_index">4</integer>
changed to
Code:
<integer name="hotseat_all_apps_index">5</integer>
Click to expand...
Click to collapse
Thanks for sharing. I'm real curious to see how you guys did the app drawer transparent. It was a nightmare to figure out
Sent from my HTC One using xda premium

credits to lex_is300 dased14 and myself we have had transparent app drawer for couple of weeks but wanted to perfect it more before releasing it
like the op we all have different methods but this is my personal take on it.
this is my edits based on 5x6 app drawer
all dimen edits are based on this
if you use this mod please give credits to lex_is300 dased14 and myself
layouts .xmls​hotseat.xml
Code:
<ImageView android:layout_gravity="bottom|center" android:layout_width="wrap_content" android:layout_height="@dimen/button_bar_height_without_padding" android:src="@drawable/home_nav_bg" android:scaleType="fitXY" />
to
Code:
<ImageView android:layout_gravity="bottom|center" android:layout_width="wrap_content" android:layout_height="@dimen/button_bar_height_without_padding[COLOR="Red"]2[/COLOR]" android:src="@drawable/home_nav_bg" android:scaleType="fitXY" />
all_apps_paged_view.xml
Code:
<com.htc.launcher.pageview.AllAppsPagedViewHost android:id="@id/all_apps_paged_view_frame" android:layout_width="fill_parent" android:layout_height="fill_parent"
to
Code:
<com.htc.launcher.pageview.AllAppsPagedViewHost android:id="@id/all_apps_paged_view_frame" [COLOR="red"]android:background="@drawable/custom"[/COLOR] android:layout_width="fill_parent" android:layout_height="fill_parent"
values xmls​this edits fills the dock area with the custom bg for those with trans dock.
dimens.xml
Code:
<dimen name="button_bar_height_without_padding">55.0dip</dimen>
to
Code:
<dimen name="button_bar_height_without_padding">[COLOR="Red"]0.0dip[/COLOR]</dimen>
add this new line
Code:
<dimen name="button_bar_height_without_padding2">55.0dip</dimen>
styles.xml​<style name="DropTargetBar">
add this
Code:
<item name="android:background">#98000000</item>
edit to suit your level of transparency​
smali​
com/android/htc/launcher
line numbers based on vts layout
Draglayer.smali
line 195 on 1.28 base
or line 156 on 1.29.401.12 base
const/high16 v2, -0x100
change to
const/high16 v2, 0x0
launcher.smali
line 21566 on 1.28 base
or line 15353 on 1.29.401.12 base
const/high16 v2, 0x10
change to
const/high16 v2, 0x0
line numbers may change on different versions of prism​
drawables xxhdpi​
add
custom backgound named custom.png
edit to your desired transparency
edit
automotive_common_app_bkg_top
to desired transparency this is blinkfeed and appdrawer clock bg
change home_nav_bg.jpg to home_nav_bg.png and edit transparency​
if using 5x6 appdrawer you are gonna have an ugly mess of icons overlapping with tranparent docks.
values dimens.xml​
Code:
<dimen name="config_allAppsTabbedPageLayoutPaddingTop">18.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingBottom">4.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingLeft">0.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingRight">0.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingTop_alt">35.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingBottom_alt">10.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingLeft_alt">0.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingRight_alt">0.0dip</dimen>
<dimen name="page_view_icon_cell_width">75.0dip</dimen>
<dimen name="page_view_icon_cell_height">90.0dip</dimen>
to
Code:
<dimen name="config_allAppsTabbedPageLayoutPaddingTop">18.5dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingBottom">35.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingLeft">16.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingRight">16.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingTop_alt">35.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingBottom_alt">50.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingLeft_alt">30.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingRight_alt">30.0dip</dimen>
<dimen name="allapps_edit_layout_page_spacing">100.0dip</dimen>
<dimen name="page_view_icon_cell_width">85.0dip</dimen>
<dimen name="page_view_icon_cell_height">87.0dip</dimen>
now the text may be overlaping or cut off screen
edit to your suited size
Code:
<dimen name="shortcut_label_l">12.0sp</dimen>
mine i have set to
Code:
<dimen name="shortcut_label_l">8.0sp</dimen>

Ajthescot said:
lex_is300 dased14 and myself have done the transparent app drawer we have taken some slack for not releasing it yet but we were trying to perfect it before releasing.
5x6 layouts needed a bit of dimen tweakage to stop icons overlaping dock icons
the custom bg did not fill dock area if you have trans dock
thats fixed.
i shall post my method here in a few as lex_is300 and dased14 have different setups.
in the meantime
heres my dock setup
i use 5 icons plus appdrawer icon
increase docked icon count
my layout
values integers.xml
Code:
<integer name="hotseat_cell_count">5</integer>
changed to
Code:
<integer name="hotseat_cell_count">6</integer>
values/dimens.xml
reduce padding
Code:
<dimen name="button_bar_width_left_padding">16.0dip</dimen>
<dimen name="button_bar_width_right_padding">16.0dip</dimen>
changed to
Code:
<dimen name="button_bar_width_left_padding">2.0dip</dimen>
<dimen name="button_bar_width_right_padding">2.0dip</dimen>
move dock icon position
values integers.xml
Code:
<integer name="hotseat_all_apps_index">4</integer>
changed to
Code:
<integer name="hotseat_all_apps_index">5</integer>
Click to expand...
Click to collapse
really beatifull !
my compliments ...... love this trasparent navbar !

nice work on the 5 icons dock ..
are those showing also on locksreen ???

Dougi said:
nice work on the 5 icons dock ..
are those showing also on locksreen ???
Click to expand...
Click to collapse
thanks bud lockscreen is still only 4

Ajthescot said:
thanks bud lockscreen is still only 4
Click to expand...
Click to collapse
thanks for the reply...
Sssuupp my men Ray how are you , nice OP there
Ray , do you think there are still M10 in sense 5 ??? i thought no, but after searching, reading and understanding the new sense 5 files , i'm now sure there are M10 files....
what do you think ?? .. ( this question goes out to all themers and advanced users.. )

Related

[HOW TO] AOSP Lock + Toggle| 3 Way Ext. Power Menu| CRT-OFF| Long Menu Press to Kill

Hy Guys! in my request to isolate all the codes in Smali files to enable Extended Power Menu, CRT-OF, Long Menu Press To Kill and AOSP Lockscreen working separately to implement in my ROM (crDroid ROM) i manage to found how to do it!
Updated 19.01.2013 = Working in latest XXELLC
Requirements :
- You need to know how to work with apktool, smali and baksmali stuffs.
- Notepad++
- 7-zip
WE WILL USE FOLLOING STEPS IN ALL 4 MODS
1 - You need to extract from inside the stock framework/ a file called android.policy.jar;
2 - Open android.policy.jar with 7-zip;
3 - Extract classes.dex from it;
2 - Decompile using baksmail commands;
3 - Once it's done Recompile using smali commands:
Click to expand...
Click to collapse
== AOSP Lockscreen with Toggle ==
Decompile android.policy.jar
Go to: com\android\internal\policy\impl\LockPatternKeyguardView.smali
Click to expand...
Click to collapse
Find this method
Code:
.method createLockScreen()Landroid/view/View;
And switch completely with this (Same method with new codes inside)
Code:
[left][color="blue"].method createLockScreen()Landroid/view/View;
.registers 7
.prologue
.line 1254
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "aosp_lock"
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-nez v0, :cond_1f
new-instance v0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/sec/CircleLockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
goto :goto_2e
.line 1260
:cond_1f
new-instance v0, Lcom/android/internal/policy/impl/LockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
.local v0, lockView:Landroid/view/View;
:goto_2e
invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->initializeTransportControlView(Landroid/view/View;)V
.line 1261
return-object v0
.end method[/color][/left]
It will create the AOSP lockscreen but with one issue. Adding only this "new" method will made the lockscreen unlockable using menu button;
So let's made some changes to fix this. There are 2 ways to fix it
1st way
Go to: com\android\internal\policy\impl\LockScreen.smali
Click to expand...
Click to collapse
Find and delete the red one
Code:
.field private mCreationOrientation:I
[color="red"]--- .field private mEnableMenuKeyInLockScreen:Z[/color]
.field private mEnableRingSilenceFallback:Z
Find and delete the red ones
Code:
[left].line 447
iput-object p5, p0, Lcom/android/internal/policy/impl/LockScreen;->mCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
.line 448
[color="red"]--- invoke-direct {p0}, Lcom/android/internal/policy/impl/LockScreen;->shouldEnableMenuKey()Z
--- move-result v0
--- iput-boolean v0, p0, Lcom/android/internal/policy/impl/LockScreen;->mEnableMenuKeyInLockScreen:Z[/color]
.line 449
iget v0, p2, Landroid/content/res/Configuration;->orientation:I[/left]
Find the method and delete completely
Code:
[left][color="red"].method public onKeyDown(ILandroid/view/KeyEvent;)Z
.registers 4
.parameter "keyCode"
.parameter "event"
.prologue
.line 541
const/16 v0, 0x52
if-ne p1, v0, :cond_d
iget-boolean v0, p0, Lcom/android/internal/policy/impl/LockScreen;->mEnableMenuKeyInLockScreen:Z
if-eqz v0, :cond_d
.line 542
iget-object v0, p0, Lcom/android/internal/policy/impl/LockScreen;->mCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-interface {v0}, Lcom/android/internal/policy/impl/KeyguardScreenCallback;->goToUnlockScreen()V
.line 544
:cond_d
const/4 v0, 0x0
return v0
.end method[/color][/left]
Recompile android.policy.jar and it's done!
AOSP Lockscreen Properly working
2nd way (Thanks to jimbo77)
Using this method we will need to decompile framework-res.apk
Go to: res/values/bools
Click to expand...
Click to collapse
Find and switch
Code:
[color="red"]--- <bool name="config_disableMenuKeyInLockScreen">false</bool>[/color]
[color="blue"]+++ <bool name="config_disableMenuKeyInLockScreen">true</bool>[/color]
Recompile framework-res.apk and it's done.
Lets put toggle in SecSettings.apk
decompile SecSettings.apk
Go to:res/values/strings
Click to expand...
Click to collapse
Add this at the end of the file, before close resources</resources>.
This 2 string bellow will be shown in settings, so feel free to change.
Code:
[left][color="blue"]+++ <string name="aosp">Jelly Bean (AOSP) Lockscreen</string>
+++ <string name="aosp_summary">Enable Original Jelly Bean Lockscreen</string>[/color]
[/left]
Go to: res/xml/Lockscreen_Settings.xml
Click to expand...
Click to collapse
Find and add
Code:
[left]<SwitchPreferenceScreen android:title="@string/lock_screen_shortcut_title" android:key="lock_screen_shortcut" android:summary="@string/lock_screen_shortcut_summary">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.lockscreenshortcut.LockScreenShortcutSettings" />
</SwitchPreferenceScreen>
[color="blue"]+++ <CheckBoxPreference android:title="@string/aosp" android:key="say_your_wakeup" android:summary="@string/aosp_summary" />[/color]
<SwitchPreferenceScreen android:title="@string/information_ticker" android:key="information_ticker" android:summary="@string/information_ticker_summary" android:fragment="com.android.settings.InformationTicker" />
[/left]
Go to: smali\com\android\settings\LockScreenSettings.smali
Click to expand...
Click to collapse
Find and add
Code:
[left].field private isWeatherEnabled:Z
[color="blue"]+++ .field private mAospLock:Landroid/preference/CheckBoxPreference;[/color]
.field private mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;[/left]
Find and Switch
Code:
[left]iput-object v0, p0, Lcom/android/settings/LockScreenSettings;->mMotionDialog:Landroid/app/AlertDialog;
[color="red"]--- const/16 v0, 0x8[/color]
[color="blue"]+++ const/16 v0, 0x11[/color]
new-array v0, v0, [I[/left]
Find and Switch
Code:
[left]invoke-virtual {v6, v3}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 294
:cond_3
[color="red"]--- iget-object v3, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/color]
[color="blue"]+++ iget-object v3, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/color]
if-eqz v3, :cond_4
.line 295
[color="red"]--- iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/color]
[color="blue"]+++ iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/color]
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
[color="red"]--- const-string v7, "wake_up_lock_screen"[/color]
[color="blue"]+++ const-string v7, "aosp_lock"[/color]
invoke-static {v3, v7, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I[/left]
Find and Switch
Code:
[left]const-string v8, "say_your_wakeup"
invoke-virtual {p0, v8}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v8
check-cast v8, Landroid/preference/CheckBoxPreference;
[color="red"]--- iput-object v8, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/color]
[color="blue"]+++ iput-object v8, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/color]
.line 212
iget-object v8, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
if-eqz v8, :cond_8[/left]
Find and Switch
Code:
[left]goto :goto_4
:cond_9
[color="red"]--- iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/color]
[color="blue"]+++ iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/color]
invoke-virtual {p2, v4}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_0
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
[color="red"]--- const-string v5, "wake_up_lock_screen"[/color]
[color="blue"]+++ const-string v5, "aosp_lock"[/color]
[color="red"]---iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/color]
[color="blue"]+++iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/color]
invoke-virtual {v6}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v6
if-eqz v6, :cond_a[/left]
Find Switch and delete
Code:
[left]
invoke-interface {v1}, Ljava/util/List;->size()I
move-result v8
if-ge v8, v9, :cond_f
.line 240
[color="red"]--- iget-object v8, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/color]
[color="blue"]+++ iget-object v8, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/color]
if-eqz v8, :cond_e
[color="red"]--- invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;[/color]
[color="red"]--- move-result-object v8[/color]
[color="red"]--- iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/color]
[color="red"]--- invoke-virtual {v8, v9}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z[/color]
:cond_e
if-eqz v6, :cond_f
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;[/left]
Recompile SecSettings.apk and it's done!
== 3 Way Extended Power Menu ==
Go to: com/android/internal/policy/impl/GlobalActions.smali
Click to expand...
Click to collapse
Find this
Code:
[LEFT].line 368
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$5;[/LEFT]
And switch with this
Code:
[LEFT][COLOR="Blue"].line 368
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$99;[/COLOR][/LEFT]
Find this
Code:
[LEFT]invoke-direct {v1, v0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$5;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V[/LEFT]
And switch with this
Code:
[LEFT][COLOR="Blue"]invoke-direct {v1, v0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$99;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V[/COLOR][/LEFT]
Now go to
com/android/internal/policy/impl/GlobalActions$SinglePressAction.smali
Click to expand...
Click to collapse
Find this
Code:
[LEFT].end annotation
# instance fields
.field private final mIconResId:I
.field private final mMessage:Ljava/lang/CharSequence;
.field private final mMessageResId:I
[/LEFT]
And between .end annotation and # instance fields, add this
Code:
[LEFT][COLOR="Blue"]# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;[/COLOR][/LEFT]
Find this
Code:
[LEFT]# direct methods
.method protected constructor <init>(II)V
.registers 4
.parameter "iconResId"
.parameter "messageResId"
[/LEFT]
And between # direct methods and .method protected constructor <init>(II)V, add this
Code:
[LEFT][COLOR="Blue"].method static constructor <clinit>()V
.registers 3
const/4 v0, 0x3
new-array v0, v0, [Ljava/lang/String;
const/4 v1, 0x0
const-string v2, "Reboot"
aput-object v2, v0, v1
const/4 v1, 0x1
const-string v2, "Download"
aput-object v2, v0, v1
const/4 v1, 0x2
const-string v2, "Recovery"
aput-object v2, v0, v1
sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
return-void
.end method[/COLOR][/LEFT]
To finalize Extended Power Menu you need to copy tree smali files (GlobalActions$99$1.smali, GlobalActions$99$2, and GlobalActions$1.smali) and paste then inside -> com/android/internal/policy/impl/
Recompile android.policy.jar using smali commands it's DONE!
== CRT OFF Animation ==
Follow the same procedure as android.policy.jar to decompile and extract classes.dex
Go to
Go to: com/android/internal/policy/impl/PhoneWindowManager.smali
Click to expand...
Click to collapse
find this
Code:
[LEFT]# interfaces
.implements Landroid/view/WindowManagerPolicy;
# annotations
[/LEFT]
Between .implements Landroid/view/WindowManagerPolicy and # annotations, add this
Code:
[LEFT][COLOR="Blue"].implements Ljava/lang/Runnable;[/COLOR][/LEFT]
find this
Code:
[LEFT].line 5938
.end local v9 #isAllowed:Z
.end local v16 #kioskMode:Landroid/app/enterprise/kioskmode/KioskMode;
:cond_66
:goto_66
return v19[/LEFT]
Between :goto_66 and return v19, add this
Code:
[LEFT][COLOR="Blue"]and-int/lit8 v0, v19, 0x4
if-eqz v0, :cond_71
and-int/lit8 v19, v19, -0x5
move-object/from16 v0, p0
invoke-virtual {v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->sleepDelay()V
:cond_71[/COLOR][/LEFT]
Go to the Bottom of the file and add this hole code
Code:
[LEFT][COLOR="Blue"].method public sleepDelay()V
.locals 10
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
const-wide v2, 0x64
check-cast p0, Ljava/lang/Runnable;
invoke-virtual {v0, p0, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
return-void
.end method
.method public run()V
.locals 10
.prologue
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const-string v1, "power"
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v2
const-wide/16 v6, 0x3e8
add-long/2addr v2, v6
invoke-virtual {v0, v2, v3}, Landroid/os/PowerManager;->goToSleep(J)V
return-void
.end method[/COLOR][/LEFT]
Now you can recompile android.policy.jar using smali commands.
Now
Extract services.jar from inside framework folder and follow the same procedure extract classes.dex and decompile it.
Go to
Go to: com/android/server/PowerMangerService$ScreenBrightnessAnimator.smali
Click to expand...
Click to collapse
find this
Code:
[LEFT]#getter for: Lcom/android/server/PowerManagerService;->mScreenBrightnessHandler:Landroid/os/Handler;
invoke-static {v7}, Lcom/android/server/PowerManagerService;->access$7300(Lcom/android/server/PowerManagerService;)Landroid/os/Handler;
move-result-object v7
const/16 v9, 0xa[/LEFT]
Between move-result-object v7 and const/16 v9, 0xa, add this
Code:
[LEFT][COLOR="Blue"]if-eqz p2, :cond_75
const/16 v9, 0xb
const/4 v10, 0x0
const v2, 0x10
invoke-virtual {v7, v9, v2, v10}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;
move-result-object v9
invoke-virtual {v9}, Landroid/os/Message;->sendToTarget()V
:cond_75[/COLOR][/LEFT]
Now you can recompile services.jar using apktool and smali commands
== Long Menu Press to Kill App ==
Follow the same procedure as android.policy.jar and services.jar to decompile and extract classes.dex again from android.policy.jar
Go to: com/android/internal/policy/impl/PhoneWindowManager.smali
Click to expand...
Click to collapse
find this
Code:
.line 1455
[COLOR="Red"]new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$8;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$8;-><init (Lcom/android/internal/policy/impl/PhoneWindowManager;)V[/COLOR]
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mMenuLongPress:Ljava/lang/Runnable;
change the red ones for blues under
Code:
[COLOR="Blue"]+ new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$MenuLongPress;
+ invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$MenuLongPress;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V[/COLOR]
Extract the PhoneWindowManager-file.zip attached, extract the file int it and copy to com/android/internal/policy/impl/
Recompile android.policy.jar using smali commands and it's done!
With this we will be able to add or remove this 4 mods from inside any other
CREDITS
For CRT OFF Animation method all the credits goes to Sorg. I've just follow his tutorial.
For part Extended Power Menu i like to thanks mgn2o
For part of AOSP Lockscreen i like to thanks Didact74
Nice, an EPM whitout Hot Reboot (mgn2o) thanks for reference ....
Enviado de meu GT-I9300 usando o Tapatalk 2
Excellent guide! Would love one for lockscreen media skip !! I cant find the source/guide anywhere !
Great guide.
It will be great:
Can you add how to decompile .odex such that we obtain .smali for editing ??
Thanks in advance mate.
Post updated with Long Menu Press to Kill for XXELK4
Akshay (Aky) said:
Great guide.
It will be great:
Can you add how to decompile .odex such that we obtain .smali for editing ??
Thanks in advance mate.
Click to expand...
Click to collapse
You can try to deodex a file, made the changes and re-odex.
I never try with odex. I only use roms deodexed and my (crDroid) in development is surely deodexed.
Take a look in here: CLICK
how to Inkeffect tutorial
One more thing, how to add the function "Long press volume key to jump muisc" in lockscreen mode? Thanks.
I'll definitely use this to add crt animation to the 4.1.2 ROM I have for the Sprint S2. Thanks!
Sent from my SPH-D710 using xda premium
Great job, Hoping this will become a central hub for source code ! Bookmarked for future use.. looking forward to future sources!
Would you please also add the mod for "long press volume key to skip song"? Thanks.
dongfangri said:
Would you please also add the mod for "long press volume key to skip song"? Thanks.
Click to expand...
Click to collapse
I'm working on this. Trying some kind of "reverse engineering" to spot the codes.
Great tutorial, for my first attempt at these types of edits, it made life very easy. Although i have a small problem. Ive made the edits so i can have extended power menu, crt off and any app multi window in my rom. Everything went smoothly but it seems that crt off is erratic. Sometimes it works and sometimes it does not. Any ideas?
Sent from my GT-I9300 using Tapatalk 2
anaraxia said:
Great tutorial, for my first attempt at these types of edits, it made life very easy. Although i have a small problem. Ive made the edits so i can have extended power menu, crt off and any app multi window in my rom. Everything went smoothly but it seems that crt off is erratic. Sometimes it works and sometimes it does not. Any ideas?
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
Well a never had this kind of problem.
Using Kernle Perseus, by the way? It seems to broke CRT.
Cristiano Matos said:
Well a never had this kind of problem.
Using Kernle Perseus, by the way? It seems to broke CRT.
Click to expand...
Click to collapse
No... Stock kernel. Keeping in simple
Sent from my GT-I9300 using Tapatalk 2
anaraxia said:
No... Stock kernel. Keeping in simple
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
There's a problem with the Stock kernel on the newest JB update (For both leak and official)
Try using Siyah's 1.8.3 and use the CRT Fix in the STweaks application.
---------- Post added at 11:15 AM ---------- Previous post was at 10:29 AM ----------
Thanks alot for this tutorial, very simple and straight to the point!
Lost.soul said:
There's a problem with the Stock kernel on the newest JB update (For both leak and official)
Try using Siyah's 1.8.3 and use the CRT Fix in the STweaks application.
Thanks for the help. Downloaded, flashed and tested. Works perfectly now. Will have to add it to my next release. Thanks again :thumbup:
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
Loved your post, but i have a question: is it possible to do this with gingerbread rom? is it the same procedure?
Também sou brasileiro, hehehe. Tem como tu me ajudar com algumas coisas?
Click to expand...
Click to collapse
Note II InkEffect Lockscreen
It is not compatible with Note II InkEffect Lockscreen Mod.
When I flash this mod (extended menu) the ink effect lockscreen stop working
thank you
anaraxia said:
Great tutorial, for my first attempt at these types of edits, it made life very easy. Although i have a small problem. Ive made the edits so i can have extended power menu, crt off and any app multi window in my rom. Everything went smoothly but it seems that crt off is erratic. Sometimes it works and sometimes it does not. Any ideas?
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
Can you confirm it works ONLY with Wifi On ? Seams like that on my try
in the service.jar...i have 2 times those codes...234, 264 something, so how do you choose where to insert your part ?
later edit:
Makes no diff where i add those it seams. Still CRT only works with WIFI on, its like a CRT SWICH haha...suppose "stuff" should be inserted differently on 4.1.2.

[MOD/GUIDE] Xperia Jelly Bean Style SystemUI | Customize Your Own Statusbar! [18/3]

Hi,
Well, I try to theme ICS systemui to Xperia JB style like Xperia Z.
But this so far the only I can do for now. I hope you guys like it.
More to come. Stay tuned.
Project Finished
Changelog
20/2: Initial release.
21/2: Fixed all statusbar background that cause FC on some user.
03/3: Style Z added. Change colour according to themes colour. (Special thanks to erorcun for the trick)
05/3: Style S added. Thanks to destroyy.
15/3: Special style added. Modified to look more like JB statusbar notification.
18/3: CM style added. Thanks to SpaceCaker.
Preview
{
"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"
}
Brand new statusbar background style.
Style 1
Style 2
Style 3 (Fullscreen)
Style 4
Style Z (Change Color According to Themes)
Style S (Change Color According to Themes)
Style ZN6 (Change Color According to Themes)
Style CM (Change Color According to Themes)
Note
1. Before installing this, please delete any quickpanel setting or systemuipreferences if you using tab systemui before. And delete systemui.odex if it present.
2. My systemui support smallapp.
3. Please PM me asking for permission first, if you want to incorporate it into your ROMs.
4. Style 1-4 is known to work for some user only. You need a luck for this
Instruction
1. Flash Universal_part_1.zip and reboot. Did the statusbar appear?
If it doesnt, probably there have problem with your rom. Flash stock rom via flashtool first.
2. If the statusbar appeared, continue to flash Style_x.zip via recovery.
3. Reboot you phone.
Credit
Niaboc79 for original xperia t systemui.
serajr for helping me in smali editing.
leloiboi for some tip and help.
Ticklefish for his tutorial.
erorcun for his trick to change colour according to theme.
destroyy for Sammy style.
SpaceCaker for CM style.
I'm do this for free. Damn... this take huge amount of time especially the smali editing.
Dont just know how to download and flash. Try appreciate my work by hit
.
[Guide/Tutorial] Customize Your Own Statusbar!
[Guide/Tutorial] Customize Your Own Statusbar!
Hi, again.
Some user keep PM'ing me how to change that, that and etc.
So I decide to do a simple guide to customize your own statusbar.
Make sure you have a basic knowledge to compile/decompile apk.
Change Statusbar Background Color
Decompile systemui.apk and navigate to SystemUI/res/values/drawables.xml and edit this line:
Code:
<item type="drawable" name="status_bar_background">#[COLOR="Red"]ff1a1a1a[/COLOR]</item>
Change red content to what ever you line. For more hex color reference, go here
For black color, change it to ff000000.
Save and compile back.
(This method only applicable for Style_Z and later version)
For style 1-4, change status_bar_background.png in drawable-hdpi folder.
Look for transparent statusbar? Go here.
Change Navigation Button Background Color
Decompile systemui.apk and navigate to SystemUI/res/layout/navigation_bar.xml and edit this line.
Code:
<com.android.systemui.statusbar.phone.NavigationBarView android:id="@id/nav_background" [COLOR="Red"]android:background="#ff000000"[/COLOR] android:layout_width="fill_parent" android:layout_height="fill_parent" android:directionality="none"
Change red content to what ever you line. For more hex color reference, go here
The original Xperia Z nav backgroud color is ff1a1a1a.
Save and compile back
Change Clock Colour on Statusbar
Decompile systemui.apk and navigate to SystemUI/res/layout/status_bar.xml and find this line:
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
And change it to this
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="#[COLOR="Red"]ff09afed[/COLOR]" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
Change the red content to what ever colour you like. For more hex color reference, go here
Remember! You can also change carrier label color, date, and etc. Just look respective line and xml.
Add Seconds To Statusbar Clock
Decompile systemui.apk and navigate to SystemUI/res/layout/status_bar.xml and find this line:
Code:
[COLOR="Blue"]<com.android.systemui.statusbar.policy.Clock[/COLOR] android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
And replace blue line above with following red line:
Code:
<[COLOR="Red"]DigitalClock[/COLOR] android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
Save change you have made and recompile back.
It easy, right?
Hide Clock,Battery Percentage and etc.
Hide clock.
Decompile systemui.apk and navigate to SystemUI/res/layout/status_bar.xml and find this line:
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
and change to this:
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" [COLOR="Red"]android:visibility="gone"[/COLOR] android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
Hide battery percentage
Find this line:
Code:
<TextView android:layout_gravity="left|center" android:id="@id/battery_text" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" />
change to this:
Code:
<TextView android:layout_gravity="left|center" android:id="@id/battery_text" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" [COLOR="Red"]android:visibility="gone"[/COLOR] />
Remember! Just added red word at the end of line you want to hide if you want to hide content on statusbar.
Add Battery Percentage On Statusbar.
Decompile systemui.apk and navigate to SystemUI/res/layout/status_bar.xml and find this line:
Code:
<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/signal_cluster_view" />
<ImageView android:id="@id/battery" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
And add red line below:
Code:
<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/signal_cluster_view" />
[COLOR="Red"]<TextView android:layout_gravity="left|center" android:id="@id/battery_text" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" />[/COLOR]
<ImageView android:id="@id/battery" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
Save change you have made. After that, look for this smali file:
PhoneStatusBar.smali
Code:
.line 358
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
const v9, 0x7f0e0028
invoke-virtual {v4, v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/ImageView;
invoke-virtual {v10, v9}, Lcom/android/systemui/statusbar/policy/BatteryController;->addIconView(Landroid/widget/ImageView;)V
and add red lines below:
Code:
.line 358
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
const v9, 0x7f0e0028
invoke-virtual {v4, v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/ImageView;
invoke-virtual {v10, v9}, Lcom/android/systemui/statusbar/policy/BatteryController;->addIconView(Landroid/widget/ImageView;)V
[COLOR="Red"].line 13
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
const v9, 0x7f0e0061
invoke-virtual {v4, v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/TextView;
invoke-virtual {v10, v9}, Lcom/android/systemui/statusbar/policy/BatteryController;->addLabelView(Landroid/widget/TextView;)V[/COLOR]
also change the const v9, 0x7f0e0061 to your own value, look for it inside public.xml
Recompile back and flash.
Temporary Hide Statusbar When We Pull SystemUI/Fullscreen (For Advanced User Only)
Find this smali file:
PhoneStatusBar.smali:
Here when the expanded view is about to become visible, we hide the main status bar view (red):
Code:
[B].method private makeExpandedVisible()V[/B]
.line 1194
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;
const/4 v1, 0x2
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/ExpandedView;->requestFocus(I)Z
.line 1195
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTrackingView:Lcom/android/systemui/statusbar/phone/TrackingView;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/TrackingView;->setVisibility(I)V
[COLOR="red"].line 1900
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const/4 v1, 0x4
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->setVisibility(I)V[/COLOR]
goto :goto_0
.end method
Here when the expanded view is gone, we show the main status bar view again (red):
Code:
[B].method performCollapse()V[/B]
.line 1278
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedDialog:Landroid/app/Dialog;
invoke-virtual {v0}, Landroid/app/Dialog;->getWindow()Landroid/view/Window;
move-result-object v0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedParams:Landroid/view/WindowManager$LayoutParams;
invoke-virtual {v0, v1}, Landroid/view/Window;->setAttributes(Landroid/view/WindowManager$LayoutParams;)V
.line 1279
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTrackingView:Lcom/android/systemui/statusbar/phone/TrackingView;
const/16 v1, 0x8
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/TrackingView;->setVisibility(I)V
[COLOR="Red"].line 1900
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->setVisibility(I)V[/COLOR]
.line 1281
iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDisabled:I
const/high16 v1, 0x2
and-int/2addr v0, v1
if-nez v0, :cond_2
.line 1282
const/4 v0, 0x1
const/high16 v1, 0x10a
invoke-virtual {p0, v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setNotificationIconVisibility(ZI)V
.line 1285
:cond_2
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpanded:Z
if-eqz v0, :cond_0
.line 1288
iput-boolean v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpanded:Z
.line 1289
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPostCollapseCleanup:Ljava/lang/Runnable;
if-eqz v0, :cond_0
.line 1290
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPostCollapseCleanup:Ljava/lang/Runnable;
invoke-interface {v0}, Ljava/lang/Runnable;->run()V
.line 1291
const/4 v0, 0x0
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPostCollapseCleanup:Ljava/lang/Runnable;
goto :goto_0
.end method
Now look for:
Code:
Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getHeight()I
You´ll get 6 matches/lines with something like:
Code:
invoke-virtual {v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getHeight()I
move-result v2
Insert red line (respect line spaces) only within following methods:
Code:
.method doAnimation()V
.method doRevealAnimation()V
.method getExpandedHeight(I)I
.method prepareTracking(IZ)V
.method updateExpandedViewPos(I)V
DON´T INSERT INSIDE THIS METHOD:
Code:
.method interceptTouchEvent(Landroid/view/MotionEvent;)Z
Code:
invoke-virtual {v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getHeight()I
move-result v2
[COLOR="red"]const/4 v2, 0x0[/COLOR]
(remember to change v2 to the same as "move-result v?")
Save and Compile. If you still got an error or force close on statusbar, just compare with style 3.
Change Color According to ThemeAccent Color (For Expert User Only)
Download the ThemeUtils.zip in attachment and extract it to smali/com/blah.../blah... You can put ThemeUtils.smali in any directory in smali folder. But when we want to run this file, we need to specific the directory where we put the file. For example,
I put in smali/com/sonymobile/systemui/statusbar/tools/
You will know what I mean
Something have to run this file and provide context object. For example, the main file which contain context object in systemui.apk is SystemUIService.smali. So look for this line:
Code:
.line 91
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;
And added following red line:
Code:
.line 91
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;
[COLOR="Red"]invoke-static {p0}, Lcom/sonymobile/systemui/statusbar/tools/ThemeUtils;->init(Landroid/content/Context;)V[/COLOR]
And save it.
If you want to change the clock color in expanded statusbar for example, find this line in com/android/systemui/statusbar/phone/PhoneStatusBar.smali
Code:
.field mExpanded:Z
.field mExpandedContents:Landroid/view/View;
.field mExpandedDialog:Landroid/app/Dialog;
And add red line:
Code:
.field mExpanded:Z
[COLOR="Red"].field mExpandedClock:Landroid/widget/TextView;[/COLOR]
.field mExpandedContents:Landroid/view/View;
.field mExpandedDialog:Landroid/app/Dialog;
Find this line:
Code:
.line 1227
const/16 v0, -0x2710
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateExpandedViewPos(I)V
And add red line below:
Code:
.line 1227
const/16 v0, -0x2710
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateExpandedViewPos(I)V
[COLOR="Red"]iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedClock:Landroid/widget/TextView;
invoke-static {}, Lcom/sonymobile/systemui/statusbar/tools/ThemeUtils;->getAccentColor()I
move-result v1
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V
[/COLOR]
Find this line:
Code:
.line 343
const v9, 0x7f0e003e
invoke-virtual {v1, v9}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/policy/DateView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDateView:Lcom/android/systemui/statusbar/policy/DateView;
And add red line below:
Code:
.line 343
const v9, 0x7f0e003e
invoke-virtual {v1, v9}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/policy/DateView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDateView:Lcom/android/systemui/statusbar/policy/DateView;
[COLOR="Red"]const v9, 0x7f0e0095
invoke-virtual {v1, v9}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/TextView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedClock:Landroid/widget/TextView;[/COLOR]
Now look for this line:
Code:
.line 1083
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v1, 0x7f0e002b
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
And add red line below:
Code:
.line 1083
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v1, 0x7f0e002b
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
[COLOR="Red"]move-result-object v1
.line 1084
if-eqz v1, :cond_0
.line 1085
if-eqz p1, :cond_1
const/4 v0, 0x0
:goto_0
invoke-virtual {v1, v0}, Landroid/view/View;->setVisibility(I)V
.line 1087
:cond_0
invoke-virtual {p0, p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->showClockExp(Z)V
return-void
.line 1085
:cond_1
const/16 v0, 0x8
goto :goto_0
.end method
.method public showClockExp(Z)V
.locals 2
.parameter
.prologue
.line 1083
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;
const v1, 0x7f0e0095
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;[/COLOR]
And save change.
If you want to change the color for button toggle according to theme (colorizing button), look for ToolsButton.smali (com/sonymobile/systemui/statusbar/tools).
Fine this line:
Code:
.method private updateIcon()V
.locals 5
.prologue
.line 239
iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mStateIcons:Ljava/util/HashMap;
iget v4, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mState:I
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/Integer;
And change to this:
Code:
.method private updateIcon()V
.locals [COLOR="Red"]6[/COLOR]
.prologue
[COLOR="Red"].line 239
const/4 v5, 0x0
.local v5, applyFilter:Z[/COLOR]
iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mStateIcons:Ljava/util/HashMap;
iget v4, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mState:I
[COLOR="Red"]const/4 v1, 0x1
if-eq v4, v1, :cond_0
const/4 v5, 0x1
:cond_0[/COLOR]
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/Integer;
Now look for this line:
Code:
.line 241
.local v1, icon:Landroid/graphics/Bitmap;
if-eqz v2, :cond_0
And change the value to this
Code:
.line 241
.local v1, icon:Landroid/graphics/Bitmap;
if-eqz v2, :[COLOR="Red"]cond_1[/COLOR]
Look for following line:
Code:
.line 249
:cond_0
:goto_0
iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mIcon:Lcom/sonymobile/systemui/uicomponents/Image;
invoke-virtual {v3, v1}, Lcom/sonymobile/systemui/uicomponents/Image;->setBitmap(Landroid/graphics/Bitmap;)V
And change to following red content:
Code:
.line 249
:[COLOR="Red"]cond_1[/COLOR]
:goto_0
iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mIcon:Lcom/sonymobile/systemui/uicomponents/Image;
[COLOR="Red"]invoke-virtual {v3, v1, v5}[/COLOR], Lcom/sonymobile/systemui/uicomponents/Image;->setBitmap(Landroid/graphics/Bitmap;[COLOR="Red"]Z[/COLOR])V
Look for following line and delete red line:
Code:
.line 250
[COLOR="Red"]iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mIcon:Lcom/sonymobile/systemui/uicomponents/Image;[/COLOR]
invoke-virtual {v3}, Lcom/sonymobile/systemui/uicomponents/Image;->invalidate()V
Find this line:
Code:
.line 251
return-void
And add red line below:
Code:
.line 251
[COLOR="Red"].end local v5 #applyFilter:Z[/COLOR]
return-void
Look for following line:
Code:
.line 244
:catch_0
move-exception v0
And like usual, add following line:
Code:
.line 244
[COLOR="Red"].restart local v5 #applyFilter:Z[/COLOR]
:catch_0
move-exception v0
And save change you have made.
Now the last part is change the image.smali (com/sonymobile/systemui/uicomponents/)
Look for following line and add red line:
Code:
# instance fields
[COLOR="Red"].field protected mApplyFilter:Z[/COLOR]
.field protected mBitmap:Landroid/graphics/Bitmap;
.field protected final mMatrix:Landroid/graphics/Matrix;
.field protected mScalingX:F
.field protected mScalingY:F
Look for following line:
Code:
.method public constructor <init>(Ljava/lang/String;Landroid/graphics/Bitmap;)V
.locals 1
.parameter "id"
.parameter "image"
.prologue
const/high16 v0, 0x3f80
And change to this:
Code:
.method public constructor <init>(Ljava/lang/String;Landroid/graphics/Bitmap;)V
[COLOR="Red"].locals 2[/COLOR]
.parameter "id"
.parameter "image"
.prologue
const/high16 v0, 0x3f80
[COLOR="Red"]const/4 v1, 0x0[/COLOR]
Look for this line:
Code:
.line 54
invoke-virtual {p0, p2}, Lcom/sonymobile/systemui/uicomponents/Image;->setBitmap(Landroid/graphics/Bitmap;)V
Change the entire line to this:
Code:
.line 54
[COLOR="red"]invoke-virtual {p0, p2, v1}, Lcom/sonymobile/systemui/uicomponents/Image;->setBitmap(Landroid/graphics/Bitmap;Z)V[/COLOR]
Find this line:
Code:
.method public onDraw(Landroid/graphics/Canvas;FF)V
.locals 3
.parameter "canvas"
.parameter "x"
.parameter "y"
.prologue
const/high16 v1, 0x3f80
And change to this:
Code:
.method public onDraw(Landroid/graphics/Canvas;FF)V
[COLOR="red"].locals 5[/COLOR]
.parameter "canvas"
.parameter "x"
.parameter "y"
.prologue
const/high16 v1, 0x3f80
Look for this line:
Code:
.line 181
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
if-eqz v0, :cond_1
...
Code:
.line 181
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
if-eqz v0, [COLOR="red"]:cond_2[/COLOR]
Look for this code:
Code:
.line 182
iget v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mScalingX:F
cmpl-float v0, v0, v1
if-nez v0, :cond_0
iget v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mScalingY:F
cmpl-float v0, v0, v1
if-eqz v0, :cond_2
Change to this:
Code:
.line 182
iget v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mScalingX:F
cmpl-float v0, v0, v1
if-nez v0, :cond_0
iget v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mScalingY:F
cmpl-float v0, v0, v1
if-eqz v0, [COLOR="Red"]:cond_3[/COLOR]
Look this line:
Code:
.line 185
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
iget-object v1, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mMatrix:Landroid/graphics/Matrix;
iget-object v2, p0, Lcom/sonymobile/systemui/uicomponents/Component;->mPaint:Landroid/graphics/Paint;
Add red line below:
Code:
.line 185
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
iget-object v1, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mMatrix:Landroid/graphics/Matrix;
iget-object v2, p0, Lcom/sonymobile/systemui/uicomponents/Component;->mPaint:Landroid/graphics/Paint;
[COLOR="red"]iget-boolean v4, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mApplyFilter:Z
const/4 v3, 0x0
if-eqz v4, :cond_1
invoke-static {}, Lcom/sonymobile/systemui/statusbar/tools/ThemeUtils;->getAccentColorFilter()Landroid/graphics/ColorFilter;
move-result-object v3
:cond_1
invoke-virtual {v2, v3}, Landroid/graphics/Paint;->setColorFilter(Landroid/graphics/ColorFilter;)Landroid/graphics/ColorFilter;[/COLOR]
invoke-virtual {p1, v0, v1, v2}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Matrix;Landroid/graphics/Paint;)V
Now look for this line:
Code:
.line 190
:cond_1
:goto_0
return-void
And change to this value:
Code:
.line 190
[COLOR="Red"]:cond_2[/COLOR]
:goto_0
return-void
Look for following line:
Code:
.line 187
:cond_2
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
iget-object v1, p0, Lcom/sonymobile/systemui/uicomponents/Component;->mPaint:Landroid/graphics/Paint;
invoke-virtual {p1, v0, p2, p3, v1}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V
And change to this value/add red line:
Code:
.line 187
[COLOR="red"]:cond_3[/COLOR]
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
iget-object v1, p0, Lcom/sonymobile/systemui/uicomponents/Component;->mPaint:Landroid/graphics/Paint;
[COLOR="red"]iget-boolean v4, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mApplyFilter:Z
const/4 v3, 0x0
if-eqz v4, :cond_4
invoke-static {}, Lcom/sonymobile/systemui/statusbar/tools/ThemeUtils;->getAccentColorFilter()Landroid/graphics/ColorFilter;
move-result-object v3
:cond_4
invoke-virtual {v1, v3}, Landroid/graphics/Paint;->setColorFilter(Landroid/graphics/ColorFilter;)Landroid/graphics/ColorFilter;[/COLOR]
invoke-virtual {p1, v0, p2, p3, v1}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V
Look this line:
Code:
.method public setBitmap(Landroid/graphics/Bitmap;Z)V
.locals 2
.parameter "bitmap"
.prologue
const/4 v1, 0x0
And ...
Code:
.method public setBitmap(Landroid/graphics/Bitmap;Z)V
.locals 2
.parameter "bitmap"
[COLOR="red"].parameter "filter"[/COLOR]
.prologue
const/4 v1, 0x0
And LAST one
Code:
.line 73
:cond_0
:goto_0
iput-object p1, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
And... you know what I mean, right?
Code:
.line 73
:cond_0
:goto_0
iput-object p1, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
[COLOR="red"]iput-boolean p2, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mApplyFilter:Z[/COLOR]
erorcun is here said:
You are missing 2 thing. In older versions statusbar clock and expanded clocks' ids are same, so it will not work on normal systemui and you should add 0 to setbitmap's last parameters in ninepatchimage.smali.
Click to expand...
Click to collapse
Remember!
The png you want to colorize must be in white color.
This may take more than two hour. So, patient is require for this.
Good luck
End for now. Will post again if I find something useful.
very very very nice :good::good::good:
Sv: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
Are you skilled in porting apps also?
Sent from my LT26i using xda app-developers app
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
DenmarkRootN00b said:
Are you skilled in porting apps also?
Sent from my LT26i using xda app-developers app
Click to expand...
Click to collapse
What app you want to port?
Ask erorcun becoz he have more experience in porting app than me.
Feel free to hit
if this post help you anyway.
Sent from LT22i via Tapatalk.
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
I'm using stock ics 2.55 rooted
Notification bar is disappeared (
Sent from my LT26i using xda premium
Style_1 not working with Home Launcher Xperia Z V2 port by Thilina C:crying:
http://forum.xda-developers.com/showthread.php?t=2102397
xperia ion
ZN6 said:
There's a big chance to not working if you use tab systemui with preferences.
Here try this.
Delete systemui.apk and systemuipreferences.apk. After that reboot your phone. You will lost statusbar. Reboot you phone again and flash my systemui. If still doesnt work...flash on clean stock rom.
Click to expand...
Click to collapse
Feel free to hit
if this post help you anyway.
Sent from LT22i via Tapatalk.
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
boncaunhaquynhanh said:
Style_1 not working with Home Launcher Xperia Z V2 port by Thilina C:crying:
http://forum.xda-developers.com/showthread.php?t=2102397
xperia ion
Click to expand...
Click to collapse
This mod has nothing to do with home launcher
Feel free to hit
if this post help you anyway.
Sent from LT22i via Tapatalk.
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
Thread update. Please follow instruction on the first post. I have fix the systemui didnt appeared by some of people here.
Give your feedback guy.
Sv: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
Can I use it with rooted stock 45 or only with 55? Thanks in advance
Sent from my LT26i using Tapatalk2
Works perfectly on my ION 6.1.E.3.7! Possibility of adding quickpanel settings?
farvin said:
Can I use it with rooted stock 45 or only with 55? Thanks in advance
Sent from my LT26i using Tapatalk2
Click to expand...
Click to collapse
Work on any stock ics based.
Sv: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
THX do I need to have a Rom with small app function or would your mod give that function?
Sendt fra min LT26i med Tapatalk2
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
farvin said:
THX do I need to have a Rom with small app function or would your mod give that function?
Sendt fra min LT26i med Tapatalk2
Click to expand...
Click to collapse
Just search on xda about smallapp mod.
And no, my mod doesnt include smallapp.
Feel free to hit
if this post help you anyway.
Sent from LT22i via Tapatalk.
Awesome
This SystemUI is awesome!!
Hope you can creat quickpanel or tab setting
sorry for my bad english
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
Great work
Sent from my LT26ii using xda app-developers app
Excellent work. Exactly what i wanted
like your wOOOOOrk dude ... if possible to install with small apps , it's full ok... thnaks bro
Sv: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
ZN6 said:
What app you want to port?
Ask erorcun becoz he have more experience in porting app than me.
Feel free to hit
if this post help you anyway.
Sent from LT22i via Tapatalk.
Click to expand...
Click to collapse
Well we are still looking for phonebook and conversations to be ported... If it is possible
Edit : ported to CM based roms
Sent from my LT26i using xda app-developers app

[help with a mod]DigitalClock statusbar

This problem is solved see post #5
gerryS2 said:
I have found the file of DigitalClock with second for statusbar (<DigitalClock android...)in framework2.jar in smali/android/widget/DigitalClock.
I have ported this file in smali folder of SystemUI and I have insert this line in tw_status_bar:
<com.android.systemui.statusbar.policy.DigitalClock android:textSize="@dimen/status_bar_clock_text_size"...
I would like to enter a checkbox in the SecSettings to show or hide the clock, the problem is in SystemUI because I can not put a code to hide, I have use a id for hide and insert the android:visibility="gone", but doesn't work. It is possible help me with this mod in SystemUI?
P.S.I am able with SecSettings but I haven't able with SystemUI
Click to expand...
Click to collapse
I have wanted seconds on my statusbar clock. Have you a link to a tutorial? Or, where did you put the smali file into the systemui?
Wish I could help with your request but maybe I can find out on the S Advance forum... if I do I'll be back LOL...
bobfrantic said:
I have wanted seconds on my statusbar clock. Have you a link to a tutorial? Or, where did you put the smali file into the systemui?
Wish I could help with your request but maybe I can find out on the S Advance forum... if I do I'll be back LOL...
Click to expand...
Click to collapse
I have extract the file of framework2.jar in systemUI. I have create for you a zip that contains this file smali, this file must be inserted in:
smali/com/android/systemui/statubar/policy/
You have replace this line of clock in tw_status_bar.xml:
<com.android.systemui.statusbar.policy.Clock
with this:
<com.android.systemui.statusbar.policy.DigitalClock
gerryS2 said:
I have extract the file of framework2.jar in systemUI. I have create for you a zip that contains this file smali, this file must be inserted in:
smali/com/android/systemui/statubar/policy/
You have replace this line of clock in tw_status_bar.xml:
<com.android.systemui.statusbar.policy.Clock
with this:
<com.android.systemui.statusbar.policy.DigitalClock
Click to expand...
Click to collapse
Thank you for this, it worked. Will see what I can find out about a switch for turning on and off the clock in settings. Appreciated much!
bobfrantic said:
Thank you for this, it worked. Will see what I can find out about a switch for turning on and off the clock in settings. Appreciated much!
Click to expand...
Click to collapse
I solved it with the guide of @Goldie, I have created a method in PhoneStatusbar and I have insert a custom id in the line of Digital Clock like this:
Code:
<com.android.systemui.statusbar.policy.DigitalClock android:textSize="@dimen/status_bar_clock_text_size" android:textColor="#ff959595" android:ellipsize="none" android:gravity="left|center" android:id="@id/digitalclock_view" android:visibility="gone" android:paddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" />
Insert this line in ids.xml:
Code:
<item type="id" name="digitalclock_view">false</item>
In PhoneStatusbar insert this method at the end of the file:
Code:
.method digitalclock_view()V
.locals 6
iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "enable_digitalclock"
const/4 v3, 0x1
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-nez v3, :cond_0
const v3, 0x8
:cond_0
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const p0, 0x7f0d01e0
invoke-virtual {v5, p0}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v4
invoke-virtual {v4, v3}, Lcom/android/systemui/statusbar/policy/DigitalClock;->setVisibility(I)V
return-void
.end method
0x7f0d01e0 is the public id of "digitalclock_view"
"enable_digitalclock" is the key for checkbox (android:key="enable_digitalclock")
After I have insert this line in a part of method makestatusbarview:
Code:
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->digitalclock_view()V
Code:
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mClearButton:Landroid/view/View;
const/4 v10, 0x0
invoke-virtual {v9, v10}, Landroid/view/View;->setAlpha(F)V
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mClearButton:Landroid/view/View;
const/4 v10, 0x4
invoke-virtual {v9, v10}, Landroid/view/View;->setVisibility(I)V
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->digitalclock_view()V
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mClearButton:Landroid/view/View;
const/4 v10, 0x0
invoke-virtual {v9, v10}, Landroid/view/View;->setEnabled(Z)V
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d004f
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/policy/DateView;
If you have this on-fly you must have PhoneStatusBar$SettingsObserver.smali and add this line in two method:
Code:
.method observe()V
.locals 3
const/4 v2, 0x0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
iget-object v1, v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "enable_digitalclock"
invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
invoke-virtual {v0, v1, v2, p0}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
Code:
.method public onChange(Z)V
.locals 1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;->digitalclock_view()V
Thanks @Goldie for his guide of smali code
Nice to see it helping
Sent from my GT-I9305 using Tapatalk
Glad you found out how. Maybe when I have time I'll give a try. If you can, show me with a screen shot what you accomplished please. May help me when I attempt this.
Sent from my Advanced SII lite

[GUIDE][PORT] [cm11] Dinamic statusbar

what is Dinamic statusbar??
can you see here
or here my original facebook post​
i comparing from another rom include this feature to pure CM11 base
big thanks to
Allah swt
my family
CyanogenMod
@ocoot
@bamzzz
@qoejohn
prabu siliwangi
anggi muhammad
syaeful anwar
deddy kitul
you
REQUIREMENT:
- BRAIN
- Patient
- experience
- Know how to decompile/recompiling Apk and JAR file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else ( i use apktool 1.5.2 )
download file recources below
Settings.apk
Decompile Settings.apk
add string
Code:
<string name="dynamic_system_bars_title">Dynamic system bars</string>
<string name="dynamic_status_bar_title">Dynamic status bar</string>
<string name="dynamic_status_bar_summary">Automatically update the background of the status bar</string>
<string name="dynamic_navigation_bar_title">Dynamic navigation bar</string>
<string name="dynamic_navigation_bar_summary">Automatically update the background of the navigation bar</string>
<string name="dynamic_system_bars_gradient_title">System bar gradient</string>
<string name="dynamic_system_bars_gradient_summary">Overlay a gradient on the system bars</string>
<string name="dynamic_status_bar_filter_title">Darker status bar</string>
<string name="dynamic_status_bar_filter_summary">Overlay a darkening filter on the status bar</string>
open
res/xml/display_settings.xml
add wherever you want
Code:
<PreferenceScreen android:title="Dinamic Status Bar" android:fragment="com.android.settings.oplosandev.DSBSettings" />
place DSBSettings.smali into folder "smali" ,after recompile and decompile automatic place directories name smali
Recompile
Decompile
open
DSBSettings.smali
matched
const v0, 0x7f050071 #type="xml" name="dsb_settings"
Recompile
sign
push
SystemUI.apk
decompile SystemUI
open
Lcom/android/systemui/statusbar/phone/PhoneStatusBarTransitions.smali
find
Code:
# instance fields
add above
Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/android/systemui/statusbar/phone/PhoneStatusBarTransitions$1;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBarTransitions$GradientObserver;,
Lcom/android/systemui/statusbar/phone/PhoneStatusBarTransitions$PhoneStatusBarBackgroundDrawable;
}
.end annotation
findmethod
Code:
.method public constructor <init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)V
replace with
Code:
.method public constructor <init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)V
.locals 4
.parameter "view"
.prologue
const/4 v3, 0x1
.line 47
new-instance v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBarTransitions$PhoneStatusBarBackgroundDrawable;
invoke-virtual {p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getContext()Landroid/content/Context;
move-result-object v2
invoke-direct {v1, v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarTransitions$PhoneStatusBarBackgroundDrawable;-><init>(Landroid/content/Context;)V
invoke-direct {p0, p1, v1}, Lcom/android/systemui/statusbar/phone/BarTransitions;-><init>(Landroid/view/View;Lcom/android/systemui/statusbar/phone/BarTransitions$BarBackgroundDrawable;)V
.line 48
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarTransitions;->mView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.line 49
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarTransitions;->mView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-virtual {v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getContext()Landroid/content/Context;
move-result-object v1
invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
.line 50
.local v0, res:Landroid/content/res/Resources;
const v1, 0x7f0b002b [COLOR="Red"]#type="dimen" name="status_bar_icon_drawing_alpha"[/COLOR]
invoke-virtual {v0, v1, v3, v3}, Landroid/content/res/Resources;->getFraction(III)F
move-result v1
iput v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarTransitions;->mIconAlphaWhenOpaque:F
.line 51
return-void
.end method
skip this step if in your have it
add this
dimens.xml
Code:
<item type="dimen" name="status_bar_icon_drawing_alpha">75.0%</item>
colors.xml
Code:
<color name="status_bar_background_opaque">#ff000000</color>
<color name="status_bar_background_semi_transparent">#66000000</color>
intergers.xml
Code:
<integer name="dsb_transition_duration">500</integer>
push smali
recoompile
decompile
open public.xml
and matched all id
Lcom/android/systemui/statusbar/phone/PhoneStatusBarTransitions$PhoneStatusBarBackgroundDrawable.smali
Code:
const v1, 0x7f07000a #type="color" name="status_bar_background_opaque"
const v3, 0x7f07000b #type="color" name="status_bar_background_semi_transparent"
const v4, 0x7f0201dd #type="drawable" name="status_background"
Lcom/android/systemui/statusbar/phone/BarTransitions$BarBackgroundDrawable.smali
Code:
const v1, 0x7f090015 #type="integer" name="dsb_transition_duration"
Navbar
open
Lcom/android/systemui/statusbar/phone/NavigationBarTransitions;
find code
Code:
# instance fields
.field private final mBarService:Lcom/android/internal/statusbar/IStatusBarService;
add above
Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/android/systemui/statusbar/phone/NavigationBarTransitions$GradientObserver;,
Lcom/android/systemui/statusbar/phone/NavigationBarTransitions$NavigationBarBackgroundDrawable;
}
.end annotation
find
Code:
.method public constructor
change like it
Code:
# direct methods
.method public constructor <init>(Lcom/android/systemui/statusbar/phone/NavigationBarView;)V
.locals 3
.parameter "view"
.prologue
.line 50
new-instance v0, Lcom/android/systemui/statusbar/phone/NavigationBarTransitions$NavigationBarBackgroundDrawable;
invoke-virtual {p1}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getContext()Landroid/content/Context;
move-result-object v1
invoke-direct {v0, v1}, Lcom/android/systemui/statusbar/phone/NavigationBarTransitions$NavigationBarBackgroundDrawable;-><init>(Landroid/content/Context;)V
invoke-direct {p0, p1, v0}, Lcom/android/systemui/statusbar/phone/BarTransitions;-><init>(Landroid/view/View;Lcom/android/systemui/statusbar/phone/BarTransitions$BarBackgroundDrawable;)V
.line 242
new-instance v0, Lcom/android/systemui/statusbar/phone/NavigationBarTransitions$2;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/NavigationBarTransitions$2;-><init>(Lcom/android/systemui/statusbar/phone/NavigationBarTransitions;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/NavigationBarTransitions;->mLightsOutListener:Landroid/view/View$OnTouchListener;
.line 52
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/NavigationBarTransitions;->mView:Lcom/android/systemui/statusbar/phone/NavigationBarView;
.line 53
const-string v0, "statusbar"
invoke-static {v0}, Landroid/os/ServiceManager;->getService(Ljava/lang/String;)Landroid/os/IBinder;
move-result-object v0
invoke-static {v0}, Lcom/android/internal/statusbar/IStatusBarService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/statusbar/IStatusBarService;
move-result-object v0
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/NavigationBarTransitions;->mBarService:Lcom/android/internal/statusbar/IStatusBarService;
.line 55
return-void
.end method
save
open
Lcom/android/systemui/statusbar/phone/NavigationBarView$StatusBarBlockerTransitions;
find
Code:
.method public constructor
change to
Code:
# direct methods
.method public constructor <init>(Landroid/view/View;)V
.locals 5
.parameter "statusBarBlocker"
.prologue
.line 1268
new-instance v0, Lcom/android/systemui/statusbar/phone/BarTransitions$BarBackgroundDrawable;
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v1
const v2, 0x7f07000a #type="color" name="status_bar_background_opaque"
const v3, 0x7f07000b #type="color" name="status_bar_background_semi_transparent"
const v4, 0x7f0201dd #type="drawable" name="status_background"
invoke-direct {v0, v1, v2, v3, v4}, Lcom/android/systemui/statusbar/phone/BarTransitions$BarBackgroundDrawable;-><init>(Landroid/content/Context;III)V
invoke-direct {p0, p1, v0}, Lcom/android/systemui/statusbar/phone/BarTransitions;-><init>(Landroid/view/View;Lcom/android/systemui/statusbar/phone/BarTransitions$BarBackgroundDrawable;)V
.line 1273
return-void
.end method
and matched all id
Code:
const v2, 0x7f07000a #type="color" name="status_bar_background_opaque"
const v3, 0x7f07000b #type="color" name="status_bar_background_semi_transparent"
const v4, 0x7f0201dd #type="drawable" name="status_background"
do enabling navigation bar via build.prop
add this code at ADDITIONAL_BUILD_PROPERTIES
Code:
qemu.hw.mainkeys=0
push
Settings.apk /system/priv-app/here
SystemUI.apk /system/priv-app/here
systemui.so /system/lib/here
or other way, u can try methode flasahble.zip,adb,or other
Hi will it work in gingerbread phones? coz my systemui does not have phone folder under com/android/systemui/statusbar/
RESERVED !!!
nice share omm...
Jedz77 said:
Hi will it work in gingerbread phones? coz my systemui does not have phone folder under com/android/systemui/statusbar/
Click to expand...
Click to collapse
cm11 only.....
stock kk adjust
dugeriss said:
cm11 only.....
stock kk adjust
Click to expand...
Click to collapse
oh my bad. sorry. i really like it though. anyways thanks maan nice mod btw
dugeriss said:
what is Dinamic statusbar??
can you see here
or here my original facebook post​
i comparing from another rom include this feature to pure CM11 base
big thanks to
Allah swt
my family
CyanogenMod
@ocoot
@bamzzz
@qoejohn
prabu siliwangi
anggi muhammad
syaeful anwar
deddy kitul
you
REQUIREMENT:
- BRAIN
- Patient
- experience
- Know how to decompile/recompiling Apk and JAR file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else ( i use apktool 1.5.2 )
download file recources below
Click to expand...
Click to collapse
Hey Great Guide!!Thank you for the willingness!Please could you make a guide on how to port Hover to cm11 ?Please it's so important for me and I've searched so many times on web but I haven't found nothing and I don't know how to do it,Please
ah..... great work sir :good: :fingers-crossed:
kitul..!!
Nice :good:
Ahmm .. Sir... I tried This one on cm11 ... but it doesnt force closes .. rather it gets black screen? i tried your guide twice .. but the same thing happens.. Please Help... BTw this guide is good
Thanks...
my Stock Kitkat 4.4.2 :good:
Can someone help me to upload cm 11 r26 statusbar without sim number indicator ??, my pc Hard disk got broken , lost all data, thanks
Thank you sir ,,
Micky99 said:
Hey Great Guide!!Thank you for the willingness!Please could you make a guide on how to port Hover to cm11 ?Please it's so important for me and I've searched so many times on web but I haven't found nothing and I don't know how to do it,Please
Click to expand...
Click to collapse
Hover is not easy because it gas so many commits with many additions and a lot of files changed
srisurya95 said:
Hover is not easy because it gas so many commits with many additions and a lot of files changed
Click to expand...
Click to collapse
Should I see your answer as a "no I won't help you",or do you mean you want to help me but it won't be easy?What's the problem?Do you think the hover related commits are too much for only two persons?
Micky99 said:
Should I see your answer as a "no I won't help you",or do you mean you want to help me but it won't be easy?What's the problem?Do you think the hover related commits are too much for only two persons?
Click to expand...
Click to collapse
I say its not possible/not so easy
srisurya95 said:
I say its not possible/not so easy
Click to expand...
Click to collapse
Dont you absolutely know some of the hover related commits?

[Guide][tut] [MM] HeadsUp timeOut / enable / disable settings

Today i am presenting HeadsUp tut
For LP click here
This is For MM only Devices
All you need is Patience
deodexed SystemUI.apk
1. Decompile SystemUI.apk
2. Now Open smali/com/android/systemui/statusbar/policy/HeadsUpManager.smali
In this find this line:
Code:
# instance fields
Add the following lines below this:
Code:
.field private mDefaultHeadsUpNotificationDecay:I
3. Then find the below line and remove delete the part that says “final”:
Code:
.field private final mHeadsUpNotificationDecay:I
So it look like
Code:
.field private mHeadsUpNotificationDecay:I
4. Find this line:
Code:
# direct methods
5. Add these two entire methods below this:
Code:
.method static synthetic -get1(Lcom/android/systemui/statusbar/policy/HeadsUpManager;)Landroid/content/Context;
.locals 1
iget-object v0, p0, Lcom/android/systemui/statusbar/policy/HeadsUpManager;->mContext:Landroid/content/Context;
return-object v0
.end method
.method static synthetic -set0(Lcom/android/systemui/statusbar/policy/HeadsUpManager;I)I
.locals 0
iput p1, p0, Lcom/android/systemui/statusbar/policy/HeadsUpManager;->mHeadsUpNotificationDecay:I
return p1
.end method
6. Find this line:
Code:
iput v1, p0, Lcom/android/systemui/statusbar/policy/HeadsUpManager;->mMinimumDisplayTime:I
Below this, you will see these two lines:
Code:
const v1, 0x7f0d0012
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getInteger(I)I
Delete these two lines and replace them with the following code:
Code:
iget-object v1, p0, Lcom/android/systemui/statusbar/policy/HeadsUpManager;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string/jumbo v2, "heads_up_timeout"
iget-object v3, p0, Lcom/android/systemui/statusbar/policy/HeadsUpManager;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
const v4, 0x7f0d0012 #<public type="integer" name="heads_up_notification_decay" id="0x7f0d0012" />
invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getInteger(I)I
move-result v3
const/4 v4, -0x3
invoke-static {v1, v2, v3, v4}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I
7. Save it and close
8. Now open smali/com/android/systemui/statusbar/policy/HeadsUpManager$HeadsUpEntry.smali
9. Find the following line:
Code:
.method public updateEntry()V
Directly below this line you will find this line:
Code:
.locals 10
10. Take that line and replace it with this entire block of code (make sure to replace the commented public ID):
Code:
.locals 11
iget-object v6, p0, Lcom/android/systemui/statusbar/policy/HeadsUpManager$HeadsUpEntry;->this$0:Lcom/android/systemui/statusbar/policy/HeadsUpManager;
iget-object v7, p0, Lcom/android/systemui/statusbar/policy/HeadsUpManager$HeadsUpEntry;->this$0:Lcom/android/systemui/statusbar/policy/HeadsUpManager;
invoke-static {v7}, Lcom/android/systemui/statusbar/policy/HeadsUpManager;->-get1(Lcom/android/systemui/statusbar/policy/HeadsUpManager;)Landroid/content/Context;
move-result-object v7
invoke-virtual {v7}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v7
const-string/jumbo v8, "heads_up_timeout"
iget-object v9, p0, Lcom/android/systemui/statusbar/policy/HeadsUpManager$HeadsUpEntry;->this$0:Lcom/android/systemui/statusbar/policy/HeadsUpManager;
invoke-static {v9}, Lcom/android/systemui/statusbar/policy/HeadsUpManager;->-get1(Lcom/android/systemui/statusbar/policy/HeadsUpManager;)Landroid/content/Context;
move-result-object v9
invoke-virtual {v9}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v9
const v10, 0x7f0d0012 #<public type="integer" name="heads_up_notification_decay" id="0x7f0d0012" />
invoke-virtual {v9, v10}, Landroid/content/res/Resources;->getInteger(I)I
move-result v9
const/4 v10, -0x3
invoke-static {v7, v8, v9, v10}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I
move-result v7
invoke-static {v6, v7}, Lcom/android/systemui/statusbar/policy/HeadsUpManager;->-set0(Lcom/android/systemui/statusbar/policy/HeadsUpManager;I)I
11. Save, recompile, and replace
For setting Please go for Next post
Thanks to @Bloodlvst for this tut possible
my respect to you
Settings
Download this setting
Click here
...
If you want to add by settings as default ?
then learn to do guys
follow this guide
[Guide][New Learners Basics] [LP/MM/+] Create settings preferences and subsettings
cause i had limited time brothers
hope you get me
Dont forgot to tag me if you use my work
hello
thank you for this tut
i have edited and compiled SystemUi.apk and it's working
but to control the settings i have added i wanted to install your app from the second post , Right?
the problem is that the app is not installing
i don't have speruser mod
please post a tut on how to add the control app into main setting
PS: am working on my HTC desire 820 (MM 6.0.1)
Thanks in Advance
Edit: after deodexing my rom and got superuser mod the control app is working
please post a tut on how to add the control app into main setting.....

Categories

Resources