[HOW TO] [LSJ] Toggle to choose AOSP lockscreen **11DEC** - AT&T Samsung Galaxy S II SGH-I777

For TouchWiz Jelly Bean Roms (LSJ)
This is a noob proof guide, very easy to do, and made to involve less :cond_ possible.
Is not a clean guide for developers, infact i will use existing parts of code (not used) to make the toggle.
Obviously, if u are a developer and have a little experience with smali code language and patience with cond you can figure this out easily
requirements:
-apktool use (i won t teach u how to use apktool, i assume u can use it)
-attention
this tutorial is made on 2 parts:
-create a switch to change circle lockscreen with aosp lockscreen
-create a toggle to set the aosp lockscreen when checked
ready?
PART 1
We need to decompile android.policy.jar for first.
navigate: smali/com/android/internal/policy/impl/LockPatternKeyguardView.smali
look for .method createLockScreen()Landroid/view/View; and add the red lines
Code:
.method createLockScreen()Landroid/view/View;
.registers 7
.prologue
.line 1319
[COLOR="Red"]iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "aosp_lock"
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-nez v0, :cond_mirko
[/COLOR]
new-instance v0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/sec/CircleLockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
[COLOR="Red"]goto :goto_ddd[/COLOR]
.line 1325
[COLOR="Red"]:cond_mirko
new-instance v0, Lcom/android/internal/policy/impl/LockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
[/COLOR]
.local v0, lockView:Landroid/view/View;
[COLOR="Red"]:goto_ddd[/COLOR]
invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->initializeTransportControlView(Landroid/view/View;)V
first part is done
recompile and push it on /system/framework
PART 2
this is the not clean part, i have not created new codes for a toggle, but i used an unused code with the form i needed (checkbox preference).
I decompiled SecSettings.apk /smali/com/android/settings/LockscreenSettings.smali
the unused code i used is "mSayCommand" one, infact has the checkbox preference form i needed as we can see
Code:
.field private mSayCommand:Landroid/preference/CheckBoxPreference;
ok let s start second part, we need to change all "mSayCommand" to "mAospLock" and change the keyword from "wake_up_lock_screen" to "aosp_lock" in order to recall the first part of the mod we made in android.policy.jar
red part is what we add, and purple what we delete.
Code:
[COLOR="Red"].field private mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
.field private mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
.field private mClock:Landroid/preference/CheckBoxPreference;
.field private mDualclock:Landroid/preference/SwitchPreferenceScreen;
.field private mHelpText:Landroid/preference/CheckBoxPreference;
.field private mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
.field private mInkEffect:Landroid/preference/PreferenceScreen;
.field mInkEffectSummary:[I
.field private mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
.field private mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
.field private mMotionDialog:Landroid/app/AlertDialog;
.field private mRippleEffect:Landroid/preference/CheckBoxPreference;
[COLOR="DarkOrchid"].field private mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
...
Code:
.line 319
:cond_f8
[COLOR="DarkOrchid"] iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Red"]iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
if-eqz v4, :cond_10e
.line 320
[COLOR="DarkOrchid"]iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Red"]iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
[COLOR="DarkOrchid"]const-string v8, "wake_up_lock_screen"[/COLOR]
[COLOR="Red"]const-string v8, "aosp_lock"[/COLOR]
invoke-static {v4, v8, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v4
if-eqz v4, :cond_146
move v4, v5
:goto_10b
invoke-virtual {v7, v4}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
Code:
.line 225
const-string v9, "say_your_wakeup"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/CheckBoxPreference;
[COLOR="DarkOrchid"] iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Red"]iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
.line 227
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;
move-result-object v9
invoke-static {v9}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
move-result v9
if-eqz v9, :cond_20d
.line 228
[COLOR="DarkOrchid"]iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Red"]iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v10
const v11, 0x7f090d6f
invoke-virtual {v10, v11}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v10
invoke-virtual {v9, v10}, Landroid/preference/CheckBoxPreference;->setSummary(Ljava/lang/CharSequence;)V
as u can see I left untouched keyword "say_your_wakeup", it s not a wrong writing, i left it and i will use that keyword in future steps.
Code:
.line 254
[COLOR="DarkOrchid"]iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Red"]iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
if-eqz v9, :cond_26d
.line 255
[COLOR="DarkOrchid"]invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v9
iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;
invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
[/COLOR]
we delete this part of code to make the option visible, infact i said we re using an unused part of code, and has been hidden from preference screen.
Code:
.line 259
:cond_276
const/4 v9, 0x0
invoke-static {v9}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
move-result v9
if-nez v9, :cond_287
[COLOR="DarkOrchid"]iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Red"]iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
if-eqz v9, :cond_296
if-eqz v7, :cond_296
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
if-nez v9, :cond_296
Code:
.line 262
:cond_296
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
if-nez v9, :cond_2af
[COLOR="DarkOrchid"]iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Red"]iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
if-nez v9, :cond_2af
if-nez v7, :cond_2af
Code:
.line 356
:cond_b3
[COLOR="DarkOrchid"]iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Red"]iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
invoke-virtual {p2, v4}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_1e
.line 357
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
[COLOR="DarkOrchid"]const-string v5, "wake_up_lock_screen"[/COLOR]
[COLOR="Red"]const-string v5, "aosp_lock"[/COLOR]
[COLOR="DarkOrchid"]iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Red"]iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
invoke-virtual {v6}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v6
if-eqz v6, :cond_ce
smali part is done, and now the toggle is set and working
last part is to edit our unused part of the code in res/xml folder, lockscreen_settings.xml
Code:
[COLOR="DarkOrchid"]<CheckBoxPreference android:title="@string/samsung_unlock_option_say_your_wakeup_command_to_unlock_screen" android:key="say_your_wakeup" android:summary="@string/wakeup_in_lockscreen_summary" />
[/COLOR]
[COLOR="Red"]<CheckBoxPreference android:title="@string/your_string" android:key="say_your_wakeup" android:summary="@string/your_summary_string" />[/COLOR]
asu can see we have again the keyword i said before "say_your_wakeup" , if u want u can change it, but change it in the smali part too if not the toggle won t work.
Now simply add the strings in /res/values/strings.xml
Code:
<string name="your_string">AOSP Lockscreen</string>
<string name="your_summary_string">Original Jelly Bean Lockscreen</string>
that s it.
easy and noob proof
and this is the result
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

i take just in case

Nice guide... I like the way you reused some code.

shoman94 said:
Nice guide... I like the way you reused some code.
Click to expand...
Click to collapse
Thanks Jas!

Very useful tutorial:thumbup:
Inviato dal mio GT-N7000 con Tapatalk 2

How I can do this without the toggle? I just want the AOSP Lockscreen, does not interest me to Samsung xD
Thank you very much :laugh:

Related

[Q] [MIUI] Using two different battery styles

Hi,
i like the MIUI battery top bar but i want also have a percent indicator.
I have no idea how to find the related strings and values... to activate the top bar style and the battery percent style concurrently...
I hope someone of you can help me
Smali code:
Code:
.class public Lcom/android/systemui/statusbar/BatteryStatus;
.super Lcom/android/systemui/statusbar/StatusBarIconView;
.source "BatteryStatus.java"
# static fields
.field private static mBatteryStyle:I
.field static sIconUnit:I
# instance fields
.field private mAnimation:Landroid/graphics/drawable/LevelListDrawable;
.field private mBatteryStyleChangeObserver:Landroid/database/ContentObserver;
.field private mGraphicIcon:Landroid/graphics/drawable/LevelListDrawable;
# direct methods
.method static constructor <clinit>()V
.locals 1
.prologue
.line 153
const/16 v0, 0x26
sput v0, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;)V
.locals 2
.parameter "context"
.parameter "slot"
.prologue
.line 44
invoke-direct {p0, p1, p2}, Lcom/android/systemui/statusbar/StatusBarIconView;-><init>(Landroid/content/Context;Ljava/lang/String;)V
.line 46
invoke-direct {p0}, Lcom/android/systemui/statusbar/BatteryStatus;->updateBatterySettings()V
.line 47
new-instance v0, Lcom/android/systemui/statusbar/BatteryStatus$1;
new-instance v1, Landroid/os/Handler;
invoke-direct {v1}, Landroid/os/Handler;-><init>()V
invoke-direct {v0, p0, v1}, Lcom/android/systemui/statusbar/BatteryStatus$1;-><init>(Lcom/android/systemui/statusbar/BatteryStatus;Landroid/os/Handler;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mBatteryStyleChangeObserver:Landroid/database/ContentObserver;
.line 53
return-void
.end method
.method static synthetic access$000(Lcom/android/systemui/statusbar/BatteryStatus;)V
.locals 0
.parameter "x0"
.prologue
.line 36
invoke-direct {p0}, Lcom/android/systemui/statusbar/BatteryStatus;->updateBatterySettings()V
return-void
.end method
.method private extractDrawable(I)Ljava/util/ArrayList;
.locals 17
.parameter "resId"
.annotation system Ldalvik/annotation/Signature;
value = {
"(I)",
"Ljava/util/ArrayList",
"<",
"Landroid/graphics/drawable/Drawable;",
">;"
}
.end annotation
.prologue
.line 155
new-instance v15, Ljava/util/ArrayList;
invoke-direct {v15}, Ljava/util/ArrayList;-><init>()V
.line 157
.local v15, result:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/graphics/drawable/Drawable;>;"
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/StatusBarIconView;->mContext:Landroid/content/Context;
move-object v4, v0
invoke-virtual {v4}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v14
.line 158
.local v14, res:Landroid/content/res/Resources;
move-object v0, v14
move/from16 v1, p1
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->openRawResource(I)Ljava/io/InputStream;
move-result-object v4
invoke-static {v4}, Landroid/graphics/BitmapFactory;->decodeStream(Ljava/io/InputStream;)Landroid/graphics/Bitmap;
move-result-object v2
.line 159
.local v2, bm:Landroid/graphics/Bitmap;
if-nez v2, :cond_0
.line 175
:goto_0
return-object v15
.line 163
:cond_0
invoke-virtual {v2}, Landroid/graphics/Bitmap;->getHeight()I
move-result v4
sget v5, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
div-int v16, v4, v5
.line 164
.local v16, rowCount:I
invoke-virtual {v2}, Landroid/graphics/Bitmap;->getWidth()I
move-result v4
sget v5, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
div-int v10, v4, v5
.line 165
.local v10, columnCount:I
sget v4, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
sget v5, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
mul-int/2addr v4, v5
new-array v3, v4, [I
.line 166
.local v3, pixels:[I
const/4 v11, 0x0
.local v11, i:I
:goto_1
move v0, v11
move/from16 v1, v16
if-ge v0, v1, :cond_2
.line 167
const/4 v13, 0x0
.local v13, j:I
:goto_2
if-ge v13, v10, :cond_1
.line 168
const/4 v4, 0x0
sget v5, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
sget v6, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
mul-int/2addr v6, v13
sget v7, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
mul-int/2addr v7, v11
sget v8, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
sget v9, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
invoke-virtual/range {v2 .. v9}, Landroid/graphics/Bitmap;->getPixels([IIIIIII)V
.line 169
const/4 v4, 0x0
sget v5, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
sget v6, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
sget v7, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
sget-object v8, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;
invoke-static/range {v3 .. v8}, Landroid/graphics/Bitmap;->createBitmap([IIIIILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;
move-result-object v12
.line 170
.local v12, icon:Landroid/graphics/Bitmap;
new-instance v4, Landroid/graphics/drawable/BitmapDrawable;
invoke-direct {v4, v14, v12}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/content/res/Resources;Landroid/graphics/Bitmap;)V
invoke-virtual {v15, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 167
add-int/lit8 v13, v13, 0x1
goto :goto_2
.line 166
.end local v12 #icon:Landroid/graphics/Bitmap;
:cond_1
add-int/lit8 v11, v11, 0x1
goto :goto_1
.line 173
.end local v13 #j:I
:cond_2
invoke-virtual {v2}, Landroid/graphics/Bitmap;->recycle()V
goto :goto_0
.end method
.method private generateAnimation(I)Landroid/graphics/drawable/LevelListDrawable;
.locals 11
.parameter "resId"
.prologue
.line 129
new-instance v7, Landroid/graphics/drawable/LevelListDrawable;
invoke-direct {v7}, Landroid/graphics/drawable/LevelListDrawable;-><init>()V
.line 131
.local v7, result:Landroid/graphics/drawable/LevelListDrawable;
invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/BatteryStatus;->extractDrawable(I)Ljava/util/ArrayList;
move-result-object v3
.line 132
.local v3, drawables:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/graphics/drawable/Drawable;>;"
invoke-virtual {v3}, Ljava/util/ArrayList;->size()I
move-result v1
.line 133
.local v1, count:I
if-lez v1, :cond_1
.line 135
const v8, 0x3ecccccd
.line 136
.local v8, sum:F
const/high16 v9, 0x42c8
int-to-float v10, v1
div-float v2, v9, v10
.line 137
.local v2, delta:F
const/16 v9, 0x1388
div-int v4, v9, v1
.line 138
.local v4, duration:I
const/4 v5, 0x0
.end local p0
.local v5, i:I
:goto_0
if-ge v5, v1, :cond_1
.line 139
new-instance v0, Landroid/graphics/drawable/AnimationDrawable;
invoke-direct {v0}, Landroid/graphics/drawable/AnimationDrawable;-><init>()V
.line 140
.local v0, animation:Landroid/graphics/drawable/AnimationDrawable;
invoke-virtual {v3, v5}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object p0
check-cast p0, Landroid/graphics/drawable/Drawable;
add-int/lit16 v9, v4, 0x1f4
invoke-virtual {v0, p0, v9}, Landroid/graphics/drawable/AnimationDrawable;->addFrame(Landroid/graphics/drawable/Drawable;I)V
.line 141
add-int/lit8 v6, v5, 0x1
.local v6, j:I
:goto_1
if-ge v6, v1, :cond_0
.line 142
invoke-virtual {v3, v6}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object p0
check-cast p0, Landroid/graphics/drawable/Drawable;
invoke-virtual {v0, p0, v4}, Landroid/graphics/drawable/AnimationDrawable;->addFrame(Landroid/graphics/drawable/Drawable;I)V
.line 141
add-int/lit8 v6, v6, 0x1
goto :goto_1
.line 144
:cond_0
const/4 v9, 0x0
invoke-virtual {v0, v9}, Landroid/graphics/drawable/AnimationDrawable;->setOneShot(Z)V
.line 145
float-to-int v9, v8
add-float v10, v8, v2
float-to-int v10, v10
invoke-virtual {v7, v9, v10, v0}, Landroid/graphics/drawable/LevelListDrawable;->addLevel(IILandroid/graphics/drawable/Drawable;)V
.line 146
add-float/2addr v8, v2
.line 138
add-int/lit8 v5, v5, 0x1
goto :goto_0
.line 150
.end local v0 #animation:Landroid/graphics/drawable/AnimationDrawable;
.end local v2 #delta:F
.end local v4 #duration:I
.end local v5 #i:I
.end local v6 #j:I
.end local v8 #sum:F
:cond_1
return-object v7
.end method
.method private generateIcon(I)Landroid/graphics/drawable/LevelListDrawable;
.locals 8
.parameter "resId"
.prologue
.line 111
new-instance v4, Landroid/graphics/drawable/LevelListDrawable;
invoke-direct {v4}, Landroid/graphics/drawable/LevelListDrawable;-><init>()V
.line 113
.local v4, result:Landroid/graphics/drawable/LevelListDrawable;
invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/BatteryStatus;->extractDrawable(I)Ljava/util/ArrayList;
move-result-object v2
.line 114
.local v2, drawables:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/graphics/drawable/Drawable;>;"
invoke-virtual {v2}, Ljava/util/ArrayList;->size()I
move-result v0
.line 115
.local v0, count:I
if-lez v0, :cond_0
.line 117
const v5, 0x3ecccccd
.line 118
.local v5, sum:F
const/high16 v6, 0x42c8
int-to-float v7, v0
div-float v1, v6, v7
.line 119
.local v1, delta:F
const/4 v3, 0x0
.end local p0
.local v3, i:I
:goto_0
if-ge v3, v0, :cond_0
.line 120
float-to-int v6, v5
add-float v7, v5, v1
float-to-int v7, v7
invoke-virtual {v2, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object p0
check-cast p0, Landroid/graphics/drawable/Drawable;
invoke-virtual {v4, v6, v7, p0}, Landroid/graphics/drawable/LevelListDrawable;->addLevel(IILandroid/graphics/drawable/Drawable;)V
.line 121
add-float/2addr v5, v1
.line 119
add-int/lit8 v3, v3, 0x1
goto :goto_0
.line 125
.end local v1 #delta:F
.end local v3 #i:I
.end local v5 #sum:F
:cond_0
return-object v4
.end method
.method private final updateBatterySettings()V
.locals 4
.prologue
const/4 v3, 0x0
.line 180
iget-object v0, p0, Lcom/android/systemui/statusbar/StatusBarIconView;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "battery_indicator_style"
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
sput v0, Lcom/android/systemui/statusbar/BatteryStatus;->mBatteryStyle:I
.line 184
iput-object v3, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mGraphicIcon:Landroid/graphics/drawable/LevelListDrawable;
.line 185
iput-object v3, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mAnimation:Landroid/graphics/drawable/LevelListDrawable;
.line 186
new-instance v0, Lcom/android/systemui/statusbar/BatteryStatus$2;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/BatteryStatus$2;-><init>(Lcom/android/systemui/statusbar/BatteryStatus;)V
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/BatteryStatus;->post(Ljava/lang/Runnable;)Z
.line 194
return-void
.end method
# virtual methods
.method protected getIcon(Lcom/android/internal/statusbar/StatusBarIcon;)Landroid/graphics/drawable/Drawable;
.locals 4
.parameter "icon"
.prologue
const/4 v3, 0x0
.line 82
sget v1, Lcom/android/systemui/statusbar/BatteryStatus;->mBatteryStyle:I
const/4 v2, 0x2
if-ne v1, v2, :cond_0
move-object v1, v3
.line 107
:goto_0
return-object v1
.line 86
:cond_0
iget v1, p1, Lcom/android/internal/statusbar/StatusBarIcon;->iconId:I
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
iget-boolean v2, p0, Lcom/android/systemui/statusbar/StatusBarIconView;->mEnableAlternative:Z
invoke-static {v1, v2}, Lcom/android/systemui/statusbar/AlternativeIcons;->get(Ljava/lang/Integer;Z)I
move-result v0
.line 87
.local v0, iconId:I
sparse-switch v0, :sswitch_data_0
move-object v1, v3
.line 107
goto :goto_0
.line 89
:sswitch_0
iget-object v1, p0, Lcom/android/systemui/statusbar/StatusBarIconView;->mContext:Landroid/content/Context;
invoke-static {v1, p1}, Lcom/android/systemui/statusbar/StatusBarIconView;->getIcon(Landroid/content/Context;Lcom/android/internal/statusbar/StatusBarIcon;)Landroid/graphics/drawable/Drawable;
move-result-object v1
goto :goto_0
.line 92
:sswitch_1
iget-object v1, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mAnimation:Landroid/graphics/drawable/LevelListDrawable;
if-nez v1, :cond_1
.line 93
const v1, 0x7f050001
invoke-direct {p0, v1}, Lcom/android/systemui/statusbar/BatteryStatus;->generateAnimation(I)Landroid/graphics/drawable/LevelListDrawable;
move-result-object v1
iput-object v1, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mAnimation:Landroid/graphics/drawable/LevelListDrawable;
.line 95
:cond_1
iget-object v1, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mAnimation:Landroid/graphics/drawable/LevelListDrawable;
goto :goto_0
.line 98
:sswitch_2
iget-object v1, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mGraphicIcon:Landroid/graphics/drawable/LevelListDrawable;
if-nez v1, :cond_2
.line 99
sget v1, Lcom/android/systemui/statusbar/BatteryStatus;->mBatteryStyle:I
if-nez v1, :cond_3
const/high16 v1, 0x7f05
:goto_1
invoke-direct {p0, v1}, Lcom/android/systemui/statusbar/BatteryStatus;->generateIcon(I)Landroid/graphics/drawable/LevelListDrawable;
move-result-object v1
iput-object v1, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mGraphicIcon:Landroid/graphics/drawable/LevelListDrawable;
.line 104
:cond_2
iget-object v1, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mGraphicIcon:Landroid/graphics/drawable/LevelListDrawable;
goto :goto_0
.line 99
:cond_3
const v1, 0x7f050002
goto :goto_1
.line 87
nop
:sswitch_data_0
.sparse-switch
0x10805cc -> :sswitch_2
0x10805d4 -> :sswitch_1
0x10805db -> :sswitch_0
.end sparse-switch
.end method
.method public onAttachedToWindow()V
.locals 4
.prologue
.line 56
invoke-super {p0}, Lcom/android/systemui/statusbar/StatusBarIconView;->onAttachedToWindow()V
.line 57
iget-object v0, p0, Lcom/android/systemui/statusbar/StatusBarIconView;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "battery_indicator_style"
invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
const/4 v2, 0x0
iget-object v3, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mBatteryStyleChangeObserver:Landroid/database/ContentObserver;
invoke-virtual {v0, v1, v2, v3}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
.line 61
return-void
.end method
.method public onDetachedFromWindow()V
.locals 2
.prologue
.line 64
invoke-super {p0}, Lcom/android/systemui/statusbar/StatusBarIconView;->onDetachedFromWindow()V
.line 65
iget-object v0, p0, Lcom/android/systemui/statusbar/StatusBarIconView;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
iget-object v1, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mBatteryStyleChangeObserver:Landroid/database/ContentObserver;
invoke-virtual {v0, v1}, Landroid/content/ContentResolver;->unregisterContentObserver(Landroid/database/ContentObserver;)V
.line 66
return-void
.end method
.method protected setIcon(Lcom/android/internal/statusbar/StatusBarIcon;)V
.locals 2
.parameter "icon"
.prologue
.line 73
const/4 v1, -0x1
invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/BatteryStatus;->setImageLevel(I)V
.line 74
invoke-virtual {p0, p1}, Lcom/android/systemui/statusbar/BatteryStatus;->getIcon(Lcom/android/internal/statusbar/StatusBarIcon;)Landroid/graphics/drawable/Drawable;
move-result-object v0
.line 75
.local v0, drawable:Landroid/graphics/drawable/Drawable;
if-nez v0, :cond_0
const/4 v1, 0x1
:goto_0
iput-boolean v1, p0, Lcom/android/systemui/statusbar/StatusBarIconView;->mHideForAlternative:Z
.line 76
invoke-virtual {p0}, Lcom/android/systemui/statusbar/BatteryStatus;->updateVisibility()V
.line 77
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/BatteryStatus;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
.line 78
iget v1, p1, Lcom/android/internal/statusbar/StatusBarIcon;->iconLevel:I
invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/BatteryStatus;->setImageLevel(I)V
.line 79
return-void
.line 75
:cond_0
const/4 v1, 0x0
goto :goto_0
.end method
.method protected updateNumber(Lcom/android/internal/statusbar/StatusBarIcon;)V
.locals 0
.parameter "icon"
.prologue
.line 70
return-void
.end method
thank you
greetz
You are doing way to much work. Just go to the setting menu then battery style and choose the number type there.
Sent from my SAMSUNG-SGH-I777 using Tapatalk
Waddle said:
You are doing way to much work. Just go to the setting menu then battery style and choose the number type there.
Sent from my SAMSUNG-SGH-I777 using Tapatalk
Click to expand...
Click to collapse
hi,
thanks for your answer but you missed my point so here is a photo
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
i want to show the green battery indicator AND the percent indicator TOGETHER
hope you understand it and can help me
greetz
it is impossible mate..sometimes we gotta live with limitation..
Sent from my LT18i

[HOW-TO] [ASOP MOD] DIY android.policy.jar | 3.15 OTA | APM | Vol Rocker | Back Kill

All Swagged Out Project
The goal of ASOP is to provide every user with the chance to tweak their phones exactly how they like. At the same time, ASOP gives up and coming devs a place to learn how to get their hands dirty and add mods the old fashioned way.
Background
android.policy.jar is a framework file that controls a lot of things. The three mods that will be covered today include the Advanced Power Menu, Volume Rocker Mod (to skip tracks) and Long-press Back to Kill. These mods were created a long time ago and have been used on many devices. A big props does have to be given to mikmik user one_love_420 for bringing this to the HTC EVO 4G LTE's latest OTA.
Remember
This is for the HTC EVO 4G LTE running OTA 3.15, Android 4.1.1, Sense 4+ and nothing else. We are assuming you are starting with a stock android.policy.jar.
ADVANCED POWER MENU
The Mod
Long-press the Power button and be met with an advanced menu. Including, 4-in-1 Reboot Menu, sound profiles, airplane mode.
Decompile
You gotta figure this one out! Learn how to use apktool, baksmali or VTS. It is HIGHLY recommended that if you are decompiling with apktool or baksmali to add "-b" modifier. If using VTS, uncheck the smali debug code. This will make your smali code MUCH smaller - less system space = MORE RAM.
What Needs to Be Added
This mod requires two smali files that do not exist in the stock android.policy.jar you will find them attached at the bottom of this post.
GlobalActions$5$1.smali
GlobalActions$5$2.smali
They go in \com\android\internal\policy\impl\
What needs to Be Changed [The long part]
Using Notepad++ or a similar text editor (ie not Notepad) navigate to \com\android\internal\policy\impl\GlobalActions.smali
SEARCH FOR:
Code:
.method private changeAirplaneModeSystemSetting(Z)V
AFTER THIS METHOD ENDS, ADD THE FOLLOWING METHODS IN GREEN
Code:
.end method
[COLOR="SeaGreen"].method private createDialog()Lcom/htc/widget/HtcAlertDialog;
.locals 24
move-object/from16 v0, p0
iget-boolean v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mHasVibrator:Z
if-nez v3, :cond_14c
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$SilentModeToggleAction;
move-object/from16 v0, p0
invoke-direct {v3, v0}, Lcom/android/internal/policy/impl/GlobalActions$SilentModeToggleAction;-><init>(Lcom/android/internal/policy/impl/GlobalActions;)V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mSilentModeAction:Lcom/android/internal/policy/impl/GlobalActions$Action;
:goto_11
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$1;
const v5, 0x402002a
const v6, 0x402002a
const v7, 0x104013e
const v8, 0x104013f
const v9, 0x1040140
const/4 v10, 0x0
move-object/from16 v4, p0
invoke-direct/range {v3 .. v10}, Lcom/android/internal/policy/impl/GlobalActions$1;-><init>(Lcom/android/internal/policy/impl/GlobalActions;IIIIIZ)V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-direct/range {p0 .. p0}, Lcom/android/internal/policy/impl/GlobalActions;->onAirplaneModeChanged()V
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$2;
const v5, 0x402003f
const v6, 0x402003f
const v7, 0x4070029
const v8, 0x4070028
const v9, 0x4070027
const/4 v10, 0x1
move-object/from16 v4, p0
invoke-direct/range {v3 .. v10}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;IIIIIZ)V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mVibrationModeToggle:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$3;
const v5, 0x402003d
const v6, 0x402003d
const v7, 0x407002a
const v8, 0x407002c
const v9, 0x407002b
const/4 v10, 0x1
move-object/from16 v4, p0
invoke-direct/range {v3 .. v10}, Lcom/android/internal/policy/impl/GlobalActions$3;-><init>(Lcom/android/internal/policy/impl/GlobalActions;IIIIIZ)V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mMobileNetworkModeToggle:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
new-instance v3, Ljava/util/ArrayList;
invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
invoke-direct/range {p0 .. p0}, Lcom/android/internal/policy/impl/GlobalActions;->isSense2Mode()Z
move-result v3
if-eqz v3, :cond_163
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
const-string v4, "powerOptions_power_off_status"
const-string v5, "string"
const-string v6, "com.htc.framework"
invoke-virtual {v3, v4, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v17
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
const-string v4, "powerOptions_restart"
const-string v5, "string"
const-string v6, "com.htc.framework"
invoke-virtual {v3, v4, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v20
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
const-string v4, "powerOptions_restart_status"
const-string v5, "string"
const-string v6, "com.htc.framework"
invoke-virtual {v3, v4, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v19
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v4, Lcom/android/internal/policy/impl/GlobalActions$4;
const v5, 0x402003e
const v6, 0x104013a
move-object/from16 v0, p0
move/from16 v1, v17
invoke-direct {v4, v0, v5, v6, v1}, Lcom/android/internal/policy/impl/GlobalActions$4;-><init>(Lcom/android/internal/policy/impl/GlobalActions;III)V
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v4, Lcom/android/internal/policy/impl/GlobalActions$5;
const v5, 0x4020044
move-object/from16 v0, p0
move/from16 v1, v20
move/from16 v2, v19
invoke-direct {v4, v0, v5, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$5;-><init>(Lcom/android/internal/policy/impl/GlobalActions;III)V
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
:goto_e0
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v3
invoke-virtual {v3}, Landroid/content/pm/PackageManager;->getUsers()Ljava/util/List;
move-result-object v23
invoke-interface/range {v23 .. v23}, Ljava/util/List;->size()I
move-result v3
const/4 v4, 0x1
if-le v3, v4, :cond_1fd
:try_start_f3
invoke-static {}, Landroid/app/ActivityManagerNative;->getDefault()Landroid/app/IActivityManager;
move-result-object v3
invoke-interface {v3}, Landroid/app/IActivityManager;->getCurrentUser()Landroid/content/pm/UserInfo;
:try_end_fa
.catch Landroid/os/RemoteException; {:try_start_f3 .. :try_end_fa} :catch_1dd
move-result-object v12
:goto_fb
invoke-interface/range {v23 .. v23}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v14
:goto_ff
invoke-interface {v14}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_1fd
invoke-interface {v14}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v22
check-cast v22, Landroid/content/pm/UserInfo;
if-nez v12, :cond_1e5
move-object/from16 v0, v22
iget v3, v0, Landroid/content/pm/UserInfo;->id:I
if-nez v3, :cond_1e1
const/16 v16, 0x1
:goto_115
new-instance v21, Lcom/android/internal/policy/impl/GlobalActions$8;
const v4, 0x108031d
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
move-object/from16 v0, v22
iget-object v3, v0, Landroid/content/pm/UserInfo;->name:Ljava/lang/String;
if-eqz v3, :cond_1f5
move-object/from16 v0, v22
iget-object v3, v0, Landroid/content/pm/UserInfo;->name:Ljava/lang/String;
:goto_129
invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
if-eqz v16, :cond_1f9
const-string v3, " \u2714"
:goto_131
invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
move-object/from16 v0, v21
move-object/from16 v1, p0
move-object/from16 v2, v22
invoke-direct {v0, v1, v4, v3, v2}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;ILjava/lang/CharSequence;Landroid/content/pm/UserInfo;)V
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, v21
invoke-virtual {v3, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_ff
:cond_14c
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$SilentModeTriStateAction;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAudioManager:Landroid/media/AudioManager;
move-object/from16 v0, p0
iget-object v6, v0, Lcom/android/internal/policy/impl/GlobalActions;->mHandler:Landroid/os/Handler;
invoke-direct {v3, v4, v5, v6}, Lcom/android/internal/policy/impl/GlobalActions$SilentModeTriStateAction;-><init>(Landroid/content/Context;Landroid/media/AudioManager;Landroid/os/Handler;)V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mSilentModeAction:Lcom/android/internal/policy/impl/GlobalActions$Action;
goto/16 :goto_11
:cond_163
sget-short v3, Lcom/htc/htcjavaflag/HtcBuildFlag;->Htc_DEVICE_flag:S
const/16 v4, 0x9
if-ne v3, v4, :cond_1a6
sget-short v3, Lcom/htc/htcjavaflag/HtcBuildFlag;->Htc_PROJECT_flag:S
const/16 v4, 0xd1
if-ne v3, v4, :cond_1a6
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v4, Lcom/android/internal/policy/impl/GlobalActions$6;
const v5, 0x402003d
const v6, 0x104013a
move-object/from16 v0, p0
invoke-direct {v4, v0, v5, v6}, Lcom/android/internal/policy/impl/GlobalActions$6;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/internal/policy/impl/GlobalActions;->mSilentModeAction:Lcom/android/internal/policy/impl/GlobalActions$Action;
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/internal/policy/impl/GlobalActions;->mVibrationModeToggle:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/internal/policy/impl/GlobalActions;->mMobileNetworkModeToggle:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto/16 :goto_e0
:cond_1a6
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v4, Lcom/android/internal/policy/impl/GlobalActions$7;
const v5, 0x402003d
const v6, 0x104013a
move-object/from16 v0, p0
invoke-direct {v4, v0, v5, v6}, Lcom/android/internal/policy/impl/GlobalActions$7;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/internal/policy/impl/GlobalActions;->mSilentModeAction:Lcom/android/internal/policy/impl/GlobalActions$Action;
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/internal/policy/impl/GlobalActions;->mVibrationModeToggle:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto/16 :goto_e0
:catch_1dd
move-exception v18
const/4 v12, 0x0
goto/16 :goto_fb
:cond_1e1
const/16 v16, 0x0
goto/16 :goto_115
:cond_1e5
iget v3, v12, Landroid/content/pm/UserInfo;->id:I
move-object/from16 v0, v22
iget v4, v0, Landroid/content/pm/UserInfo;->id:I
if-ne v3, v4, :cond_1f1
const/16 v16, 0x1
goto/16 :goto_115
:cond_1f1
const/16 v16, 0x0
goto/16 :goto_115
:cond_1f5
const-string v3, "Primary"
goto/16 :goto_129
:cond_1f9
const-string v3, ""
goto/16 :goto_131
:cond_1fd
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$MyAdapter;
const/4 v4, 0x0
move-object/from16 v0, p0
invoke-direct {v3, v0, v4}, Lcom/android/internal/policy/impl/GlobalActions$MyAdapter;-><init>(Lcom/android/internal/policy/impl/GlobalActions;Lcom/android/internal/policy/impl/GlobalActions$1;)V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAdapter:Lcom/android/internal/policy/impl/GlobalActions$MyAdapter;
new-instance v11, Lcom/htc/widget/HtcAlertDialog$Builder;
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-direct {v11, v3}, Lcom/htc/widget/HtcAlertDialog$Builder;-><init>(Landroid/content/Context;)V
invoke-direct/range {p0 .. p0}, Lcom/android/internal/policy/impl/GlobalActions;->isSense2Mode()Z
move-result v3
if-eqz v3, :cond_278
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
const-string v4, "global_actions"
const-string v5, "string"
const-string v6, "android"
invoke-virtual {v3, v4, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v15
:goto_22a
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAdapter:Lcom/android/internal/policy/impl/GlobalActions$MyAdapter;
move-object/from16 v0, p0
invoke-virtual {v11, v3, v0}, Lcom/htc/widget/HtcAlertDialog$Builder;->setAdapter(Landroid/widget/ListAdapter;Landroid/content/DialogInterface$OnClickListener;)Lcom/htc/widget/HtcAlertDialog$Builder;
move-result-object v3
const/4 v4, 0x1
invoke-virtual {v3, v4}, Lcom/htc/widget/HtcAlertDialog$Builder;->setInverseBackgroundForced(Z)Lcom/htc/widget/HtcAlertDialog$Builder;
move-result-object v3
invoke-virtual {v3, v15}, Lcom/htc/widget/HtcAlertDialog$Builder;->setTitle(I)Lcom/htc/widget/HtcAlertDialog$Builder;
invoke-virtual {v11}, Lcom/htc/widget/HtcAlertDialog$Builder;->create()Lcom/htc/widget/HtcAlertDialog;
move-result-object v13
invoke-virtual {v13}, Lcom/htc/widget/HtcAlertDialog;->getListView()Landroid/widget/ListView;
move-result-object v3
const/4 v4, 0x1
invoke-virtual {v3, v4}, Landroid/widget/ListView;->setItemsCanFocus(Z)V
invoke-virtual {v13}, Lcom/htc/widget/HtcAlertDialog;->getListView()Landroid/widget/ListView;
move-result-object v3
const/4 v4, 0x1
invoke-virtual {v3, v4}, Landroid/widget/ListView;->setLongClickable(Z)V
invoke-virtual {v13}, Lcom/htc/widget/HtcAlertDialog;->getListView()Landroid/widget/ListView;
move-result-object v3
new-instance v4, Lcom/android/internal/policy/impl/GlobalActions$9;
move-object/from16 v0, p0
invoke-direct {v4, v0}, Lcom/android/internal/policy/impl/GlobalActions$9;-><init>(Lcom/android/internal/policy/impl/GlobalActions;)V
invoke-virtual {v3, v4}, Landroid/widget/ListView;->setOnItemLongClickListener(Landroid/widget/AdapterView$OnItemLongClickListener;)V
invoke-virtual {v13}, Lcom/htc/widget/HtcAlertDialog;->getWindow()Landroid/view/Window;
move-result-object v3
const/16 v4, 0x7d8
invoke-virtual {v3, v4}, Landroid/view/Window;->setType(I)V
move-object/from16 v0, p0
invoke-virtual {v13, v0}, Lcom/htc/widget/HtcAlertDialog;->setOnDismissListener(Landroid/content/DialogInterface$OnDismissListener;)V
invoke-direct/range {p0 .. p0}, Lcom/android/internal/policy/impl/GlobalActions;->isSense2Mode()Z
move-result v3
if-eqz v3, :cond_277
move-object/from16 v0, p0
invoke-virtual {v13, v0}, Lcom/htc/widget/HtcAlertDialog;->setOnKeyListener(Landroid/content/DialogInterface$OnKeyListener;)V
:cond_277
return-object v13
:cond_278
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
const-string v4, "global_actions"
const-string v5, "string"
const-string v6, "android"
invoke-virtual {v3, v4, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v15
goto :goto_22a
.end method[/COLOR]
.method private getWindowManager()Landroid/view/IWindowManager;
Navigate to \com\android\internal\policy\impl\GlobalActions$5.smali
SEARCH FOR:
Code:
.method public onPress()V
AFTER REPLACE THE REST OF THE FILE WITH
Code:
.locals 6
const/4 v5, 0x4
new-instance v1, Lcom/htc/widget/HtcAlertDialog$Builder;
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions$5;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
#getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v2}, Lcom/android/internal/policy/impl/GlobalActions;->access$200(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v2
invoke-direct {v1, v2}, Lcom/htc/widget/HtcAlertDialog$Builder;-><init>(Landroid/content/Context;)V
const v2, 0x1080027
invoke-virtual {v1, v2}, Lcom/htc/widget/HtcAlertDialog$Builder;->setIcon(I)Lcom/htc/widget/HtcAlertDialog$Builder;
move-result-object v1
const v2, 0x20400cd
invoke-virtual {v1, v2}, Lcom/htc/widget/HtcAlertDialog$Builder;->setTitle(I)Lcom/htc/widget/HtcAlertDialog$Builder;
move-result-object v1
sget-object v2, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
const/4 v3, 0x0
new-instance v4, Lcom/android/internal/policy/impl/GlobalActions$5$2;
invoke-direct {v4, p0}, Lcom/android/internal/policy/impl/GlobalActions$5$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions$5;)V
invoke-virtual {v1, v2, v3, v4}, Lcom/htc/widget/HtcAlertDialog$Builder;->setSingleChoiceItems([Ljava/lang/CharSequence;ILandroid/content/DialogInterface$OnClickListener;)Lcom/htc/widget/HtcAlertDialog$Builder;
move-result-object v1
const v2, 0x2040151
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$5$1;
invoke-direct {v3, p0}, Lcom/android/internal/policy/impl/GlobalActions$5$1;-><init>(Lcom/android/internal/policy/impl/GlobalActions$5;)V
invoke-virtual {v1, v2, v3}, Lcom/htc/widget/HtcAlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Lcom/htc/widget/HtcAlertDialog$Builder;
move-result-object v1
const/high16 v2, 0x104
const/4 v3, 0x0
invoke-virtual {v1, v2, v3}, Lcom/htc/widget/HtcAlertDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Lcom/htc/widget/HtcAlertDialog$Builder;
move-result-object v1
invoke-virtual {v1}, Lcom/htc/widget/HtcAlertDialog$Builder;->create()Lcom/htc/widget/HtcAlertDialog;
move-result-object v0
invoke-virtual {v0}, Lcom/htc/widget/HtcAlertDialog;->getWindow()Landroid/view/Window;
move-result-object v1
const/16 v2, 0x7d8
invoke-virtual {v1, v2}, Landroid/view/Window;->setType(I)V
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions$5;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
#getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v1}, Lcom/android/internal/policy/impl/GlobalActions;->access$200(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v1
invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v2, 0x1110009
invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getBoolean(I)Z
move-result v1
if-nez v1, :cond_60
invoke-virtual {v0}, Lcom/htc/widget/HtcAlertDialog;->getWindow()Landroid/view/Window;
move-result-object v1
invoke-virtual {v1, v5, v5}, Landroid/view/Window;->setFlags(II)V
:cond_60
invoke-virtual {v0}, Lcom/htc/widget/HtcAlertDialog;->show()V
return-void
.end method
.method public showBeforeProvisioning()Z
.locals 1
const/4 v0, 0x1
return v0
.end method
.method public showDuringKeyguard()Z
.locals 1
const/4 v0, 0x1
return v0
.end method
Navigate to \com\android\internal\policy\impl\GlobalActions$6.smali
REPLACE
Code:
.method constructor <init>(Lcom/android/internal/policy/impl/GlobalActions;[COLOR="Red"]II[/COLOR])V
WITH
Code:
.method constructor <init>(Lcom/android/internal/policy/impl/GlobalActions;[COLOR="red"]III[/COLOR])V
REPLACE
Code:
invoke-direct {[COLOR="red"]p0, p2, p3[/COLOR]}, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;-><init>([COLOR="red"]II[/COLOR])V
WITH
Code:
invoke-direct {[COLOR="red"]p0, p2, p3, p4[/COLOR]}, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;-><init>([COLOR="red"]III[/COLOR])V
REPLACE
Code:
const/4 v1, 0x[COLOR="red"]1[/COLOR]
invoke-static {v0, v1}, Lcom/htc/app/HtcShutdownThread;->[COLOR="red"]shutdown[/COLOR](Landroid/content/Context;Z)V
WITH
Code:
const/4 v1, 0x[COLOR="red"]0[/COLOR]
invoke-static {v0, v1}, Lcom/htc/app/HtcShutdownThread;->[COLOR="red"]hibernate[/COLOR](Landroid/content/Context;Z)V
Navigate to \com\android\internal\policy\impl\GlobalActions$SinglePressAction.smali
ADD GREEN TEXT
Code:
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/internal/policy/impl/GlobalActions;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x40a
name = "SinglePressAction"
.end annotation
[COLOR="SeaGreen"]# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;[/COLOR]
# instance fields
.field private final mIconResId:I
.field private final mMessage:Ljava/lang/CharSequence;
.field private final mMessageResId:I
.field private final mStatusResId:I
SEARCH FOR
Code:
# direct methods
ADD AFTER
Code:
.method static constructor <clinit>()V
.locals 3
const/4 v0, 0x4
new-array v0, v0, [Ljava/lang/String;
const/4 v1, 0x0
const-string v2, "Normal"
aput-object v2, v0, v1
const/4 v1, 0x1
const-string v2, "Hot restart"
aput-object v2, v0, v1
const/4 v1, 0x2
const-string v2, "Bootloader"
aput-object v2, v0, v1
const/4 v1, 0x3
const-string v2, "Recovery"
aput-object v2, v0, v1
sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
return-void
.end method
The Final Step
Now that all the smali files have been edited, recompile your .jar, rename your file to android.policy.jar and push to /system/framework/android.policy.jar. Smali files are stored in classes.dex inside of .apks and .jars, I have uploaded some classes.dexs that include the other mods listed here as well as modified/unmodified smalis. Enjoy!
EXTRA FILES
GlobalActions$5$1.smali
GlobalActions$5$2.smali
STOCK FILES
GlobalActions.smali
GlobalActions$5.smali
GlobalActions$6.smali
GlobalActions$SinglePressAction.smali
classes.dex
android.policy.jar
APM FILES
GlobalActions.smali
GlobalActions$5.smali
GlobalActions$6.smali
GlobalActions$SinglePressAction.smali
classes.dex
android.policy.jar
APM + VOL-TRACK + BACK-KILL FILES
classes.dex
android.policy.jar
#ASOP
VOLUME ROCKER MOD
The Mod
When listening to music, with the screen off, long-press the VOL+ key to change tracks forward and long-press the VOL- key to change tracks backwards.
Decompile
You gotta figure this one out! Learn how to use apktool, baksmali or VTS. It is HIGHLY recommended that if you are decompiling with apktool or baksmali to add "-b" modifier. If using VTS, uncheck the smali debug code. This will make your smali code MUCH smaller - less system space = MORE RAM.
What Needs to Be Added
This mod requires two smali files that do not exist in the stock android.policy.jar you will find them attached at the bottom of this post.
PhoneWindowManager$VolumeLongPressF.smali
PhoneWindowManager$VolumeLongPressR.smali
They go in \com\android\internal\policy\impl\
What needs to Be Changed [The long part]
Using Notepad++ or a similar text editor (ie not Notepad) navigate to \com\android\internal\policy\impl\PhoneWindowManager.smali
SEARCH FOR
Code:
.field mIsGuestMode:Z
ADD TEXT IN GREEN
Code:
.field mIsGuestMode:Z
.field mIsHtcDockScreenAsHome:Z
[COLOR="SeaGreen"].field mIsLongPress:Z[/COLOR]
.field mKeyEventsBlocked:Z
.field mKeyboardTapVibePattern:[J
SEARCH FOR
Code:
.field private mVolumeDownKeyTime:J
ADD TEXT IN GREEN
Code:
.field private mVolumeDownKeyTime:J
.field private mVolumeDownKeyTriggered:Z
[COLOR="SeaGreen"].field mVolumeDownLongPress:Ljava/lang/Runnable;[/COLOR]
.field private mVolumeUpKeyTriggered:Z
[COLOR="SeaGreen"].field mVolumeUpLongPress:Ljava/lang/Runnable;
.field mWakeAcquired:Z[/COLOR]
.field mWindowManager:Landroid/view/IWindowManager;
.field mWindowManagerFuncs:Landroid/view/WindowManagerPolicy$WindowManagerFuncs;
SEARCH FOR:
.method public constructor <init>()V
NOW SCROLL UNTIL YOU FIND THIS TEXT, ADD TEXT IN GREEN
Code:
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$27;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$27;-><init> Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSetLastUserActivity:Ljava/lang/Runnable;
[COLOR="SeaGreen"]new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$VolumeLongPressF;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$VolumeLongPressF;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$VolumeLongPressR;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$VolumeLongPressR;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;[/COLOR]
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$28;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$28;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mPowerLongPress_Toast:Ljava/lang/Runnable;
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$29;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$29;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mEndCallLongPress:Ljava/lang/Runnable;
return-void
.end method
SEARCH FOR
Code:
.method handleVolumeKey(II)V
SCROLL TO THE END OF THIS METHOD AND ADD NEW METHODS IN GREEN
Code:
.end method
[COLOR="SeaGreen"].method handleVolumeLongPress(I)V
.locals 4
const/16 v1, 0x18
if-ne p1, v1, :cond_11
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
:goto_6
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
invoke-static {}, Landroid/view/ViewConfiguration;->getLongPressTimeout()I
move-result v2
int-to-long v2, v2
invoke-virtual {v1, v0, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
return-void
:cond_11
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
goto :goto_6
.end method
.method handleVolumeLongPressAbort()V
.locals 2
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
return-void
.end method[/COLOR]
.method public hasNavigationBar()Z
SEARCH FOR
Code:
sparse-switch v13, :sswitch_data_6[COLOR="red"]82[/COLOR]
CHANGE TO
Code:
sparse-switch v13, :sswitch_data_6[COLOR="Red"]c4[/COLOR]
SEARCH FOR
Code:
:sswitch_274
BELOW THIS, YOU WILL NEED TO REPLACE EVERYTHING UNTIL AND INCLUDING
Code:
:sswitch_data_6c4
.sparse-switch
0x5 -> :sswitch_699
0x6 -> :sswitch_38a
0x18 -> :sswitch_274
0x19 -> :sswitch_274
0x1a -> :sswitch_49b
0x4f -> :sswitch_65c
0x55 -> :sswitch_64e
0x56 -> :sswitch_65c
0x57 -> :sswitch_65c
0x58 -> :sswitch_65c
0x59 -> :sswitch_65c
0x5a -> :sswitch_65c
0x5b -> :sswitch_65c
0x7e -> :sswitch_64e
0x7f -> :sswitch_64e
0x82 -> :sswitch_65c
0xa4 -> :sswitch_274
.end sparse-switch
.end method
THE CODE TO ADD CAN BE FOUND HERE:
http://goo.gl/1SfRm
IT'S TOO BIG FOR XDA
SEARCH FOR
Code:
.method sendEvent(IIIJ)V
SCROLL TO THE END OF THIS METHOD AND ADD NEW METHOD IN GREEN
Code:
.end method
[COLOR="SeaGreen"].method protected sendMediaButtonEvent(I)V
.locals 13
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v1
new-instance v11, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v11, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
new-instance v0, Landroid/view/KeyEvent;
const/4 v5, 0x0
const/4 v7, 0x0
move-wide v3, v1
move v6, p1
invoke-direct/range {v0 .. v7}, Landroid/view/KeyEvent;-><init>(JJIII)V
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v11, v4, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v11, v5}, Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;)V
new-instance v12, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v12, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
new-instance v3, Landroid/view/KeyEvent;
const/4 v8, 0x1
const/4 v10, 0x0
move-wide v4, v1
move-wide v6, v1
move v9, p1
invoke-direct/range {v3 .. v10}, Landroid/view/KeyEvent;-><init>(JJIII)V
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v12, v4, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v12, v5}, Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;)V
return-void
.end method[/COLOR]
.method setAttachedWindowFrames(Landroid/view/WindowManagerPolicy$WindowState;IILandroid/view/WindowManagerPolicy$WindowState;ZLandroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;)V
The Final Step
Now that all the smali files have been edited, recompile your .jar, rename your file to android.policy.jar and push to /system/framework/android.policy.jar. Smali files are stored in classes.dex inside of .apks and .jars, I have uploaded some classes.dexs that include the other mods listed here as well as modified/unmodified smalis. Enjoy!
EXTRA FILES
PhoneWindowManager$VolumeLongPressF.smali
PhoneWindowManager$VolumeLongPressR.smali
STOCK FILES
PhoneWindowManager.smali
classes.dex
android.policy.jar
VOL-TRACK FILES
PhoneWindowManager.smali
classes.dex
android.policy.jar
APM + VOL-TRACK FILES
classes.dex
android.policy.jar
APM + VOL-TRACK + BACK-KILL FILES
classes.dex
android.policy.jar
#ASOP
LONG-PRESS BACK TO KILL THIRD-PARTY APPS
The Mod
By long-pressing the Back capacitive button, any third-party app will be killed. This is very handy for when apps become unresponsive.
Decompile
You gotta figure this one out! Learn how to use apktool, baksmali or VTS. It is HIGHLY recommended that if you are decompiling with apktool or baksmali to add "-b" modifier. If using VTS, uncheck the smali debug code. This will make your smali code MUCH smaller - less system space = MORE RAM.
What needs to Be Changed [The long part]
Using Notepad++ or a similar text editor (ie not Notepad) navigate to \com\android\internal\policy\impl\PhoneWindowManager.smali
SEARCH FOR
Code:
.field mAutoMotiveReceiver:Landroid/content/BroadcastReceiver;
ADD TEXT IN GREEN
Code:
.field mAutoMotiveReceiver:Landroid/content/BroadcastReceiver;
[COLOR="SeaGreen"].field mBackKeyLongPressed:Z[/COLOR]
.field mBootCompleted:Z
SEARCH FOR
Code:
.method private launchAssistLongPressAction()V
SCROLL TO THE END OF THIS METHOD AND ADD NEW METHOD IN GREEN
Code:
.end method
[COLOR="SeaGreen"].method private launchBackLongPressAction()V
.locals 18
:try_start_0
invoke-static {}, Landroid/app/ActivityManagerNative;->getDefault()Landroid/app/IActivityManager;
move-result-object v9
invoke-interface {v9}, Landroid/app/IActivityManager;->getRunningAppProcesses()Ljava/util/List;
move-result-object v5
move-object/from16 v0, p0
iget-object v14, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const-string v15, "activity"
invoke-virtual {v14, v15}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v2
check-cast v2, Landroid/app/ActivityManager;
const/4 v14, 0x1
invoke-virtual {v2, v14}, Landroid/app/ActivityManager;->getRunningTasks(I)Ljava/util/List;
move-result-object v12
const/4 v14, 0x0
invoke-interface {v12, v14}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v14
check-cast v14, Landroid/app/ActivityManager$RunningTaskInfo;
iget-object v6, v14, Landroid/app/ActivityManager$RunningTaskInfo;->topActivity:Landroid/content/ComponentName;
invoke-interface {v5}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v14
:cond_26
:goto_26
invoke-interface {v14}, Ljava/util/Iterator;->hasNext()Z
move-result v15
if-nez v15, :cond_2d
:cond_2c
:goto_2c
return-void
:cond_2d
invoke-interface {v14}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v3
check-cast v3, Landroid/app/ActivityManager$RunningAppProcessInfo;
iget v13, v3, Landroid/app/ActivityManager$RunningAppProcessInfo;->uid:I
const/16 v15, 0x2710
if-lt v13, v15, :cond_26
const v15, 0x1869f
if-gt v13, v15, :cond_26
iget v15, v3, Landroid/app/ActivityManager$RunningAppProcessInfo;->importance:I
const/16 v16, 0x64
move/from16 v0, v16
if-ne v15, v0, :cond_26
iget-object v15, v3, Landroid/app/ActivityManager$RunningAppProcessInfo;->pkgList:[Ljava/lang/String;
if-eqz v15, :cond_26
invoke-interface {v5}, Ljava/util/List;->size()I
move-result v15
if-lez v15, :cond_26
iget-object v15, v3, Landroid/app/ActivityManager$RunningAppProcessInfo;->processName:Ljava/lang/String;
invoke-virtual {v6}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;
move-result-object v16
invoke-virtual/range {v15 .. v16}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v15
if-eqz v15, :cond_26
new-instance v8, Landroid/content/Intent;
const-string v15, "android.intent.action.MAIN"
invoke-direct {v8, v15}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
const-string v15, "android.intent.category.HOME"
invoke-virtual {v8, v15}, Landroid/content/Intent;->addCategory(Ljava/lang/String;)Landroid/content/Intent;
move-object/from16 v0, p0
iget-object v15, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v15}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v15
const/16 v16, 0x0
move/from16 v0, v16
invoke-virtual {v15, v8, v0}, Landroid/content/pm/PackageManager;->resolveActivity(Landroid/content/Intent;I)Landroid/content/pm/ResolveInfo;
move-result-object v11
iget-object v15, v11, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;
iget-object v15, v15, Landroid/content/pm/ActivityInfo;->processName:Ljava/lang/String;
iget-object v0, v3, Landroid/app/ActivityManager$RunningAppProcessInfo;->processName:Ljava/lang/String;
move-object/from16 v16, v0
invoke-virtual/range {v15 .. v16}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v15
if-nez v15, :cond_2c
move-object/from16 v0, p0
iget-object v15, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v15}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
:try_end_8d
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_8d} :catch_d8
move-result-object v10
:try_start_8e
invoke-virtual {v6}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;
move-result-object v15
const/16 v16, 0x0
move/from16 v0, v16
invoke-virtual {v10, v15, v0}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;
:try_end_99
.catch Ljava/lang/Exception; {:try_start_8e .. :try_end_99} :catch_db
move-result-object v1
:goto_9a
if-eqz v1, :cond_de
:try_start_9c
invoke-virtual {v10, v1}, Landroid/content/pm/PackageManager;->getApplicationLabel(Landroid/content/pm/ApplicationInfo;)Ljava/lang/CharSequence;
move-result-object v4
:goto_a0
check-cast v4, Ljava/lang/String;
invoke-virtual {v6}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;
move-result-object v15
invoke-interface {v9, v15}, Landroid/app/IActivityManager;->forceStopPackage(Ljava/lang/String;)V
iget v15, v3, Landroid/app/ActivityManager$RunningAppProcessInfo;->pid:I
invoke-static {v15}, Landroid/os/Process;->killProcess(I)V
move-object/from16 v0, p0
iget-object v15, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
new-instance v16, Ljava/lang/StringBuilder;
invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v17
invoke-direct/range {v16 .. v17}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
const-string v17, " killed."
invoke-virtual/range {v16 .. v17}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v16
invoke-virtual/range {v16 .. v16}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v16
const-string v0, "lyapota"
move-object/from16 v2, v15
move-object/from16 v3, v16
invoke-static {v0, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
const/4 v4, 0x0
invoke-static {v2, v3, v4}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v15
invoke-virtual {v15}, Landroid/widget/Toast;->show()V
goto/16 :goto_26
:catch_d8
move-exception v14
goto/16 :goto_2c
:catch_db
move-exception v7
const/4 v1, 0x0
goto :goto_9a
:cond_de
const-string v4, "(unknown)"
:try_end_e0
.catch Ljava/lang/Exception; {:try_start_9c .. :try_end_e0} :catch_d8
goto :goto_a0
.end method[/COLOR]
.method static makeFnState(IIZIZ)V
(To make life easy) SEARCH FOR
Code:
const-string v40, "ignore handleLongPressOnHome when hasRingingCall or it\'s in GuestMode"
BELOW THIS, YOU WILL NEED TO REPLACE EVERYTHING UNTIL AND INCLUDING
Code:
:pswitch_data_8a4
.packed-switch 0x0
:pswitch_4bd
:pswitch_4c1
:pswitch_4bd
.end packed-switch
:pswitch_data_8ae
.packed-switch 0x1
:pswitch_527
:pswitch_545
.end packed-switch
.end method
NOTE: This last section WILL change with the new data.
THE CODE TO ADD CAN BE FOUND HERE:
http://goo.gl/NA8KI
IT'S TOO BIG FOR XDA
The Final Step
Now that all the smali files have been edited, recompile your .jar, rename your file to android.policy.jar and push to /system/framework/android.policy.jar. Smali files are stored in classes.dex inside of .apks and .jars, I have uploaded some classes.dexs that include the other mods listed here as well as modified/unmodified smalis. Enjoy!
STOCK FILES
PhoneWindowManager.smali
classes.dex
android.policy.jar
BACK-KILL FILES
PhoneWindowManager.smali
classes.dex
android.policy.jar
APM + BACK-KILL FILES
classes.dex
android.policy.jar
APM + VOL-TRACK + BACK-KILL FILES
classes.dex
android.policy.jar
#ASOP
Just in case there are more...
Awesome. /reserved
Sent from my EVO using Tapatalk 2
Reserved
Sent from my EVO using Xparent Red Tapatalk 2
can anyone see if this is updated? i cant seem to download the extra files.
Sup joe. It's not updated lol
Sent from my EVO using Tapatalk
Trying to dig around for those files
Sent from my EVO using Tapatalk now Free
ssojyeti2 said:
Sup joe. It's not updated lol
Sent from my EVO using Tapatalk
Click to expand...
Click to collapse
Sup bro! You been hiding around here?
Sent from my EVO using xda premium

[MOD][HowTo] Samsung KeyBoard Swipe Color Change Found! Added Text Editor Changes

Okay, alot of dev's/themers been looking for this one...
If you use, please give credit, I spent many hours finding this Mod... Don't take credit for someone else's work...
This Mod will allow you to change the Samsung KeyBoard Swipe Color..(SamsungIME.apk)
Look for:
smali\com\diotek\ime\framework\view\AbstractKeyBoardView.smali
Search for -> .method private setTracePaintOptionsWithSettings()V
Click to see Org Code
Code:
.method private setTracePaintOptionsWithSettings()V
.locals 5
.prologue
const/16 v4, 0xff
const/4 v1, 0x1
const/4 v3, 0x0
.line 9829
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
if-nez v0, :cond_0
.line 9830
new-instance v0, Landroid/graphics/Paint;
invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V
iput-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
.line 9832
:cond_0
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePoint:Ljava/util/ArrayList;
if-eqz v0, :cond_1
.line 9833
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePoint:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
.line 9835
:cond_1
iput-short v3, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePointCount:S
.line 9836
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setAntiAlias(Z)V
.line 9837
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setDither(Z)V
.line 9838
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
const/16 v1, 0xa5
const/16 v2, 0xf3
invoke-static {v4, v3, v1, v2}, Landroid/graphics/Color;->argb(IIII)I
Click to see what to change:
Code:
.method private setTracePaintOptionsWithSettings()V
.locals 5
.prologue
const/16 v4, [B][U][COLOR="Blue"]0xff[/COLOR][/U][/B] [B][COLOR="seagreen"]Change for Alpha Value - "0xff" [/COLOR][/B]
const/4 v1, 0x1
const/4 v3, [B][U][COLOR="Blue"]0x0[/COLOR][/U][/B] [B][COLOR="seaGreen"] - Change for Red Value - "0x0"[/COLOR][/B]
.line 9829
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
if-nez v0, :cond_0
.line 9830
new-instance v0, Landroid/graphics/Paint;
invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V
iput-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
.line 9832
:cond_0
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePoint:Ljava/util/ArrayList;
if-eqz v0, :cond_1
.line 9833
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePoint:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
.line 9835
:cond_1
iput-short v3, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePointCount:S
.line 9836
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setAntiAlias(Z)V
.line 9837
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setDither(Z)V
.line 9838
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
const/16 v1, [B][U][COLOR="Blue"]0xa5[/COLOR][/U][/B] [COLOR="seagreen"]- Change for Green Value - "0xa5"[/COLOR]
const/16 v2, [B][U][COLOR="Blue"]0xf3[/COLOR][/U][/B] [COLOR="seagreen"] - Change for Blue Value - "0xf3"[/COLOR]
invoke-static {v4, v3, v1, v2}, Landroid/graphics/Color;->argb(IIII)I
So what it boils down to is that the Swipe Color is what we call RGB color coding. I suggest a site like this to see values you can use:
Hex to RGB Color converter
Thats it folks.. swipe color squashed!!!!
A Little clarification on Instructions.
I was swamped with questions on how to edit and such.. So with @strongsteve help we dug more and here is an easier way to get your colors instead of trying to use RGB values..
Note III - Edits
change code:
Code:
const/16 v1, 0xa5
const/16 v2, 0xf3
to
Code:
const v3, 0x33
const v1, 0x66
const v2, 0xcc
Note II - Edits
change code:
Code:
const/16 v1, 0xff
const/16 v2, 0xa5
const/16 v3, 0xf3
change to:
Code:
const/16 v1, 0xff
const v2, 0x66
const v3, 0xcc
const v4, 0x33
Then just use any normal Hex Color code you would normally use!!!
In the above example I used 3366cc which is DarkHorse Blue..
I hope that helps
Text Color in Text Editor(Second Screen Shot)
Note III
Search for
Code:
constructor <init>(Lcom/visionobjects/textwidget/e/a;Landroid/util/DisplayMetrics;)V
and then look for:
Code:
const/high16 v1, -0x100 <--- Black Text Color Previous Typed Word
const v2, -0xcc4a1b <--- Last Typed Word
Change Black Text to a Smali Color Code
Change Last Typed Word to Smali Color code (-0xcc4a1b)
For example:
3366cc converts to -0xCC9934 for smali color codes
Thx to @EMSpilot for pointing out the Black Text Line... Thank you!!!
Nice work my friend, :highfive:
Please and to all users, lets make sure credit and permission are handled when using these awesome mods! :victory:
You are a master of theming sir. Nice job as always...
[email protected]'$ [email protected]@XY- Team Average Joe's Official beta tester
Great find and Thank you for sharing, I know many people were searching for this little bugger.:good:
Nice Work!
Great Work Buddy...
I can confirm this also works on Note 2 keyboards as well...
thread here.
Full credit given, in addition, I made you a contributor., so if you need to change anything, feel free.
On the note 2, the V is different for each classification... but I corrected for that thread already.
Nice Work!
OP Updated with more changes..
how would i go about changing this? im new to mods like this.
stafly17 said:
how would i go about changing this? im new to mods like this.
Click to expand...
Click to collapse
Decompile the apk.
Follow the instructions in the OP.
It's a step by step guide.
Can't go wrong.
Slithering from the nether regions of a twisted mind and tarnished soul
@Gunthermic
Found an even easier way to do this...
Original code:
Code:
.method private setTracePaintOptionsWithSettings()V
.locals 5
const/16 v4, 0xff
const/4 v1, 0x1
const/4 v3, 0x0
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
if-nez v0, :cond_0
new-instance v0, Landroid/graphics/Paint;
invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V
iput-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
:cond_0
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePoint:Ljava/util/ArrayList;
if-eqz v0, :cond_1
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePoint:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
:cond_1
iput-short v3, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePointCount:S
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setAntiAlias(Z)V
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setDither(Z)V
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
const/16 v1, 0xa5
const/16 v2, 0xf3
invoke-static {v4, v3, v1, v2}, Landroid/graphics/Color;->argb(IIII)I
move-result v1
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
sget-object v1, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
sget-object v1, Landroid/graphics/Paint$Join;->ROUND:Landroid/graphics/Paint$Join;
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeJoin(Landroid/graphics/Paint$Join;)V
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
sget-object v1, Landroid/graphics/Paint$Cap;->ROUND:Landroid/graphics/Paint$Cap;
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeCap(Landroid/graphics/Paint$Cap;)V
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
invoke-virtual {v0, v4}, Landroid/graphics/Paint;->setAlpha(I)V
New code:
Code:
.method private setTracePaintOptionsWithSettings()V
.locals 5
const/16 v4, 0xff
const/4 v1, 0x1
const/4 v3, 0x0
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
if-nez v0, :cond_0
new-instance v0, Landroid/graphics/Paint;
invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V
iput-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
:cond_0
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePoint:Ljava/util/ArrayList;
if-eqz v0, :cond_1
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePoint:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
:cond_1
iput-short v3, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePointCount:S
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setAntiAlias(Z)V
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setDither(Z)V
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
const/16 v1, 0xa5
const/16 v2, 0xf3
[COLOR="Red"]const-string v2, "#AARRGGBB" [COLOR="blue"]<--this is your color hex, AA is the alpha, RR is the red value, GG is the green value, and BB is the blue value[/COLOR]
#invoke-static {v4, v3, v1, v2}, Landroid/graphics/Color;->argb(IIII)I
invoke-static {v2}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I
move-result v1
invoke-static {v1}, Landroid/graphics/Color;->alpha(I)I
move-result v4[/COLOR]
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
sget-object v1, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
sget-object v1, Landroid/graphics/Paint$Join;->ROUND:Landroid/graphics/Paint$Join;
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeJoin(Landroid/graphics/Paint$Join;)V
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
sget-object v1, Landroid/graphics/Paint$Cap;->ROUND:Landroid/graphics/Paint$Cap;
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeCap(Landroid/graphics/Paint$Cap;)V
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
invoke-virtual {v0, v4}, Landroid/graphics/Paint;->setAlpha(I)V
This way you can just write out your hex code in one line

Android 4.3 Smali Edits Help Guide

Just in Case!!
These are smali edits I found or had help finding while converting my ASU theme to Android 4.3. I will be constantly updating this OP and hope that other folks will give me there smali finds to add to this guide. Please PM me with anything you would like to add. Feel free to use anything in this OP. You don't have to ask!!!
Please don't forget to thank Gunthermic, Naddict, Rompnit and Strongsteve for all there help as well!!!
SystemUI
1. Brightness slider color animation.
Go to SystemUI\smali\com\android\systemui\statusbar\Anim atedBrightnessIconView.smali
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Look for:
.line 73
iget-object v0, p0, Lcom/android/systemui/statusbar/AnimatedBrightnessIconView;->mPaint:Landroid/graphics/Paint;
const v1, -0x3a1f17
Change -0x3a1f17 to your desired smali color code!!!!
SecMms Messaging
1. Changing text color when searching for a contact in SecMms Messaging
Go To: SecMms\smali\com\android\mms\ui\RecipientsAdapter.smali
Look For:
.line 342
new-instance v27, Landroid/text/style/ForegroundColorSpan;
const v28, -0xff852e and change it to your desired smali color code.
Look For:
.line 359
new-instance v27, Landroid/text/style/ForegroundColorSpan;
const v28, -0xff852e and change it to your desired smali color code.
Look For:
.line 373
new-instance v27, Landroid/text/style/ForegroundColorSpan;
const v28, -0xff852e and change it to your desired smali color code.
Look For:
.line 344
.restart local v22 # "span":Landroid/text/Spannable;
:cond_d
new-instance v27, Landroid/text/style/ForegroundColorSpan;
const v28, -0xcc4a16 and change it to your desired smali color code.
Look For:
.line 361
.restart local v22 # "span":Landroid/text/Spannable;
:cond_10
new-instance v27, Landroid/text/style/ForegroundColorSpan;
const v28, -0xcc4a16 and change it to your desired smali color code.
Look For:
.line 375
.restart local v23 # "spanNameText":Landroid/text/Spannable;
.restart local v24 # "spanNumberText":Landroid/text/Spannable;
:cond_12
new-instance v27, Landroid/text/style/ForegroundColorSpan;
const v28, -0xcc4a16 and change it to your desired smali color code.
Gmail 4.7.2 smali finds
Gmail send email to text color:
Go to:
Gmail-4.7.2\smali\com\android\ex\chips\RecipientEditTextView.smali
Find:
move-result-object v3
const v4, 0x106000c
invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getColor(I)I
move-result v3
invoke-virtual {v7, v3}, Landroid/text/TextPaint;->setColor(I)V
Insert: const v3, -0x4cf0 Of coarse changing -0x4cf0 to your smali text color code
move-result-object v3
const v4, 0x106000c
invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getColor(I)I
move-result v3
INSERT HERE
invoke-virtual {v7, v3}, Landroid/text/TextPaint;->setColor(I)V
So the finished product looks like this
move-result-object v3
const v4, 0x106000c
invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getColor(I)I
move-result v3
const v3, -0x4cf0
invoke-virtual {v7, v3}, Landroid/text/TextPaint;->setColor(I)V
Gmail list view email contents first line step one:
Go to:
Gmail-4.7.2-stock\smali\com\android\mail\browse\ConversationItemView.smali
Look for:
.line 421
new-instance v0, Landroid/text/style/ForegroundColorSpan;
const v3, 0x7f080029
invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getColor(I)I
move-result v3
invoke-direct {v0, v3}, Landroid/text/style/ForegroundColorSpan;-><init>(I)V
Insert this:
const v3, -0x66FFCD Changing -0x66ffcd to your favorite smali code
.line 421
new-instance v0, Landroid/text/style/ForegroundColorSpan;
const v3, 0x7f080029
invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getColor(I)I
move-result v3
INSERT HERE
invoke-direct {v0, v3}, Landroid/text/style/ForegroundColorSpan;-><init>(I)V
So the finished product looks like this
.line 421
new-instance v0, Landroid/text/style/ForegroundColorSpan;
const v3, 0x7f080029
invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getColor(I)I
move-result v3
const v3, -0x66FFCD
invoke-direct {v0, v3}, Landroid/text/style/ForegroundColorSpan;-><init>(I)V
Gmail list view email contents first line step two:
Go to
Gmail\smali\com\android\mail\browse\ConversationItemView.smali
Look for:
.line 1404
sget-object v0, Lcom/android/mail/browse/ConversationItemView;->aOX:Landroid/text/TextPaint;
iget-object v1, p0, Lcom/android/mail/browse/ConversationItemView;->aPi:Lcom/android/mail/browse/K;
iget-object v1, v1, Lcom/android/mail/browse/K;->GO:Lcom/android/mail/providers/Conversation;
iget v1, v1, Lcom/android/mail/providers/Conversation;->color:I
invoke-virtual {v0, v1}, Landroid/text/TextPaint;->setColor(I)V
.line 1405
Insert this:
const v0, -0x66ffcd Changing -0x66ffcd to your favorite smali code
.line 1404
sget-object v0, Lcom/android/mail/browse/ConversationItemView;->aOX:Landroid/text/TextPaint;
iget-object v1, p0, Lcom/android/mail/browse/ConversationItemView;->aPi:Lcom/android/mail/browse/K;
iget-object v1, v1, Lcom/android/mail/browse/K;->GO:Lcom/android/mail/providers/Conversation;
iget v1, v1, Lcom/android/mail/providers/Conversation;->color:I
invoke-virtual {v0, v1}, Landroid/text/TextPaint;->setColor(I)V
INSERT HERE
.line 1405
So the finished product looks like this:
.line 1404
sget-object v0, Lcom/android/mail/browse/ConversationItemView;->aOX:Landroid/text/TextPaint;
iget-object v1, p0, Lcom/android/mail/browse/ConversationItemView;->aPi:Lcom/android/mail/browse/K;
iget-object v1, v1, Lcom/android/mail/browse/K;->GO:Lcom/android/mail/providers/Conversation;
iget v1, v1, Lcom/android/mail/providers/Conversation;->color:I
invoke-virtual {v0, v1}, Landroid/text/TextPaint;->setColor(I)V
const v0, -0x66FFCD
.line 1405
Gmail open email inbox background and text color
Go to:
Gmail\smali\com\google\android\gm\utils\b.smali
Look for:
.line 82
new-array v0, v4, [Ljava/lang/String;
const-string v1, "#dddddd" This is the background color
aput-object v1, v0, v5
const-string v1, "#777777" This is the text color
aput-object v1, v0, v6
Change hex color codes to your favorite color.
SamsungIME Keyboard Swipe Color:
Please see Gunthermic's thread http://forum.xda-developers.com/showthread.php?t=2569480
Calendar Year Tab horizontal line under month
Go to:
\Calendar\smali\com\android\calendar\month\YearView.smali
Look for:
.line 1021
const v1, -0xb4b4b5
invoke-virtual {v6, v1}, Landroid/graphics/Paint;->setColor(I)V
and
.line 1027
:cond_b
const v1, -0xb4b4b5
invoke-virtual {v6, v1}, Landroid/graphics/Paint;->setColor(I)V
Change -0xb4b4b5 to your favorite smali color code
Change text color in day and week events Calendar
Go to:
Calendar\smali\com\android\calendar\timeline\DayLayout$DayEventAdapter$2.smali
Look for:
.line 962
.end local v0 # "paintFlag":I
:cond_2
iget-object v3, p0, Lcom/android/calendar/timeline/DayLayout$DayEventAdapter$2;->val$holder:Lcom/android/calendar/timeline/DayLayout$ViewHolder;
iget-object v3, v3, Lcom/android/calendar/timeline/DayLayout$ViewHolder;->titleView:Landroid/widget/TextView;
const/high16 v5, -0x1000000
invoke-virtual {v3, v5}, Landroid/widget/TextView;->setTextColor(I)V
Change const/high16 v5, -0x1000000 to const v3, -0x1000000 then change -0x1000000 to your favorite smali color code.
Go to:
Calendar\smali\com\android\calendar\timeline\DayLayout$DayEventAdapter.smali
Look for:
.line 1007
iget-object v6, p2, Lcom/android/calendar/timeline/DayLayout$ViewHolder;->titleView:Landroid/widget/TextView;
const/high16 v7, -0x1000000
invoke-virtual {v6, v7}, Landroid/widget/TextView;->setTextColor(I)V
Change const/high16 v7, -0x1000000 to const v7, -0x1000000 then change -0x1000000 to your favorite smali color code
Look for:
.line 940
:cond_8
iget-object v3, p2, Lcom/android/calendar/timeline/DayLayout$ViewHolder;->titleView:Landroid/widget/TextView;
const/high16 v4, -0x1000000
invoke-virtual {v3, v4}, Landroid/widget/TextView;->setTextColor(I)V
Change const/high16 v4, -0x1000000 to const v4, -0x1000000 then change -0x1000000 to your favorite smali color code
Go to:
Calendar\smali\com\android\calendar\timeline\EventListWithStartTime.smali
Look for:
.line 107
iget-object v1, p0, Lcom/android/calendar/timeline/EventListWithStartTime;->mListView:Landroid/widget/ListView;
new-instance v2, Landroid/graphics/drawable/ColorDrawable;
const/high16 v3, -0x1000000
invoke-direct {v2, v3}, Landroid/graphics/drawable/ColorDrawable;-><init>(I)V
Change const/high16 v3, -0x1000000 to const v3, -0x1000000 then change -0x100000 to your favorite smali color code
Go to:
Calendar\smali\com\android\calendar\timeline\WeekLayout$WeekEventAdapter.smali
Look for:
.line 1342
iget-object v6, p2, Lcom/android/calendar/timeline/WeekLayout$ViewHolder;->titleView:Landroid/widget/TextView;
const/high16 v7, -0x1000000
invoke-virtual {v6, v7}, Landroid/widget/TextView;->setTextColor(I)V
Change const/high16 v7, -0x1000000 to const v7, -0x1000000 then change -0x1000000 to your favorite smali color code
Look for:
.line 1299
:goto_4
iget-object v2, p2, Lcom/android/calendar/timeline/WeekLayout$ViewHolder;->titleView:Landroid/widget/TextView;
const/high16 v3, -0x1000000
invoke-virtual {v2, v3}, Landroid/widget/TextView;->setTextColor(I)V
Change const/high16 v3, -0x1000000 to const v3, -0x1000000 then change -0x1000000 to your favorite smali color code
Mine
Nice finds bud, very neat
I need one too!! Nice EMS! :highfive:
Nice to see someone take time to put it together.
I see a lot of smali edits I have been using for a while. Just never have time to write it all down,...
Reserved, cuz I do a ton of smali edits....
There goes all my trade secrets..lol
strongsteve said:
There goes all my trade secrets..lol
Click to expand...
Click to collapse
Yup... once released in an apk.. all free game.. hahaha.
You have no stinking secrets... I am Robocop.. put down your smali...
thanks
EMSpilot said:
These are smali edits I found or had help finding while converting my ASU theme to Android 4.3. I will be constantly updating this OP and hope that other folks will give me there smali finds to add to this guide. Please PM me with anything you would like to add. Feel free to use anything in this OP. You don't have to ask!!!
Please don't forget to thank Gunthermic, Naddict, Rompnit and Strongsteve for all there help as well!!!
SystemUI
1. Brightness slider color animation.
Go to SystemUI\smali\com\android\systemui\statusbar\Anim atedBrightnessIconView.smali
Look for:
.line 73
iget-object v0, p0, Lcom/android/systemui/statusbar/AnimatedBrightnessIconView;->mPaint:Landroid/graphics/Paint;
const v1, -0x3a1f17
Change -0x3a1f17 to your desired smali color code!!!!
SecMms Messaging
1. Changing text color when searching for a contact in SecMms Messaging
Go To: SecMms\smali\com\android\mms\ui\RecipientsAdapter.smali
Look For:
.line 342
new-instance v27, Landroid/text/style/ForegroundColorSpan;
const v28, -0xff852e and change it to your desired smali color code.
Look For:
.line 359
new-instance v27, Landroid/text/style/ForegroundColorSpan;
const v28, -0xff852e and change it to your desired smali color code.
Look For:
.line 373
new-instance v27, Landroid/text/style/ForegroundColorSpan;
const v28, -0xff852e and change it to your desired smali color code.
Look For:
.line 344
.restart local v22 # "span":Landroid/text/Spannable;
:cond_d
new-instance v27, Landroid/text/style/ForegroundColorSpan;
const v28, -0xcc4a16 and change it to your desired smali color code.
Look For:
.line 361
.restart local v22 # "span":Landroid/text/Spannable;
:cond_10
new-instance v27, Landroid/text/style/ForegroundColorSpan;
const v28, -0xcc4a16 and change it to your desired smali color code.
Look For:
.line 375
.restart local v23 # "spanNameText":Landroid/text/Spannable;
.restart local v24 # "spanNumberText":Landroid/text/Spannable;
:cond_12
new-instance v27, Landroid/text/style/ForegroundColorSpan;
const v28, -0xcc4a16 and change it to your desired smali color code.
Gmail 4.7.2 smali finds
Gmail send email to text color:
Go to:
Gmail-4.7.2\smali\com\android\ex\chips\RecipientEditTextView.smali
Find:
move-result-object v3
const v4, 0x106000c
invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getColor(I)I
move-result v3
invoke-virtual {v7, v3}, Landroid/text/TextPaint;->setColor(I)V
Insert: const v3, -0x4cf0 Of coarse changing -0x4cf0 to your smali text color code
move-result-object v3
const v4, 0x106000c
invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getColor(I)I
move-result v3
INSERT HERE
invoke-virtual {v7, v3}, Landroid/text/TextPaint;->setColor(I)V
So the finished product looks like this
move-result-object v3
const v4, 0x106000c
invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getColor(I)I
move-result v3
const v3, -0x4cf0
invoke-virtual {v7, v3}, Landroid/text/TextPaint;->setColor(I)V
Gmail list view email contents first line step one:
Go to:
Gmail-4.7.2-stock\smali\com\android\mail\browse\ConversationItemView.smali
Look for:
.line 421
new-instance v0, Landroid/text/style/ForegroundColorSpan;
const v3, 0x7f080029
invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getColor(I)I
move-result v3
invoke-direct {v0, v3}, Landroid/text/style/ForegroundColorSpan;-><init>(I)V
Insert this:
const v3, -0x66FFCD Changing -0x66ffcd to your favorite smali code
.line 421
new-instance v0, Landroid/text/style/ForegroundColorSpan;
const v3, 0x7f080029
invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getColor(I)I
move-result v3
INSERT HERE
invoke-direct {v0, v3}, Landroid/text/style/ForegroundColorSpan;-><init>(I)V
So the finished product looks like this
.line 421
new-instance v0, Landroid/text/style/ForegroundColorSpan;
const v3, 0x7f080029
invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getColor(I)I
move-result v3
const v3, -0x66FFCD
invoke-direct {v0, v3}, Landroid/text/style/ForegroundColorSpan;-><init>(I)V
Gmail list view email contents first line step two:
Go to
Gmail\smali\com\android\mail\browse\ConversationItemView.smali
Look for:
.line 1404
sget-object v0, Lcom/android/mail/browse/ConversationItemView;->aOX:Landroid/text/TextPaint;
iget-object v1, p0, Lcom/android/mail/browse/ConversationItemView;->aPi:Lcom/android/mail/browse/K;
iget-object v1, v1, Lcom/android/mail/browse/K;->GO:Lcom/android/mail/providers/Conversation;
iget v1, v1, Lcom/android/mail/providers/Conversation;->color:I
invoke-virtual {v0, v1}, Landroid/text/TextPaint;->setColor(I)V
.line 1405
Insert this:
const v0, -0x66ffcd Changing -0x66ffcd to your favorite smali code
.line 1404
sget-object v0, Lcom/android/mail/browse/ConversationItemView;->aOX:Landroid/text/TextPaint;
iget-object v1, p0, Lcom/android/mail/browse/ConversationItemView;->aPi:Lcom/android/mail/browse/K;
iget-object v1, v1, Lcom/android/mail/browse/K;->GO:Lcom/android/mail/providers/Conversation;
iget v1, v1, Lcom/android/mail/providers/Conversation;->color:I
invoke-virtual {v0, v1}, Landroid/text/TextPaint;->setColor(I)V
INSERT HERE
.line 1405
So the finished product looks like this:
.line 1404
sget-object v0, Lcom/android/mail/browse/ConversationItemView;->aOX:Landroid/text/TextPaint;
iget-object v1, p0, Lcom/android/mail/browse/ConversationItemView;->aPi:Lcom/android/mail/browse/K;
iget-object v1, v1, Lcom/android/mail/browse/K;->GO:Lcom/android/mail/providers/Conversation;
iget v1, v1, Lcom/android/mail/providers/Conversation;->color:I
invoke-virtual {v0, v1}, Landroid/text/TextPaint;->setColor(I)V
const v0, -0x66FFCD
.line 1405
Gmail open email inbox background and text color
Go to:
Gmail\smali\com\google\android\gm\utils\b.smali
Look for:
.line 82
new-array v0, v4, [Ljava/lang/String;
const-string v1, "#dddddd" This is the background color
aput-object v1, v0, v5
const-string v1, "#777777" This is the text color
aput-object v1, v0, v6
Change hex color codes to your favorite color.
SamsungIME Keyboard Swipe Color:
Please see Gunthermic's thread http://forum.xda-developers.com/showthread.php?t=2569480
Calendar Year Tab horizontal line under month
Go to:
\Calendar\smali\com\android\calendar\month\YearView.smali
Look for:
.line 1021
const v1, -0xb4b4b5
invoke-virtual {v6, v1}, Landroid/graphics/Paint;->setColor(I)V
and
.line 1027
:cond_b
const v1, -0xb4b4b5
invoke-virtual {v6, v1}, Landroid/graphics/Paint;->setColor(I)V
Change -0xb4b4b5 to your favorite smali color code
Change text color in day and week events Calendar
Go to:
Calendar\smali\com\android\calendar\timeline\DayLayout$DayEventAdapter$2.smali
Look for:
.line 962
.end local v0 # "paintFlag":I
:cond_2
iget-object v3, p0, Lcom/android/calendar/timeline/DayLayout$DayEventAdapter$2;->val$holder:Lcom/android/calendar/timeline/DayLayout$ViewHolder;
iget-object v3, v3, Lcom/android/calendar/timeline/DayLayout$ViewHolder;->titleView:Landroid/widget/TextView;
const/high16 v5, -0x1000000
invoke-virtual {v3, v5}, Landroid/widget/TextView;->setTextColor(I)V
Change const/high16 v5, -0x1000000 to const v3, -0x1000000 then change -0x1000000 to your favorite smali color code.
Go to:
Calendar\smali\com\android\calendar\timeline\DayLayout$DayEventAdapter.smali
Look for:
.line 1007
iget-object v6, p2, Lcom/android/calendar/timeline/DayLayout$ViewHolder;->titleView:Landroid/widget/TextView;
const/high16 v7, -0x1000000
invoke-virtual {v6, v7}, Landroid/widget/TextView;->setTextColor(I)V
Change const/high16 v7, -0x1000000 to const v7, -0x1000000 then change -0x1000000 to your favorite smali color code
Look for:
.line 940
:cond_8
iget-object v3, p2, Lcom/android/calendar/timeline/DayLayout$ViewHolder;->titleView:Landroid/widget/TextView;
const/high16 v4, -0x1000000
invoke-virtual {v3, v4}, Landroid/widget/TextView;->setTextColor(I)V
Change const/high16 v4, -0x1000000 to const v4, -0x1000000 then change -0x1000000 to your favorite smali color code
Go to:
Calendar\smali\com\android\calendar\timeline\EventListWithStartTime.smali
Look for:
.line 107
iget-object v1, p0, Lcom/android/calendar/timeline/EventListWithStartTime;->mListView:Landroid/widget/ListView;
new-instance v2, Landroid/graphics/drawable/ColorDrawable;
const/high16 v3, -0x1000000
invoke-direct {v2, v3}, Landroid/graphics/drawable/ColorDrawable;-><init>(I)V
Change const/high16 v3, -0x1000000 to const v3, -0x1000000 then change -0x100000 to your favorite smali color code
Go to:
Calendar\smali\com\android\calendar\timeline\WeekLayout$WeekEventAdapter.smali
Look for:
.line 1342
iget-object v6, p2, Lcom/android/calendar/timeline/WeekLayout$ViewHolder;->titleView:Landroid/widget/TextView;
const/high16 v7, -0x1000000
invoke-virtual {v6, v7}, Landroid/widget/TextView;->setTextColor(I)V
Change const/high16 v7, -0x1000000 to const v7, -0x1000000 then change -0x1000000 to your favorite smali color code
Look for:
.line 1299
:goto_4
iget-object v2, p2, Lcom/android/calendar/timeline/WeekLayout$ViewHolder;->titleView:Landroid/widget/TextView;
const/high16 v3, -0x1000000
invoke-virtual {v2, v3}, Landroid/widget/TextView;->setTextColor(I)V
Change const/high16 v3, -0x1000000 to const v3, -0x1000000 then change -0x1000000 to your favorite smali color code
Click to expand...
Click to collapse
please help me sir

[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.

Categories

Resources