[GUIDE]4.2.2 Statusbar for Samsung 4.1.2 ROM with Live Tiles - Galaxy S Advance I9070 Themes and Apps

4.2.2 Style Stausbar for Samsung 4.1.2 ROM​
(This tutorial is originally made for SGSA but it should work with all samsung 4.1.2 ROMs)
Before we begin let me give credit to original author of this mod @SpaceCaker i'm just gonna tell you how to port it to Samsung JB 4.1.2 ROM.
(SpaceCaker's original Thread here)
Note: Throughout the tutorial we'll travel sequentially, i mean when i ask you to search for something and you find more than two matches, then choose the immediate one which comes after previous modification.
So let's begin
- Decompile SystemUI.apk
- Navigate to res/layout
- tw_status_bar.xml
search for
Code:
<com.android.systemui.statusbar.phone.PhoneStatusBarView android:orientation="vertical" android:id="@id/status_bar" android:background="@drawable/status_bar_background" android:focusable="true" android:fitsSystemWindows="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
Add this below it
Code:
<com.android.systemui.statusbar.StatusBarServiceLRPull android:layout_width="fill_parent" android:layout_height="wrap_content">
- Now search for
Code:
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
Add this above it
Code:
</com.android.systemui.statusbar.StatusBarServiceLRPull>
- Save file
Click to expand...
Click to collapse
- tw_status_bar_expanded.xml
replace
Code:
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/tw_close_handle_underlap">
with
Code:
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
below it there will be <include /> clause add this line below it
Code:
</LinearLayout>
below it there'll be <TextView /> add these lines below it
Code:
<com.spacecaker.SpaceLayOut android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<include layout="@layout/quickpanel_quick_settings_space" />
</LinearLayout>
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/tw_close_handle_underlap">
- Now search for
Code:
<com.android.systemui.statusbar.phone.CloseDragHandle
and add this code above it
Code:
</com.spacecaker.SpaceLayOut>
- Save file
Click to expand...
Click to collapse
- tw_status_bar_expanded_header.xml
search for
Code:
<RelativeLayout android:id="@id/settings_button" android:background="@drawable/tw_quick_panel_setting_button_bg" android:focusable="true" android:visibility="visible" android:layout_width="@dimen/status_bar_expanded_setting_width" android:layout_height="39.0dip">
replace it with below code
Code:
<RelativeLayout android:id="@id/settings_button" android:background="@drawable/tw_quick_panel_setting_button_bg" android:focusable="true" android:visibility="invisible" android:layout_width="0.100000024dip" android:layout_height="0.100000024dip">
<ImageView android:id="@id/settings_button_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/tw_quickpanel_icon_settings" android:scaleType="center" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:contentDescription="@string/accessibility_settings_button" />
</RelativeLayout>
<RelativeLayout android:background="@drawable/tw_quick_panel_setting_button_bg" android:focusable="true" android:visibility="visible" android:layout_width="@dimen/status_bar_expanded_setting_width" android:layout_height="39.0dip">
- Search below for
Code:
android:contentDescription="@string/accessibility_settings_button"
and add this above it
Code:
android:onClick="mOpenSettings"
- Below after </RelativeLayout> add this code
Code:
<com.spacecaker.ButtonBurst android:id="@id/spacebuttonburst" android:layout_width="31.0dip" android:layout_height="34.0dip" android:scaleType="center" />
- Save file.
Click to expand...
Click to collapse
- Navigate to /res/values and add these lines to ids.xml
Code:
<item type="id" name="spaceybeaneyheader">false</item>
<item type="id" name="jbclock">false</item>
<item type="id" name="spacebuttonburst">false</item>
<item type="id" name="recent_app_button">false</item>
Click to expand...
Click to collapse
- Add these lines to end of the file Styles.xml
Code:
<style name="S3.Clear" parent="@*android:style/Widget.Button">
<item name="android:textAppearance">?android:textAppearanceSmallInverse</item>
<item name="android:textColor">#ffffffff</item>
<item name="android:gravity">center</item>
<item name="android:background">@drawable/tw_btn_default_small</item>
<item name="android:focusable">true</item>
<item name="android:clickable">true</item>
</style>
- Save files
Click to expand...
Click to collapse
- Download attached files and extract them in the directory where apk is decompiled.Now compile and again decompile APK.
Click to expand...
Click to collapse
- Go to /res/values/public.xml and search these
Code:
<public type="drawable" name="btn_tg"
<public type="drawable" name="btn_toggles_normal"
- Open smali/com/spacecaker/ButtonBurst.smali and search this
Code:
const v3, 0x7f020180
replace red part with id you got from
Code:
<public type="drawable" name="btn_toggles_normal"
- Now find this
Code:
const v3, 0x7f02017f
replace red part with id you got from
Code:
<public type="drawable" name="btn_tg"
Click to expand...
Click to collapse
- Open smali/com/android/systemui/SystemUIService.smali and add this to end of file
Code:
.method public mOpenSettings(Landroid/view/View;)V
.locals 3
.parameter "v"
.prologue
.line 2431
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 2432
const-string v1, "com.android.settings"
const-string v2, "com.android.settings.Settings"
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
const/high16 v2, 0x1000
invoke-virtual {v0, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
move-result-object v0
.line 2433
invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
const-string v1, "statusbar"
invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/StatusBarManager;
invoke-virtual {v0}, Landroid/app/StatusBarManager;->collapse()V
.line 1720
return-void
.end method
.method public ProfileButton(Landroid/view/View;)V
.locals 3
.parameter "v"
.prologue
.line 2431
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 2432
const-string v1, "com.android.contacts"
const-string v2, "com.android.contacts.activities.PeopleActivity"
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
const/high16 v2, 0x1000
invoke-virtual {v0, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
move-result-object v0
.line 2433
invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
const-string v1, "statusbar"
invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/StatusBarManager;
invoke-virtual {v0}, Landroid/app/StatusBarManager;->collapse()V
.line 1720
return-void
.end method
.method public camera_tile(Landroid/view/View;)V
.locals 3
.parameter "v"
.prologue
.line 2431
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 2432
const-string v1, "com.sec.android.app.camera"
const-string v2, "com.sec.android.app.camera.Camera"
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
const/high16 v2, 0x1000
invoke-virtual {v0, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
move-result-object v0
.line 2433
invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
const-string v1, "statusbar"
invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/StatusBarManager;
invoke-virtual {v0}, Landroid/app/StatusBarManager;->collapse()V
.line 1720
return-void
.end method
.method public turn_off_light(Landroid/view/View;)V
.locals 3
.parameter "v"
.prologue
.line 2431
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 2432
const-string v1, "turn.off.the.lights"
const-string v2, "turn.off.the.lights.LockerActivity"
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
const/high16 v2, 0x1000
invoke-virtual {v0, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
move-result-object v0
.line 2433
invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
const-string v1, "statusbar"
invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/StatusBarManager;
invoke-virtual {v0}, Landroid/app/StatusBarManager;->collapse()V
.line 1720
return-void
.end method
.method public torch_toggle(Landroid/view/View;)V
.locals 3
.parameter "v"
.prologue
.line 2431
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 2432
const-string v1, "com.teslacoilsw.flashlight"
const-string v2, "com.teslacoilsw.flashlight.TeslaLEDToggle"
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
const/high16 v2, 0x1000
invoke-virtual {v0, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
move-result-object v0
.line 2433
invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
const-string v1, "statusbar"
invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/StatusBarManager;
invoke-virtual {v0}, Landroid/app/StatusBarManager;->collapse()V
.line 1720
return-void
.end method
.method public dormant_toggle(Landroid/view/View;)V
.locals 3
.parameter "v"
.prologue
.line 2431
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 2432
const-string v1, "com.android.settings"
const-string v2, "com.android.settings.dormantmode.DormantmodeSettings"
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
const/high16 v2, 0x1000
invoke-virtual {v0, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
move-result-object v0
.line 2433
invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
const-string v1, "statusbar"
invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/StatusBarManager;
invoke-virtual {v0}, Landroid/app/StatusBarManager;->collapse()V
.line 1720
return-void
.end method
.method public tether_toggle(Landroid/view/View;)V
.locals 3
.parameter "v"
.prologue
.line 2431
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 2432
const-string v1, "com.android.settings"
const-string v2, "com.android.settings.TetherSettings"
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
const/high16 v2, 0x1000
invoke-virtual {v0, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
move-result-object v0
.line 2433
invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
const-string v1, "statusbar"
invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/StatusBarManager;
invoke-virtual {v0}, Landroid/app/StatusBarManager;->collapse()V
.line 1720
return-void
.end method
.method public app_toggle(Landroid/view/View;)V
.locals 3
.parameter "v"
.prologue
.line 2431
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 2432
const-string v1, "com.android.settings"
const-string v2, "com.android.settings.RunningServices"
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
const/high16 v2, 0x1000
invoke-virtual {v0, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
move-result-object v0
.line 2433
invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
const-string v1, "statusbar"
invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/StatusBarManager;
invoke-virtual {v0}, Landroid/app/StatusBarManager;->collapse()V
.line 1720
return-void
.end method
.method public bat_toggle(Landroid/view/View;)V
.locals 3
.parameter "v"
.prologue
.line 2431
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 2432
const-string v1, "com.android.settings"
const-string v2, "com.android.settings.fuelgauge.PowerUsageSummary"
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
const/high16 v2, 0x1000
invoke-virtual {v0, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
move-result-object v0
.line 2433
invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
const-string v1, "statusbar"
invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/StatusBarManager;
invoke-virtual {v0}, Landroid/app/StatusBarManager;->collapse()V
.line 1720
return-void
.end method
.method public SpaceCakerButton(Landroid/view/View;)V
.locals 3
.parameter "v"
.prologue
.line 2431
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 2432
const-string v1, "com.android.settings"
const-string v2, "com.android.settings.Settings"
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
const/high16 v2, 0x1000
invoke-virtual {v0, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
move-result-object v0
.line 2433
invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
const-string v1, "statusbar"
invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/StatusBarManager;
invoke-virtual {v0}, Landroid/app/StatusBarManager;->collapse()V
.line 1720
return-void
.end method
Click to expand...
Click to collapse
That's all compile apk and push it to device.
(Torch and Sleep tiles won't work unless you install TeslaLED and Turn Off the Lights app from market)
You can refer to SpaceCaker's thread for more info and tutorial for how to add new tiles.
If you get any errors/FCs report here along with full log.
(i won't quote posts without logcat and ask for logcat, i'll simply ignore them)

How to add Live Tiles
So now you've setup layout for 4.2 statusbar.Now its time to add some live tiles here.
What you'll get
At the moment i've only created live tiles for Battery and WiFi (those are the only ones which are fairly noticeable and widely used).Live tile for battery shows battery level and WiFi tile shows AP name and signal level when connected.See below screenshot for more info.
(More tiles will be added later when i'll get some time)
So let's begin
- Add thses lines to res/values/ids.xml
Code:
<item type="id" name="harsh_batt">false</item>
<item type="id" name="harsh_wifi">false</item>
<item type="id" name="harsh_bat_img">false</item>
<item type="id" name="harsh_wifi_img">false</item>
Click to expand...
Click to collapse
- Now open \res\layout\quickpanel_quick_settings_space.xml
- Every tile here is wrapped up within <FrameLayout></FrameLayout>.So now select one of frameLayout which will be your battery tile.This framelayout will include one ImageView (for indication of battery tile) and one TextView (for showing battery in %).Create them if you haven't.
- Now remove
Code:
android:src="@drawable/set"
or whatever drawable you've associated to that ImageView.
- Add
Code:
android:id="@id/harsh_bat_img"
for same ImageView.
- We'll do the same for TextView.Remove
Code:
android:text="Battery"
and add
Code:
android:id="@id/harsh_batt"
for that TextView.
- Now let's do the same for WiFi tile.Select FrameLayout for that tile and do following changes for that FrameLayout
- Remove
Code:
android:src="@drawable/set"
for the <ImageView> and add
Code:
android:id="@id/harsh_wifi_img"
- Now for <TextView>, remove
Code:
android:text="xxx"
and add
Code:
android:id="@id/harsh_wifi"
- Thats all.Save the files.
Click to expand...
Click to collapse
- Download the attached file and extract it to decompiled directory.
- Compile APK and decompiled it back so that public ids get generated.
- Now keep you res/values/public.xml open.
Click to expand...
Click to collapse
- Open smali\com\spacecaker\SpaceLayOut.smali
- Add
Code:
.field draw:Landroid/graphics/drawable/Drawable;
.field iv:Landroid/widget/ImageView;
before .field private mContext:Landroid/content/Context;
- Add
Code:
.field res:Landroid/content/res/Resources;
.field t:Landroid/widget/TextView;
.field userName:Ljava/lang/String;
after .field private mUpdating:Z
- Now search for .method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSetV and add following lines before return-void
Code:
invoke-virtual {p0}, Lcom/spacecaker/SpaceLayOut;->getResources()Landroid/content/res/Resources;
move-result-object v0
iput-object v0, p0, Lcom/spacecaker/SpaceLayOut;->res:Landroid/content/res/Resources;
- search for .method private update(Z)V and add this below .line 46 (i.e. at the starting of the method)
Code:
invoke-virtual {p0}, Lcom/spacecaker/SpaceLayOut;->getBatteryState()V
.line 256
invoke-virtual {p0}, Lcom/spacecaker/SpaceLayOut;->getWifiInfo()V
- Now add the following lines after # virtual methods.
Code:
.method public getBatteryState()V
.locals 13
.prologue
.line 31
const v10, 0x7f0d012c
invoke-virtual {p0, v10}, Lcom/spacecaker/SpaceLayOut;->findViewById(I)Landroid/view/View;
move-result-object v10
check-cast v10, Landroid/widget/TextView;
iput-object v10, p0, Lcom/spacecaker/SpaceLayOut;->t:Landroid/widget/TextView;
.line 32
const v10, 0x7f0d012e
invoke-virtual {p0, v10}, Lcom/spacecaker/SpaceLayOut;->findViewById(I)Landroid/view/View;
move-result-object v10
check-cast v10, Landroid/widget/ImageView;
iput-object v10, p0, Lcom/spacecaker/SpaceLayOut;->iv:Landroid/widget/ImageView;
.line 33
new-instance v3, Landroid/content/IntentFilter;
const-string v10, "android.intent.action.BATTERY_CHANGED"
invoke-direct {v3, v10}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V
.line 34
.local v3, ifilter:Landroid/content/IntentFilter;
iget-object v10, p0, Lcom/spacecaker/SpaceLayOut;->mContext:Landroid/content/Context;
const/4 v11, 0x0
invoke-virtual {v10, v11, v3}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
move-result-object v1
.line 35
.local v1, batteryStatus:Landroid/content/Intent;
const-string v10, "level"
const/4 v11, -0x1
invoke-virtual {v1, v10, v11}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
move-result v5
.line 36
.local v5, level:I
const-string v10, "scale"
const/4 v11, -0x1
invoke-virtual {v1, v10, v11}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
move-result v7
.line 37
.local v7, scale:I
const-string v10, "status"
const/4 v11, -0x1
invoke-virtual {v1, v10, v11}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
move-result v8
.line 38
.local v8, status:I
const/4 v10, 0x2
if-eq v8, v10, :cond_0
const/4 v10, 0x5
if-eq v8, v10, :cond_0
const/4 v4, 0x0
.line 39
.local v4, isCharging:Z
:goto_0
const-string v10, "plugged"
const/4 v11, -0x1
invoke-virtual {v1, v10, v11}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
move-result v2
.line 40
.local v2, chargePlug:I
const/4 v10, 0x2
if-ne v2, v10, :cond_1
const/4 v9, 0x1
.line 41
.local v9, usbCharge:Z
:goto_1
int-to-float v10, v5
int-to-float v11, v7
div-float v6, v10, v11
.line 42
.local v6, net_battery:F
const/high16 v10, 0x42c8
mul-float/2addr v10, v6
invoke-static {v10}, Ljava/lang/Math;->round(F)I
move-result v0
.line 43
.local v0, batteryPct:I
if-eqz v4, :cond_3
.line 44
if-eqz v9, :cond_2
.line 45
iget-object v10, p0, Lcom/spacecaker/SpaceLayOut;->t:Landroid/widget/TextView;
new-instance v11, Ljava/lang/StringBuilder;
invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v12
invoke-direct {v11, v12}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
const-string v12, "%"
invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v11
const-string v12, " (USB)"
invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v11
invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v11
invoke-virtual {v10, v11}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 52
:goto_2
:try_start_0
iget-object v10, p0, Lcom/spacecaker/SpaceLayOut;->res:Landroid/content/res/Resources;
iget-object v11, p0, Lcom/spacecaker/SpaceLayOut;->res:Landroid/content/res/Resources;
const v12, 0x7f0202ff
invoke-virtual {v11, v12}, Landroid/content/res/Resources;->getXml(I)Landroid/content/res/XmlResourceParser;
move-result-object v11
invoke-static {v10, v11}, Landroid/graphics/drawable/Drawable;->createFromXml(Landroid/content/res/Resources;Lorg/xmlpull/v1/XmlPullParser;)Landroid/graphics/drawable/Drawable;
move-result-object v10
iput-object v10, p0, Lcom/spacecaker/SpaceLayOut;->draw:Landroid/graphics/drawable/Drawable;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.line 55
:goto_3
iget-object v10, p0, Lcom/spacecaker/SpaceLayOut;->draw:Landroid/graphics/drawable/Drawable;
invoke-virtual {v10, v0}, Landroid/graphics/drawable/Drawable;->setLevel(I)Z
.line 56
iget-object v10, p0, Lcom/spacecaker/SpaceLayOut;->iv:Landroid/widget/ImageView;
iget-object v11, p0, Lcom/spacecaker/SpaceLayOut;->draw:Landroid/graphics/drawable/Drawable;
invoke-virtual {v10, v11}, Landroid/widget/ImageView;->setBackground(Landroid/graphics/drawable/Drawable;)V
.line 57
return-void
.line 38
.end local v0 #batteryPct:I
.end local v2 #chargePlug:I
.end local v4 #isCharging:Z
.end local v6 #net_battery:F
.end local v9 #usbCharge:Z
:cond_0
const/4 v4, 0x1
goto :goto_0
.line 40
.restart local v2 #chargePlug:I
.restart local v4 #isCharging:Z
:cond_1
const/4 v9, 0x0
goto :goto_1
.line 47
.restart local v0 #batteryPct:I
.restart local v6 #net_battery:F
.restart local v9 #usbCharge:Z
:cond_2
iget-object v10, p0, Lcom/spacecaker/SpaceLayOut;->t:Landroid/widget/TextView;
new-instance v11, Ljava/lang/StringBuilder;
invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v12
invoke-direct {v11, v12}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
const-string v12, "%"
invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v11
const-string v12, " (AC)"
invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v11
invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v11
invoke-virtual {v10, v11}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
goto :goto_2
.line 49
:cond_3
iget-object v10, p0, Lcom/spacecaker/SpaceLayOut;->t:Landroid/widget/TextView;
new-instance v11, Ljava/lang/StringBuilder;
invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v12
invoke-direct {v11, v12}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
const-string v12, "%"
invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v11
invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v11
invoke-virtual {v10, v11}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
goto :goto_2
.line 53
:catch_0
move-exception v10
goto :goto_3
.end method
.method public getWifiInfo()V
.locals 7
.prologue
.line 59
const v4, 0x7f0d012d
invoke-virtual {p0, v4}, Lcom/spacecaker/SpaceLayOut;->findViewById(I)Landroid/view/View;
move-result-object v4
check-cast v4, Landroid/widget/TextView;
iput-object v4, p0, Lcom/spacecaker/SpaceLayOut;->t:Landroid/widget/TextView;
.line 60
const v4, 0x7f0d012f
invoke-virtual {p0, v4}, Lcom/spacecaker/SpaceLayOut;->findViewById(I)Landroid/view/View;
move-result-object v4
check-cast v4, Landroid/widget/ImageView;
iput-object v4, p0, Lcom/spacecaker/SpaceLayOut;->iv:Landroid/widget/ImageView;
.line 61
iget-object v4, p0, Lcom/spacecaker/SpaceLayOut;->mContext:Landroid/content/Context;
const-string v5, "wifi"
invoke-virtual {v4, v5}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v3
check-cast v3, Landroid/net/wifi/WifiManager;
.line 62
.local v3, wm:Landroid/net/wifi/WifiManager;
invoke-virtual {v3}, Landroid/net/wifi/WifiManager;->getWifiState()I
move-result v2
.line 63
.local v2, wifiState:I
packed-switch v2, :pswitch_data_0
.line 86
iget-object v4, p0, Lcom/spacecaker/SpaceLayOut;->t:Landroid/widget/TextView;
const-string v5, "Error"
invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 89
:goto_0
return-void
.line 67
:pswitch_0
iget-object v4, p0, Lcom/spacecaker/SpaceLayOut;->t:Landroid/widget/TextView;
const-string v5, "Wi-Fi"
invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 69
:try_start_0
iget-object v4, p0, Lcom/spacecaker/SpaceLayOut;->res:Landroid/content/res/Resources;
iget-object v5, p0, Lcom/spacecaker/SpaceLayOut;->res:Landroid/content/res/Resources;
const v6, 0x7f020322
invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getXml(I)Landroid/content/res/XmlResourceParser;
move-result-object v5
invoke-static {v4, v5}, Landroid/graphics/drawable/Drawable;->createFromXml(Landroid/content/res/Resources;Lorg/xmlpull/v1/XmlPullParser;)Landroid/graphics/drawable/Drawable;
move-result-object v4
iput-object v4, p0, Lcom/spacecaker/SpaceLayOut;->draw:Landroid/graphics/drawable/Drawable;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1
.line 72
:goto_1
iget-object v4, p0, Lcom/spacecaker/SpaceLayOut;->iv:Landroid/widget/ImageView;
iget-object v5, p0, Lcom/spacecaker/SpaceLayOut;->draw:Landroid/graphics/drawable/Drawable;
invoke-virtual {v4, v5}, Landroid/widget/ImageView;->setBackground(Landroid/graphics/drawable/Drawable;)V
goto :goto_0
.line 75
:pswitch_1
invoke-virtual {v3}, Landroid/net/wifi/WifiManager;->getConnectionInfo()Landroid/net/wifi/WifiInfo;
move-result-object v1
.line 76
.local v1, wifiInfo:Landroid/net/wifi/WifiInfo;
iget-object v4, p0, Lcom/spacecaker/SpaceLayOut;->t:Landroid/widget/TextView;
invoke-virtual {v1}, Landroid/net/wifi/WifiInfo;->getSSID()Ljava/lang/String;
move-result-object v5
invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 77
invoke-virtual {v1}, Landroid/net/wifi/WifiInfo;->getRssi()I
move-result v4
const/4 v5, 0x5
invoke-static {v4, v5}, Landroid/net/wifi/WifiManager;->calculateSignalLevel(II)I
move-result v0
.line 79
.local v0, signalLevel:I
:try_start_1
iget-object v4, p0, Lcom/spacecaker/SpaceLayOut;->res:Landroid/content/res/Resources;
iget-object v5, p0, Lcom/spacecaker/SpaceLayOut;->res:Landroid/content/res/Resources;
const v6, 0x7f020300
invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getXml(I)Landroid/content/res/XmlResourceParser;
move-result-object v5
invoke-static {v4, v5}, Landroid/graphics/drawable/Drawable;->createFromXml(Landroid/content/res/Resources;Lorg/xmlpull/v1/XmlPullParser;)Landroid/graphics/drawable/Drawable;
move-result-object v4
iput-object v4, p0, Lcom/spacecaker/SpaceLayOut;->draw:Landroid/graphics/drawable/Drawable;
:try_end_1
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
.line 82
:goto_2
iget-object v4, p0, Lcom/spacecaker/SpaceLayOut;->draw:Landroid/graphics/drawable/Drawable;
invoke-virtual {v4, v0}, Landroid/graphics/drawable/Drawable;->setLevel(I)Z
.line 83
iget-object v4, p0, Lcom/spacecaker/SpaceLayOut;->iv:Landroid/widget/ImageView;
iget-object v5, p0, Lcom/spacecaker/SpaceLayOut;->draw:Landroid/graphics/drawable/Drawable;
invoke-virtual {v4, v5}, Landroid/widget/ImageView;->setBackground(Landroid/graphics/drawable/Drawable;)V
goto :goto_0
.line 80
:catch_0
move-exception v4
goto :goto_2
.line 70
.end local v0 #signalLevel:I
.end local v1 #wifiInfo:Landroid/net/wifi/WifiInfo;
:catch_1
move-exception v4
goto :goto_1
.line 63
nop
:pswitch_data_0
.packed-switch 0x0
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_1
.end packed-switch
.end method
Click to expand...
Click to collapse
- Search for
Code:
const v15, 0x7f0d012c
change public id which you get from
Code:
<public type="id" name="harsh_batt"
in public.xml
- Search for
Code:
const v15, 0x7f0d012e
change public id which you get from
Code:
<public type="id" name="harsh_bat_img"
- Search for
Code:
const v15, 0x7f0202ff
change public id which you get from
Code:
<public type="drawable" name="harsh_stat_battery"
- Search for
Code:
const v8, 0x7f0d012d
change public id which you get from
Code:
<public type="id" name="harsh_wifi"
- Search for
Code:
const v8, 0x7f0d012f
change public id which you get from
Code:
<public type="id" name="harsh_wifi_img"
- Search for
Code:
const v8, 0x7f020322
change public id which you get from
Code:
<public type="drawable" name="wifi_tile"
- Search for
Code:
const v8, 0x7f020300
change public id which you get from
Code:
<public type="drawable" name="harsh_stat_wifi"
Click to expand...
Click to collapse
- Thats it.Now save your file and compile APK and push it to device.

Tips,Tricks & FAQs
Changelog:
13/12/13 --> Initial Release
27/12/13 --> Optimized code.Reduced lags when live tiles are implemented.Live tiles will update only when statusbar is pulled down.
Tips, Tricks & FAQs:
If battery indicator or any other image don't look in center, define paddings like android:layout_marginTop="30.0dip"
If you've added more than 3 rows, then you need to enclose it in <ScrollView> in order to make it scrollable.
Even though i've named them Live tiles, they're not actually live like original 4.2.2 statusbar. They'll update only when tile layout is drawn (i mean expanded).But this has one advantage that addition overhead to system is gone.
Associate android: onClick="foobar" attribute to FrameLayout instead of ImageView so that clicking anywhere on the tile can execute defined method.
Each <LinearLayout> shows one row which have 3 FrameLayout by default.If you'll add/remove FrameLayout then width of tiles will be set accordingly.

screenshot will be? I would like to see the final result

Status bar disappeared. What to do? Galaxy ace 2 android 4.1.2

ildar2099 said:
Status bar disappeared. What to do? Galaxy ace 2 android 4.1.2
Click to expand...
Click to collapse
First...read the OP. Especially the underlined line at the bottom
Nice guide btw
Sent from my GT-I9305 using Tapatalk

Code:
pkTools152\SystemUI\res; found: mk
aapt: warning: string 'month_shortest_july' has no default translation in C:\ApkT
ools152\SystemUI\res; found: mk
aapt: warning: string 'month_shortest_june' has no default translation in C:\ApkT
ools152\SystemUI\res; found: mk
aapt: warning: string 'month_shortest_march' has no default translation in C:\Apk
Tools152\SystemUI\res; found: mk
aapt: warning: string 'month_shortest_may' has no default translation in C:\ApkTo
ols152\SystemUI\res; found: mk
aapt: warning: string 'month_shortest_november' has no default translation in C:\
ApkTools152\SystemUI\res; found: mk
aapt: warning: string 'month_shortest_october' has no default translation in C:\A
pkTools152\SystemUI\res; found: mk
aapt: warning: string 'month_shortest_september' has no default translation in C:
\ApkTools152\SystemUI\res; found: mk
aapt: warning: string 'no_such_item' has no default translation in C:\ApkTools152
\SystemUI\res; found: bg cs da de el en_US es_ES es_US et fi fr ga hr hu is it kk
ko lt lv mk nb nl pl pt_PT ro ru sk sl sr sv tr uk
aapt: warning: string 'pm' has no default translation in C:\ApkTools152\SystemUI\
res; found: mk
aapt: warning: string 'quickpanel_data_roaming_disable_toast' has no default tran
slation in C:\ApkTools152\SystemUI\res; found: bg cs da de el en_US es_ES es_US e
t fi fr ga hr hu is it kk ko lt lv mk nb nl pl pt_PT ro ru sk sl sr sv tr uk
aapt: warning: string 'quickpanel_data_roaming_enable_toast' has no default trans
lation in C:\ApkTools152\SystemUI\res; found: bg cs da de el en_US es_ES es_US et
fi fr ga hr hu is it kk ko lt lv mk nb nl pl pt_PT ro ru sk sl sr sv tr uk
aapt: warning: string 'today' has no default translation in C:\ApkTools152\System
UI\res; found: mk
aapt: warning: string 'tomorrow' has no default translation in C:\ApkTools152\Sys
temUI\res; found: mk
aapt: warning: string 'twelve_hour_time_format' has no default translation in C:\
ApkTools152\SystemUI\res; found: mk
aapt: warning: string 'yesterday' has no default translation in C:\ApkTools152\Sy
stemUI\res; found: mk
I: Building apk file...
SystemUI - complete
All done!
My original SystemUI.apk

They're just apktool warnings. You need a logcat of the system ui fc not the compile log
Sent from my GT-I9305 using Tapatalk

Goldie said:
They're just apktool warnings. You need a logcat of the system ui fc not the compile log
Sent from my GT-I9305 using Tapatalk
Click to expand...
Click to collapse
where to find it?

ildar2099 said:
where to find it?
Click to expand...
Click to collapse
You should have a dumpstate_app_error.txt.gz in data/log. If not then you need to google how to take a logcat
Sent from my GT-I9305 using Tapatalk

Goldie said:
You should have a dumpstate_app_error.txt.gz in data/log. If not then you need to google how to take a logcat
Sent from my GT-I9305 using Tapatalk
Click to expand...
Click to collapse
can be more?
Sent from my GT-I8160 using xda app-developers app

Great tutorial, I would like to try this on Note but one question , is the zip file same for xhdpi phones?

nice tutorial thank you..
tommorow i will try it :good:

just awesome. Thank you for all Mr.Harsh

got it working, but there's 1 problem, when not charging, there's no icons in the statusbar, and i can only use the last used dropdown.
when it is charging, i can use both (left and right) and the statusbar looks normal. any idea what that could be? i'll upload the logcat later, unless you know what this problem is.
-edit- it seems that the statusbar and mod work like expected when in the lockscreen, and when there is a notification (when charging over usb there is a notification, so that's why it also works the way it should when charging, it also doesn't work when charging normally). because of this i can't upload a logcat, cause when using my pc (via usb) the statusbar works normally, and when using terminal emulator there is a notification, so then it also works normally.
---------- Post added at 11:47 PM ---------- Previous post was at 11:05 PM ----------
nevermind, i disabled the clock with some xml editing, and apparently that causes the disappearing of the icons and the functionality of the left/right pull.
so for anybody that for some reason removed the clock, it causes this bug (maybe it isn't a bug, i don't know yet) to happen.

ildar2099 said:
My original SystemUI.apk
Click to expand...
Click to collapse
Yep, as Goldie told they're just warnings, if statusbar has disappeared then you must have done something wrong.Post logcat here.
(Here is a tut about how to take logcat: http://forum.xda-developers.com/showthread.php?t=2303834 )
kmokhtar79 said:
Great tutorial, I would like to try this on Note but one question , is the zip file same for xhdpi phones?
Click to expand...
Click to collapse
You'll need to replace icons in drawable-hdpi folder else they'll look too small.But if you're gonna test it then try with those icons then you'll just need to replace those icons by better icons.
mjz2cool said:
got it working, but there's 1 problem, when not charging, there's no icons in the statusbar, and i can only use the last used dropdown.
when it is charging, i can use both (left and right) and the statusbar looks normal. any idea what that could be? i'll upload the logcat later, unless you know what this problem is.
-edit- it seems that the statusbar and mod work like expected when in the lockscreen, and when there is a notification (when charging over usb there is a notification, so that's why it also works the way it should when charging, it also doesn't work when charging normally). because of this i can't upload a logcat, cause when using my pc (via usb) the statusbar works normally, and when using terminal emulator there is a notification, so then it also works normally.
---------- Post added at 11:47 PM ---------- Previous post was at 11:05 PM ----------
nevermind, i disabled the clock with some xml editing, and apparently that causes the disappearing of the icons and the functionality of the left/right pull.
so for anybody that for some reason removed the clock, it causes this bug (maybe it isn't a bug, i don't know yet) to happen.
Click to expand...
Click to collapse
Have you modified statusbar before?
Anyways i'm glad that you got it working..
ildar2099 said:
can be more?
Sent from my GT-I8160 using xda app-developers app
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2303834

mr.harsh said:
4.2.2 Style Stausbar for Samsung 4.1.2 ROM​
(This tutorial is originally made for SGSA but it should work with all samsung 4.1.2 ROMs)
Before we begin let me give credit to original author of this mod @SpaceCaker i'm just gonna tell you how to port it to Samsung JB 4.1.2 ROM.
(SpaceCaker's original Thread here)
Note: Throughout the tutorial we'll travel sequentially, i mean when i ask you to search for something and you find more than two matches, then choose the immediate one which comes after previous modification.
So let's begin
- Decompile SystemUI.apk
- Navigate to res/layout
That's all compile apk and push it to device.
(Torch and Sleep tiles won't work unless you install TeslaLED and Turn Off the Lights app from market)
You can refer to SpaceCaker's thread for more info and tutorial for how to add new tiles.
If you get any errors/FCs report here along with full log.
Click to expand...
Click to collapse
thanks b4 for your guide:good: but after i try this guide not work for me my systemUI FC i hope you help me.. (sorry for bad my English)
Edit: SOLVED my mistake incorrect one line to edit

is there a way to add actual toggles? i tried using the guides to add lidroid toggles, and then the guide to get them in a grid, but i can't seem to get the lidroid toggles to work.

abdoel_046 said:
thanks b4 for your guide:good: but after i try this guide not work for me my systemUI FC i hope you help me.. (sorry for bad my English)
Click to expand...
Click to collapse
No log = No help
mjz2cool said:
is there a way to add actual toggles? i tried using the guides to add lidroid toggles, and then the guide to get them in a grid, but i can't seem to get the lidroid toggles to work.
Click to expand...
Click to collapse
You need to override methods in such a way that they toggles the state of wifi/bluetooth etc instead of launching activity.I did it but problem was that tiles won't get updated after toggling state.SpaceCaker has made update() method private/ non-static (of course there was reason to do so) so we can't call is after changing state.To make it work in that i'll need to code whole things again but i don't have such time.May be in future i'll do that...
BTW, lidroid toggles are easy to port and arrange them in grid.

mr.harsh said:
No log = No help
You need to override methods in such a way that they toggles the state of wifi/bluetooth etc instead of launching activity.I did it but problem was that tiles won't get updated after toggling state.SpaceCaker has made update() method private/ non-static (of course there was reason to do so) so we can't call is after changing state.To make it work in that i'll need to code whole things again but i don't have such time.May be in future i'll do that...
BTW, lidroid toggles are easy to port and arrange them in grid.
Click to expand...
Click to collapse
already solved.. sorry mr.harsh i wrong edit one line it is make systemUI FC..

Related

[TUT][LSJ] How to add quad targates in AOSP lockscreen

Hello Friends this is mine tutorial for quad targates in aosp lockscreen You can direct me here But when according to that tut when you decompile framework.jar you wont find any widget folder .
So my tut has very little change but fully wokring for XXLSJ rom
FOR WORKING quad targates you must have an AOSP lockscreen this tutorial is for adding over all quad targates to AOSP lockscreen
i m providing only smali part
Now Please start following the instuction with that tag.
Framework-res.apk Editing
[SMALI]
Decompile your framework-res.apk
Put ic_lockscreen_phone_activated.png, ic_lockscreen_phone_normal.png, ic_lockscreen_sms_activated.png, ic_lockscreen_sms_normal.png in /res/drawable-hdpi/
[SMALI]
Put ic_lockscreen_phone.xml, ic_lockscreen_sms.xml in /res/drawable/
[SMALI]
Open /res/values/arrays.xml
[SMALI]/
Replace the whole array .. with:
Code:
@drawable/ic_lockscreen_unlock
@drawable/ic_lockscreen_sms
@drawable/ic_action_assist_generic
@drawable/ic_lockscreen_phone
@drawable/ic_lockscreen_camera
@null
@null
@null
Replace the whole array .. with:
Code:
@string/description_target_unlock
@string/description_target_sms
@string/description_target_search
@string/description_target_phone
@string/description_target_camera
@null
@null
@null
[SMALI]
Open /res/values-land/arrays.xml
[SMALI]/
Replace the whole array .. with:
Code:
@null
@null
@drawable/ic_lockscreen_unlock
@drawable/ic_lockscreen_sms
@drawable/ic_action_assist_generic
@drawable/ic_lockscreen_phone
@drawable/ic_lockscreen_camera
@null
Replace the whole array .. with:
Code:
@null
@null
@string/description_target_unlock
@string/description_target_sms
@string/description_target_search
@string/description_target_phone
@string/description_target_camera
@null
[SMALI]
Open /res/values/strings.xml
[SMALI]/
Add the following entries:
Code:
Sms
Phone
Recompile your framework
framework editing:
[SMALI]
Disassemble your framework2.jar
Edit /com/android/internal/widget/multiwaveview/GlowPadView.smali and replace the whole methods ".method private getDirectionDescription(I)Ljava/lang/String;" and ".method private getTargetDescription(I)Ljava/lang/String;" with the following methods:
Code:
.method private getDirectionDescription(I)Ljava/lang/String;
.locals 4
.parameter "index"
.prologue
.line 1119
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mDirectionDescriptions:Ljava/util/ArrayList;
if-eqz v2, :cond_0
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mDirectionDescriptions:Ljava/util/ArrayList;
invoke-virtual {v2}, Ljava/util/ArrayList;->isEmpty()Z
move-result v2
if-eqz v2, :cond_1
.line 1120
:cond_0
iget v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mDirectionDescriptionsResourceId:I
invoke-direct {p0, v2}, Lcom/android/internal/widget/multiwaveview/GlowPadView;->loadDescriptions(I)Ljava/util/ArrayList;
move-result-object v2
iput-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mDirectionDescriptions:Ljava/util/ArrayList;
.line 1121
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDrawables:Ljava/util/ArrayList;
invoke-virtual {v2}, Ljava/util/ArrayList;->size()I
move-result v2
iget-object v3, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mDirectionDescriptions:Ljava/util/ArrayList;
invoke-virtual {v3}, Ljava/util/ArrayList;->size()I
move-result v3
if-eq v2, v3, :cond_1
.line 1122
const-string v2, "GlowPadView"
const-string v3, "The number of target drawables must be equal to the number of direction descriptions."
invoke-static {v2, v3}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
.line 1124
const/4 v0, 0x0
.line 1133
:goto_0
return-object v0
.line 1130
:cond_1
:try_start_0
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mDirectionDescriptions:Ljava/util/ArrayList;
invoke-virtual {v2, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/String;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.line 1131
.local v0, directionZ:Ljava/lang/String;
goto :goto_0
.line 1132
.end local v0 #directionZ:Ljava/lang/String;
:catch_0
move-exception v1
.line 1133
.local v1, e:Ljava/lang/Exception;
const-string v0, ""
goto :goto_0
.end method
Code:
.method private getTargetDescription(I)Ljava/lang/String;
.locals 4
.parameter "index"
.prologue
.line 1099
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDescriptions:Ljava/util/ArrayList;
if-eqz v2, :cond_0
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDescriptions:Ljava/util/ArrayList;
invoke-virtual {v2}, Ljava/util/ArrayList;->isEmpty()Z
move-result v2
if-eqz v2, :cond_1
.line 1100
:cond_0
iget v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDescriptionsResourceId:I
invoke-direct {p0, v2}, Lcom/android/internal/widget/multiwaveview/GlowPadView;->loadDescriptions(I)Ljava/util/ArrayList;
move-result-object v2
iput-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDescriptions:Ljava/util/ArrayList;
.line 1101
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDrawables:Ljava/util/ArrayList;
invoke-virtual {v2}, Ljava/util/ArrayList;->size()I
move-result v2
iget-object v3, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDescriptions:Ljava/util/ArrayList;
invoke-virtual {v3}, Ljava/util/ArrayList;->size()I
move-result v3
if-eq v2, v3, :cond_1
.line 1102
const-string v2, "GlowPadView"
const-string v3, "The number of target drawables must be equal to the number of target descriptions."
invoke-static {v2, v3}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
.line 1104
const/4 v1, 0x0
.line 1114
:goto_0
return-object v1
.line 1109
:cond_1
const-string v1, ""
.line 1111
.local v1, targetZ:Ljava/lang/String;
:try_start_0
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDescriptions:Ljava/util/ArrayList;
invoke-virtual {v2, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v2
move-object v0, v2
check-cast v0, Ljava/lang/String;
move-object v1, v0
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
.line 1112
:catch_0
move-exception v2
goto :goto_0
.end method
Recompile your framework2.jar
Now we're done with the framework2.jar now we need to modify that last file android.policy.jar
[SMALI]
Disassemble your android.policy.jar
Edit /com/android/internal/policy/impl/LockScreen.smali and add the following methods:
Code:
.method static synthetic access$1400(Lcom/android/internal/policy/impl/LockScreen;)Landroid/content/Context;
.locals 1
.parameter "x0"
.prologue
.line 56
iget-object v0, p0, Lcom/android/internal/policy/impl/LockScreen;->mContext:Landroid/content/Context;
return-object v0
.end method
.method static synthetic access$1500(Lcom/android/internal/policy/impl/LockScreen;)Landroid/content/Context;
.locals 1
.parameter "x0"
.prologue
.line 56
iget-object v0, p0, Lcom/android/internal/policy/impl/LockScreen;->mContext:Landroid/content/Context;
return-object v0
.end method
Edit /com/android/internal/policy/impl/LockScreen$GlowPadViewMethods.smali.
Replace the whole method onTrigger with:
Code:
.method public onTrigger(Landroid/view/View;I)V
.locals 7
.parameter "v"
.parameter "target"
.prologue
const/high16 v6, 0x1000
.line 313
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->mGlowPadView:Lcom/android/internal/widget/multiwaveview/GlowPadView;
invoke-virtual {v4, p2}, Lcom/android/internal/widget/multiwaveview/GlowPadView;->getResourceIdForTarget(I)I
move-result v3
.line 321
.local v3, resId:I
sparse-switch v3, :sswitch_data_0
.line 367
:goto_0
return-void
.line 323
:sswitch_0
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$1200(Lcom/android/internal/policy/impl/LockScreen;)Landroid/content/Context;
move-result-object v4
invoke-static {v4}, Landroid/app/SearchManager;->getAssistIntent(Landroid/content/Context;)Landroid/content/Intent;
move-result-object v0
.line 324
.local v0, assistIntent:Landroid/content/Intent;
if-eqz v0, :cond_0
.line 325
invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->launchActivity(Landroid/content/Intent;)V
.line 329
:goto_1
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$400(Lcom/android/internal/policy/impl/LockScreen;)Lcom/android/internal/policy/impl/KeyguardScreenCallback;
move-result-object v4
invoke-interface {v4}, Lcom/android/internal/policy/impl/KeyguardScreenCallback;->pokeWakelock()V
goto :goto_0
.line 327
:cond_0
const-string v4, "LockScreen"
const-string v5, "Failed to get intent for assist activity"
invoke-static {v4, v5}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_1
.line 333
.end local v0 #assistIntent:Landroid/content/Intent;
:sswitch_1
new-instance v4, Landroid/content/Intent;
const-string v5, "android.media.action.STILL_IMAGE_CAMERA"
invoke-direct {v4, v5}, Landroid/content/Intent;->(Ljava/lang/String;)V
invoke-direct {p0, v4}, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->launchActivity(Landroid/content/Intent;)V
.line 334
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$400(Lcom/android/internal/policy/impl/LockScreen;)Lcom/android/internal/policy/impl/KeyguardScreenCallback;
move-result-object v4
invoke-interface {v4}, Lcom/android/internal/policy/impl/KeyguardScreenCallback;->pokeWakelock()V
goto :goto_0
.line 339
:sswitch_2
new-instance v2, Landroid/content/Intent;
const-string v4, "android.intent.action.MAIN"
invoke-direct {v2, v4}, Landroid/content/Intent;->(Ljava/lang/String;)V
.line 340
.local v2, phoneIntent:Landroid/content/Intent;
const-string v4, "com.android.contacts"
const-string v5, "com.android.contacts.activities.DialtactsActivity"
invoke-virtual {v2, v4, v5}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 341
invoke-virtual {v2, v6}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
.line 342
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$1300(Lcom/android/internal/policy/impl/LockScreen;)Landroid/content/Context;
move-result-object v4
invoke-virtual {v4, v2}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
.line 343
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$400(Lcom/android/internal/policy/impl/LockScreen;)Lcom/android/internal/policy/impl/KeyguardScreenCallback;
move-result-object v4
invoke-interface {v4}, Lcom/android/internal/policy/impl/KeyguardScreenCallback;->goToUnlockScreen()V
goto :goto_0
.line 348
.end local v2 #phoneIntent:Landroid/content/Intent;
:sswitch_3
new-instance v1, Landroid/content/Intent;
const-string v4, "android.intent.action.MAIN"
invoke-direct {v1, v4}, Landroid/content/Intent;->(Ljava/lang/String;)V
.line 349
.local v1, mmsIntent:Landroid/content/Intent;
const-string v4, "com.android.mms"
const-string v5, "com.android.mms.ui.ConversationList"
invoke-virtual {v1, v4, v5}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 350
invoke-virtual {v1, v6}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
.line 351
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$1400(Lcom/android/internal/policy/impl/LockScreen;)Landroid/content/Context;
move-result-object v4
invoke-virtual {v4, v1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
.line 352
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$400(Lcom/android/internal/policy/impl/LockScreen;)Lcom/android/internal/policy/impl/KeyguardScreenCallback;
move-result-object v4
invoke-interface {v4}, Lcom/android/internal/policy/impl/KeyguardScreenCallback;->goToUnlockScreen()V
goto :goto_0
.line 357
.end local v1 #mmsIntent:Landroid/content/Intent;
:sswitch_4
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$500(Lcom/android/internal/policy/impl/LockScreen;)V
.line 358
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$400(Lcom/android/internal/policy/impl/LockScreen;)Lcom/android/internal/policy/impl/KeyguardScreenCallback;
move-result-object v4
invoke-interface {v4}, Lcom/android/internal/policy/impl/KeyguardScreenCallback;->pokeWakelock()V
goto/16 :goto_0
.line 364
:sswitch_5
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$400(Lcom/android/internal/policy/impl/LockScreen;)Lcom/android/internal/policy/impl/KeyguardScreenCallback;
move-result-object v4
invoke-interface {v4}, Lcom/android/internal/policy/impl/KeyguardScreenCallback;->goToUnlockScreen()V
goto/16 :goto_0
.line 321
:sswitch_data_0
.sparse-switch
0x010802cd -> :sswitch_0
0x01080328 -> :sswitch_1
0x01080344 -> :sswitch_4
0x0108034f -> :sswitch_5
0x01080352 -> :sswitch_5
0x01080a4d -> :sswitch_2
0x01080a50 -> :sswitch_3
.end sparse-switch
.end method
Recompile and you're good to go!
I dont work only for thanks i work for my passion toward android too but if you will press thanks it will help me
Credits
atl4ntis for base tutorial
reserved
i used this one time ago: http://forum.xda-developers.com/showthread.php?t=2011461 pretty "same"
Mirko ddd said:
i used this one time ago: http://forum.xda-developers.com/showthread.php?t=2002620 pretty "same"
Click to expand...
Click to collapse
its for adding more targates to AOSP lockscreen
there is no link between mine and the one you give bcz i m not providing how to FOR TOGGLEING AOSP N TW LOCKSCREEN
ICS_XD said:
its for adding more targates to AOSP lockscreen
there is no link between mine and the one you give bcz i m not providing how to FOR TOGGLEING AOSP N TW LOCKSCREEN
Click to expand...
Click to collapse
sorry i linked wrong thing http://forum.xda-developers.com/showthread.php?t=2011461
this one is the same
Mirko ddd said:
sorry i linked wrong thing http://forum.xda-developers.com/showthread.php?t=2011461
this one is the same
Click to expand...
Click to collapse
I dont know
But i modified one which i linked in thread
Btw when i check the thread you gave previous
It will same like you post for LSJ ?
Toggle for TW n Aosp lockscreen
Sent from my GT-I9400 using Tapatalk
ICS_XD said:
I dont know
But i modified one which i linked in thread
Btw when i check the thread you gave previous
It will same like you post for LSJ ?
Toggle for TW n Aosp lockscreen
Sent from my GT-I9400 using Tapatalk
Click to expand...
Click to collapse
for sure is not the same as u can see mine consists to reuse an existings code and made it noobproof.
as u are not even explaining what this is
Code:
.line 321
:sswitch_data_0
.sparse-switch
0x010802cd -> :sswitch_0
0x01080328 -> :sswitch_1
0x01080344 -> :sswitch_4
0x0108034f -> :sswitch_5
0x01080352 -> :sswitch_5
0x01080a4d -> :sswitch_2
0x01080a50 -> :sswitch_3
.end sparse-switch
.end method
people may have different public values leading them into bootloops
Mirko ddd said:
for sure is not the same as u can see mine consists to reuse an existings code and made it noobproof.
as u are not even explaining what this is
Code:
.line 321
:sswitch_data_0
.sparse-switch
0x010802cd -> :sswitch_0
0x01080328 -> :sswitch_1
0x01080344 -> :sswitch_4
0x0108034f -> :sswitch_5
0x01080352 -> :sswitch_5
0x01080a4d -> :sswitch_2
0x01080a50 -> :sswitch_3
.end sparse-switch
.end method
people may have different public values leading them into bootloops
Click to expand...
Click to collapse
These values are not from that thread
These values are of LSJ rom i think these values will work on any LSJ rom ?
Isin't
Sent from my GT-I9400 using Tapatalk
ICS_XD said:
These values are not from that thread
These values are of LSJ rom i think these values will work on any LSJ rom ?
Isin't
Sent from my GT-I9400 using Tapatalk
Click to expand...
Click to collapse
suppose for a while that the guys who s applying your tutorial has one more png file on his framework-res.apk, or that the one u have has it, public valus will mismatch
noobproof is well explained, not easy to copy
Mirko ddd said:
suppose for a while that the guys who s applying your tutorial has one more png file on his framework-res.apk, or that the one u have has it, public valus will mismatch
noobproof is well explained, not easy to copy
Click to expand...
Click to collapse
Oh thanks mate
I will be updating thread tomorrow
Thanks for the help
Sent from my GT-I9100G using xda premium
ICS_XD said:
Oh thanks mate
I will be updating thread tomorrow
Thanks for the help
Sent from my GT-I9100G using xda premium
Click to expand...
Click to collapse
nice target is provide safer and detailed as possible guides
收件人: [TUT][LSJ] How to add quad targates in AOSP lockscreen
have a look. thx
Sent from my HTC X515d using xda premium

[TUTORIAL]How To Add Advance Power Menu[3/1/2014]

Happy New Year...
This is my first tutorial of 2014. Today I will teach
you how to add Reboot and Recovery option in Power Menu.
Make sure you have a basic knowledge on how to compile/decompile .apk/.jar files.
framework-res.apk
Decompile framework-res.apk
[*]Navigate to framework-res.apk\res\drawable-hdpi
[*]Extract all the files from PNG folder (Download From Attachment)
[*]Navigate to framework-res.apk\res\values
[*]Open strings.xml file in file editor
[*]Add these line at the end
Code:
<string name="reboot">Reboot</string>
<string name="reboot_progress">Rebooting…</string>
<string name="reboot_confirm">Your phone will reboot</string>
<string name="recovery">Recovery</string>
<string name="recovery_progress">Rebooting into recovery…</string>
<string name="recovery_confirm">Your phone will reboot into recovery</string>
[*]Save the file
[*]Recompile your framework-res.apk
[*]Decompile framework-res.apk which you have recompiled a moment ago
[*]Navigate to framework-res.apk\res\values
[*]Open public.xml file in file editor
framework.jar
Decompile framework.jar
[*]Navigate to framework.jar\smali\com\android\internal\app
[*]Open ShutdownThread.smali file in file editor
[*]Search for .field private static mReboot:Z and add the red line only
Code:
.field private static final TAG:Ljava/lang/String; = "ShutdownThread"
[COLOR="Red"].field public static mReboot:I[/COLOR]
.field private static mReboot:Z
[*]Search for .local v1, pd:Landroid/app/ProgressDialog; and add the red lines only
Code:
.line 184
.local v1, pd:Landroid/app/ProgressDialog;
[COLOR="Red"]sget v2, Lcom/android/internal/app/ShutdownThread;->mReboot:I
if-eq v2, v5, :cond_1
if-nez v2, :cond_2[/COLOR]
const v2, 0x104014a
[COLOR="Red"]goto :goto_1
:cond_1
const v2, name="reboot"
goto :goto_1
:cond_2
const v2, name="recovery"
:goto_1[/COLOR]
invoke-virtual {p0, v2}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;
move-result-object v2
[*]Search for invoke-virtual {v1, v2}, Landroid/app/ProgressDialog;->setTitle(Ljava/lang/CharSequenceV and add the red lines only
Code:
move-result-object v2
invoke-virtual {v1, v2}, Landroid/app/ProgressDialog;->setTitle(Ljava/lang/CharSequence;)V
.line 185
[COLOR="Red"]sget v2, Lcom/android/internal/app/ShutdownThread;->mReboot:I
if-eq v2, v5, :cond_3
if-nez v2, :cond_4[/COLOR]
const v2, 0x104014e
[COLOR="Red"]goto :goto_2
:cond_3
const v2, name="reboot_progress"
goto :goto_2
:cond_4
const v2, name="recovery_progress"
:goto_2[/COLOR]
invoke-virtual {p0, v2}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;
move-result-object v2
[*]Search for .catch Ljava/lang/SecurityException; {:try_start_1 .. :try_end_1} :catch_0 and change the blue lines only
Code:
invoke-virtual {v2}, Landroid/os/PowerManager$WakeLock;->acquire()V
:try_end_1
.catch Ljava/lang/SecurityException; {:try_start_1 .. :try_end_1} :catch_0
.line 208
[COLOR="Blue"]:goto_3[/COLOR]
sget-object v2, Lcom/android/internal/app/ShutdownThread;->sInstance:Lcom/android/internal/app/ShutdownThread;
iput-object v6, v2, Lcom/android/internal/app/ShutdownThread;->mScreenWakeLock:Landroid/os/PowerManager$WakeLock;
.line 209
sget-object v2, Lcom/android/internal/app/ShutdownThread;->sInstance:Lcom/android/internal/app/ShutdownThread;
iget-object v2, v2, Lcom/android/internal/app/ShutdownThread;->mPowerManager:Landroid/os/PowerManager;
invoke-virtual {v2}, Landroid/os/PowerManager;->isScreenOn()Z
move-result v2
[COLOR="Blue"]if-eqz v2, :cond_5[/COLOR]
.line 211
:try_start_2
[*]Search for .catch Ljava/lang/SecurityException; {:try_start_2 .. :try_end_2} :catch_1 and change the blue lines only
Code:
:try_end_2
.catch Ljava/lang/SecurityException; {:try_start_2 .. :try_end_2} :catch_1
.line 222
[COLOR="Blue"]:cond_5
:goto_4[/COLOR]
sget-object v2, Lcom/android/internal/app/ShutdownThread;->sInstance:Lcom/android/internal/app/ShutdownThread;
new-instance v3, Lcom/android/internal/app/ShutdownThread$2;
[*]Search for .end local v0 #e:Ljava/lang/SecurityException; and change the blue lines only
Code:
iput-object v6, v2, Lcom/android/internal/app/ShutdownThread;->mCpuWakeLock:Landroid/os/PowerManager$WakeLock;
[COLOR="Blue"]goto :goto_3[/COLOR]
.line 215
.end local v0 #e:Ljava/lang/SecurityException;
:catch_1
move-exception v0
.line 216
.restart local v0 #e:Ljava/lang/SecurityException;
const-string v2, "ShutdownThread"
const-string v3, "No permission to acquire wake lock"
invoke-static {v2, v3, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
.line 217
sget-object v2, Lcom/android/internal/app/ShutdownThread;->sInstance:Lcom/android/internal/app/ShutdownThread;
iput-object v6, v2, Lcom/android/internal/app/ShutdownThread;->mScreenWakeLock:Landroid/os/PowerManager$WakeLock;
[COLOR="Blue"]goto :goto_4[/COLOR]
.end method
.method public static reboot(Landroid/content/Context;Ljava/lang/String;Z)V
[*]Search for .method public static rebootOrShutdown(ZLjava/lang/StringV and change the blue line only
Code:
.end method
.method public static rebootOrShutdown(ZLjava/lang/String;)V
.locals 5
.parameter "reboot"
.parameter "reason"
.prologue
.line 403
[COLOR="Blue"]if-eqz p0, :cond_3[/COLOR]
.line 404
const-string v2, "ShutdownThread"
[*]Search for invoke-static {p1}, Landroid/os/Power;->reboot(Ljava/lang/StringV and add the red lines and change the blue lines only
Code:
:try_start_0
invoke-static {p1}, Landroid/os/Power;->reboot(Ljava/lang/String;)V
:try_end_0
[COLOR="Blue"].catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1[/COLOR]
.line 428
:goto_0
const-string v2, "ShutdownThread"
const-string v3, "Performing low-level shutdown..."
invoke-static {v2, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
[COLOR="Red"]sget v1, Lcom/android/internal/app/ShutdownThread;->mReboot:I
const/4 v2, 0x1
if-eq v1, v2, :cond_0
const/4 v2, 0x2
if-eq v1, v2, :cond_1[/COLOR]
.line 429
invoke-static {}, Landroid/os/Power;->shutdown()V
.line 430
return-void
[COLOR="Red"]:cond_0
const-string/jumbo v4, "now"
invoke-static {v4}, Landroid/os/Power;->reboot(Ljava/lang/String;)V
return-void
:cond_1
:try_start_1
new-instance v1, Ljava/io/File;
const-string v4, "/cache/recovery/boot"
invoke-direct {v1, v4}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 442
.restart local v1
invoke-virtual {v1}, Ljava/io/File;->exists()Z
move-result v4
if-nez v4, :cond_2
.line 443
invoke-virtual {v1}, Ljava/io/File;->createNewFile()Z
:try_end_1
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0
:catch_0
:cond_2
const-string/jumbo v4, "recovery"
invoke-static {v4}, Landroid/os/Power;->reboot(Ljava/lang/String;)V
return-void[/COLOR]
.line 407
[COLOR="Blue"]:catch_1[/COLOR]
move-exception v0
.line 408
.local v0, e:Ljava/lang/Exception;
const-string v2, "ShutdownThread"
[*]Search for .end local v0 #e:Ljava/lang/Exception; and change the blue lines only
Code:
.line 412
.end local v0 #e:Ljava/lang/Exception;
[COLOR="Blue"]:cond_3[/COLOR]
new-instance v1, Landroid/os/Vibrator;
invoke-direct {v1}, Landroid/os/Vibrator;-><init>()V
.line 414
.local v1, vibrator:Landroid/os/Vibrator;
const-wide/16 v2, 0x1f4
[COLOR="Blue"]:try_start_2[/COLOR]
invoke-virtual {v1, v2, v3}, Landroid/os/Vibrator;->vibrate(J)V
[COLOR="Blue"]:try_end_2
.catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_3[/COLOR]
.line 422
:goto_1
const-wide/16 v2, 0x1f4
[COLOR="Blue"]:try_start_3[/COLOR]
invoke-static {v2, v3}, Ljava/lang/Thread;->sleep(J)V
[COLOR="Blue"]:try_end_3
.catch Ljava/lang/InterruptedException; {:try_start_3 .. :try_end_3} :catch_2[/COLOR]
goto :goto_0
.line 423
[COLOR="Blue"]:catch_2[/COLOR]
move-exception v2
goto :goto_0
.line 415
[COLOR="Blue"]:catch_3[/COLOR]
move-exception v0
.line 417
.restart local v0 #e:Ljava/lang/Exception;
[*]Search for .local v1, longPressBehavior:I and change the blue lines only
Code:
.line 106
.local v1, longPressBehavior:I
const/4 v3, 0x2
[COLOR="Blue"]if-ne v1, v3, :cond_4[/COLOR]
const v2, 0x1040150
.line 110
.local v2, resourceId:I
:goto_1
const-string v3, "ShutdownThread"
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "Notifying thread to start shutdown longPressBehavior="
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 112
[COLOR="Blue"]if-eqz p1, :cond_7[/COLOR]
.line 113
new-instance v0, Lcom/android/internal/app/ShutdownThread$CloseDialogReceiver;
[*]Search for invoke-direct {v3, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/ContextV and add the red lines only
Code:
new-instance v3, Landroid/app/AlertDialog$Builder;
invoke-direct {v3, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V
[COLOR="Red"]const v5, 0x1
sget v4, Lcom/android/internal/app/ShutdownThread;->mReboot:I
if-eq v4, v5, :cond_2
if-nez v4, :cond_3[/COLOR]
const v4, 0x104014a
[COLOR="Red"]goto :goto_2
:cond_2
const v4, name="reboot"
goto :goto_2
:cond_3
const v4, name="recovery"
:goto_2[/COLOR]
invoke-virtual {v3, v4}, Landroid/app/AlertDialog$Builder;->setTitle(I)Landroid/app/AlertDialog$Builder;
move-result-object v3
[*]Search for invoke-virtual {v3}, Landroid/app/AlertDialog;->show()V and add the red lines and change the blue lines only
Code:
sget-object v3, Lcom/android/internal/app/ShutdownThread;->sConfirmDialog:Landroid/app/AlertDialog;
invoke-virtual {v3}, Landroid/app/AlertDialog;->show()V
[COLOR="Blue"]goto/16 :goto_0[/COLOR]
.line 102
.end local v0 #closer:Lcom/android/internal/app/ShutdownThread$CloseDialogReceiver;
.end local v1 #longPressBehavior:I
.end local v2 #resourceId:I
:catchall_0
move-exception v3
:try_start_1
monitor-exit v4
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v3
.line 106
.restart local v1 #longPressBehavior:I
[COLOR="Blue"]:cond_4[/COLOR]
[COLOR="Red"]const v3, 0x1
sget v2, Lcom/android/internal/app/ShutdownThread;->mReboot:I
if-eq v2, v3, :cond_5
if-nez v2, :cond_6[/COLOR]
const v2, 0x104014f
[COLOR="Blue"]goto/16 :goto_1[/COLOR]
[COLOR="Red"]:cond_5
const v2, name="reboot_confirm"
goto/16 :goto_1
:cond_6
const v2, name="recovery_confirm"
goto/16 :goto_1[/COLOR]
.line 132
.restart local v2 #resourceId:I
[COLOR="Blue"]:cond_7[/COLOR]
invoke-static {p0}, Lcom/android/internal/app/ShutdownThread;->beginShutdownSequence(Landroid/content/Context;)V
goto/16 :goto_0
.end method
[*]Now you have to find the names below
Code:
name="reboot"
name="recovery"
name="reboot_progress"
name="recovery_progress"
name="reboot_confirm"
name="recovery_confirm"
[*]You have to replace these name with hex ids from public.xml which is already opened in file editor
[*]For example search for name="reboot" in public.xml file
[*]In my case I have got
Code:
<public type="string" name="reboot" id="[COLOR="Blue"]0x01040548[/COLOR]" />
[*]The blue marked part is hex. Copy the hex and remove the 3rd digit. So 0x01040548 will be 0x1040548
[*]Now search for name="reboot" in ShutdownThread.smali file and replace name="reboot" with 0x1040548
[*]Do the same for other names too
[*]Save the file
[*]Recompile your framework.jar
android.policy.jar
Decompile android.policy.jar
[*]Navigate to android.policy.jar\smali\com\android\internal\policy\impl
[*]Extract all the files from SMALI folder (Download From Attachment)
[*]Open GlobalActions$2.smali file in file editor
[*]Search for invoke-static {v0}, Lcom/android/internal/policy/impl/GlobalActions;->access$100(Lcom/android/internal/policy/impl/GlobalActionsLandroid/content/Context; and add the red lines only
Code:
#getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v0}, Lcom/android/internal/policy/impl/GlobalActions;->access$100(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v0
const/4 v1, 0x1
[COLOR="Red"]const/4 p0, 0x0
sput p0, Lcom/android/internal/app/ShutdownThread;->mReboot:I[/COLOR]
invoke-static {v0, v1}, Lcom/android/internal/app/ShutdownThread;->shutdown(Landroid/content/Context;Z)V
.line 171
return-void
.end method
[*]Save the file
[*]Open GlobalActions.smali file in file editor
[*]Search for .method private createDialog()Landroid/app/AlertDialog; and change the blue lines only
Code:
.end method
.method private createDialog()Landroid/app/AlertDialog;
[COLOR="Blue"].locals 12[/COLOR]
.prologue
const/4 v9, 0x1
[*]Search for invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V and add the red lines only
Code:
invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
[COLOR="Red"]iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const-string v1, "reboot"
const-string v2, "string"
const-string v3, "android"
invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v10
if-nez v10, :cond_0
const-string v1, "reboot_system"
invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v10
if-eqz v10, :cond_1
:cond_0
const-string v1, "ic_lock_reboot"
const-string v2, "drawable"
invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v11
if-eqz v11, :cond_1
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$7;
invoke-direct {v1, p0, v11, v10}, Lcom/android/internal/policy/impl/GlobalActions$7;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
:cond_1
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const-string v1, "recovery"
const-string v2, "string"
const-string v3, "android"
invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v10
if-nez v10, :cond_2
const-string v1, "recovery_system"
invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v10
if-eqz v10, :cond_3
:cond_2
const-string v1, "ic_lock_recovery"
const-string v2, "drawable"
invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v11
if-eqz v11, :cond_3
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$8;
invoke-direct {v1, p0, v11, v10}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z[/COLOR]
.line 183
[COLOR="Red"]:cond_3[/COLOR]
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
[*]Save the file
[*]Recompile your android.policy.jar
Please Note :
Take backup before doing anything.
Use Notepad++ to edit files.
Please read the tutorial properly befor editing files.
If you found any mistake in this tutorial then please let me know.
this is the one thing our xperia community was lacking of. Now it's fulfilled thanks for this :good:
Good Job bro
Thank u
WOW, really a nice guide, perfectly explained & noob Friendly
keep it coming
Great guide, will really help many people, not just to Arc owners but to all Xperia family
saqib nazm said:
this is the one thing our xperia community was lacking of. Now it's fulfilled thanks for this :good:
Click to expand...
Click to collapse
3andala said:
Good Job bro
Thank u
Click to expand...
Click to collapse
stanlin salu said:
WOW, really a nice guide, perfectly explained & noob Friendly
keep it coming
Click to expand...
Click to collapse
Ayush Singh said:
Great guide, will really help many people, not just to Arc owners but to all Xperia family
Click to expand...
Click to collapse
Thanks for these encouraging comments. You all are cordially welcome...
Awesome Guide
This is how its done!
Understanding that smali was a pain in the a**.
You just made this simpler to copy paste
Thank you!
Wonderful work man..
You ll soon be a great themer. Thanks for keeping 2011 xperias forum alive..:thumbup:
Cheers,
Vatsal
Nice work mate.. Nice write up. Way to go. Keep it up and hoping to see more of your works
Sent from my GT-P3110 using Tapatalk
Nice tutorial @BDFreak ...
Can you tell which apktool is recommended for use in this tutorial ?
karandpr said:
Nice tutorial @BDFreak ...
Can you tell which apktool is recommended for use in this tutorial ?
Click to expand...
Click to collapse
I am using THIS one. But I think you can use old versions too...
Ayush Singh said:
Great guide, will really help many people, not just to Arc owners but to all Xperia family
Click to expand...
Click to collapse
this is for Arc only, another xperia phone will be different .
in my TX, framework.jar dont have ShutdownThread.smali but it in services.jar
devilmaycry2020 said:
this is for Arc only, another xperia phone will be different .
in my TX, framework.jar dont have ShutdownThread.smali but it in services.jar
Click to expand...
Click to collapse
I meant all Xperia 2011 family
devilmaycry2020 said:
this is for Arc only, another xperia phone will be different .
in my TX, framework.jar dont have ShutdownThread.smali but it in services.jar
Click to expand...
Click to collapse
Would be the same for atleast the 2011 Xperia Line up
devilmaycry2020 said:
this is for Arc only, another xperia phone will be different .
in my TX, framework.jar dont have ShutdownThread.smali but it in services.jar
Click to expand...
Click to collapse
It's obvious that this will be different in 2012-13 xperias. But the main idea is quite same, like if you know where you have to look for
Nice tut! Its also not very complicated
i dont understand about "change the blue lines only" .what does it mean ? if my own different change it to same as yours ?
devilmaycry2020 said:
i dont understand about "change the blue lines only" .what does it mean ? if my own different change it to same as yours ?
Click to expand...
Click to collapse
Exactly. I mean yes...
BDFreak said:
Exactly. I mean yes...
Click to expand...
Click to collapse
i dont think so because i've modded this before and it work great but the only i missed was when i choose reboot or recovery it didn't show "Reboot" or "Recovery" tittle but only Power off. could you help me. thanks
basically my mod for TX as same as your but have some different
i can send to you all relate files for modding this, could you take a look to it. thanks
devilmaycry2020 said:
i dont think so because i've modded this before and it work great but the only i missed was when i choose reboot or recovery it didn't show "Reboot" or "Recovery" tittle but only Power off. could you help me. thanks
basically my mod for TX as same as your but have some different
i can send to you all relate files for modding this, could you take a look to it. thanks
Click to expand...
Click to collapse
Actually this tutorial is for 2011 Xperia phones. I didn't try in newer phones yet. But I will give it a try in my SP when times allow me.

[MOD][PORT][UPDATED 04/20/14] IME (Keyboard) Animations

Hi guys,
I would like to share a Mod/Animations that I ported from PAC man ROM.. This will enable a IME(Keyboard) Animations and you will be able to test them and change them on the fly!!
What exatcly does this mod do?
Click to expand...
Click to collapse
This mod will enable your keyboard to have all different types of Enter and Exit Animations, along with different animations for the Interpolator and speed of the animation..
Here is a video of what I mean..
​
I started looking into this bc I thought it was a pretty cool feature. I want to remind you that this is NOT my work. I DID NOT create these animations..All I did was port them over to TW 4.3 to make them work:laugh:
Anyone is able to use this mod, just please give proper credit to Devs of PAC Man ROM & Xylon ROM, @zst123 for open source XUI MOD Xposed Module and me if you want
ALSO I want to give a BIG THANKS to:
@dwitherell - for always being there to help and for a sounding bored (LOLLL)
@Deckoz2302 - you already know
@Stryke_the_Orc - logcat thread and a 2nd eye
And too everyone else whos guides I've used to teach me and all the things I know now and am planning to learn along the way
WARNING!!! THIS IS GUIDE IS NOT FOR NOVICE USERS/MODDERS/THEMERS ETC...THERE ARE A LOT OF EDITS IN RES FOLDERS AND SMALI!! IF YOU GET STOCK PLEASE PLEASE POST A LOG OR THE ERROR! I WILL TRY TO BE AS NOOB FRIENDLY AS POSSIBLE BUT THIS IS NOT A NOOB GUIDE/MOD!
PS:This guide may not be PERFECT.. There maybe somethings that I added that this mod may not need..or use.. But i added them for the sake of not missing anything..So if you see something and are like "Why did he add those ids, strings, layouts etc" WHATEVER..Just ignore it or don't use them.. I will try to be as accurate as possible.
So let's begin..
What you'll need:
Note Pad++
Apktool and knowledge on how to read errors
framework-res.apk
SecSettings.apk
framework.jar
PATIENCE
Let's start with SecSettings, decompile it goto res/values..
strings.xml add these:
Code:
<string name="listview_off">Off</string>
<string name="listview_wave_left">Wave (Left)</string>
<string name="listview_wave_right">Wave (Right)</string>
<string name="listview_alpha">Alpha</string>
<string name="listview_scale">Scale</string>
<string name="listview_stack_top">Stack (Top)</string>
<string name="listview_stack_bottom">Stack (Bottom)</string>
<string name="listview_unfold">Unfold</string>
<string name="listview_fold">Fold</string>
<string name="listview_translate_left">Translate (Left)</string>
<string name="listview_translate_right">Translate (Right)</string>
<string name="listview_accelerate_interpolator">Accelerate</string>
<string name="listview_decelerate_interpolator">Decelerate</string>
<string name="listview_accelerate_decelerate_interpolator">Accelerate/Decelerate</string>
<string name="listview_anticipate_interpolator">Anticipate</string>
<string name="listview_overshoot_interpolator">Overshoot</string>
<string name="listview_anticipate_overshoot_interpolator">Anticipate/Overshoot</string>
<string name="listview_bounce_interpolator">Bounce</string>
<string name="listview_cycle_interpolator">Cycle</string>
<string name="listview_linear_interpolator">Linear</string>
<string name="animation_default">Default</string>
<string name="animation_fade">Fade</string>
<string name="animation_slide_right">Slide in right</string>
<string name="animation_slide_left">Slide in left</string>
<string name="animation_slide_right_no_fade">Slide in right (No fade)</string>
<string name="animation_slide_left_no_fade">Slide in left (No fade)</string>
<string name="animation_slide_up">Slide in bottom</string>
<string name="animation_slide_down">Slide in top</string>
<string name="animation_translucent">Translucent</string>
<string name="animation_grow_shrink">Grow in (Top)</string>
<string name="animation_grow_shrink_center">Grow in (Center)</string>
<string name="animation_grow_shrink_bottom">Grow in (Bottom)</string>
<string name="animation_grow_shrink_left">Grow in (Left)</string>
<string name="animation_grow_shrink_right">Grow in (Right)</string>
<string name="ime_animation_title">IME animations</string>
<string name="ime_animation_summary">Set keyboard animations</string>
<string name="ime_animation_test_title">Test IME Animation Here</string>
<string name="ime_enter_animation_title">Enter Animation</string>
<string name="ime_exit_animation_title">Exit Animation</string>
<string name="ime_interpolator_title">Interpolator</string>
<string name="ime_duration_title">IME Duration</string>
<string name="animation_duration_title">Animation duration</string>
<string name="animation_duration_summary">Set duration</string>
<string name="animation_settings_reset_message">Reset all animation settings to default?</string>
Save..
ids.xml add these:
Code:
<item type="id" name="seekBarPrefUnitsRight">false</item>
<item type="id" name="seekBarPrefValue">false</item>
<item type="id" name="seekBarPrefUnitsLeft">false</item>
<item type="id" name="seekBarPrefBarContainer">false</item>
Save..
arrays.xml add these:
Code:
<string-array name="listview_animation_entries">
<item [user=251364]@Str[/user]ing/listview_off</item>
<item [user=251364]@Str[/user]ing/listview_wave_left</item>
<item [user=251364]@Str[/user]ing/listview_wave_right</item>
<item [user=251364]@Str[/user]ing/listview_scale</item>
<item [user=251364]@Str[/user]ing/listview_alpha</item>
<item [user=251364]@Str[/user]ing/listview_stack_top</item>
<item [user=251364]@Str[/user]ing/listview_stack_bottom</item>
<item [user=251364]@Str[/user]ing/listview_unfold</item>
<item [user=251364]@Str[/user]ing/listview_fold</item>
<item [user=251364]@Str[/user]ing/listview_translate_left</item>
<item [user=251364]@Str[/user]ing/listview_translate_right</item>
</string-array>
<string-array name="listview_animation_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
</string-array>
<string-array name="listview_interpolator_entries">
<item [user=251364]@Str[/user]ing/listview_off</item>
<item [user=251364]@Str[/user]ing/listview_accelerate_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_decelerate_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_accelerate_decelerate_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_anticipate_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_overshoot_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_anticipate_overshoot_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_bounce_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_cycle_interpolator</item>
<item [user=251364]@Str[/user]ing/listview_linear_interpolator</item>
</string-array>
<string-array name="listview_interpolator_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
</string-array>
<string-array name="anim_controls_entries">
<item [user=251364]@Str[/user]ing/animation_default</item>
<item [user=251364]@Str[/user]ing/animation_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_right</item>
<item [user=251364]@Str[/user]ing/animation_slide_left</item>
<item [user=251364]@Str[/user]ing/animation_slide_right_no_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_left_no_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_up</item>
<item [user=251364]@Str[/user]ing/animation_slide_down</item>
<item [user=251364]@Str[/user]ing/animation_translucent</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_center</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_bottom</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_left</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_right</item>
</string-array>
<string-array name="anim_controls_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
<item>11</item>
<item>12</item>
<item>13</item>
</string-array>
Save..
attrs.xml add these:
Code:
<attr name="interval" format="integer" />
<attr name="unitsLeft" format="reference|string" />
<attr name="unitsRight" format="reference|string" />
<attr name="maximum" format="integer" />
<attr name="minimum" format="integer" />
Save..
Now go to res/xml/ and where ever you want to add the preference screen to change the animations.. I added it to a xml that we (N3bula) have specifically for keyboard mods..Add this line
Code:
<PreferenceScreen android:title= [user=251364]@Str[/user]ing/ime_animation_title" android:key="interface_animation_scroll" android:summary= [user=251364]@Str[/user]ing/ime_animation_summary" android:fragment="com.android.settings.pac.KeyboardAnimationInterfaceSettings" />
Goto android/settings/SubSettings.smali
Search
Code:
.method public constructor
add this below .end method
Code:
.method private popFragment()Z
.locals 2
.prologue
.line 46
invoke-virtual {p0}, Lcom/android/settings/SubSettings;->getFragmentManager()Landroid/app/FragmentManager;
move-result-object v0
.line 47
.local v0, "fm":Landroid/app/FragmentManager;
invoke-virtual {v0}, Landroid/app/FragmentManager;->getBackStackEntryCount()I
move-result v1
if-lez v1, :cond_0
.line 48
invoke-virtual {v0}, Landroid/app/FragmentManager;->popBackStack()V
.line 49
const/4 v1, 0x1
.line 51
:goto_0
return v1
:cond_0
const/4 v1, 0x0
goto :goto_0
.end method
Then search
Code:
# virtual methods
Add this below it:
Code:
.method protected isValidFragment(Ljava/lang/String;)Z
.locals 3
.param p1, "fragmentName" # Ljava/lang/String;
.prologue
.line 41
const-string v0, "SubSettings"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "Launching fragment "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 42
const/4 v0, 0x1
return v0
.end method
Find
Code:
.method public onNavigateUp()Z
Add blue:
Code:
.method public onNavigateUp()Z
.locals 1
.prologue
.line 27
[COLOR="Blue"]invoke-direct {p0}, Lcom/android/settings/SubSettings;->popFragment()Z
move-result v0
if-nez v0, :cond_0
[/COLOR]
invoke-virtual {p0}, Lcom/android/settings/SubSettings;->finish()V
.line 28
[COLOR="blue"]:cond_0[/COLOR]
const/4 v0, 0x1
return v0
.end method
Now extract the zip below and add all the contents to their respected folders..
SecSettings.zip
Once you have them in place compile the apk, then decompile it so you can pull your new public id's in res/values/public.xml
Here is my public.xml please go through all the smali you added and search for all the 0x7******* (public ids) When you find one search my public.xml for it, find the name, then search your NEW public.xml for that name and id. Then change the id to YOUR NEW ONE. (Please if you don't understand how to do this, then this mod is NOT for you..either that or you need to search and find out what I am talking about. I will not post every id with the name bc there are A LOT)
Now moving on, framework-res.apk, decompile it...go to res/arrays add these..
Code:
<string-array name="anim_controls_entries">
<item [user=251364]@Str[/user]ing/animation_default</item>
<item [user=251364]@Str[/user]ing/animation_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_right</item>
<item [user=251364]@Str[/user]ing/animation_slide_left</item>
<item [user=251364]@Str[/user]ing/animation_slide_right_no_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_left_no_fade</item>
<item [user=251364]@Str[/user]ing/animation_slide_up</item>
<item [user=251364]@Str[/user]ing/animation_slide_down</item>
<item [user=251364]@Str[/user]ing/animation_translucent</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_center</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_bottom</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_left</item>
<item [user=251364]@Str[/user]ing/animation_grow_shrink_right</item>
</string-array>
<string-array name="anim_controls_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
<item>11</item>
<item>12</item>
<item>13</item>
</string-array>
Save..
Then go to res/strings.xml add these:
Code:
<string name="animation_fade">Fade</string>
<string name="animation_slide_right">Slide in right</string>
<string name="animation_slide_left">Slide in left</string>
<string name="animation_slide_right_no_fade">Slide in right (No fade)</string>
<string name="animation_slide_left_no_fade">Slide in left (No fade)</string>
<string name="animation_slide_up">Slide in bottom</string>
<string name="animation_slide_down">Slide in top</string>
<string name="animation_default">Default</string>
<string name="animation_translucent">Translucent</string>
<string name="animation_grow_shrink">Grow in (Top)</string>
<string name="animation_grow_shrink_center">Grow in (Center)</string>
<string name="animation_grow_shrink_bottom">Grow in (Bottom)</string>
<string name="animation_grow_shrink_left">Grow in (Left)</string>
<string name="animation_grow_shrink_right">Grow in (Right)</string>
<string name="action_null">Blank</string>
Save..
Now extract the zip below and add them in their respected folder(s)..
framework-res.zip
Compile it and then decompile it, you will need to generate a new public.xml for framework.jar which is the next step..
Goto POST#5
Neat. Gonna try this when I have time to match all those ids (I see why you didn't list them all, thats gonna be alot lol)
Sent from my Galaxy Note II
icedventimocha said:
Neat. Gonna try this when I have time to match all those ids (I see why you didn't list them all, thats gonna be alot lol)
Sent from my Galaxy Note II
Click to expand...
Click to collapse
Yep.. I guess I could have planned it better and wrote them all down.. But wasn't sure I could get it all working
lacoursiere18 said:
Yep.. I guess I could have planned it better and wrote them all down.. But wasn't sure I could get it all working
Click to expand...
Click to collapse
Eff that dude. Doing tedious **** like that is how you learn. Let people work for it lol
Sent from my Galaxy Note II
Now framework.jar..goto android\inputservices\InputMethodSevices.smali..
Now search
Code:
# annotations
add blue:
Code:
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroid/inputmethodservice/InputMethodService$Insets;,
Landroid/inputmethodservice/InputMethodService$InputMethodSessionImpl;,
Landroid/inputmethodservice/InputMethodService$InputMethodImpl;,
[COLOR="Blue"] Landroid/inputmethodservice/InputMethodService$SettingsObserver;[/COLOR]
}
.end annotation
Search
Code:
# instance fields
add these below
Code:
.field private mAnimationDuration:I
.field private mAnimationEnterIndex:I
.field private mAnimationExitIndex:I
.field mHandler:Landroid/os/Handler;
.field private mInterpolatorIndex:I
.field private mSettingsObserver:Landroid/inputmethodservice/InputMethodService$SettingsObserver;
.field private mWindowIme:Landroid/view/Window;
Now search
Code:
.method static synthetic
add this whole .method
Code:
.method static synthetic access$123(Landroid/inputmethodservice/InputMethodService;)V
.locals 0
.param p0, "x0" # Landroid/inputmethodservice/InputMethodService;
.prologue
.line 232
invoke-direct {p0}, Landroid/inputmethodservice/InputMethodService;->updateSettings()V
return-void
.end method
Now search
Code:
.method private sendInputViewShownState()V
Add this above it:
Code:
.method private retrieveAnimation(Z)Landroid/view/animation/Animation;
.locals 6
.param p1, "enter" # Z
.prologue
.line 1709
if-eqz p1, :cond_1
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationEnterIndex:I
:goto_0
invoke-static {v4}, Lcom/android/internal/util/aokp/AwesomeAnimationHelper;->getAnimations(I)[I
move-result-object v1
.line 1710
.local v1, "animArray":[I
if-eqz p1, :cond_2
const/4 v4, 0x1
aget v2, v1, v4
.line 1711
.local v2, "animInt":I
:goto_1
if-nez v2, :cond_3
const/4 v0, 0x0
.line 1718
:cond_0
:goto_2
return-object v0
.line 1709
.end local v1 # "animArray":[I
.end local v2 # "animInt":I
:cond_1
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationExitIndex:I
goto :goto_0
.line 1710
.restart local v1 # "animArray":[I
:cond_2
const/4 v4, 0x0
aget v2, v1, v4
goto :goto_1
.line 1712
.restart local v2 # "animInt":I
:cond_3
invoke-static {p0, v2}, Landroid/view/animation/AnimationUtils;->loadAnimation(Landroid/content/Context;I)Landroid/view/animation/Animation;
move-result-object v0
.line 1713
.local v0, "anim":Landroid/view/animation/Animation;
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mInterpolatorIndex:I
invoke-static {p0, v4}, Lcom/android/internal/util/aokp/AwesomeAnimationHelper;->getInterpolator(Landroid/content/Context;I)Landroid/view/animation/Interpolator;
move-result-object v3
.line 1714
.local v3, "intplr":Landroid/view/animation/Interpolator;
if-eqz v3, :cond_4
invoke-virtual {v0, v3}, Landroid/view/animation/Animation;->setInterpolator(Landroid/view/animation/Interpolator;)V
.line 1715
:cond_4
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationDuration:I
if-lez v4, :cond_0
.line 1716
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationDuration:I
int-to-long v4, v4
invoke-virtual {v0, v4, v5}, Landroid/view/animation/Animation;->setDuration(J)V
goto :goto_2
.end method
Next search:
Code:
# virtual methods
.method doFinishInput()V
Add this above it:
Code:
.method private updateSettings()V
.locals 4
.prologue
const/4 v3, 0x0
.line 413
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "animation_ime_enter"
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
iput v1, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationEnterIndex:I
.line 415
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "animation_ime_exit"
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
iput v1, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationExitIndex:I
.line 417
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "animation_ime_interpolator"
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
iput v1, p0, Landroid/inputmethodservice/InputMethodService;->mInterpolatorIndex:I
.line 419
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "animation_ime_duration"
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
.line 421
.local v0, "temp":I
mul-int/lit8 v1, v0, 0xf
iput v1, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationDuration:I
.line 422
return-void
.end method
Now search
Code:
.method initViews()V
Add whats is in blue:
Code:
sget-object v0, Landroid/R$styleable;->InputMethodService:[I
invoke-virtual {p0, v0}, Landroid/inputmethodservice/InputMethodService;->obtainStyledAttributes([I)Landroid/content/res/TypedArray;
move-result-object v0
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mThemeAttrs:Landroid/content/res/TypedArray;
.line 1082
iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mInflater:Landroid/view/LayoutInflater;
const v1, 0x1090063
invoke-virtual {v0, v1, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v0
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
.line 776
[COLOR="Blue"]iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
const/16 v1, 0x300
invoke-virtual {v0, v1}, Landroid/view/View;->setSystemUiVisibility(I)V[/COLOR]
.line 778
iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
iget-object v1, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
invoke-virtual {v0, v1}, Landroid/inputmethodservice/SoftInputWindow;->setContentView(Landroid/view/View;)V
.line 1085
iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
invoke-virtual {v0}, Landroid/view/View;->getViewTreeObserver()Landroid/view/ViewTreeObserver;
Next search:
Code:
const-string v1, "fancy_ime_animations"
should be just a few lines down
Add blue
Code:
const-string v1, "fancy_ime_animations"
invoke-static {v0, v1, v2}, Landroid/provider/Settings$Global;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-eqz v0, :cond_0
.line 782
[COLOR="blue"]iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
invoke-virtual {v0}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v0
const v1, 0x1030201
invoke-virtual {v0, v1}, Landroid/view/Window;->setWindowAnimations(I)V
[/COLOR]
.line 785
:cond_0
iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
const v1, 0x1020351
invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/view/ViewGroup;
Search
Code:
const-string v0, "KOR"
Add blue above like this:
Code:
invoke-virtual {v0, v4}, Landroid/widget/FrameLayout;->setVisibility(I)V
[COLOR="blue"]new-instance v0, Landroid/os/Handler;
invoke-direct {v0}, Landroid/os/Handler;-><init>()V
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mHandler:Landroid/os/Handler;[/COLOR]
.line 1113
const-string v0, "KOR"
const-string v1, "USA"
NOW search
Code:
.method public onCreate()V
Add blue:
Code:
invoke-virtual {v1}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v1
const/high16 v2, 0x1000000
invoke-virtual {v1, v2}, Landroid/view/Window;->addFlags(I)V
.line 1003
:cond_0
[COLOR="blue"] new-instance v0, Landroid/os/Handler;
invoke-direct {v0}, Landroid/os/Handler;-><init>()V
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mHandler:Landroid/os/Handler;
.line 742
new-instance v0, Landroid/inputmethodservice/InputMethodService$SettingsObserver;
iget-object v1, p0, Landroid/inputmethodservice/InputMethodService;->mHandler:Landroid/os/Handler;
invoke-direct {v0, p0, v1}, Landroid/inputmethodservice/InputMethodService$SettingsObserver;-><init>(Landroid/inputmethodservice/InputMethodService;Landroid/os/Handler;)V
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mSettingsObserver:Landroid/inputmethodservice/InputMethodService$SettingsObserver;
.line 743
iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mSettingsObserver:Landroid/inputmethodservice/InputMethodService$SettingsObserver;
invoke-virtual {v0}, Landroid/inputmethodservice/InputMethodService$SettingsObserver;->observe()V[/COLOR]
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->initViews()V
.line 1004
iget-object v1, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
invoke-virtual {v1}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v1
const/4 v2, -0x1
const/4 v3, -0x2
invoke-virtual {v1, v2, v3}, Landroid/view/Window;->setLayout(II)V
.line 1016
[COLOR="blue"] iget-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
invoke-virtual {v0}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v0
iput-object v0, p0, Landroid/inputmethodservice/InputMethodService;->mWindowIme:Landroid/view/Window;
.line 747
invoke-direct {p0}, Landroid/inputmethodservice/InputMethodService;->updateSettings()V[/COLOR]
new-instance v0, Landroid/content/IntentFilter;
invoke-direct {v0}, Landroid/content/IntentFilter;-><init>()V
.line 1017
.local v0, "filter":Landroid/content/IntentFilter;
const-string v1, "RequestAxT9Info"
invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 1018
const-string v1, "com.samsung.axt9info.close"
invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 1023
iget-object v1, p0, Landroid/inputmethodservice/InputMethodService;->mBR:Landroid/content/BroadcastReceiver;
invoke-virtual {p0, v1, v0}, Landroid/inputmethodservice/InputMethodService;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
.line 1024
const-string v1, "InputMethodService"
const-string v2, "mBR.registerReceiver()"
invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 1054
return-void
.end method
Search
Code:
.method public onWindowHidden()V
Replace whole method with this:
Code:
.method public onWindowHidden()V
.locals 6
.prologue
.line 1669
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationExitIndex:I
if-nez v4, :cond_1
.line 1670
iget-object v4, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
invoke-virtual {v4}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v4
const v5, 0x1030056
invoke-virtual {v4, v5}, Landroid/view/Window;->setWindowAnimations(I)V
.line 1706
:cond_0
:goto_0
return-void
.line 1673
:cond_1
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getWindow()Landroid/app/Dialog;
move-result-object v1
.line 1674
.local v1, "dialog":Landroid/app/Dialog;
invoke-virtual {v1}, Landroid/app/Dialog;->getWindow()Landroid/view/Window;
move-result-object v4
iput-object v4, p0, Landroid/inputmethodservice/InputMethodService;->mWindowIme:Landroid/view/Window;
.line 1675
iget-object v4, p0, Landroid/inputmethodservice/InputMethodService;->mWindowIme:Landroid/view/Window;
const/4 v5, -0x1
invoke-virtual {v4, v5}, Landroid/view/Window;->setWindowAnimations(I)V
.line 1677
new-instance v2, Landroid/os/Handler;
invoke-direct {v2}, Landroid/os/Handler;-><init>()V
.line 1678
.local v2, "handler":Landroid/os/Handler;
new-instance v3, Landroid/inputmethodservice/InputMethodService$4;
invoke-direct {v3, p0, v1}, Landroid/inputmethodservice/InputMethodService$4;-><init>(Landroid/inputmethodservice/InputMethodService;Landroid/app/Dialog;)V
.line 1685
.local v3, "runnable":Ljava/lang/Runnable;
const/4 v4, 0x0
invoke-direct {p0, v4}, Landroid/inputmethodservice/InputMethodService;->retrieveAnimation(Z)Landroid/view/animation/Animation;
move-result-object v0
.line 1686
.local v0, "anim":Landroid/view/animation/Animation;
if-eqz v0, :cond_0
.line 1687
new-instance v4, Landroid/inputmethodservice/InputMethodService$5;
invoke-direct {v4, p0, v2, v3, v1}, Landroid/inputmethodservice/InputMethodService$5;-><init>(Landroid/inputmethodservice/InputMethodService;Landroid/os/Handler;Ljava/lang/Runnable;Landroid/app/Dialog;)V
invoke-virtual {v0, v4}, Landroid/view/animation/Animation;->setAnimationListener(Landroid/view/animation/Animation$AnimationListener;)V
.line 1698
invoke-virtual {v1}, Landroid/app/Dialog;->show()V
.line 1699
iget-object v4, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
invoke-virtual {v4, v0}, Landroid/view/View;->startAnimation(Landroid/view/animation/Animation;)V
.line 1700
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationDuration:I
if-lez v4, :cond_2
.line 1701
iget v4, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationDuration:I
mul-int/lit8 v4, v4, 0x2
int-to-long v4, v4
invoke-virtual {v2, v3, v4, v5}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto :goto_0
.line 1703
:cond_2
const-wide/16 v4, 0x3e8
invoke-virtual {v2, v3, v4, v5}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto :goto_0
.end method
Next search
Code:
.method public onWindowShown()V
Replace whole method with this:
Code:
.method public onWindowShown()V
.locals 4
.prologue
.line 1651
iget v2, p0, Landroid/inputmethodservice/InputMethodService;->mAnimationEnterIndex:I
if-nez v2, :cond_1
.line 1652
iget-object v2, p0, Landroid/inputmethodservice/InputMethodService;->mWindow:Landroid/inputmethodservice/SoftInputWindow;
invoke-virtual {v2}, Landroid/inputmethodservice/SoftInputWindow;->getWindow()Landroid/view/Window;
move-result-object v2
const v3, 0x1030056
invoke-virtual {v2, v3}, Landroid/view/Window;->setWindowAnimations(I)V
.line 1662
:cond_0
:goto_0
return-void
.line 1655
:cond_1
invoke-virtual {p0}, Landroid/inputmethodservice/InputMethodService;->getWindow()Landroid/app/Dialog;
move-result-object v1
.line 1656
.local v1, "dialog":Landroid/app/Dialog;
invoke-virtual {v1}, Landroid/app/Dialog;->getWindow()Landroid/view/Window;
move-result-object v2
iput-object v2, p0, Landroid/inputmethodservice/InputMethodService;->mWindowIme:Landroid/view/Window;
.line 1657
iget-object v2, p0, Landroid/inputmethodservice/InputMethodService;->mWindowIme:Landroid/view/Window;
const/4 v3, -0x1
invoke-virtual {v2, v3}, Landroid/view/Window;->setWindowAnimations(I)V
.line 1658
invoke-virtual {v1}, Landroid/app/Dialog;->show()V
.line 1659
const/4 v2, 0x1
invoke-direct {p0, v2}, Landroid/inputmethodservice/InputMethodService;->retrieveAnimation(Z)Landroid/view/animation/Animation;
move-result-object v0
.line 1660
.local v0, "anim":Landroid/view/animation/Animation;
if-eqz v0, :cond_0
.line 1661
iget-object v2, p0, Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
invoke-virtual {v2, v0}, Landroid/view/View;->startAnimation(Landroid/view/animation/Animation;)V
goto :goto_0
.end method
Extract the zip and add them to their respected folder(s):
framework.jar.zip
After that YOUR DONE!!!
Make sure you have compiled everything with YOUR NEW public ids.. Then go head and transfer/flash the files..
REMINDER!! Please post a log/error if you are having problems. I will try to help as much as possible...:good:
Reserve..
Can you help me with my framework.jar?
the_vanya1 said:
Can you help me with my framework.jar?
Click to expand...
Click to collapse
What is it that you need help with.. I will try
Pls check my framework.jar and pls provide me video for this
https://www.dropbox.com/s/wwpcprwzkfamw30/framework.rar?dl=0
the_vanya1 said:
Pls check my framework.jar and pls provide me video for this
https://www.dropbox.com/s/wwpcprwzkfamw30/framework.rar?dl=0
Click to expand...
Click to collapse
Lol a video for this would be quite lengthy.. I don't really do "here is my files do them for me".. What is it that you are having trouble with or don't understand
ok, sorry, but its only part for framework.jar
I dont have this .method private sendInputViewShownState()V and const-string v0, "KOR" (LG P713, 4.1.2) Pls check it for me, only this part
the_vanya1 said:
ok, sorry, but its only part for framework.jar
I dont have this .method private sendInputViewShownState()V and const-string v0, "KOR" (LG P713, 4.1.2) Pls check it for me, only this part
Click to expand...
Click to collapse
Ok.. well it says to add a method above that (sendInputViewShownState) but you can add it anywhere.. When you compile it will automatically put in alphabetical order..
Not sure what you are referring to with "const-string v0 "KOR"
1. I dont have this line
const-string v0, "KOR"
const-string v1, "USA"
2. My .method public onCreate()V not like yours
3. I dont have inputmethod folder in com\android\internal\
the_vanya1 said:
1. I dont have this line
const-string v0, "KOR"
const-string v1, "USA"
2. My .method public onCreate()V not like yours
3. I dont have inputmethod folder in com\android\internal\
Click to expand...
Click to collapse
Ok.. let me take a look.. The const-string's maybe different but that should not matter.. You need look and see the placement of the code.. a string name should not matter..
Pls check my framework and tell me how to
the_vanya1 said:
1. I dont have this line
const-string v0, "KOR"
const-string v1, "USA"
2. My .method public onCreate()V not like yours
3. I dont have inputmethod folder in com\android\internal\
Click to expand...
Click to collapse
View attachment framework.zipHere is the InputMethodService with whats needed.. You can compare yours and see my edits..
Inputmethod folder might be in your framework2.jar.. framework and framework2 are essentially the same but they had to split them bc of the size..
thx, but I dont have the inputmethod folder in com\android\internal\ and in framework2
the_vanya1 said:
thx, but I dont have the inputmethod folder in com\android\internal\ and in framework2
Click to expand...
Click to collapse
Send it to me please.. You may need to check and see if LG has any specific frameworks, except "res" of course
What send? I already check it
the_vanya1 said:
What send? I already check it
Click to expand...
Click to collapse
Did you see if in your framework folder do you have any LG related frameworks.. except "res" ones.. It has to be somewhere.. pretty big part of the system

[MOD][Guide]How to change Dialer background in real time

tested and work perfectly in JB 4.1.2 xwms3 based
Before modding do a Nandroid Backup
To achieve you need:
SecSettings.apk
SecContacts.apk
tool for decompile and compile like apktool 1.5.2;
tool for text edit like notepad++:
Start with SecSettings.apk:
Decompile SecSettings.apk ,go in res/xml ,open with text editor display_settings.xml and add the red line
Code:
<CheckBoxPreference android:persistent="false" android:title="@string/display_saving" android:key="power_saving_mode" android:summary="@string/display_saving_mode_summary" />
<CheckBoxPreference android:persistent="false" android:title="@string/notification_pulse_title" android:key="notification_pulse" />[COLOR="Red"]
<PreferenceCategory android:title="@string/dialer_options">
<ListPreference android:persistent="false" android:entries="@array/dialer_bg_entries" android:title="@string/dialer_bg_chooser" android:key="dialer_chooser" android:summary="@string/dialer_bg_chooser_summary" android:entryValues="@array/dialer_bg_values" />
</PreferenceCategory>[/COLOR]
Go in res/value open with text editor arrays.xml and add at the end the red line
Code:
[COLOR="Red"]
<string-array name="dialer_bg_entries">
<item>Stock Dialer</item>
<item>Anastasia Dialer</item>
<item>BlackGlass Dialer</item>
<item>Chrome Dialer</item>
<item>Orange Dialer</item>
<item>Rainbow Dialer</item>
<item>White Dialer</item>
</string-array>
<string-array name="dialer_bg_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
</string-array>[/COLOR]
</resources>
Go in res/value open with text editor strings.xml and add at the end this line
Code:
[COLOR="Red"]
<string name="dialer_options">Options Dialer</string>
<string name="dialer_bg_chooser">Choose Dialer</string>
<string name="dialer_bg_chooser_summary">Select the background of dialer</string>[/COLOR]
</resources>
Go in smali\com\android\settings\DisplaySettings.smali file and add the following lines in RED
Code:
.field private final mCurConfig:Landroid/content/res/Configuration;
[COLOR="Red"]
.field private mDialerChooser:Landroid/preference/ListPreference;
[/COLOR]
.field private mDirect:I
.field mDirectUri:Landroid/net/Uri;
In the same file find .method public onCreate and add the following lines in RED
Code:
iput-object v12, p0, Lcom/android/settings/DisplaySettings;->mFontSizePref:Landroid/preference/ListPreference;
.line 424
iget-object v12, p0, Lcom/android/settings/DisplaySettings;->mFontSizePref:Landroid/preference/ListPreference;
invoke-virtual {v12, p0}, Landroid/preference/ListPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
[COLOR="Red"]
const-string v12, "dialer_chooser"
invoke-virtual {p0, v12}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v12
check-cast v12, Landroid/preference/ListPreference;
iput-object v12, p0, Lcom/android/settings/DisplaySettings;->mDialerChooser:Landroid/preference/ListPreference;
const-string v12, "dialer_chooser"
const/4 v13, 0x0
invoke-static {v8, v12, v13}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
iget-object v13, p0, Lcom/android/settings/DisplaySettings;->mDialerChooser:Landroid/preference/ListPreference;
invoke-static {v12}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v12
invoke-virtual {v13, v12}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V
iget-object v13, p0, Lcom/android/settings/DisplaySettings;->mDialerChooser:Landroid/preference/ListPreference;
invoke-virtual {v13, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
[/COLOR]
In the same file find .method public onPreferenceChange then find this code and add the red lines ,in blue line some explanation
Code:
const-string v2, "contextualpage_settings"
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :[COLOR="Red"]cond_dialer_chooser[/COLOR] [COLOR="Blue"]change this from cond_2 to cond_dialer_chooser[/COLOR]
.line 1089
check-cast p2, Ljava/lang/Boolean;
invoke-virtual {p2}, Ljava/lang/Boolean;->booleanValue()Z
move-result v0
if-eqz v0, :cond_e
in the same method find this code and add the red lines
Code:
.line 1100
const-string v1, "DisplaySettings"
const-string v3, "CONTEXTUALPAGE_SWITCH_CHANGED changed = false"
invoke-static {v1, v3}, Landroid/util/Log;->secD(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_7
:cond_11
move-wide v0, v4
goto/16 :goto_3
[COLOR="Red"]
:cond_dialer_chooser
iget-object v1, p0, Lcom/android/settings/DisplaySettings;->mDialerChooser:Landroid/preference/ListPreference;
if-ne p1, v1, :cond_2
check-cast p2, Ljava/lang/String;
invoke-static {p2}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I
move-result v0
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "dialer_chooser"
invoke-static {v1, v2, v0}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_4[/COLOR]
.end method
Save all changes and compile SecSettings
SecContacts.apk part
Decompile SecContacts.apk ,download this zip View attachment Dialer_Background.zip and put all the drawable pngs in SecContacts\res\drawable-sw320dp-hdpi
Compile SecContacts and decompile the new SecContacts.apk to obtain the new ids of the new pngs
So open SystemUI\res\value\public and leave it open to check the new ids
Go in SecContacts/smali/com/sec/android/app/dialertab/dialpad and open DialpadFragment.smali file and add the following red lines
Code:
.field private mAddContactsDialog:Landroid/app/AlertDialog;[COLOR="Red"]
.field private mAdditionalButtonBackground:I
.field private mAdditionalButtonBackgroundLand:I[/COLOR]
.field private mAudioManager:Landroid/media/AudioManager;
.field private mButtonAnimLeft:Landroid/view/animation/TranslateAnimation;
.
.
.
.field private mDialButtonSim1:Landroid/view/View;
.field private mDialButtonSim2:Landroid/view/View;[COLOR="Red"]
.field private mDialerBackground:I
.field private mDialerLandBackground:I[/COLOR]
.field private mDialpad:Landroid/view/View;
.field private mDialpadAdditionalButtons:Landroid/view/View;
then add at the end these 4 new methods,
in blue lines some explanation
Code:
.method set_dialer_background(Landroid/content/Context;)V
.locals 5
invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "dialer_chooser"
const v3, 0x0
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
const v2, 0x1
if-eq v1, v2, :cond_0
const v2, 0x2
if-eq v1, v2, :cond_1
const v2, 0x3
if-eq v1, v2, :cond_2
const v2, 0x4
if-eq v1, v2, :cond_3
const v2, 0x5
if-eq v1, v2, :cond_4
const v2, 0x6
if-eq v1, v2, :cond_5
const v2, 0x7f02039e [COLOR="Blue"]check this id with dialer_bg_p_01 in your res/value[/COLOR]
goto :goto_0
:cond_0
const v2, 0x7f02064b [COLOR="Blue"]check this id with anastasia_dialer_bg_p_01 in your res/value[/COLOR]
goto :goto_0
:cond_1
const v2, 0x7f02064c [COLOR="Blue"]check this id with blackglass_dialer_bg_p_01 in your res/value[/COLOR]
goto :goto_0
:cond_2
const v2, 0x7f02064d [COLOR="Blue"]check this id with chrome_dialer_bg_p_01 in your res/value[/COLOR]
goto :goto_0
:cond_3
const v2, 0x7f02064a [COLOR="Blue"]check this id with orange_dialer_bg_p_01 in your res/value[/COLOR]
goto :goto_0
:cond_4
const v2, 0x7f02064e [COLOR="Blue"]check this id with rainbow_dialer_bg_p_01 in your res/value[/COLOR]
goto :goto_0
:cond_5
const v2, 0x7f02064f [COLOR="Blue"]check this id with white_dialer_bg_p_01 in your res/value[/COLOR]
:goto_0
iput v2, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialerBackground:I
return-void
.end method
.method set_dialerland_background(Landroid/content/Context;)V
.locals 5
invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "dialer_chooser"
const v3, 0x0
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
const v2, 0x1
if-eq v1, v2, :cond_0
const v2, 0x2
if-eq v1, v2, :cond_1
const v2, 0x3
if-eq v1, v2, :cond_2
const v2, 0x4
if-eq v1, v2, :cond_3
const v2, 0x5
if-eq v1, v2, :cond_4
const v2, 0x6
if-eq v1, v2, :cond_5
const v2, 0x7f020395 [COLOR="Blue"]check this id with dialer_bg_h_01 in your res/value[/COLOR]
goto :goto_0
:cond_0
const v2, 0x7f020656 [COLOR="Blue"]check this id with anastasia_dialer_bg_h_01 in your res/value[/COLOR]
goto :goto_0
:cond_1
const v2, 0x7f020658 [COLOR="Blue"]check this id with blackglass_dialer_bg_h_01 in your res/value[/COLOR]
goto :goto_0
:cond_2
const v2, 0x7f02065a [COLOR="Blue"]check this id with chrome_dialer_bg_h_01 in your res/value[/COLOR]
goto :goto_0
:cond_3
const v2, 0x7f02065c [COLOR="Blue"]check this id with orange_dialer_bg_h_01 in your res/value[/COLOR]
goto :goto_0
:cond_4
const v2, 0x7f02065e [COLOR="Blue"]check this id with rainbow_dialer_bg_h_01 in your res/value[/COLOR]
goto :goto_0
:cond_5
const v2, 0x7f020660 [COLOR="Blue"]check this id with white_dialer_bg_h_01 in your res/value[/COLOR]
:goto_0
iput v2, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialerLandBackground:I
return-void
.end method
.method set_additional_button_background(Landroid/content/Context;)V
.locals 5
invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "dialer_chooser"
const v3, 0x0
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
const v2, 0x1
if-eq v1, v2, :cond_0
const v2, 0x2
if-eq v1, v2, :cond_1
const v2, 0x3
if-eq v1, v2, :cond_2
const v2, 0x4
if-eq v1, v2, :cond_3
const v2, 0x5
if-eq v1, v2, :cond_4
const v2, 0x6
if-eq v1, v2, :cond_5
const v2, 0x7f02039f [COLOR="Blue"]check this id with dialer_bg_p_02 in your res/value[/COLOR]
goto :goto_0
:cond_0
const v2, 0x7f020650 [COLOR="Blue"]check this id with anastasia_dialer_bg_p_02 in your res/value[/COLOR]
goto :goto_0
:cond_1
const v2, 0x7f020651 [COLOR="Blue"]check this id with blackglass_dialer_bg_p_02 in your res/value[/COLOR]
goto :goto_0
:cond_2
const v2, 0x7f020652 [COLOR="Blue"]check this id with chrome_dialer_bg_p_02 in your res/value[/COLOR]
goto :goto_0
:cond_3
const v2, 0x7f020653 [COLOR="Blue"]check this id with orange_dialer_bg_p_02 in your res/value[/COLOR]
goto :goto_0
:cond_4
const v2, 0x7f020654 [COLOR="Blue"]check this id with rainbow_dialer_bg_p_02 in your res/value[/COLOR]
goto :goto_0
:cond_5
const v2, 0x7f020655 [COLOR="Blue"]check this id with white_dialer_bg_p_02 in your res/value[/COLOR]
:goto_0
iput v2, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mAdditionalButtonBackground:I
return-void
.end method
.method set_additional_button_background_land(Landroid/content/Context;)V
.locals 5
invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "dialer_chooser"
const v3, 0x0
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
const v2, 0x1
if-eq v1, v2, :cond_0
const v2, 0x2
if-eq v1, v2, :cond_1
const v2, 0x3
if-eq v1, v2, :cond_2
const v2, 0x4
if-eq v1, v2, :cond_3
const v2, 0x5
if-eq v1, v2, :cond_4
const v2, 0x6
if-eq v1, v2, :cond_5
const v2, 0x7f020396 [COLOR="Blue"]check this id with dialer_bg_h_02 in your res/value[/COLOR]
goto :goto_0
:cond_0
const v2, 0x7f020657 [COLOR="Blue"]check this id with anastasia_dialer_bg_h_02 in your res/value[/COLOR]
goto :goto_0
:cond_1
const v2, 0x7f020659 [COLOR="Blue"]check this id with blackglass_dialer_bg_h_02 in your res/value[/COLOR]
goto :goto_0
:cond_2
const v2, 0x7f02065b [COLOR="Blue"]check this id with chrome_dialer_bg_h_02 in your res/value[/COLOR]
goto :goto_0
:cond_3
const v2, 0x7f02065d [COLOR="Blue"]check this id with orange_dialer_bg_h_02 in your res/value[/COLOR]
goto :goto_0
:cond_4
const v2, 0x7f02065f [COLOR="Blue"]check this id with rainbow_dialer_bg_h_02 in your res/value[/COLOR]
goto :goto_0
:cond_5
const v2, 0x7f020661 [COLOR="Blue"]check this id with white_dialer_bg_h_02 in your res/value[/COLOR]
:goto_0
iput v2, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mAdditionalButtonBackgroundLand:I
return-void
.end method
In the same file find .method private showDialpadChooser(Z)V and change at the beginning .locals 5 to .locals 6
In the same method find this code
Code:
iget-object v1, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpad:Landroid/view/View;
invoke-virtual {v1, v3}, Landroid/view/View;->setVisibility(I)V
and add the followind red lines
Code:
iget-object v1, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpad:Landroid/view/View;
invoke-virtual {v1, v3}, Landroid/view/View;->setVisibility(I)V[COLOR="Red"]
iget-object v1, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpad:Landroid/view/View;
invoke-virtual {p0}, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->getActivity()Landroid/app/Activity;
move-result-object v5
invoke-virtual {p0, v5}, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->set_dialer_background(Landroid/content/Context;)V
iget v5, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialerBackground:I
invoke-virtual {v1, v5}, Landroid/view/View;->setBackgroundResource(I)V[/COLOR]
then find this code
Code:
iget-object v1, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpadLand:Landroid/view/View;
invoke-virtual {v1, v3}, Landroid/view/View;->setVisibility(I)V
and add the followind red lines
Code:
iget-object v1, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpadLand:Landroid/view/View;
invoke-virtual {v1, v3}, Landroid/view/View;->setVisibility(I)V[COLOR="Red"]
iget-object v1, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpadLand:Landroid/view/View;
invoke-virtual {p0}, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->getActivity()Landroid/app/Activity;
move-result-object v5
invoke-virtual {p0, v5}, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->set_dialerland_background(Landroid/content/Context;)V
iget v5, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialerLandBackground:I
invoke-virtual {v1, v5}, Landroid/view/View;->setBackgroundResource(I)V[/COLOR]
then find this code,pay attention this is twice
Code:
iget-object v0, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpadAdditionalButtons:Landroid/view/View;
invoke-virtual {v0, v3}, Landroid/view/View;->setVisibility(I)V
and add the followind red lines
Code:
iget-object v0, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpadAdditionalButtons:Landroid/view/View;
invoke-virtual {v0, v3}, Landroid/view/View;->setVisibility(I)V[COLOR="Red"]
iget-object v0, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpadAdditionalButtons:Landroid/view/View;
invoke-virtual {p0}, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->getActivity()Landroid/app/Activity;
move-result-object v5
invoke-virtual {p0, v5}, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->set_additional_button_background(Landroid/content/Context;)V
iget v5, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mAdditionalButtonBackground:I
invoke-virtual {v0, v5}, Landroid/view/View;->setBackgroundResource(I)V[/COLOR]
then find this code,pay attention this is twice
Code:
iget-object v0, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpadAdditionalButtonsLand:Landroid/view/View;
invoke-virtual {v0, v3}, Landroid/view/View;->setVisibility(I)V
and add the followind red lines
Code:
iget-object v0, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpadAdditionalButtonsLand:Landroid/view/View;
invoke-virtual {v0, v3}, Landroid/view/View;->setVisibility(I)V[COLOR="Red"]
iget-object v0, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpadAdditionalButtonsLand:Landroid/view/View;
invoke-virtual {p0}, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->getActivity()Landroid/app/Activity;
move-result-object v5
invoke-virtual {p0, v5}, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->set_additional_button_background_land(Landroid/content/Context;)V
iget v5, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mAdditionalButtonBackgroundLand:I
invoke-virtual {v0, v5}, Landroid/view/View;->setBackgroundResource(I)V[/COLOR]
Then find the .method public resetAllLayout()V and change at the beginning .locals 12 to .locals 13
then in the same method find this code, pay attention it appears more than once and you need to add for each
Code:
iget-object v0, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpad:Landroid/view/View;
invoke-virtual {v0, v7}, Landroid/view/View;->setVisibility(I)V
and add the followind red lines
Code:
iget-object v0, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpad:Landroid/view/View;
invoke-virtual {v0, v7}, Landroid/view/View;->setVisibility(I)V[COLOR="Red"]
iget-object v0, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpad:Landroid/view/View;
invoke-virtual {p0}, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->getActivity()Landroid/app/Activity;
move-result-object v12
invoke-virtual {p0, v12}, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->set_dialer_background(Landroid/content/Context;)V
iget v12, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialerBackground:I
invoke-virtual {v0, v12}, Landroid/view/View;->setBackgroundResource(I)V[/COLOR]
find this code, pay attention it appears more than once and you need to add for each
Code:
iget-object v0, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpadLand:Landroid/view/View;
invoke-virtual {v0, v7}, Landroid/view/View;->setVisibility(I)V
and add the followind red lines
Code:
iget-object v0, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpadLand:Landroid/view/View;
invoke-virtual {v0, v7}, Landroid/view/View;->setVisibility(I)V[COLOR="Red"]
iget-object v0, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpadLand:Landroid/view/View;
invoke-virtual {p0}, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->getActivity()Landroid/app/Activity;
move-result-object v12
invoke-virtual {p0, v12}, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->set_dialerland_background(Landroid/content/Context;)V
iget v12, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialerLandBackground:I
invoke-virtual {v0, v12}, Landroid/view/View;->setBackgroundResource(I)V[/COLOR]
find this code, pay attention it appears more than once and you need to add for each
Code:
iget-object v0, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpadAdditionalButtons:Landroid/view/View;
invoke-virtual {v0, v7}, Landroid/view/View;->setVisibility(I)V
and add the followind red lines
Code:
iget-object v0, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpadAdditionalButtons:Landroid/view/View;
invoke-virtual {v0, v7}, Landroid/view/View;->setVisibility(I)V[COLOR="Red"]
iget-object v0, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpadAdditionalButtons:Landroid/view/View;
invoke-virtual {p0}, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->getActivity()Landroid/app/Activity;
move-result-object v12
invoke-virtual {p0, v12}, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->set_additional_button_background(Landroid/content/Context;)V
iget v12, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mAdditionalButtonBackground:I
invoke-virtual {v0, v12}, Landroid/view/View;->setBackgroundResource(I)V[/COLOR]
find this code, pay attention it appears more than once and you need to add for each
Code:
iget-object v0, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpadAdditionalButtonsLand:Landroid/view/View;
invoke-virtual {v0, v7}, Landroid/view/View;->setVisibility(I)V
and add the followind red lines
Code:
iget-object v0, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpadAdditionalButtonsLand:Landroid/view/View;
invoke-virtual {v0, v7}, Landroid/view/View;->setVisibility(I)V[COLOR="Red"]
iget-object v0, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mDialpadAdditionalButtonsLand:Landroid/view/View;
invoke-virtual {p0}, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->getActivity()Landroid/app/Activity;
move-result-object v12
invoke-virtual {p0, v12}, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->set_additional_button_background_land(Landroid/content/Context;)V
iget v12, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mAdditionalButtonBackgroundLand:I
invoke-virtual {v0, v12}, Landroid/view/View;->setBackgroundResource(I)V[/COLOR]
Save all changes and compile SecContacts then put SecSettings.apk and SecContacts.apk in your device
reserved .
Nice work mate. Keep it up, hope some more guides to come soon from your hard coded mind. ✌?
Sent from my GT-I9100 using Tapatalk 2
remuntada78 said:
tested and work perfectly in JB 4.1.2 xwms3 based
Save all changes and compile SecContacts then put SecSettings.apk and SecContacts.apk in your device
Click to expand...
Click to collapse
Do we have to sign the apk files?
avirk said:
Nice work mate. Keep it up, hope some more guides to come soon from your hard coded mind. ✌?
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
Thanks mate
homeboy1956 said:
Do we have to sign the apk files?
Click to expand...
Click to collapse
No need to sign
remuntada78 said:
Thanks mate
No need to sign
Click to expand...
Click to collapse
Thanks mate, will try asap.
Good job man
Sent from my SM-G900F using Tapatalk
Goldie said:
Good job man
Sent from my SM-G900F using Tapatalk
Click to expand...
Click to collapse
Thanks to you and for your guide
Inviato dal mio GT-I9100 utilizzando Tapatalk
remuntada78 said:
Thanks mate
No need to sign
Click to expand...
Click to collapse
Nice doing, great work.
I love it. Is there a way to change the color of the number?
homeboy1956 said:
Nice doing, great work.
I love it. Is there a way to change the color of the number?
Click to expand...
Click to collapse
The easiest way to change the color of the number is to edit the pngs in drawables-sw320dp-hdpi, they are call_dial_btn_xx and call_dial_btn_xx_h, you can use a tool for image editor like paint.net or gimp
Inviato dal mio GT-I9100 utilizzando Tapatalk
Well done. I will add to my ROM with your permission.
phenomarc said:
Well done. I will add to my ROM with your permission.
Click to expand...
Click to collapse
Thanks mate , you are free to add
inviato dal mio galaxy s2 con tapatalk
remuntada78 said:
Thanks mate , you are free to add
inviato dal mio galaxy s2 con tapatalk
Click to expand...
Click to collapse
Did you succes with List View Animations in XWMS3?
phenomarc said:
Did you succes with List View Animations in XWMS3?
Click to expand...
Click to collapse
Yes it's all working fine now
inviato dal mio galaxy s2 con tapatalk
I've find your Guide mate! [emoji1]
This is a Great work! You are a Genius! Really! Congratulation 4 Your big work and Your great capacity. [emoji1]
Of course... will try the Mod. [emoji5]
glowerita said:
I've find your Guide mate! [emoji1]
This is a Great work! You are a Genius! Really! Congratulation 4 Your big work and Your great capacity. [emoji1]
Of course... will try the Mod. [emoji5]
Click to expand...
Click to collapse
Thanks mate , trying to learning
Inviato dal mio GT-I9100 utilizzando Tapatalk
remuntada78 said:
Thanks mate , trying to learning
Inviato dal mio GT-I9100 utilizzando Tapatalk
Click to expand...
Click to collapse
I think You have to teach.
The learning time is finish 4 you. [emoji1]
glowerita said:
I think You have to teach.
The learning time is finish 4 you. [emoji1]
Click to expand...
Click to collapse
[emoji23] [emoji23] [emoji23]
Inviato dal mio GT-I9100 utilizzando Tapatalk
remuntada78 said:
[emoji23] [emoji23] [emoji23]
Inviato dal mio GT-I9100 utilizzando Tapatalk
Click to expand...
Click to collapse
Don't cry! Be happy to be a Great and Good Android's Teacher. [emoji1]
Congratulation again mate! [emoji1]
About Kk
Great job man
But the question is I can't do in a ROM KK 4.4.2 . Sorry my bad English.
Avanti Italia y la Roma. Salute di Argentina.

[GUIDE] [TUT] Header Images Auto machine

GUIDE Header Images Auto machine
Work and Tested - CM 12.1 & LP Based
​
1. Decompile settings.apk
At the file:
Settings\res\xml\Display_Settings.xmll
Add this line
<com.android.settings.cyanogenmod.SystemSettingSwitchPreference android:title="@string/status_bar_custom_header_title" android:key="status_bar_custom_header" android:summary="@string/status_bar_custom_header_summary" android:defaultValue="false" />
Click to expand...
Click to collapse
ADD THIS LINES.
Settings\res\values\strings.xml
<string name="status_bar_custom_header_title">Custom auto machine header image</string>
<string name="status_bar_custom_header_summary">Enable notification panel header image</string>
Click to expand...
Click to collapse
*Compile Settings.apk DONE*
2. Decompile SystemUI.apk
ystemUI\res\layout\status_bar_expanded_header.xml
Looking for:
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res-auto">
following inserted ::
<ImageView android:layout_gravity="center" android:id="@id/background_image" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:scaleType="centerCrop" android:adjustViewBounds="true" />
Click to expand...
Click to collapse
SystemUI\res\values\ids.xml
Add this line
<item type="id" name="background_image">false</item>
Click to expand...
Click to collapse
*compile and decompile again to assign the ID to a file*
GO TO SystemUI\smali\com\android\systemui\statusbar\phone\PhoneStatusbar.smali
PHP:
Looking for:
# instance fields
following inserted ::
.field private mStatusBarHeaderMachine:Lcom/android/systemui/ahmednhk/StatusBarHeaderMachine;
----------------------------------------------------------------
Looking for:
.method protected makeStatusBarView()V
After This Line:
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->startGlyphRasterizeHack()V
following inserted:
.line 1309
new-instance v3, Lcom/android/systemui/ahmednhk/StatusBarHeaderMachine;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-direct {v3, v4}, Lcom/android/systemui/ahmednhk/StatusBarHeaderMachine;-><init>(Landroid/content/Context;)V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarHeaderMachine:Lcom/android/systemui/ahmednhk/StatusBarHeaderMachine;
.line 1310
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarHeaderMachine:Lcom/android/systemui/ahmednhk/StatusBarHeaderMachine;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mHeader:Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;
invoke-virtual {v3, v4}, Lcom/android/systemui/ahmednhk/StatusBarHeaderMachine;->addObserver(Lcom/android/systemui/ahmednhk/StatusBarHeaderMachine$IStatusBarHeaderMachineObserver;)V
.line 1311
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarHeaderMachine:Lcom/android/systemui/ahmednhk/StatusBarHeaderMachine;
invoke-virtual {v3}, Lcom/android/systemui/ahmednhk/StatusBarHeaderMachine;->updateEnablement()V
----------------------------------------------------------------
SystemUI\smali\com\android\systemui\statusbar\phone\StatusBarHeaderView.smali
Looking for:
.implements Lcom/android/systemui/statusbar/policy/WeatherController$Callback;
following inserted :
.implements Lcom/android/systemui/ahmednhk/StatusBarHeaderMachine$IStatusBarHeaderMachineObserver;
----------------------------------------------------------------
Looking for:
# instance fields
following inserted :
.field private mBackgroundImage:Landroid/widget/ImageView;
----------------------------------------------------------------
Looking for:
.field private mCollapsedHeight:I
following inserted :
.field private mCurrentBackground:Landroid/graphics/drawable/Drawable;
----------------------------------------------------------------
Looking for:
.field private mExpandedHeight:I
following inserted :
.field private mLastHeight:F
----------------------------------------------------------------
Looking for:
.method static synthetic access$900(Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;)Landroid/widget/Switch;
At the end of it -> inserted :
.method static synthetic access$100001(Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;Landroid/graphics/drawable/Drawable;Z)V
.locals 0
.param p0, "x0" # Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;
.param p1, "x1" # Landroid/graphics/drawable/Drawable;
.param p2, "x2" # Z
.prologue
.line 71
invoke-direct {p0, p1, p2}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->doUpdateStatusBarCustomHeader(Landroid/graphics/drawable/Drawable;Z)V
return-void
.end method
.method static synthetic access$100002(Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;)Landroid/widget/ImageView;
.locals 1
.param p0, "x0" # Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;
.prologue
.line 71
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mBackgroundImage:Landroid/widget/ImageView;
return-object v0
.end method
.method static synthetic access$100003(Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
.locals 0
.param p0, "x0" # Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;
.param p1, "x1" # Landroid/graphics/drawable/Drawable;
.prologue
.line 71
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mCurrentBackground:Landroid/graphics/drawable/Drawable;
return-object p1
.end method
.method private doUpdateStatusBarCustomHeader(Landroid/graphics/drawable/Drawable;Z)V
.locals 2
.param p1, "next" # Landroid/graphics/drawable/Drawable;
.param p2, "force" # Z
.prologue
.line 1033
if-eqz p1, :cond_1
.line 1034
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mCurrentBackground:Landroid/graphics/drawable/Drawable;
if-eq p1, v0, :cond_0
.line 1035
const-string v0, "StatusBarHeaderView"
const-string v1, "Updating status bar header background"
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 1036
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mBackgroundImage:Landroid/widget/ImageView;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V
.line 1037
invoke-direct {p0, p1, p2}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->setNotificationPanelHeaderBackground(Landroid/graphics/drawable/Drawable;Z)V
.line 1038
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mCurrentBackground:Landroid/graphics/drawable/Drawable;
.line 1044
:cond_0
:goto_0
return-void
.line 1041
:cond_1
const/4 v0, 0x0
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mCurrentBackground:Landroid/graphics/drawable/Drawable;
.line 1042
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mBackgroundImage:Landroid/widget/ImageView;
const/16 v1, 0x8
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V
goto :goto_0
.end method
.method private setNotificationPanelHeaderBackground(Landroid/graphics/drawable/Drawable;Z)V
.locals 5
.param p1, "dw" # Landroid/graphics/drawable/Drawable;
.param p2, "force" # Z
.prologue
const/4 v4, 0x1
.line 1047
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mBackgroundImage:Landroid/widget/ImageView;
invoke-virtual {v2}, Landroid/widget/ImageView;->getDrawable()Landroid/graphics/drawable/Drawable;
move-result-object v2
if-eqz v2, :cond_0
if-nez p2, :cond_0
.line 1048
const/4 v2, 0x2
new-array v0, v2, [Landroid/graphics/drawable/Drawable;
.line 1049
.local v0, "arrayDrawable":[Landroid/graphics/drawable/Drawable;
const/4 v2, 0x0
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mBackgroundImage:Landroid/widget/ImageView;
invoke-virtual {v3}, Landroid/widget/ImageView;->getDrawable()Landroid/graphics/drawable/Drawable;
move-result-object v3
aput-object v3, v0, v2
.line 1050
aput-object p1, v0, v4
.line 1052
new-instance v1, Landroid/graphics/drawable/TransitionDrawable;
invoke-direct {v1, v0}, Landroid/graphics/drawable/TransitionDrawable;-><init>([Landroid/graphics/drawable/Drawable;)V
.line 1053
.local v1, "transitionDrawable":Landroid/graphics/drawable/TransitionDrawable;
invoke-virtual {v1, v4}, Landroid/graphics/drawable/TransitionDrawable;->setCrossFadeEnabled(Z)V
.line 1054
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mBackgroundImage:Landroid/widget/ImageView;
invoke-virtual {v2, v1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
.line 1055
const/16 v2, 0x3e8
invoke-virtual {v1, v2}, Landroid/graphics/drawable/TransitionDrawable;->startTransition(I)V
.line 1059
.end local v0 # "arrayDrawable":[Landroid/graphics/drawable/Drawable;
.end local v1 # "transitionDrawable":Landroid/graphics/drawable/TransitionDrawable;
:goto_0
return-void
.line 1057
:cond_0
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mBackgroundImage:Landroid/widget/ImageView;
invoke-virtual {v2, p1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
goto :goto_0
.end method
----------------------------------------------------------------
Looking for:
# virtual method
following inserted :
.method public disableHeader()V
.locals 1
.prologue
.line 1072
new-instance v0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView$98;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView$98;-><init>(Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;)V
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->post(Ljava/lang/Runnable;)Z
.line 1078
return-void
.end method
.method public updateHeader(Landroid/graphics/drawable/Drawable;Z)V
.locals 1
.param p1, "headerImage" # Landroid/graphics/drawable/Drawable;
.param p2, "force" # Z
.prologue
.line 1063
new-instance v0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView$97;
invoke-direct {v0, p0, p1, p2}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView$97;-><init>(Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;Landroid/graphics/drawable/Drawable;Z)V
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->post(Ljava/lang/Runnable;)Z
.line 1068
return-void
.end method
----------------------------------------------------------------
Looking for:
.method protected onFinishInflate()V
After This Line:
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mDateExpanded:Landroid/widget/TextView;
following inserted ::
.line 31
const v0, 0x7f0f017a
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/ImageView;
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mBackgroundImage:Landroid/widget/ImageView;
.line 168
Will Find At :
<0x7f0f017a - <public type="id" name="background_image">
----------------------------------------------------------------
Looking for:
.method public setExpansion(F)V
Changing it completely with:
.method public setExpansion(F)V
.locals 5
.param p1, "t" # F
.prologue
.line 584
iget-boolean v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mExpanded:Z
if-nez v2, :cond_0
.line 585
const/4 p1, 0x0
.line 587
:cond_0
iput p1, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mCurrentT:F
.line 588
iget v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mCollapsedHeight:I
int-to-float v2, v2
iget v3, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mExpandedHeight:I
iget v4, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mCollapsedHeight:I
sub-int/2addr v3, v4
int-to-float v3, v3
mul-float/2addr v3, p1
add-float v0, v2, v3
.line 589
.local v0, "height":F
iget v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mLastHeight:F
cmpl-float v2, v0, v2
if-eqz v2, :cond_3
.line 590
iget v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mCollapsedHeight:I
int-to-float v2, v2
cmpg-float v2, v0, v2
if-gez v2, :cond_1
.line 591
iget v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mCollapsedHeight:I
int-to-float v0, v2
.line 593
:cond_1
iget v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mExpandedHeight:I
int-to-float v2, v2
cmpl-float v2, v0, v2
if-lez v2, :cond_2
.line 594
iget v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mExpandedHeight:I
int-to-float v0, v2
.line 596
:cond_2
move v1, v0
.line 597
.local v1, "heightFinal":F
invoke-direct {p0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->setClipping(F)V
.line 599
new-instance v2, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView$96;
invoke-direct {v2, p0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView$96;-><init>(Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;F)V
invoke-virtual {p0, v2}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->post(Ljava/lang/Runnable;)Z
.line 607
invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->updateLayoutValues(F)V
.line 608
iput v1, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mLastHeight:F
.line 610
.end local v1 # "heightFinal":F
:cond_3
return-void
.end method
----------------------------------------------------------------
*assign the ID's to file*
SystemUI\smali\com\android\systemui\ahmednhk\StatusBarHeaderProvider.smali
<public type="drawable" name="notifhead_christmas"
LINE 220
<public type="drawable" name="notifhead_newyearseve"
LINE 241
<public type="drawable" name="notifhead_night"
LINE 265
<public type="drawable" name="notifhead_sunrise"
LINE 280
<public type="drawable" name="notifhead_morning"
LINE 295
<public type="drawable" name="notifhead_noon"
LINE 310
<public type="drawable" name="notifhead_afternoon"
LINE 325
<public type="drawable" name="notifhead_sunset"
LINE 342>
*Compile SystemUI.apk DONE*
Files and Compare Press Me​
I have tried this but my systemUI got fc. I decompile and recompile it without errors. Any help?

Categories

Resources