[GUIDE] [SMALI] Theme Accent Colored SystemUI.apk - v1.0 - 08/02/2015 - Sony Cross-Device Development Themes and Apps

Here is simple smali editing guide showing you how to give your SystemUI.apk runtime theme accent color change!​
Changes that you will get by this guide was originally implemented by me here and later on my Xperia™ Xposed (KK) module, also brilliantly ported by:
- 4.3: @kongaz2 (here)
- 4.2.2: @STRYDER~007 (here)
Screenshot:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Requirements:
- Original Xperia™ stock SystemUI.apk
- Read lines below carefully
- Not to be afraid of FCs you will probably face
TRY IT AT YOUR OWN RISK
Here we go...
- Decompile SystemUI.apk v1.2 from my thread.
- Decompile KK one (yours)
I´m gonna show you where exactly I put accent color related code and you compare both decompiled smali files to get diffs (in red) ok!!
ToolsMain.smali
Code:
# instance fields
[COLOR="Red"].field private mAccentColorId:I[/COLOR]
Code:
.method public constructor <init>(Landroid/content/Context;Landroid/view/ViewGroup;)V
.locals 4
.parameter "context"
.parameter "parent"
.
.
[COLOR="red"].line 105
iget-object v0, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsMain;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const-string v1, "somc_accent_color_neutral"
const-string v2, "color"
const-string v3, "com.sonyericsson.uxp"
invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v0
iput v0, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsMain;->mAccentColorId:I[/COLOR]
Code:
[COLOR="red"].method static synthetic access$1000(Lcom/sonymobile/systemui/statusbar/tools/ToolsMain;)V
.locals 0
.parameter "x0"
.prologue
.line 47
invoke-direct {p0}, Lcom/sonymobile/systemui/statusbar/tools/ToolsMain;->colorize()V
return-void
.end method[/COLOR]
Code:
[COLOR="red"].method private colorize()V
.locals 4
.prologue
.line 749
iget v2, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsMain;->mAccentColorId:I
if-eqz v2, :cond_0
.line 750
iget-object v2, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsMain;->mButtons:Ljava/util/LinkedList;
invoke-virtual {v2}, Ljava/util/LinkedList;->iterator()Ljava/util/Iterator;
move-result-object v0
.local v0, i$:Ljava/util/Iterator;
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_0
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;
.line 751
.local v1, toolButton:Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;
iget-object v2, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsMain;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v2
iget v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsMain;->mAccentColorId:I
invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getColor(I)I
move-result v2
invoke-virtual {v1, v2}, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->colorize(I)V
goto :goto_0
.line 754
.end local v0 #i$:Ljava/util/Iterator;
.end local v1 #toolButton:Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;
:cond_0
return-void
.end method[/COLOR]
Code:
.method public configurationChanged(Landroid/content/res/Configuration;)V
.locals 5
.parameter "newConfig"
.
.
.line 1020
:cond_1
[COLOR="red"]invoke-direct {p0}, Lcom/sonymobile/systemui/statusbar/tools/ToolsMain;->colorize()V[/COLOR]
.line 1021
return-void
Code:
.method public start()V
.locals 5
.
.
[COLOR="red"].line 162
invoke-direct {p0}, Lcom/sonymobile/systemui/statusbar/tools/ToolsMain;->colorize()V[/COLOR]
.line 163
return-void
.end method
Code:
.method private reCreateButtons()V
.locals 17
.
.
.line 200
.end local v7 #i:I
:cond_4
[COLOR="red"]invoke-direct {p0}, Lcom/sonymobile/systemui/statusbar/tools/ToolsMain;->colorize()V
.line 201[/COLOR]
return-void
.end method
ToolsMain$1.smali
Code:
# virtual methods
.method public onChange(Z)V
.locals 4
.parameter "selfChange"
.
.
.line 124
iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsMain$1;->this$0:Lcom/sonymobile/systemui/statusbar/tools/ToolsMain;
#calls: Lcom/sonymobile/systemui/statusbar/tools/ToolsMain;->startServices()V
invoke-static {v3}, Lcom/sonymobile/systemui/statusbar/tools/ToolsMain;->access$400(Lcom/sonymobile/systemui/statusbar/tools/ToolsMain;)V
[COLOR="Red"] .line 125
iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsMain$1;->this$0:Lcom/sonymobile/systemui/statusbar/tools/ToolsMain;
#calls: Lcom/sonymobile/systemui/statusbar/tools/ToolsMain;->colorize()V
invoke-static {v3}, Lcom/sonymobile/systemui/statusbar/tools/ToolsMain;->access$1000(Lcom/sonymobile/systemui/statusbar/tools/ToolsMain;)V[/COLOR]
ToolsButton.smali
Code:
[COLOR="Red"].method public colorize(I)V
.locals 1
.parameter "color"
.prologue
.line 447
iput p1, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mAccentColor:I
.line 450
iget-object v0, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mIcon:Landroid/widget/ImageView;
invoke-direct {p0, v0}, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->colorize(Landroid/widget/ImageView;)V
.line 451
iget-object v0, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mLabel:Landroid/widget/TextView;
invoke-direct {p0, v0}, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->colorize(Landroid/widget/TextView;)V
.line 452
iget-object v0, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mAnimationView:Landroid/widget/ImageView;
invoke-direct {p0, v0}, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->colorize(Landroid/widget/ImageView;)V
.line 453
return-void
.end method[/COLOR]
ToolsTabWidget.smali
Code:
.method public setCurrentTab(I)V
.locals 2
.parameter "index"
.prologue
.line 101
invoke-super {p0, p1}, Landroid/widget/TabWidget;->setCurrentTab(I)V
.line 102
if-ltz p1, :cond_0
invoke-virtual {p0}, Lcom/sonymobile/systemui/statusbar/tools/ToolsTabWidget;->getTabCount()I
move-result v0
if-ge p1, v0, :cond_0
iget v0, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsTabWidget;->mCurrentTab:I
if-ne p1, v0, :cond_1
.line 106
:cond_0
:goto_0
[COLOR="Red"]invoke-virtual {p0, p1}, Lcom/sonymobile/systemui/statusbar/tools/ToolsTabWidget;->getChildTabViewAt(I)Landroid/view/View;
move-result-object v0
invoke-virtual {p0}, Lcom/sonymobile/systemui/statusbar/tools/ToolsTabWidget;->getTabCount()I
move-result v1
invoke-direct {p0, v0, p1, v1}, Lcom/sonymobile/systemui/statusbar/tools/ToolsTabWidget;->setActiveTabColorFilter(Landroid/view/View;II)V[/COLOR]
.line 107
return-void
.line 105
:cond_1
iput p1, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsTabWidget;->mCurrentTab:I
goto :goto_0
.end method
Code:
[COLOR="Red"].method private setActiveTabColorFilter(Landroid/view/View;II)V
.locals 10
.parameter "view"
.parameter "activeTab"
.parameter "tabCount"
.prologue
.line 43
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v7
invoke-virtual {v7}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
.line 44
.local v3, res:Landroid/content/res/Resources;
const-string v7, "somc_accent_color_neutral"
const-string v8, "color"
const-string v9, "com.sonyericsson.uxp"
invoke-virtual {v3, v7, v8, v9}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v1
.line 46
.local v1, accentNeutralResId:I
if-nez v1, :cond_1
.line 74
:cond_0
:goto_0
return-void
.line 51
:cond_1
:try_start_0
invoke-virtual {v3, v1}, Landroid/content/res/Resources;->getColor(I)I
move-result v0
.line 53
.local v0, accentNeutralColor:I
const/4 v4, 0x0
.local v4, tabIndex:I
:goto_1
if-ge v4, p3, :cond_0
.line 55
invoke-virtual {p0, v4}, Lcom/sonymobile/systemui/statusbar/tools/ToolsTabWidget;->getChildTabViewAt(I)Landroid/view/View;
move-result-object v5
.line 56
.local v5, tabView:Landroid/view/View;
const-string v7, "title"
const-string v8, "id"
const-string v9, "android"
invoke-virtual {v3, v7, v8, v9}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v7
invoke-virtual {v5, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v6
check-cast v6, Landroid/widget/TextView;
.line 58
.local v6, titleView:Landroid/widget/TextView;
invoke-virtual {v5}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v7
invoke-virtual {v7}, Landroid/graphics/drawable/Drawable;->clearColorFilter()V
.line 59
iget-object v7, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsTabWidget;->mTabTextColor:Landroid/content/res/ColorStateList;
invoke-virtual {v6, v7}, Landroid/widget/TextView;->setTextColor(Landroid/content/res/ColorStateList;)V
.line 61
if-ne v4, p2, :cond_2
.line 63
invoke-virtual {v5}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
move-result-object v7
new-instance v8, Landroid/graphics/PorterDuffColorFilter;
sget-object v9, Landroid/graphics/PorterDuff$Mode;->MULTIPLY:Landroid/graphics/PorterDuff$Mode;
invoke-direct {v8, v0, v9}, Landroid/graphics/PorterDuffColorFilter;-><init>(ILandroid/graphics/PorterDuff$Mode;)V
invoke-virtual {v7, v8}, Landroid/graphics/drawable/Drawable;->setColorFilter(Landroid/graphics/ColorFilter;)V
.line 64
invoke-virtual {v6, v0}, Landroid/widget/TextView;->setTextColor(I)V
:try_end_0
.catch Landroid/content/res/Resources$NotFoundException; {:try_start_0 .. :try_end_0} :catch_0
.line 53
:cond_2
add-int/lit8 v4, v4, 0x1
goto :goto_1
.line 69
.end local v0 #accentNeutralColor:I
.end local v4 #tabIndex:I
.end local v5 #tabView:Landroid/view/View;
.end local v6 #titleView:Landroid/widget/TextView;
:catch_0
move-exception v2
.line 71
.local v2, e:Landroid/content/res/Resources$NotFoundException;
invoke-virtual {v2}, Landroid/content/res/Resources$NotFoundException;->printStackTrace()V
goto :goto_0
.end method[/COLOR]
SomcTabsNotificationPanelView.smali
Code:
# instance fields
[COLOR="Red"].field private mExpanded:Z[/COLOR]
Code:
# virtual methods
.method public onConfigurationChanged()V
.locals 3
.
.
.line 102
:cond_0
[COLOR="Red"] iget-boolean v0, p0, Lcom/sonymobile/systemui/statusbar/tools/SomcTabsNotificationPanelView;->mExpanded:Z
if-nez v0, :cond_1
.line 104
iget-object v2, p0, Lcom/sonymobile/systemui/statusbar/tools/SomcTabsNotificationPanelView;->mTabHost:Landroid/widget/TabHost;
if-eqz v2, :cond_1
.line 106
iget-object v2, p0, Lcom/sonymobile/systemui/statusbar/tools/SomcTabsNotificationPanelView;->mTabHost:Landroid/widget/TabHost;
invoke-virtual {v2}, Landroid/widget/TabHost;->clearAllTabs()V
.line 107
const/4 v2, 0x0
iput-object v2, p0, Lcom/sonymobile/systemui/statusbar/tools/SomcTabsNotificationPanelView;->mTabHost:Landroid/widget/TabHost;
.line 109
invoke-direct {p0}, Lcom/sonymobile/systemui/statusbar/tools/SomcTabsNotificationPanelView;->initTabs()V
.line 111
:cond_1[/COLOR]
return-void
.end method
Code:
.method public onExpandedChanged(Z)V
.locals 2
.parameter "expanded"
.prologue
[COLOR="Red"].line 292
iput-boolean p1, p0, Lcom/sonymobile/systemui/statusbar/tools/SomcTabsNotificationPanelView;->mExpanded:Z
.line 293[/COLOR]
if-eqz p1, :cond_0
RecentsPanelView.smali
Code:
.method private showImpl(Z)V
.locals 5
.parameter "show"
.prologue
const/4 v2, 0x0
const/4 v1, 0x1
[COLOR="Red"].line 364
invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->setRecentsNoAppsTextColor()V[/COLOR]
.line 365
iget-object v3, p0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;
const-string v4, "recentapps"
invoke-static {v3, v4}, Lcom/android/systemui/recent/RecentsPanelView;->sendCloseSystemWindows(Landroid/content/Context;Ljava/lang/String;)V
Code:
[COLOR="Red"].method private setRecentsNoAppsTextColor()V
.locals 8
.prologue
.line 86
iget-object v5, p0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;
invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v4
.line 87
.local v4, res:Landroid/content/res/Resources;
const-string v5, "somc_accent_color_neutral"
const-string v6, "color"
const-string v7, "com.sonyericsson.uxp"
invoke-virtual {v4, v5, v6, v7}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v1
.line 89
.local v1, accentNeutralResId:I
if-nez v1, :cond_0
.line 104
:goto_0
return-void
.line 94
:cond_0
:try_start_0
invoke-virtual {v4, v1}, Landroid/content/res/Resources;->getColor(I)I
move-result v0
.line 96
.local v0, accentNeutralColor:I
const v5, 0x7f0800a5
invoke-virtual {p0, v5}, Lcom/android/systemui/recent/RecentsPanelView;->findViewById(I)Landroid/view/View;
move-result-object v3
check-cast v3, Landroid/widget/TextView;
.line 97
.local v3, recentsNoAppsText:Landroid/widget/TextView;
invoke-virtual {v3, v0}, Landroid/widget/TextView;->setTextColor(I)V
:try_end_0
.catch Landroid/content/res/Resources$NotFoundException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
.line 99
.end local v0 #accentNeutralColor:I
.end local v3 #recentsNoAppsText:Landroid/widget/TextView;
:catch_0
move-exception v2
.line 101
.local v2, e:Landroid/content/res/Resources$NotFoundException;
invoke-virtual {v2}, Landroid/content/res/Resources$NotFoundException;->printStackTrace()V
goto :goto_0
.end method[/COLOR]
PhoneStatusBar.smali
Code:
.method makeExpandedVisible()V
.locals 5
.prologue
const/4 v3, 0x1
.line 1995
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedVisible:Z
if-nez v0, :cond_0
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->panelsEnabled()Z
move-result v0
if-nez v0, :cond_1
.line 2027
:cond_0
:goto_0
return-void
.line 1999
:cond_1
iput-boolean v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedVisible:Z
.line 2000
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;
invoke-virtual {v0, v3}, Lcom/android/systemui/statusbar/policy/NotificationRowLayout;->setLayoutTransitionsEnabled(Z)V
.line 2001
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNavigationBarView:Lcom/android/systemui/statusbar/phone/NavigationBarView;
if-eqz v0, :cond_2
.line 2002
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNavigationBarView:Lcom/android/systemui/statusbar/phone/NavigationBarView;
invoke-virtual {v0, v3}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->setSlippery(Z)V
.line 2004
:cond_2
invoke-virtual {p0, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateCarrierLabelVisibility(Z)V
.line 2006
const/16 v0, -0x2710
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateExpandedViewPos(I)V
[COLOR="red"].line 2007
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const-string v1, "somc_accent_color_neutral"
const-string v2, "color"
const-string v4, "com.sonyericsson.uxp"
invoke-virtual {v0, v1, v2, v4}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v1
.line 2008
if-eqz v1, :cond_3
.line 2009
:try_start_0
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getColor(I)I
move-result v2
.line 2010
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanelHeader:Landroid/view/View;
const v4, 0x7f08007b
invoke-virtual {v0, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
invoke-virtual {v0, v2}, Landroid/widget/TextView;->setTextColor(I)V
.line 2012
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v4, 0x7f08007e
invoke-virtual {v0, v4}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/Button;
invoke-virtual {v0, v2}, Landroid/widget/Button;->setTextColor(I)V
.line 2013
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v4, 0x7f08007f
invoke-virtual {v0, v4}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/Button;
invoke-virtual {v0, v2}, Landroid/widget/Button;->setTextColor(I)V
:try_end_0
.catch Landroid/content/res/Resources$NotFoundException; {:try_start_0 .. :try_end_0} :catch_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1
.line 2016
:cond_3
:goto_1[/COLOR]
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v0
check-cast v0, Landroid/view/WindowManager$LayoutParams;
.line 2017
iget v1, v0, Landroid/view/WindowManager$LayoutParams;->flags:I
and-int/lit8 v1, v1, -0x9
iput v1, v0, Landroid/view/WindowManager$LayoutParams;->flags:I
.line 2018
iget v1, v0, Landroid/view/WindowManager$LayoutParams;->flags:I
const/high16 v2, 0x2
or-int/2addr v1, v2
iput v1, v0, Landroid/view/WindowManager$LayoutParams;->flags:I
.line 2019
const/4 v1, -0x1
iput v1, v0, Landroid/view/WindowManager$LayoutParams;->height:I
.line 2020
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mWindowManager:Landroid/view/WindowManager;
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
invoke-interface {v1, v2, v0}, Landroid/view/WindowManager;->updateViewLayout(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
.line 2021
invoke-virtual {p0, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->visibilityChanged(Z)V
.line 2022
invoke-virtual {p0, v3, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setInteracting(IZ)V
.line 2023
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/NotificationPanelView;
instance-of v0, v0, Lcom/sonymobile/systemui/statusbar/tools/SomcTabsNotificationPanelView;
if-eqz v0, :cond_0
.line 2024
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/NotificationPanelView;
check-cast v0, Lcom/sonymobile/systemui/statusbar/tools/SomcTabsNotificationPanelView;
invoke-virtual {v0, v3}, Lcom/sonymobile/systemui/statusbar/tools/SomcTabsNotificationPanelView;->onExpandedChanged(Z)V
.line 2025
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->isAccessibilityEnabled()Z
move-result v0
if-eqz v0, :cond_0
.line 2026
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
goto/16 :goto_0
[COLOR="red"].line 1854
:catch_0
move-exception v0
.line 1855
const-string v0, "PhoneStatusBar"
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "Can not find color resource "
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-static {v1}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
move-result-object v1
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Slog;->w(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_1
.line 1856
:catch_1
move-exception v0
.line 1857
const-string v0, "PhoneStatusBar"
const-string v1, "Can not colorize the clock"
invoke-static {v0, v1}, Landroid/util/Slog;->w(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_1[/COLOR]
.end method
Pay attention on every method, in some cases I have needed to increase .locals value (underneath method name)
That´s it!! Good luck... \m/

Changelog
v1.0 - 08/02/2015:
- Initial release

@serajr thanks you
I needed a lot
Keep good work

Nice tut blood bro @serajr
Keep it up, very usefull for new people
Sent From Somewhere On Earth With My Z2 ^^

Amazing guide sir!! Thanks a lot.. :highfive::good:

omg !!!!
Amazing
Thanks :good::good::good:

Nice
It looks good and possible! However im just lazy and it looks scary to me!

WoW
well done :good:

Congratulations!!
Congratulations sir!! Your fantastic guide is on portal!! :good:

STRYDER~007 said:
Congratulations sir!! Your fantastic guide is on portal!! :good:
Click to expand...
Click to collapse
Wow... xda guys are faster than never!
Thank you bro!!!

thanks @serajr ^^ nice tut ^^

@serajr awesome.
Thanks Bro. Greats! Regards ?✌
Sent from my Sony Xperia Z3 Sensation - D6643 by Ogunja ??✌

serajr said:
v1.0 - 08/02/2015:
- Initial release
Click to expand...
Click to collapse
Nice work @serajr :highfive:

The Master did it again!!Thanks Master of smali coding----->@serajr :good:

This guide blows my mind
Any simpler guide or something else like that?

MT27i said:
This guide blows my mind
Any simpler guide or something else like that?
Click to expand...
Click to collapse
There's a way to get theme accent without editing any smali.

idid idamrep said:
There's a way to get theme accent without editing any smali.
Click to expand...
Click to collapse
Exactly!
I'm gonna try updating this guide with Lollipop SystemUI.apk.
No ETA, please!

Awesome guide!

Related

[DEV] [MOD] [HOW-TO] Remove Smart Stay/Rotation statusbar icon - Note2 MA7

Please give thanks/credit if you use this in your ROM - Donations are also appreciated!
This one really aggravated me with the latest update since it stayed on the statusbar all the time. You can of course just turn off the Smartstay or Smartrotation but that wouldn't be any fun. You can also cheat and mess with the icon file itself but that's not any fun either. I will admit this method is a little aggressive as I just boss hogged through the module and removed the icon usage all through it. I'm sure there are several other methods as well.
Yes, I could have attached the smali files themselves but that's not the point of How-To threads. Plus you'll need to learn for the next ROM base anyways
SystemUI/smali/com/android/systemui/statusbar/policy/FaceDetectionController$SmartRotationObserver.smali
Code:
invoke-static {v2}, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->access$300(Lcom/android/systemui/statusbar/policy/FaceDetectionController;)Z
move-result v2
[COLOR="Red"] --invoke-virtual {v0, v1, v2}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V[/COLOR]
.line 97
return-void
.line 93
:cond_1
iget-object v0, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController$SmartRotationObserver;->this$0:Lcom/android/systemui/statusbar/policy/FaceDetectionController;
#setter for: Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mEnableDetect:Z
invoke-static {v0, v4}, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->access$302(Lcom/android/systemui/statusbar/policy/FaceDetectionController;Z)Z
goto :goto_0
.end method
SystemUI/smali/com/android/systemui/statusbar/policy/FaceDetectionController$SmartStayObserver.smali
Code:
#getter for: Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mEnableDetect:Z
invoke-static {v2}, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->access$300(Lcom/android/systemui/statusbar/policy/FaceDetectionController;)Z
move-result v2
[COLOR="Red"] --invoke-virtual {v0, v1, v2}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V[/COLOR]
.line 78
return-void
.line 74
:cond_1
iget-object v0, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController$SmartStayObserver;->this$0:Lcom/android/systemui/statusbar/policy/FaceDetectionController;
#setter for: Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mEnableDetect:Z
invoke-static {v0, v4}, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->access$302(Lcom/android/systemui/statusbar/policy/FaceDetectionController;Z)Z
goto :goto_0
.end method
SystemUI/smali/com/android/systemui/statusbar/policy/FaceDetectionController.smali
Starting at line 118 (take note that your line numbers may change as we work down the file deleting lines)
Code:
const-string v2, "face"
iget v3, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mStopIconId:I
const/4 v4, 0x0
[COLOR="Red"] --invoke-virtual {v1, v2, v3, v5, v4}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V[/COLOR]
.line 105
iget-object v1, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mService:Landroid/app/StatusBarManager;
const-string v2, "face"
[COLOR="Red"] --invoke-virtual {v1, v2, v5}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V[/COLOR]
.line 107
iget-object v1, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mContext:Landroid/content/Context;
Starting at about Line 176
Code:
.line 116
:goto_0
iget v1, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mStopIconId:I
iget-boolean v2, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mEnableDetect:Z
[COLOR="Red"] --invoke-direct {p0, v1, v2}, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->updateIconView(IZ)V[/COLOR]
.line 117
iget-object v1, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mService:Landroid/app/StatusBarManager;
const-string v2, "face"
iget-boolean v3, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mEnableDetect:Z
[COLOR="Red"] --invoke-virtual {v1, v2, v3}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V[/COLOR]
.line 119
new-instance v1, Lcom/android/systemui/statusbar/policy/FaceDetectionController$SmartStayObserver;
Starting at about Line 372
Code:
.method static synthetic access$500(Lcom/android/systemui/statusbar/policy/FaceDetectionController;IZ)V
.locals 0
.parameter "x0"
.parameter "x1"
.parameter "x2"
.prologue
.line 35
[COLOR="Red"] --invoke-direct {p0, p1, p2}, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->updateIconView(IZ)V[/COLOR]
return-void
.end method
Starting at about Line 396
Code:
.method private final updateFaceIconVisibility(Z)V
.locals 2
.parameter "visible"
.prologue
.line 149
iget-object v0, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mService:Landroid/app/StatusBarManager;
const-string v1, "face"
[COLOR="Red"] --invoke-virtual {v0, v1, p1}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V[/COLOR]
.line 150
return-void
.end method
Starting at about Line 446
Code:
.line 144
if-eqz p2, :cond_0
const/4 v3, 0x0
:goto_1
[COLOR="Red"] --invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setVisibility(I)V[/COLOR]
.line 141
add-int/lit8 v1, v1, 0x1
Starting at about Line 472
Code:
# virtual methods
.method public addIconView(Landroid/widget/ImageView;)V
.locals 1
.parameter "v"
.prologue
.line 136
iget-object v0, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mIconViews:Ljava/util/ArrayList;
[COLOR="Red"] --invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z[/COLOR]
.line 137
return-void
.end method
Starting at about Line 552
Code:
if-eqz v1, :cond_1
.line 157
iget v1, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mStartIconId:I
[COLOR="Red"] --invoke-direct {p0, v1, v4}, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->updateIconView(IZ)V[/COLOR]
.line 158
iget-object v1, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mService:Landroid/app/StatusBarManager;
const-string v2, "face"
iget v3, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mStartIconId:I
[COLOR="Red"] --invoke-virtual {v1, v2, v3, v5, v6}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V[/COLOR]
.line 174
:cond_0
:goto_0
Starting at about Line 579
Code:
move-result v1
if-eqz v1, :cond_2
.line 160
iget v1, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mStopIconId:I
[COLOR="Red"] --invoke-direct {p0, v1, v4}, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->updateIconView(IZ)V[/COLOR]
.line 161
iget-object v1, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mService:Landroid/app/StatusBarManager;
const-string v2, "face"
iget v3, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mStopIconId:I
[COLOR="Red"] --invoke-virtual {v1, v2, v3, v5, v6}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V[/COLOR]
goto :goto_0
Starting at about Line 614
Code:
iget v1, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->isSmartStayMode:I
if-eq v1, v4, :cond_3
.line 164
iget v1, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mStopIconId:I
[COLOR="Red"] --invoke-direct {p0, v1, v4}, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->updateIconView(IZ)V[/COLOR]
.line 168
:goto_1
iget-object v1, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mService:Landroid/app/StatusBarManager;
const-string v2, "face"
iget v3, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mStopIconId:I
[COLOR="Red"] --invoke-virtual {v1, v2, v3, v5, v6}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V[/COLOR]
goto :goto_0
.line 166
:cond_3
iget v1, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mFailIconId:I
[COLOR="Red"] --invoke-direct {p0, v1, v4}, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->updateIconView(IZ)V[/COLOR]
goto :goto_1
.line 169
:cond_4
const-string v1, "android.intent.action.SCREEN_OFF"
Starting at about Line 653
Code:
.line 170
iget v1, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mStopIconId:I
[COLOR="Red"] --invoke-direct {p0, v1, v4}, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->updateIconView(IZ)V[/COLOR]
.line 171
iget-object v1, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mService:Landroid/app/StatusBarManager;
const-string v2, "face"
iget v3, p0, Lcom/android/systemui/statusbar/policy/FaceDetectionController;->mStopIconId:I
[COLOR="Red"] --invoke-virtual {v1, v2, v3, v5, v6}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V[/COLOR]
goto :goto_0
.end method
If you like this MOD and would like to see others please consider a donation via my profile. I encourage other developers to share their work in How-To's as well.
you are on it today! haha
t3project said:
you are on it today! haha
Click to expand...
Click to collapse
Doing the knowledge dump Being meaning to do these for a while and just haven't had time.
digiblur said:
Doing the knowledge dump Being meaning to do these for a while and just haven't had time.
Click to expand...
Click to collapse
I did it the easy way by editing the images but would definitely like to give this a try.
Skunk Ape1 said:
I did it the easy way by editing the images but would definitely like to give this a try.
Click to expand...
Click to collapse
This method prevents the icon from being set at all, which in theory should allow that space on the status bar to be used. There always could be some hard coding somewhere else though that tells the status bar to only show so many icons.
Any way to get it back to the old LK8 style where the eye only appeared when it detected a face?
Looks like that FaceDetection smali file moved locations in the Note 3 (or in android 4.3).
If anyone knows its whereabouts it would be much appreciated!
Thanks

[MOD][HOW-TO] Display/Hide Alarm icon in real time

This will allow you to hide/display the alarm icon in real time. Useful for users that always have an alarm and don't want the icon constantly in the statusbar.
We're going to be working with the following two files:
SecSettings.apk
SystemUI.apk
KEY
REMOVE what's in BLUE
ADD what's in RED
SecSettings.apk
Navigate to /res/values/strings.xml
Add the following to the end of the file
Code:
<string name="alarm_icon_title">Alarm icon</string>
<string name="alarm_icon_summary">Change alarm in order for it to take effect</string>
Navigate to /xml/display_settings.xml
Add the following line wherever you would like it to show in the menu
Code:
<CheckBoxPreference android:title="@string/alarm_icon_title" android:key="alarm_icon" android:summary="@string/alarm_icon_summary" />
Navigate to /smali/com/android/settings/DisplaySettings.smali
Code:
.field private mAccelerometerSecond:Landroid/preference/CheckBoxPreference;
[COLOR="Red"].field private mAlarmIcon:Landroid/preference/CheckBoxPreference;[/COLOR]
.field private mAnimationHandler:Landroid/os/Handler;
.method private updateState()V
Code:
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v4, "display_battery_percentage"
invoke-static {v0, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-eqz v0, :cond_4
move v0, v1
:goto_1
invoke-virtual {v3, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
[COLOR="red"]iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mAlarmIcon:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v4, "alarm_icon"
invoke-static {v0, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-eqz v0, :cond_alarm
move v0, v1
:goto_alarm
invoke-virtual {v3, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V[/COLOR]
Code:
[COLOR="red"]:cond_alarm
move v0, v2
goto/16 :goto_alarm[/COLOR]
:cond_b
move v0, v2
goto :goto_8
:cond_c
move v1, v2
.line 856
goto :goto_9
.end method
.method public onCreate(Landroid/os/BundleV
Code:
const-string v11, "display_battery_level"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/CheckBoxPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
[COLOR="red"]const-string v11, "alarm_icon"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/CheckBoxPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mAlarmIcon:Landroid/preference/CheckBoxPreference;[/COLOR]
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getActivity()Landroid/app/Activity;
move-result-object v11
invoke-static {v11}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
move-result v11
if-eqz v11, :cond_6
.method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/PreferenceZ
Code:
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 920
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "display_battery_percentage"
if-eqz v0, :cond_5
move v2, v1
:cond_5
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto :goto_2
:cond_6
[COLOR="red"]iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mAlarmIcon:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_next
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mAlarmIcon:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "alarm_icon"
if-eqz v0, :cond_alarm
move v2, v1
:cond_alarm
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_2
:cond_next[/COLOR]
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mNotificationPulse:Landroid/preference/CheckBoxPreference;
if-ne p2, v0, :cond_10
.line 923
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mNotificationPulse:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
Compile and test!
Now for SystemUI.apk
Navigate to /smali/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.smali
.method private final updateAlarm(Landroid/content/IntentV
Code:
.method private final updateAlarm(Landroid/content/Intent;)V
[COLOR="Red"].locals 5[/COLOR]
.parameter "intent"
.prologue
.line 194
[COLOR="Red"]const/4 v3, 0x0[/COLOR]
const-string v1, "alarmSet"
const/4 v2, 0x0
invoke-virtual {p1, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v0
[COLOR="red"]iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "alarm_icon"
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
if-nez v1, :cond_0
move v0, v3[/COLOR]
.line 195
.local v0, alarmSet:Z
[COLOR="red"]:cond_0[/COLOR]
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v2, "alarm_clock"
invoke-virtual {v1, v2, v0}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
.line 196
return-void
.end method
That's it. Compile and test!
On a roll I see. Thanks Loserskater
Worked. Thank you
Sent from my SAMSUNG-SGH-I747 using xda premium
Great mod boss, and very useful!!! :good::highfive:
This works perfectly on my Sprint GS3. Thanks for another great tutorial loserskater. By any chance do you have one for the bluetooth icon?
THX works for me with a hot boot, not in real time (I9100)
Perhaps any solutions for this ?
Thx
If you change, add, or delete an alarm this mod should take effect without a reboot.
metalfan78 said:
If you change, add, or delete an alarm this mod should take effect without a reboot.
Click to expand...
Click to collapse
You´re right THX
You're welcome

[GUIDE][How-To] Vertical Screen Off for I9505

Hello guys..
I want to share the Vertical Screen Off I mod for my I9505 (XXUBMF8) which you can find on most CM roms.
This should be able to apply on all other firmwares on the I9505 (not tested yet).
but first, you need:
1. smali/baksmali app/tools
2. Some knowledge about compiling and decompiling
3. 7zip/winrar/winzip
4. notepad++
Let's get started...
1. Decompile services.jar
go to com\android\server\power\ElectronBeam.smali using notepad++.
2. Find:
Code:
[COLOR="SeaGreen"].method private drawHStretch(F)V[/COLOR]
Inspect the following the codes and make edits:
Code:
[B].registers 9
.parameter "stretch"
.prologue
const v6, 0x8074
const/4 v5, 0x0
const/high16 v4, 0x3f80
.line 321
const/high16 v1, 0x4100
invoke-static {p1, v1}, Lcom/android/server/power/ElectronBeam;->scurve(FF)F
move-result v0
.line 326
.local v0, ag:F
cmpg-float v1, p1, v4
if-gez v1, :cond_37
.line 328
const/4 v1, 0x2
const/16 v2, 0x1406
iget-object v3, p0, Lcom/android/server/power/ElectronBeam;->mVertexBuffer:Ljava/nio/FloatBuffer;
invoke-static {v1, v2, v5, v3}, Landroid/opengl/GLES10;->glVertexPointer(IIILjava/nio/Buffer;)V
.line 329
invoke-static {v6}, Landroid/opengl/GLES10;->glEnableClientState(I)V
.line 332
iget-object v1, p0, Lcom/android/server/power/ElectronBeam;->mVertexBuffer:Ljava/nio/FloatBuffer;
iget v2, p0, Lcom/android/server/power/ElectronBeam;->mDisplayWidth:I
int-to-float v2, v2
iget v3, p0, Lcom/android/server/power/ElectronBeam;->mDisplayHeight:I
int-to-float v3, v3
invoke-static {v1, v2, v3, v0}, Lcom/android/server/power/ElectronBeam;->setHStretchQuad(Ljava/nio/FloatBuffer;FFF)V
.line 333
sub-float v1, v4, v0
sub-float v2, v4, v0
sub-float v3, v4, v0
invoke-static {v1, v2, v3, v4}, Landroid/opengl/GLES10;->glColor4f(FFFF)V
.line 334
const/4 v1, 0x6
const/4 v2, 0x4
invoke-static {v1, v5, v2}, Landroid/opengl/GLES10;->glDrawArrays(III)V
.line 337
invoke-static {v6}, Landroid/opengl/GLES10;->glDisableClientState(I)V
.line 339
:cond_37
return-void
.end method[/B]
3. Next, find:
Code:
[COLOR="SeaGreen"].method private drawVStretch(F)V[/COLOR]
Inspect the following codes and make edits:
Code:
[B].registers 13
.parameter "stretch"
.prologue
const/4 v10, 0x6
const/4 v9, 0x4
const/16 v8, 0xde1
const/4 v7, 0x1
const/4 v6, 0x0
.line 249
const/high16 v3, 0x40f0
invoke-static {p1, v3}, Lcom/android/server/power/ElectronBeam;->scurve(FF)F
move-result v2
.line 250
.local v2, ar:F
const/high16 v3, 0x4100
invoke-static {p1, v3}, Lcom/android/server/power/ElectronBeam;->scurve(FF)F
move-result v1
.line 251
.local v1, ag:F
const/high16 v3, 0x4108
invoke-static {p1, v3}, Lcom/android/server/power/ElectronBeam;->scurve(FF)F
move-result v0
.line 258
.local v0, ab:F
invoke-static {v7, v7}, Landroid/opengl/GLES10;->glBlendFunc(II)V
.line 259
const/16 v3, 0xbe2
invoke-static {v3}, Landroid/opengl/GLES10;->glEnable(I)V
.line 262
const/4 v3, 0x2
const/16 v4, 0x1406
iget-object v5, p0, Lcom/android/server/power/ElectronBeam;->mVertexBuffer:Ljava/nio/FloatBuffer;
invoke-static {v3, v4, v6, v5}, Landroid/opengl/GLES10;->glVertexPointer(IIILjava/nio/Buffer;)V
.line 263
const v3, 0x8074
invoke-static {v3}, Landroid/opengl/GLES10;->glEnableClientState(I)V
.line 266
iget-object v3, p0, Lcom/android/server/power/ElectronBeam;->mTexNames:[I
aget v3, v3, v6
invoke-static {v8, v3}, Landroid/opengl/GLES10;->glBindTexture(II)V
.line 267
const/16 v4, 0x2300
const/16 v5, 0x2200
iget v3, p0, Lcom/android/server/power/ElectronBeam;->mMode:I
if-nez v3, :cond_c8
const/16 v3, 0x2100
:goto_3f
invoke-static {v4, v5, v3}, Landroid/opengl/GLES10;->glTexEnvx(III)V
.line 269
const/16 v3, 0x2800
const/16 v4, 0x2601
invoke-static {v8, v3, v4}, Landroid/opengl/GLES10;->glTexParameterx(III)V
.line 271
const/16 v3, 0x2801
const/16 v4, 0x2601
invoke-static {v8, v3, v4}, Landroid/opengl/GLES10;->glTexParameterx(III)V
.line 273
const/16 v3, 0x2802
const v4, 0x812f
invoke-static {v8, v3, v4}, Landroid/opengl/GLES10;->glTexParameterx(III)V
.line 275
const/16 v3, 0x2803
const v4, 0x812f
invoke-static {v8, v3, v4}, Landroid/opengl/GLES10;->glTexParameterx(III)V
.line 277
invoke-static {v8}, Landroid/opengl/GLES10;->glEnable(I)V
.line 278
const/4 v3, 0x2
const/16 v4, 0x1406
iget-object v5, p0, Lcom/android/server/power/ElectronBeam;->mTexCoordBuffer:Ljava/nio/FloatBuffer;
invoke-static {v3, v4, v6, v5}, Landroid/opengl/GLES10;->glTexCoordPointer(IIILjava/nio/Buffer;)V
.line 279
const v3, 0x8078
invoke-static {v3}, Landroid/opengl/GLES10;->glEnableClientState(I)V
.line 282
iget-object v3, p0, Lcom/android/server/power/ElectronBeam;->mVertexBuffer:Ljava/nio/FloatBuffer;
iget v4, p0, Lcom/android/server/power/ElectronBeam;->mDisplayWidth:I
int-to-float v4, v4
iget v5, p0, Lcom/android/server/power/ElectronBeam;->mDisplayHeight:I
int-to-float v5, v5
invoke-static {v3, v4, v5, v2}, Lcom/android/server/power/ElectronBeam;->setVStretchQuad(Ljava/nio/FloatBuffer;FFF)V
.line 283
invoke-static {v7, v6, v6, v7}, Landroid/opengl/GLES10;->glColorMask(ZZZZ)V
.line 284
invoke-static {v10, v6, v9}, Landroid/opengl/GLES10;->glDrawArrays(III)V
.line 287
iget-object v3, p0, Lcom/android/server/power/ElectronBeam;->mVertexBuffer:Ljava/nio/FloatBuffer;
iget v4, p0, Lcom/android/server/power/ElectronBeam;->mDisplayWidth:I
int-to-float v4, v4
iget v5, p0, Lcom/android/server/power/ElectronBeam;->mDisplayHeight:I
int-to-float v5, v5
invoke-static {v3, v4, v5, v1}, Lcom/android/server/power/ElectronBeam;->setVStretchQuad(Ljava/nio/FloatBuffer;FFF)V
.line 288
invoke-static {v6, v7, v6, v7}, Landroid/opengl/GLES10;->glColorMask(ZZZZ)V
.line 289
invoke-static {v10, v6, v9}, Landroid/opengl/GLES10;->glDrawArrays(III)V
.line 292
iget-object v3, p0, Lcom/android/server/power/ElectronBeam;->mVertexBuffer:Ljava/nio/FloatBuffer;
iget v4, p0, Lcom/android/server/power/ElectronBeam;->mDisplayWidth:I
int-to-float v4, v4
iget v5, p0, Lcom/android/server/power/ElectronBeam;->mDisplayHeight:I
int-to-float v5, v5
invoke-static {v3, v4, v5, v0}, Lcom/android/server/power/ElectronBeam;->setVStretchQuad(Ljava/nio/FloatBuffer;FFF)V
.line 293
invoke-static {v6, v6, v7, v7}, Landroid/opengl/GLES10;->glColorMask(ZZZZ)V
.line 294
invoke-static {v10, v6, v9}, Landroid/opengl/GLES10;->glDrawArrays(III)V
.line 297
invoke-static {v8}, Landroid/opengl/GLES10;->glDisable(I)V
.line 298
const v3, 0x8078
invoke-static {v3}, Landroid/opengl/GLES10;->glDisableClientState(I)V
.line 299
invoke-static {v7, v7, v7, v7}, Landroid/opengl/GLES10;->glColorMask(ZZZZ)V
.line 302
iget v3, p0, Lcom/android/server/power/ElectronBeam;->mMode:I
if-ne v3, v7, :cond_bc
.line 303
const/high16 v3, 0x3f80
invoke-static {v1, v1, v1, v3}, Landroid/opengl/GLES10;->glColor4f(FFFF)V
.line 304
invoke-static {v10, v6, v9}, Landroid/opengl/GLES10;->glDrawArrays(III)V
.line 308
:cond_bc
const v3, 0x8074
invoke-static {v3}, Landroid/opengl/GLES10;->glDisableClientState(I)V
.line 309
const/16 v3, 0xbe2
invoke-static {v3}, Landroid/opengl/GLES10;->glDisable(I)V
.line 310
return-void
.line 267
:cond_c8
const/16 v3, 0x1e01
goto/16 :goto_3f
.end method[/B]
3. Find:
Code:
[COLOR="SeaGreen"].method private static setHStretchQuad(Ljava/nio/FloatBuffer;FFF)V[/COLOR]
Inspect and make edits:
Code:
[B].registers 11
.parameter "vtx"
.parameter "dw"
.parameter "dh"
.parameter "a"
.prologue
const/high16 v6, 0x3f80
const/high16 v5, 0x3f00
.line 350
const/high16 v0, 0x3f80
.line 351
.local v1, w:F
mul-float v4, p1, p3
add-float v0, p1, v4
.line 352
.local v0, h:F
sub-float v4, p1, v6
mul-float v2, v4, v5
.line 353
.local v2, x:F
sub-float v4, p2, v0
mul-float v3, v4, v5
.line 354
.local v3, y:F
invoke-static {p0, v2, v3, v6, v0}, Lcom/android/server/power/ElectronBeam;->setQuad(Ljava/nio/FloatBuffer;FFFF)V
.line 355
return-void
.end method[/B]
4. Lastly, find:
Code:
[COLOR="SeaGreen"]method private static setVStretchQuad(Ljava/nio/FloatBuffer;FFF)V[/COLOR]
Inspect and make edits:
Code:
[B].registers 10
.parameter "vtx"
.parameter "dw"
.parameter "dh"
.parameter "a"
.prologue
const/high16 v5, 0x3f00
.line 342
mul-float v4, p1, p3
sub-float v1, p1, v4
.line 343
.local v1, w:F
mul-float v4, p2, p3
add-float v0, p2, v4
.line 344
.local v0, h:F
sub-float v4, p1, v1
mul-float v2, v4, v5
.line 345
.local v2, x:F
sub-float v4, p2, v0
mul-float v3, v4, v5
.line 346
.local v3, y:F
invoke-static {p0, v2, v3, v1, v0}, Lcom/android/server/power/ElectronBeam;->setQuad(Ljava/nio/FloatBuffer;FFFF)V
.line 347
return-void
.end method[/B]
Thats it.
Compile back the services.jar and flash it.
This has been tested on my device.
For Dev cookers, you are allowed to use this mod in your project. Give proper credits and thanks.
**Special thanks to Adi Aisiteru Reborn for the cm10.1 informative guide.
Press the thanks button if this mod has made your day.

[GUIDE][STOCK] Signal Bars Hide option in statusbar

Good day again. I have a new guide here. As I see the famous EDT Tweaks by Mr. RomanBB, the remodified EDT by pvyMods but I havent seen any other mods except PotatoXLenox that has a working an signal option, yes the hide and default. I didnt include the left signal. Its for you to implement it. Also i recieve many PMs regarding this so I made it.
Disclaimer:
You can add it in your ROM, you can modify it but please dont edit the About Us preference as a respect for us. Kanging is bad right? Also if you are nice enough put us in credits of your ROM.
Before you ask question double check your question first and think. As I did it and workin on stock SystemUI. Also take a necessary backup first hehe
Note: This mod is in PotatoXLenox ROM now so for them no need to do this.
Requirements:
What will be needing is a
1. Working brain that can understand my poor grammar
2. Notepad ++
3. APKTool
4. Luck
5. Your very owned SystemUI
Steps:
1. Pull your SystemUI.apk
2. Decompile your SystemUI.apk
3. After decompiling , go to this directory of your decompiled systemui
com/android/systemui/statusbar/policy/
Click to expand...
Click to collapse
4. Open the "StatusBarPolicy.smali" no need for the dollar things.
5. Now find ,
Code:
.method private final updateSignalStrength()V
6. Now replace this,
Code:
.method private final updateSignalStrength()V
.locals 11
.prologue
const/16 v8, 0xd
const/4 v7, 0x2
const/4 v6, 0x1
const/4 v5, 0x0
const-string v9, "StatusBarPolicy"
.line 1219
.line 1221
const-string v0, "ro.csc.sales_code"
invoke-static {v0}, Landroid/os/SystemProperties;->get(Ljava/lang/String;)Ljava/lang/String;
.line 1223
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->updateCdmaRoamingIcon()V
.line 1228
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->hasService()Z
move-result v0
if-nez v0, :cond_1
.line 1230
iget-object v0, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "airplane_mode_on"
invoke-static {v0, v1, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-ne v0, v6, :cond_0
.line 1232
const v0, 0x7f020087
iput v0, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mPhoneSignalIconId:I
.line 1236
:goto_0
iget-object v0, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v1, "phone_signal"
iget v2, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mPhoneSignalIconId:I
invoke-virtual {v0, v1, v2, v5}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;II)V
.line 1350
:goto_1
return-void
.line 1234
:cond_0
const v0, 0x7f020088
iput v0, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mPhoneSignalIconId:I
goto :goto_0
.line 1258
:cond_1
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->isCdma()Z
move-result v0
if-nez v0, :cond_12
.line 1264
iget-object v0, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mSignalStrength:Landroid/telephony/SignalStrength;
invoke-virtual {v0}, Landroid/telephony/SignalStrength;->getGsmSignalStrength()I
move-result v0
.line 1265
iget-object v1, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mSignalStrength:Landroid/telephony/SignalStrength;
invoke-virtual {v1}, Landroid/telephony/SignalStrength;->getGsmBitErrorRate()I
move-result v1
.line 1286
const/16 v2, 0x13
if-lt v1, v2, :cond_2
move v2, v5
.line 1290
:goto_2
const-string v3, "StatusBarPolicy"
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "ecio: "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v9, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 1291
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->getRAT()I
move-result v1
packed-switch v1, :pswitch_data_0
:pswitch_0
move v0, v5
.line 1327
:goto_3
iget-object v1, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mPhone:Landroid/telephony/TelephonyManager;
invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->isNetworkRoaming()Z
move-result v1
if-eqz v1, :cond_11
.line 1328
sget-object v1, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->sSignalImages_r:[[I
iget v2, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mInetCondition:I
aget-object v1, v1, v2
move-object v10, v1
move v1, v0
move-object v0, v10
.line 1348
:goto_4
aget v0, v0, v1
iput v0, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mPhoneSignalIconId:I
.line 1349
iget-object v0, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v1, "phone_signal"
iget v2, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mPhoneSignalIconId:I
invoke-virtual {v0, v1, v2, v5}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;II)V
goto :goto_1
.line 1287
:cond_2
if-lt v1, v8, :cond_3
const/16 v2, 0x13
if-ge v1, v2, :cond_3
const/4 v2, -0x1
goto :goto_2
.line 1288
:cond_3
if-ge v1, v8, :cond_14
const/4 v2, -0x2
goto :goto_2
.line 1293
:pswitch_1
if-lez v0, :cond_4
const/16 v1, 0x63
if-ne v0, v1, :cond_5
:cond_4
move v0, v5
.line 1300
:goto_5
const-string v1, "StatusBarPolicy"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "iconLevel: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v9, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_3
.line 1294
:cond_5
if-lt v0, v8, :cond_6
const/4 v0, 0x4
goto :goto_5
.line 1295
:cond_6
const/16 v1, 0xa
if-lt v0, v1, :cond_7
const/4 v0, 0x3
goto :goto_5
.line 1296
:cond_7
const/16 v1, 0x8
if-lt v0, v1, :cond_8
move v0, v7
goto :goto_5
.line 1297
:cond_8
const/4 v1, 0x6
if-lt v0, v1, :cond_9
move v0, v6
goto :goto_5
:cond_9
move v0, v5
.line 1298
goto :goto_5
.line 1305
:pswitch_2
if-lez v0, :cond_a
const/16 v1, 0x63
if-ne v0, v1, :cond_c
:cond_a
move v0, v5
.line 1312
:goto_6
add-int/2addr v0, v2
.line 1314
if-gez v0, :cond_b
move v0, v5
.line 1316
:cond_b
const-string v1, "StatusBarPolicy"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "iconLevel: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v9, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
goto/16 :goto_3
.line 1306
:cond_c
const/16 v1, 0xc
if-lt v0, v1, :cond_d
const/4 v0, 0x4
goto :goto_6
.line 1307
:cond_d
const/16 v1, 0x8
if-lt v0, v1, :cond_e
const/4 v0, 0x3
goto :goto_6
.line 1308
:cond_e
const/4 v1, 0x5
if-lt v0, v1, :cond_f
move v0, v7
goto :goto_6
.line 1309
:cond_f
if-lt v0, v7, :cond_10
move v0, v6
goto :goto_6
:cond_10
move v0, v5
.line 1310
goto :goto_6
.line 1330
:cond_11
sget-object v1, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->sSignalImages:[[I
iget v2, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mInetCondition:I
aget-object v1, v1, v2
move-object v10, v1
move v1, v0
move-object v0, v10
goto/16 :goto_4
.line 1333
:cond_12
sget-object v0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->sSignalImages:[[I
iget v1, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mInetCondition:I
aget-object v0, v0, v1
.line 1338
iget v1, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mPhoneState:I
if-nez v1, :cond_13
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->isEvdo()Z
move-result v1
if-eqz v1, :cond_13
iget-boolean v1, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mAlwaysUseCdmaRssi:Z
if-nez v1, :cond_13
.line 1340
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->getEvdoLevel()I
move-result v1
goto/16 :goto_4
.line 1345
:cond_13
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->getCdmaLevel()I
move-result v1
goto/16 :goto_4
:cond_14
move v2, v5
goto/16 :goto_2
.line 1291
nop
:pswitch_data_0
.packed-switch 0x2
:pswitch_1
:pswitch_0
:pswitch_0
:pswitch_2
.end packed-switch
.end method
with these
Code:
.method private final updateSignalStrength()V
.locals 15
.prologue
.line 993
iget-object v11, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v11}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v10
.line 994
.local v10, resolver:Landroid/content/ContentResolver;
invoke-virtual {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->updateSignalStrengthDbm()V
.line 996
const-string v11, "ro.csc.sales_code"
invoke-static {v11}, Landroid/os/SystemProperties;->get(Ljava/lang/String;)Ljava/lang/String;
.line 997
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->updateCdmaRoamingIcon()V
.line 998
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->hasService()Z
move-result v11
if-nez v11, :cond_2
.line 1000
iget-object v11, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v11}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v11
const-string v12, "airplane_mode_on"
const/4 v13, 0x0
invoke-static {v11, v12, v13}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v11
const/4 v12, 0x1
if-ne v11, v12, :cond_0
.line 1001
const v11, 0x7f020087
iput v11, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mPhoneSignalIconId:I
.line 1005
:goto_0
iget-object v11, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v12, "phone_signal"
iget v13, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mPhoneSignalIconId:I
const/4 v14, 0x0
invoke-virtual {v11, v12, v13, v14}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;II)V
.line 1006
const-string v11, "hide_signal_icon"
const/4 v12, 0x0
invoke-static {v10, v11, v12}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v9
.line 1007
.local v9, mHideSignalStrength:I
if-nez v9, :cond_1
.line 1008
iget-object v11, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v12, "phone_signal"
const/4 v13, 0x1
invoke-virtual {v11, v12, v13}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
.line 1123
:goto_1
return-void
.line 1003
.end local v9 #mHideSignalStrength:I
:cond_0
const v11, 0x7f020088
iput v11, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mPhoneSignalIconId:I
goto :goto_0
.line 1010
.restart local v9 #mHideSignalStrength:I
:cond_1
iget-object v11, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v12, "phone_signal"
const/4 v13, 0x0
invoke-virtual {v11, v12, v13}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
goto :goto_1
.line 1018
.end local v9 #mHideSignalStrength:I
:cond_2
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->isCdma()Z
move-result v11
if-nez v11, :cond_12
.line 1020
iget-object v11, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mSignalStrength:Landroid/telephony/SignalStrength;
invoke-virtual {v11}, Landroid/telephony/SignalStrength;->getGsmSignalStrength()I
move-result v6
.line 1021
.local v6, j:I
iget-object v11, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mSignalStrength:Landroid/telephony/SignalStrength;
invoke-virtual {v11}, Landroid/telephony/SignalStrength;->getGsmBitErrorRate()I
move-result v7
.line 1023
.local v7, k:I
const/16 v11, 0x13
if-lt v7, v11, :cond_3
.line 1024
const/4 v3, 0x0
.line 1033
.local v3, byte0:B
:goto_2
const-string v11, "StatusBarPolicy"
new-instance v12, Ljava/lang/StringBuilder;
invoke-direct {v12}, Ljava/lang/StringBuilder;-><init>()V
const-string v13, "ecio: "
invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v12
invoke-virtual {v12, v7}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v12
invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v12
invoke-static {v11, v12}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 1035
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->getRAT()I
move-result v11
packed-switch v11, :pswitch_data_0
.line 1090
:pswitch_0
const/4 v8, 0x0
.line 1093
.local v8, l:I
:goto_3
iget-object v11, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mPhone:Landroid/telephony/TelephonyManager;
invoke-virtual {v11}, Landroid/telephony/TelephonyManager;->isNetworkRoaming()Z
move-result v11
if-eqz v11, :cond_11
.line 1095
sget-object v11, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->sSignalImages_r:[[I
iget v12, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mInetCondition:I
aget-object v2, v11, v12
.line 1096
.local v2, ai2:[I
move v5, v8
.line 1097
.local v5, i:I
move-object v0, v2
.line 1112
.end local v2 #ai2:[I
.end local v3 #byte0:B
.end local v6 #j:I
.end local v7 #k:I
.end local v8 #l:I
.local v0, ai:[I
:goto_4
aget v11, v0, v5
iput v11, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mPhoneSignalIconId:I
.line 1113
iget-object v11, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v12, "phone_signal"
iget v13, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mPhoneSignalIconId:I
const/4 v14, 0x0
invoke-virtual {v11, v12, v13, v14}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;II)V
.line 1117
const-string v11, "hide_signal_icon"
const/4 v12, 0x0
invoke-static {v10, v11, v12}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v9
.line 1118
.restart local v9 #mHideSignalStrength:I
if-nez v9, :cond_14
.line 1119
iget-object v11, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v12, "phone_signal"
const/4 v13, 0x1
invoke-virtual {v11, v12, v13}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
goto :goto_1
.line 1026
.end local v0 #ai:[I
.end local v5 #i:I
.end local v9 #mHideSignalStrength:I
.restart local v6 #j:I
.restart local v7 #k:I
:cond_3
const/16 v11, 0xd
if-lt v7, v11, :cond_4
const/16 v11, 0x13
if-ge v7, v11, :cond_4
.line 1027
const/4 v3, -0x1
.restart local v3 #byte0:B
goto :goto_2
.line 1029
.end local v3 #byte0:B
:cond_4
const/16 v11, 0xd
if-ge v7, v11, :cond_5
.line 1030
const/4 v3, -0x2
.restart local v3 #byte0:B
goto :goto_2
.line 1032
.end local v3 #byte0:B
:cond_5
const/4 v3, 0x0
.restart local v3 #byte0:B
goto :goto_2
.line 1039
:pswitch_1
if-lez v6, :cond_b
const/16 v11, 0x63
if-eq v6, v11, :cond_b
.line 1041
const/16 v11, 0xc
if-lt v6, v11, :cond_7
.line 1042
const/4 v4, 0x4
.line 1058
.local v4, byte1:B
:goto_5
add-int v8, v4, v3
.line 1059
.restart local v8 #l:I
if-gez v8, :cond_6
.line 1060
const/4 v8, 0x0
.line 1061
:cond_6
const-string v11, "StatusBarPolicy"
new-instance v12, Ljava/lang/StringBuilder;
invoke-direct {v12}, Ljava/lang/StringBuilder;-><init>()V
const-string v13, "iconLevel: "
invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v12
invoke-virtual {v12, v8}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v12
invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v12
invoke-static {v11, v12}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_3
.line 1044
.end local v4 #byte1:B
.end local v8 #l:I
:cond_7
const/16 v11, 0x8
if-lt v6, v11, :cond_8
.line 1045
const/4 v4, 0x3
.restart local v4 #byte1:B
goto :goto_5
.line 1047
.end local v4 #byte1:B
:cond_8
const/4 v11, 0x5
if-lt v6, v11, :cond_9
.line 1048
const/4 v4, 0x2
.restart local v4 #byte1:B
goto :goto_5
.line 1050
.end local v4 #byte1:B
:cond_9
const/4 v11, 0x2
if-lt v6, v11, :cond_a
.line 1051
const/4 v4, 0x1
.restart local v4 #byte1:B
goto :goto_5
.line 1053
.end local v4 #byte1:B
:cond_a
const/4 v4, 0x0
.line 1054
.restart local v4 #byte1:B
goto :goto_5
.line 1056
.end local v4 #byte1:B
:cond_b
const/4 v4, 0x0
.restart local v4 #byte1:B
goto :goto_5
.line 1065
.end local v4 #byte1:B
:pswitch_2
if-lez v6, :cond_10
const/16 v11, 0x63
if-eq v6, v11, :cond_10
.line 1067
const/16 v11, 0xd
if-lt v6, v11, :cond_c
.line 1068
const/4 v8, 0x4
.line 1084
.restart local v8 #l:I
:goto_6
const-string v11, "StatusBarPolicy"
new-instance v12, Ljava/lang/StringBuilder;
invoke-direct {v12}, Ljava/lang/StringBuilder;-><init>()V
const-string v13, "iconLevel: "
invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v12
invoke-virtual {v12, v8}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v12
invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v12
invoke-static {v11, v12}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
goto/16 :goto_3
.line 1070
.end local v8 #l:I
:cond_c
const/16 v11, 0xa
if-lt v6, v11, :cond_d
.line 1071
const/4 v8, 0x3
.restart local v8 #l:I
goto :goto_6
.line 1073
.end local v8 #l:I
:cond_d
const/16 v11, 0x8
if-lt v6, v11, :cond_e
.line 1074
const/4 v8, 0x2
.restart local v8 #l:I
goto :goto_6
.line 1076
.end local v8 #l:I
:cond_e
const/4 v11, 0x6
if-lt v6, v11, :cond_f
.line 1077
const/4 v8, 0x1
.restart local v8 #l:I
goto :goto_6
.line 1079
.end local v8 #l:I
:cond_f
const/4 v8, 0x0
.line 1080
.restart local v8 #l:I
goto :goto_6
.line 1082
.end local v8 #l:I
:cond_10
const/4 v8, 0x0
.restart local v8 #l:I
goto :goto_6
.line 1100
:cond_11
sget-object v11, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->sSignalImages:[[I
iget v12, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mInetCondition:I
aget-object v1, v11, v12
.line 1101
.local v1, ai1:[I
move v5, v8
.line 1102
.restart local v5 #i:I
move-object v0, v1
.line 1104
.restart local v0 #ai:[I
goto/16 :goto_4
.line 1106
.end local v0 #ai:[I
.end local v1 #ai1:[I
.end local v3 #byte0:B
.end local v5 #i:I
.end local v6 #j:I
.end local v7 #k:I
.end local v8 #l:I
:cond_12
sget-object v11, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->sSignalImages:[[I
iget v12, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mInetCondition:I
aget-object v0, v11, v12
.line 1107
.restart local v0 #ai:[I
iget v11, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mPhoneState:I
if-nez v11, :cond_13
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->isEvdo()Z
move-result v11
if-eqz v11, :cond_13
iget-boolean v11, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mAlwaysUseCdmaRssi:Z
if-nez v11, :cond_13
.line 1108
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->getEvdoLevel()I
move-result v5
.restart local v5 #i:I
goto/16 :goto_4
.line 1110
.end local v5 #i:I
:cond_13
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->getCdmaLevel()I
move-result v5
.restart local v5 #i:I
goto/16 :goto_4
.line 1121
.restart local v9 #mHideSignalStrength:I
:cond_14
iget-object v11, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v12, "phone_signal"
const/4 v13, 0x0
invoke-virtual {v11, v12, v13}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
goto/16 :goto_1
.line 1035
nop
:pswitch_data_0
.packed-switch 0x2
:pswitch_2
:pswitch_0
:pswitch_0
:pswitch_1
.end packed-switch
.end method
7. Below (it is located at the end of the StatusbarPolicy.smali)
Code:
const-string v1, "wifi"
invoke-virtual {v0, v4, v3}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
goto :goto_1
.end method
add two spaces, and add this,
Code:
# virtual methods
.method public updateSignalStrengthDbm()V
.locals 6
.prologue
const/4 v4, -0x1
.line 1126
const/4 v1, -0x1
.line 1128
.local v1, dBm:I
iget-object v5, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mSignalStrength:Landroid/telephony/SignalStrength;
invoke-virtual {v5}, Landroid/telephony/SignalStrength;->isGsm()Z
move-result v5
if-nez v5, :cond_1
.line 1129
iget-object v4, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mSignalStrength:Landroid/telephony/SignalStrength;
invoke-virtual {v4}, Landroid/telephony/SignalStrength;->getCdmaDbm()I
move-result v1
.line 1137
:cond_0
:goto_0
new-instance v2, Landroid/content/Intent;
const-string v4, "com.android.intent.action.DBM_SIGNAL_CHANGED"
invoke-direct {v2, v4}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 1139
.local v2, dbmIntent:Landroid/content/Intent;
const-string v4, "dbm"
invoke-virtual {v2, v4, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;
.line 1141
iget-object v4, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v4, v2}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
.line 1145
return-void
.line 1131
.end local v2 #dbmIntent:Landroid/content/Intent;
:cond_1
iget-object v5, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mSignalStrength:Landroid/telephony/SignalStrength;
invoke-virtual {v5}, Landroid/telephony/SignalStrength;->getGsmSignalStrength()I
move-result v3
.line 1132
.local v3, gsmSignalStrength:I
const/16 v5, 0x63
if-ne v3, v5, :cond_2
move v0, v4
.line 1133
.local v0, asu:I
:goto_1
if-eq v0, v4, :cond_0
.line 1134
mul-int/lit8 v4, v0, 0x2
add-int/lit8 v1, v4, -0x71
goto :goto_0
.end local v0 #asu:I
:cond_2
move v0, v3
.line 1132
goto :goto_1
.end method
8. Now save the smali
9. Recompile your SystemUI.apk
10. Now flash or push hehe
10. Download te PxL Residue below
11. Install it as a normal apk
12. And finish
Screenshot:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click to expand...
Click to collapse
Download link
Here
Credits:
PxL Developers
PotatoInc
Lenox Devs
Haters
RomanBB
Greets,
PineappleOwl​​
First :laugh:
I will be handsome now
what about putting the signal icons to the left? like lenox does
zzapz said:
what about putting the signal icons to the left? like lenox does
Click to expand...
Click to collapse
Hehe there still a bug too in aigna in lenox sir so i didnt gave it
Sent from my Nexus 7 using Tapatalk
Great Guide.
Thanks working properly in Custock Rom.
More power LenoxDevs
Thanks, sir. I wait it looong time:laugh:
waaawwww very cool
btw can u make icon signal look like jb
i mean signal bar n gprs to be as one?
Minions_Army said:
waaawwww very cool
btw can u make icon signal look like jb
i mean signal bar n gprs to be as one?
Click to expand...
Click to collapse
You can make it . Its yours just change the png in drawable. Haha Gprs i find it hard but we can i think
PineappleOwl said:
You can make it . Its yours just change the png in drawable. Haha Gprs i find it hard but we can i think
Click to expand...
Click to collapse
haha...
we know in jb icon data connection and signal in one frame
error when smaling
error on smaling but Iv'e used your statusbarpolicy.smali iv'e pull it from your Lenox Rom and it works .. thanks for it
waiting for stable left signal mod.
I dont have "StatusBarPolicy.smali"
will you find a solution?
I guess it works with only galaxy y..cauz i dont have
" .method private final updateSignalStrength()V" this line lol

[Guide][tut] HeadsUp timeOut settings

Hello guys here go a simple tut
all you need is Deodexed Systemui.apk
1. Decompile SystemUI.apk
2. Open Systemui.apk/smali/com/android/statusbar/phone/PhoneStatusBar.smali
and find this Method
Code:
.method public resetHeadsUpDecayTimer()V
and completely replace with this method
Code:
.method public resetHeadsUpDecayTimer()V
.locals 5
.prologue
const/16 v4, 0x407
.line 1756
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mHandler:Lcom/android/systemui/statusbar/BaseStatusBar$H;
invoke-virtual {v0, v4}, Lcom/android/systemui/statusbar/BaseStatusBar$H;->removeMessages(I)V
.line 1757
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mUseHeadsUp:Z
if-eqz v0, :cond_0
iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mHeadsUpNotificationDecay:I
if-lez v0, :cond_0
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mHeadsUpNotificationView:Lcom/android/systemui/statusbar/policy/HeadsUpNotificationView;
invoke-virtual {v0}, Lcom/android/systemui/statusbar/policy/HeadsUpNotificationView;->isClearable()Z
move-result v0
if-eqz v0, :cond_0
.line 1759
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mHandler:Lcom/android/systemui/statusbar/BaseStatusBar$H;
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "heads_up_timeout"
const/16 v3, 0xbb8
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
int-to-long v2, v1
invoke-virtual {v0, v4, v2, v3}, Lcom/android/systemui/statusbar/BaseStatusBar$H;->sendEmptyMessageDelayed(IJ)Z
.line 1761
:cond_0
return-void
.end method
Done...!
save it and close
Now compile/sign it and replace the systemui.apk
Control with my app (Click here)
Have fun....
Dont forgot to tag me if you use my work
Thank u very much bro works fine

Categories

Resources