[Guides & Links] TOUCHWIZ UNIFIED MODS THREAD

Search This thread

tdunham

Inactive Recognized Contributor
Jun 21, 2008
13,686
36,465
TampaBay
TOUCHWIZ UNIFIED MODS THREAD - GUIDES & LINKS

Samsung-Galaxy.png


Always a work in progress. Refer here for guides and links to various mods to help improve the Android experience.
Please feel free to contribute as well. :)

This thread requires basic knowledge of compiling and decompiling apk and jar files so they can be edited.
___________________________________________________

[Guide How-to] Remove Lockscreen Carrier
This removes the lockscreen carrier text.
Keyguard.apk smali edit:
smali/com/android/keyguard/CarrierText.smali:

Change if-nez to if-eqz in the indicated edit in BLUE:
Code:
.method private static concatenate(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
    .locals 5

    const/4 v2, 0x1

    const/4 v3, 0x0

    invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v4

    [COLOR="Blue"]if-eqz [/COLOR]v4, :cond_1

    move v0, v2
___________________________________________________

[Guide How-to] USB Plug/Unplugged Disable Wake + Android L
This modification will prevent the phone from waking for both (or either) USB/Power unplugged or plugged in states.
Services.jar edits:
smali/com/android/server/power/PowerManagerService.smali:
All edits are in .method private updateIsPoweredLocked(I)V

Expand registers from 12 to 14 (your code may be different dependant on decompiling method)
Code:
.method private updateIsPoweredLocked(I)V
    [COLOR="Blue"].locals 14
[/COLOR]
Delete the line in RED to disable wake when plugged in.
Code:
    const-string v4, "charger plug"

    invoke-virtual {v8, v0, v4}, Landroid/os/PowerManager;->newWakeLock(ILjava/lang/String;)Landroid/os/PowerManager$WakeLock;

    move-result-object v7

    invoke-virtual {v7, v3}, Landroid/os/PowerManager$WakeLock;->setReferenceCounted(Z)V

    const-wide/16 v4, 0x2710

    [COLOR="Red"]invoke-virtual {v7, v4, v5}, Landroid/os/PowerManager$WakeLock;->acquire(J)V
[/COLOR]
    :cond_1

Next two edits to disable wake when unplugged.
A few lines lower, add lines in BLUE.
Code:
    iput-boolean v0, p0, Lcom/android/server/power/PowerManagerService;->mPowerIsChanged:Z

    :cond_2
    invoke-direct {p0, v10, v9, v6}, Lcom/android/server/power/PowerManagerService;->shouldWakeUpWhenPluggedOrUnpluggedLocked(ZIZ)Z

    move-result v0

    [COLOR="Blue"]goto :goto_td
[/COLOR]    if-eqz v0, :cond_3
Code:
    iput-object v0, p0, Lcom/android/server/power/PowerManagerService;->mScreenOnReason:Ljava/lang/String;

    invoke-direct {p0, v1, v2}, Lcom/android/server/power/PowerManagerService;->wakeUpNoUpdateLocked(J)Z

    [COLOR="Blue"]:goto_td[/COLOR]
    :cond_3
    const/16 v5, 0x3e8
Android L Edits
Services.jar edits:
Add new code in BLUE
Note: This edit will disable BOTH plugged and unplugged.
They are not separate edits as previous builds.
smali/com/android/server/power/PowerManagerService.smali:
Code:
    .method private updateIsPoweredLocked(I)V
.
.
.

    invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J

    move-result-wide v2

    invoke-direct {p0, v9, v8, v0}, Lcom/android/server/power/PowerManagerService;->shouldWakeUpWhenPluggedOrUnpluggedLocked(ZIZ)Z

    move-result v1

    [COLOR="Blue"]const v1, 0x0
[/COLOR]
    if-eqz v1, :cond_1

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
__________________________________________________

[Guide How-to] Remove Safe Volume Warning
This removes the safe volume warning that pops up when you turn up the volume beyond a certain point.
This mod requires modifying framework.jar
Edit smali/android/media/AudioService.smali:
Changes are in .method private checkSafeMediaVolume(III)Z
, new lines are in BLUE:

Code:
    :cond_1
    iget-object v6, p0, Landroid/media/AudioService;->mSafeMediaVolumeState:Ljava/lang/Integer;

    invoke-virtual {v6}, Ljava/lang/Integer;->intValue()I

    move-result v6

    [COLOR="Blue"]goto :goto_td
[/COLOR]
    if-ne v6, v7, :cond_4

    iget-object v6, p0, Landroid/media/AudioService;->mStreamVolumeAlias:[I

Code:
    goto :goto_1

    [COLOR="Blue"]:goto_td[/COLOR]
    :cond_4
    monitor-exit v5
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    goto :goto_0
.end method
HIGH.VOL.png
____________________________________________________

[Guide How-to] Replace Recents with Menu & LongPress Home for Recents

This guide is for the Galaxy S5 and should work on all variants.
Keylayout edits:
system/usr/keylayout/Generic.kl
Change key 254 from APP_SWITCH to MENU
key 254 MENU

system/usr/keylayout/gpio-keys.kl
Do the same to key 254
key 254 MENU

Now Recent Apps capacitive key is Menu (single-press) and Search (long-press).
However, we have now lost access to recent apps via a hardware key.

How-to map Recent Apps to Long-press Home

android.policy.jar edits
smali/com/android/internal/policy/impl/PhoneWindowManager.smali

Search for and delete the line in RED.
Code:
    iget v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mLongPressOnHomeBehavior:I

    if-eqz v2, :cond_0

    iput-boolean v5, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHomeConsumed:Z

    const/4 v2, 0x0

    invoke-virtual {p0, v2, v4, v4}, Lcom/android/internal/policy/impl/PhoneWindowManager;->performHapticFeedbackLw(Landroid/view/WindowManagerPolicy$WindowState;IZ)Z

    iget v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mLongPressOnHomeBehavior:I

   [COLOR="Red"] if-ne v2, v5, :cond_6
[/COLOR]
    invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->toggleRecentApps()V
__________________________________________________

[Guide How-To] Native Call Recording KK 4.4.2
This enables call recording natively.
Simple CSC edit.
system/csc/feature.xml edit
Add new section and must be inserted BEFORE
</FeatureSet>
</SamsungMobileFeature>
(** please note that feature.xml can be overwritten so this may not stick if using a third party software like Xposed)
Code:
<!-- Call -->
 <CscFeature_VoiceCall_ConfigRecording>RecordingAllowed</CscFeature_VoiceCall_ConfigRecording>

Installation and Other Notes:
- recordings are saved in internal SD/Sounds
____________________________________________________

[Guide/How-To] Remove Location Consent Popup
Remove that annoying Location Consent popup.
We are editing the file GmsCore.apk. The apk is very difficult to de/recompile so we are just editing classes.dex file separately. Included is the smali/baksmali compiling tool. Just extract the classes.dex from GmsCore.apk and place it in the same folder as the extracted files from the tool and select decompile.bat.
This will create an output folder called classout. Once the edits are complete, you will select compile.bat and (if there are no errors) a newly created file new-classes.dex will be created. Rename this to classes.dex and insert it back into GmsCore.apk.

Edit classout/com/google/android/location/network/NetworkLocationService.smali
.method static a(Landroid/content/Context;)V, change if-nez to if-eqz as indicated in BLUE:
Code:
    move-result-object v0

    .line 106
    [COLOR="Blue"]if-eqz [/COLOR]v0, :cond_2c

    .line 107
    const-string v0, "GmsNetworkLocationService"

    const-string v1, "applySettings(): provider not available"

Edit classout/com/google/android/location/network/ConfirmAlertActivity.smali

Make the change indicated in BLUE:
Code:
.method public constructor <init>()V
    .registers 2

    .prologue
    .line 44
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 59
    [COLOR="Blue"]const/4 v0, 0x1
[/COLOR]
    iput-boolean v0, p0, Lcom/google/android/location/network/ConfirmAlertActivity;->c:Z

    .line 60
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/google/android/location/network/ConfirmAlertActivity;->d:Landroid/app/Dialog;

    .line 163
    return-void
.end method

Make the change indicated in BLUE:
Code:
.method public onClick(Landroid/content/DialogInterface;I)V
    .registers 6

    .prologue
   [COLOR="Blue"] const/4 v1, 0x1
[/COLOR]
    .line 140
    const/4 v0, -0x1

    if-ne p2, v0, :cond_2a

    const/4 v0, 0x1

    :goto_5
    iput-boolean v0, p0, Lcom/google/android/location/network/ConfirmAlertActivity;->c:Z
LOCATION.CONSENT.png

____________________________________________________

[Guide] [How-to] Disable Battery Cover & Charging Cover Toasts
This disables both the battery cover and the charging/usb cover toast messages.
Decompile system/app/PopupuiReceiver.apk.
Edit res/values/bools.xml.

Change true value to false in the line below:
Code:
    <bool name="display_battery_cover_popup">[COLOR="Blue"]false[/COLOR]</bool>

Notes:
This should also resolve the battery cover toast from appearing for a split second after a reboot and the screen is unlocked.
COVERS.1.png
. .
COVERS2.png
____________________________________________________

[Guide How-to] Bluetooth Scan Dialog Removal
This will remove the scan dialog popup when Bluetooth is enabled.
SecSettings.apk edit:
smali/com/android/settings/Bluetooth/BluetoothScanDialog.smali
.method private initialize()V
At the end of the method, delete the line in RED:
Code:
    invoke-virtual {v0, v4}, Landroid/app/Dialog;->setOnCancelListener(Landroid/content/DialogInterface$OnCancelListener;)V

    [COLOR="Red"]invoke-virtual {v0}, Landroid/app/Dialog;->show()V
[/COLOR]
    return-void
.end method
BLUETOOTH.POPUP.png
____________________________________________________

[Guide How-to] Maximum StatusBar Brightness 4.4.2
I noticed that Samsung always make the statusbar notification areas a bit dim.
EXTRA - Also look at the link HERE
This requires decompiling SystemUI.apk.
SystemUI/res/values/dimens.xml edit
Code:
Change these three lines
New values are in BLUE
    <item type="dimen" name="status_bar_icon_drawing_alpha">[COLOR="Blue"]100.0%[/COLOR]</item>
    <item type="dimen" name="system_icon_area_alpha">[COLOR="Blue"]1.0[/COLOR]</item>
    <item type="dimen" name="notification_icon_area_alpha">[COLOR="Blue"]1.0[/COLOR]</item>
SB.BRIGHT1.png
. .
SB.BRIGHT2.png
____________________________________________________

[Guide How-to] Remove Airplane Quicksetting Popup + ANDROID L
Remove the permission popup for Airplane mode when selected from Quicksettings.
SystemUI.apk smali edit:
com/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton.smali

Add the following code in BLUE.
(the values MUST match the surrounding code and may be different for your build)
.method private showConfirmPopup(Z)V

Code:
    invoke-virtual {v6, v7}, Landroid/view/Window;->setType(I)V

    :goto_4

[COLOR="Blue"]    new-instance v8, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$4;

    invoke-direct {v8, p0, v5}, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$4;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;Z)V

    const v6, 0x0

    invoke-virtual {v8, v6, v5}, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$4;->onClick(Landroid/content/DialogInterface;I)V

    return-void
[/COLOR]
    iget-object v6, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mAlertDialog:Landroid/app/AlertDialog;

    invoke-virtual {v6}, Landroid/app/Dialog;->show()V
Android L
Add new code in BLUE
smali\com\android\systemui\qs\tiles\AirplaneModeTile.smali
Code:
    const/16 v5, 0x7d9

    invoke-virtual {v4, v5}, Landroid/view/Window;->setType(I)V

    :goto_3

[COLOR="Blue"]
    new-instance v6, Lcom/android/systemui/qs/tiles/AirplaneModeTile$6;

    invoke-direct {v6, p0, p1}, Lcom/android/systemui/qs/tiles/AirplaneModeTile$6;-><init>(Lcom/android/systemui/qs/tiles/AirplaneModeTile;Z)V

    const v4, 0x0

    invoke-virtual {v6, v4, p1}, Lcom/android/systemui/qs/tiles/AirplaneModeTile$6;->onClick(Landroid/content/DialogInterface;I)V

    return-void[/COLOR]

    iget-object v4, p0, Lcom/android/systemui/qs/tiles/AirplaneModeTile;->mAlertDialog:Landroid/app/AlertDialog;

    invoke-virtual {v4}, Landroid/app/AlertDialog;->show()V

    return-void

Airplane.png
____________________________________________________

[Guide How-To] ENABLE CALL & MSG BLOCKING
This enables call and msg blocking natively.
Simple CSC edit.
system/csc/feature.xml edit
Must be inserted BEFORE
</FeatureSet>
</SamsungMobileFeature>
(** please note that feature.xml can be overwritten so this may not stick if using a third party software like Xposed)
Code:
<CscFeature_Setting_EnableMenuBlockCallMsg>TRUE</CscFeature_Setting_EnableMenuBlockCallMsg>
CALL.BLOCK1.png
. .
CALL.BLOCK2.png
Credits to @majdinj for his thread HERE
____________________________________________________

[Guide How-To] ENABLE WiFi & USB Tethering (HOTSPOT)
This will enable WiFi Hotspot and USB tethering.
services.jar smali edit:
smali/com/android/server/connectivity/Tethering.smali
Search for the text highlighted in GREEN and make the edit in BLUE:
Code:
    const-string/jumbo v1, "tether_dun_required"

    [COLOR="Blue"]const/4 v2, 0x0[/COLOR]

    invoke-static {v0, v1, v2}, Landroid/provider/Settings$Secure;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z

    const-string v0, "Tethering"

    [COLOR="Green"]const-string v1, "Set dun requiered as 1"
[/COLOR]
__________________________________________________

[Guide How-To] ENABLE DEVELOPER OPTIONS
This will enable Developer Options settings item without having to do the build multiple tap.
SecSettings.apk edits:
We will be editing multiple xml files and adding an entry to ids.xml.
res/values/ids.xml
Code:
add this entry:
    <item type="id" name="dev_settings">false</item>
res/xml edits same edit to all 4 listed:
general_headers.xml
grid_settings_headers.xml
management_headers.xml
settings_headers.xml
Before:
Code:
    <header android:icon="@drawable/ic_settings_development" android:id="@id/development_settings" android:title="@string/development_settings_title" android:fragment="com.android.settings.DevelopmentSettings" />
After:
Code:
    <header android:icon="@drawable/ic_settings_development" android:id="@id/dev_settings" android:title="@string/development_settings_title" android:fragment="com.android.settings.DevelopmentSettings" />
Developer_options.png
Credits @rompnit for this one as well.
Android 5.1.1 guide is --> HERE
__________________________________________________

[Guide How-To] CHANGE DEFAULT ANIMATION SCALES
This smali edit will change the default animation scales for increased GUI speed.
services.jar edit:
.method private constructor <init>(Landroid/content/Context;Lcom/android/server/power/PowerManagerService;Lcom/android/server/display/DisplayManagerService;Lcom/android/server/input/InputManagerService;ZZZ)V
Search down for first occurrence of 0x3f80
Make the changes in BLUE
Code:
    iput-object v9, p0, Lcom/android/server/wm/WindowManagerService;->mFocusedApp:Lcom/android/server/wm/AppWindowToken;

    [COLOR="Blue"]const/high16 v9, 0x3f00[/COLOR]

    iput v9, p0, Lcom/android/server/wm/WindowManagerService;->mWindowAnimationScale:F

    [COLOR="Blue"]const/high16 v9, 0x3f00
[/COLOR]
    iput v9, p0, Lcom/android/server/wm/WindowManagerService;->mTransitionAnimationScale:F

    [COLOR="Blue"]const/high16 v9, 0x3f00[/COLOR]

    iput v9, p0, Lcom/android/server/wm/WindowManagerService;->mAnimatorDurationScale:F
ANIMATION_SCALE.png
Credits @bajasur for the original guide HERE
__________________________________________________

[Guide How-To] REMOVE IME KEYBOARD SWITCHER NOTIFICATION
This is a very simple edit but I couldn't find a guide anywhere to link to so here it is.
framework-res.apk edit:
res/values/bools.xml
Change the value indication in BLUE from true to false
Code:
    <bool name="show_ongoing_ime_switcher">[COLOR="Blue"]false[/COLOR]</bool>
__________________________________________________

[Guide How-To] DISABLE HOME KEY WAKE
This will prevent the Home Key from waking the phone.
android.policy.jar smali edit:
smali/com/android/interal/policy/impl/PhoneWindowManager.smali
.method private isWakeKeyWhenScreenOff(I)Z
Add the new lines in BLUE
Code:
    :sswitch_1
    move v0, v1

    goto :goto_0

    [COLOR="Blue"]:sswitch_4

    return v1

    nop
[/COLOR]
    :sswitch_data_0
    .sparse-switch
        [COLOR="Blue"]0x3 -> :sswitch_4
[/COLOR]        0x18 -> :sswitch_0
        0x19 -> :sswitch_0
Credits @rompnit for this one too.
__________________________________________________

[Guide How-To] REMOVE ROAMING NOTIFICATION
This will remove the ongoing Roaming notification.
SecTeleservice.apk smali edit:
smali/com/android/phone/PhoneGlobals$5.smali
Search for hideDataDisconnectedRoaming
(there is only one occurrence)
Delete the TWO lines in RED
Code:
    iget-object v0, v0, Lcom/android/phone/PhoneGlobals;->notificationMgr:Lcom/android/phone/NotificationMgr;

    move-object/from16 v30, v0

   [COLOR="Red"] invoke-virtual/range {v30 .. v30}, Lcom/android/phone/NotificationMgr;->showDataDisconnectedRoaming()V
[/COLOR]
    goto/16 :goto_0

    :sswitch_7
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/android/phone/PhoneGlobals$5;->this$0:Lcom/android/phone/PhoneGlobals;

    move-object/from16 v30, v0

    move-object/from16 v0, v30

    iget-object v0, v0, Lcom/android/phone/PhoneGlobals;->notificationMgr:Lcom/android/phone/NotificationMgr;

    move-object/from16 v30, v0

    [COLOR="Red"]invoke-virtual/range {v30 .. v30}, Lcom/android/phone/NotificationMgr;->hideDataDisconnectedRoaming()V
[/COLOR]
    goto/16 :goto_0
__________________________________________________

[Guide How-To] DISABLE SCROLLING CACHE
This guide will show you how to disable scrolling cache.
framework2.jar smali edit:
smali/android/widget/AbsListView.smali
Make the modification in BLUE
Code:
.method private createScrollingCache()V
    .locals 2

    .prologue
    [COLOR="Blue"]const/4 v1, 0x0[/COLOR]
Make the modification in BLUE
Code:
.method private initAbsListView()V
    .locals 11

    .prologue
    const-wide/16 v4, 0x0

    const/4 v0, 0x0

    const/4 v10, 0x1

    .line 1159
    invoke-virtual {p0, v10}, Landroid/view/View;->setClickable(Z)V

    .line 1160
    invoke-virtual {p0, v10}, Landroid/widget/AdapterView;->setFocusableInTouchMode(Z)V

    .line 1161
    invoke-virtual {p0, v0}, Landroid/view/View;->setWillNotDraw(Z)V

    .line 1162
    invoke-virtual {p0, v0}, Landroid/view/ViewGroup;->setAlwaysDrawnWithCacheEnabled(Z)V

    .line 1163
    [COLOR="Blue"]invoke-virtual {p0, v0}, Landroid/widget/AbsListView;->setScrollingCacheEnabled(Z)V
[/COLOR]
Make the modification in BLUE
Important note:
You will not see the .parameter if using apktool with the -b commandline decompile option. So don't use it. ;)
Code:
.method public setScrollingCacheEnabled(Z)V
    .locals 1
    [COLOR="Blue"].parameter "disabled"[/COLOR]

    .prologue
    .line 1999
__________________________________________________

[Guide How-To] DISABLE MSL & ENABLE PRL WRITE IN ##DATA# MENU
This guide disables the need to input MSL and also enables flashing PRL's right from the ##DATA# menu.
system/csc/sales_code.dat edit:
Our stock rom has XAS in this file and it needs to changed to SPR for the new features to work.
hiddenmenu.apk smali edit:
smali /com/android/hiddenmenu/hdata.smali
Search for the string "MSM7630_SURF".
There are 3 occurrences but only two of them have a "SPR" right above them.
We are changing the "SPR" to "SPX" in both occurrences:
Code:
    if-nez v2, :cond_c

    const-string v2, [COLOR="Blue"]"SPX"
[/COLOR]
    sget-object v3, Lcom/android/hiddenmenu/hdata;->mSalesCode:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_c

    const-string v2, "XAS"

    sget-object v3, Lcom/android/hiddenmenu/hdata;->mSalesCode:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_c

    const-string v2, "MSM7630_SURF"
Code:
    :cond_c
    const-string v2, [COLOR="Blue"]"SPX"
[/COLOR]
    sget-object v3, Lcom/android/hiddenmenu/hdata;->mSalesCode:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_d

    const-string v2, "MSM7630_SURF"
smali/com/android/hiddenmenu/hdata_options.smali
This edit is similar to the ones above but we are changing "VZW" string to "SPR".
Code:
    const-string v3, "username_preference"

    invoke-virtual {v2, v3}, Landroid/preference/PreferenceScreen;->setKey(Ljava/lang/String;)V

    const-string v3, "Edit"

    invoke-virtual {v2, v3}, Landroid/preference/PreferenceScreen;->setTitle(Ljava/lang/CharSequence;)V

    const-string v3, [COLOR="Blue"]"SPR"[/COLOR]

    sget-object v4, Lcom/android/hiddenmenu/hdata_options;->mSalesCode:Ljava/lang/String;
smali/com/android/hiddenmenu/HiddenmenuBroadcastReceiver.smali
Search for the FIRST occurrence of DebugMenu_Check
Delete lines in RED, change text in BLUE
Before:
Code:
    if-nez v0, :cond_2c

    const-class v0, Lcom/android/hiddenmenu/DebugMenu_Check;

    invoke-virtual {v3, p1, v0}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;

    [COLOR="Red"]move-result-object v0

    const-string v1, "keyString"

    invoke-virtual {v0, v1, v5}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
[/COLOR]
    move v1, v2

    goto/16 :goto_5
After:
Code:
    if-nez v0, :cond_2c

    const-class v0, Lcom/android/hiddenmenu/[COLOR="Blue"]DEBUGMENU[/COLOR];

    invoke-virtual {v3, p1, v0}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;

    move v1, v2

    goto/16 :goto_5
Credit goes to @digiblur for this incredible mod.
(And permission to post a guide for it :))
__________________________________________________

[Guide How-To] CREATE AN XPOSED PROOF FEATURES.XML FOR CSC TWEAKS
Lets face it, xposed modules always seem to overwrite my favorite CSC tweaks.
This guide will show you how to use your own custom features.xml that won't be overwritten.
framework2.jar smali edit:
smali/com/sec/android/app/CscFeature.smali
Search for and rename feature.xml to whatever you want.
There are two locations:
Code:
.field private static final FEATURE_XML:Ljava/lang/String; = "/system/csc/[COLOR="Red"]feature.xml[/COLOR]"

    const-string v10, "/system/csc/[COLOR="Red"]feature.xml[/COLOR]"
Code:
.field private static final FEATURE_XML:Ljava/lang/String; = "/system/csc/[COLOR="Blue"]ultimate.xml[/COLOR]"

    const-string v10, "/system/csc/[COLOR="Blue"]ultimate.xml[/COLOR]"
Now just copy your custom feature.xml to the file (EXAMPLE) ultimate.xml and place it in system/csc and it will be safe from being overwritten by third party apps/tweakers.
__________________________________________________

[Guide How-To] ENABLE LOCKSCREEN ROTATION (with a toggle in mind)
I know there is a bools edit for this but this is the smali way so you can add a toggle.
Keyguard.apk smali edit:
smali/com/android/keyguard/KeyguardViewManager.smali
Change the text indicated in BLUE from 0x0 to 0x1
Code:
.method private shouldEnableScreenRotation()Z
    .locals 3

    const/4 v1, [COLOR="Blue"]0x1
[/COLOR]
    iget-object v2, p0, Lcom/android/keyguard/KeyguardViewManager;->mContext:Landroid/content/Context;
__________________________________________________
[Guide How-To] Remove Knox info in About screen
Knox is removed, now remove the info from the about screen too.
SecSettings smali edit:
smali\com\android\settings\DeviceInfoSettings.smali
Find and delete the following line:
Code:
    invoke-direct/range {p0 .. p0}, Lcom/android/settings/DeviceInfoSettings;->showKnoxVersion()V
Knox_removed.png
Removing Knox for Android 6.0.x -->> http://xdaforums.com/showpost.php?p=66741387&postcount=6078

Note:
Many many hours go into developing the mods and creating guides for them.
It is also considered good form to hit the :good:Thanks button rather than saying it in open forum. (it just creates unnecessary clutter)
 

Attachments

  • JB_KK_L_VRTheme_Template.zip
    775.3 KB · Views: 6,186
Last edited:

tdunham

Inactive Recognized Contributor
Jun 21, 2008
13,686
36,465
TampaBay
[Guide How-to] Remove Quickconnect & Sfind from Pulldown
This removes the Quickconnect & Sfind shortcuts from the pulldown.
SystemUI.apk layouts edit:
res/layout/status_bar_expanded.xml
Deleted this entire section from status_bar_expanded.xml
Code:
[COLOR="Red"]<LinearLayout android:orientation="vertical" android:id="@id/sfinder_qconnect_layout" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content">
    <LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:paddingLeft="@dimen/finder_connect_button_padding_right" android:paddingTop="@dimen/finder_connect_button_padding_top" android:paddingRight="@dimen/finder_connect_button_padding_left" android:paddingBottom="@dimen/finder_connect_button_padding_bottom" android:layout_width="fill_parent" android:layout_height="wrap_content">
        <Button android:textSize="@dimen/tw_quick_panel_sfinder_qconnect_button_text_size" android:textColor="@drawable/tw_quick_panel_sfinder_qconnect_button_text_color" android:id="@id/sfinder_button_big" android:background="@drawable/tw_quick_panel_sfinder_qconnect_button" android:layout_width="0.0dip" android:layout_height="@dimen/finder_connect_button_height" android:layout_marginRight="10.0dip" android:text="@string/accessibility_sfinder_button" android:layout_weight="0.5" android:fontFamily="sec-roboto-light" />
        <Button android:textSize="@dimen/tw_quick_panel_sfinder_qconnect_button_text_size" android:textColor="@drawable/tw_quick_panel_sfinder_qconnect_button_text_color" android:id="@id/qconnect_button_big" android:background="@drawable/tw_quick_panel_sfinder_qconnect_button" android:layout_width="0.0dip" android:layout_height="@dimen/finder_connect_button_height" android:layout_marginLeft="10.0dip" android:text="@string/accessibility_qconnect_button" android:layout_weight="0.5" android:fontFamily="sec-roboto-light" />
    </LinearLayout>
    <View android:id="@id/sfinder_qconnect_divider" android:background="@drawable/notification_bottom_line" android:layout_width="fill_parent" android:layout_height="1.0dip" />
</LinearLayout>[/COLOR]
QCONNECT_SFIND1.png
. .
QCONNECT_SFIND2.png

However, removing Quickconnect & Sfind activates the Sfind shortcut in the statusbar pulldown. The next guide show us how to hide it.


[Guide How-to] Remove/Hide Sfind shortcut from StatusBar
This will hide the Sfind shortcut that appears in the statusbar when Quickpanel & Sfind are removed from the dropdown.
SystemUI.apk layouts edit:
res/layout/status_bar_expanded_header.xml
Change every 'dip' value indicated in RED
Code:
    <ImageView android:id="@id/sfinder_button" android:background="@drawable/ic_notify_button_bg" android:paddingLeft="[COLOR="Red"]0.0dip[/COLOR]" android:paddingTop="@dimen/button_holder_margin_top" android:paddingRight="[COLOR="Red"]0.0dip[/COLOR]" android:paddingBottom="@dimen/button_holder_margin_bottom" android:focusable="true" android:layout_width="[COLOR="Red"]0.0dip[/COLOR]" android:layout_height="fill_parent" android:src="@drawable/tw_quickpanel_icon_search" android:scaleType="center" android:layout_alignParentLeft="true" android:contentDescription="@string/accessibility_sfinder_button" />
    <ImageView android:id="@id/expanded_divider_1" android:background="@color/quickpanel_button_divider_color" android:layout_width="[COLOR="Red"]0.0dip[/COLOR]" android:layout_height="fill_parent" android:layout_marginTop="@dimen/button_holder_divider_margin_top" android:layout_marginBottom="@dimen/button_holder_divider_margin_bottom" android:layout_toRightOf="@id/sfinder_button" />
SFIND_1.png
. .
SFIND_2.png


[Guide How-to] USE A CUSTOM IMAGE FOR THE PULLDOWN BACKGROUND
This modification allows us to use a png image for the pulldown background.
SystemUI.apk layout edit:
res/layout/status_bar_expanded.xml
Line 2 change the background to point to an image file.
Change is indicated in RED
Code:
<com.android.systemui.statusbar.phone.NotificationPanelView android:id="@id/notification_panel" [COLOR="Red"]android:background="@drawable/tw_custom_bg[/COLOR]" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginStart="@dimen/notification_panel_margin_left"

Note:
PNG image filename is tw_custom_bg.png. Give it whatever name you like.
Notice the .png file extension is not placed in the xml code.
The image file must be placed in one of the drawable folders before you recompile (res/drawable-xxhdpi).


[Guide How-to] ADD RECENT APPS TO THE PULLDOWN STATUSBAR
This will add a recent apps shortcut to the pulldown statusbar.
Download the png image file attached at the bottom of this post and insert it into SystemUI.apk/res/drawable-xxhdpi.
SystemUI.apk layout edit:
res/layout/status_bar_expanded_header.xml
Insert new line in BLUE:
Code:
    <ImageView android:id="@id/expanded_divider_2" android:background="@color/quickpanel_button_divider_color" android:visibility="gone" android:layout_width="1.0dip" android:layout_height="fill_parent" android:layout_marginTop="@dimen/button_holder_divider_margin_top" android:layout_marginBottom="@dimen/button_holder_divider_margin_bottom" android:layout_toLeftOf="@id/edit_button_holder" />
    [COLOR="Blue"]<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/recent_apps" android:paddingLeft="1.0dip" android:paddingRight="2.0dip" android:layout_width="35.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_notify_recent" android:scaleType="center" android:layout_toLeftOf="@id/expanded_divider_2" android:contentDescription="@string/accessibility_recent" systemui:keyCode="187" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
[/COLOR]    <FrameLayout android:id="@id/edit_button_holder" android:layout_width="@dimen/button_holder_width" android:layout_height="fill_parent" android:layout_toLeftOf="@id/expanded_divider_3">

NOTE:
You might also need to hide the Sfind shortcut in the pulldown statusbar using the above guide.
RECENT_APPS.png

[Guide How-to] Enable Flashlight Toggle Android L
This will allow you to enable the native flashlight toggle.
SecSettings.apk smali edit:
smali\com\android\settings\NotificationPanelMenu.smali
Add new lines in BLUE to the bottom of the following method BEFORE the return-void (check to make sure they don't already exist) and make sure code matches surrounding values:
Code:
.method private makeConvertPanelName()V
.
.
.
[COLOR="Blue"]    const-string v1, "Flashlight"

    const-string v2, "notification_panel_flashlight"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    iget-object v0, p0, Lcom/android/settings/NotificationPanelMenu;->mConvertPanelItemstring:Ljava/util/HashMap;

    const-string v1, "notification_panel_flashlight"

    const-string v2, "Flashlight"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    iget-object v0, p0, Lcom/android/settings/NotificationPanelMenu;->mConvertPanelItemstring:Ljava/util/HashMap;
[/COLOR]
    return-void
.end method
SecSettings.apk strings.xml edit:
res/values/strings.xml
Check for following string in BLUE and add if it to the bottom (before </resources> if it does not already exist:
Code:
    [COLOR="Blue"]<string name="notification_panel_flashlight">Flashlight</string>
[/COLOR]</resources>
ADD NEW ICON FROM FLASHLIGHT RESOURCES AT BOTTOM OF THIS POST!
SystemUI.apk smali edit:
Delete the line in RED and add the new lines in BLUE
This is a very large method. Search the method for the surrounding code and make sure the new code matches surrounding variables.
smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.
.
.
    iget-object v4, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCarrierLabel:Landroid/widget/TextView;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mClearAll:Landroid/widget/TextView;

    invoke-virtual {v3, v4, v5}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->setCarrierView(Landroid/widget/TextView;Landroid/widget/TextView;)V

    :cond_d
    :goto_7
    [COLOR="Red"]const/4 v3, 0x0[/COLOR]
    [COLOR="Blue"]new-instance v3, Lcom/android/systemui/statusbar/policy/FlashlightController;

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;

    invoke-direct {v3, v4}, Lcom/android/systemui/statusbar/policy/FlashlightController;-><init>(Landroid/content/Context;)V
[/COLOR]
    move-object/from16 v0, p0

    iput-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlashlightController:Lcom/android/systemui/statusbar/policy/FlashlightController;

    new-instance v3, Lcom/android/systemui/statusbar/policy/AccessibilityController;
SystemUI.apk/res/strings.xml edit:
Add new line in BLUE near bottom of xml:
Code:
    [COLOR="Blue"]<string name="quickpanel_flashlight_text">Flashlight</string>[/COLOR]
</resources>
Optional smali edit if you want to use custom icons for flashlight:
Add icons from zip located at the bottom of this post, compile and decompile to get new values for the two icons highlighted in BLUE below that will be in the new res/values/public.xml.
smali\com\android\systemui\qs\tiles\FlashlightTile.smali
Code:
.method protected handleUpdateState(Lcom/android/systemui/qs/QSTile$BooleanState;Ljava/lang/Object;)V
.
.
.
    iput-object v1, p1, Lcom/android/systemui/qs/QSTile$BooleanState;->label:Ljava/lang/String;

    iget-boolean v1, p1, Lcom/android/systemui/qs/QSTile$BooleanState;->value:Z

    if-eqz v1, :cond_6

    const v1, 0x[COLOR="Blue"]7f0206e8[/COLOR]  ## tw_quick_panel_icon_flashlight_on

    :goto_2
    iput v1, p1, Lcom/android/systemui/qs/QSTile$BooleanState;->iconId:I

    iget-boolean v1, p1, Lcom/android/systemui/qs/QSTile$BooleanState;->value:Z

    if-eqz v1, :cond_7

    const v0, 0x7f0c0278

    :goto_3
    iget-object v1, p0, Lcom/android/systemui/qs/tiles/FlashlightTile;->mContext:Landroid/content/Context;

    invoke-virtual {v1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p1, Lcom/android/systemui/qs/QSTile$BooleanState;->contentDescription:Ljava/lang/String;

    return-void

    :cond_4
    iget-object v1, p0, Lcom/android/systemui/qs/tiles/FlashlightTile;->mHandler:Lcom/android/systemui/qs/QSTile$H;

    iget-object v2, p0, Lcom/android/systemui/qs/tiles/FlashlightTile;->mRecentlyOnTimeout:Ljava/lang/Runnable;

    invoke-virtual {v1, v2}, Lcom/android/systemui/qs/QSTile$H;->removeCallbacks(Ljava/lang/Runnable;)V

    iget-object v1, p0, Lcom/android/systemui/qs/tiles/FlashlightTile;->mHandler:Lcom/android/systemui/qs/QSTile$H;

    iget-object v2, p0, Lcom/android/systemui/qs/tiles/FlashlightTile;->mRecentlyOnTimeout:Ljava/lang/Runnable;

    iget-wide v4, p0, Lcom/android/systemui/qs/tiles/FlashlightTile;->mWasLastOn:J

    add-long/2addr v4, v8

    invoke-virtual {v1, v2, v4, v5}, Lcom/android/systemui/qs/QSTile$H;->postAtTime(Ljava/lang/Runnable;J)Z

    goto :goto_0

    :cond_5
    const/4 v1, 0x0

    goto :goto_1

    :cond_6
    const v1, 0x[COLOR="Blue"]7f0206e7[/COLOR]  ## tw_quick_panel_icon_flashlight_on
    goto :goto_2

    :cond_7
    const v0, 0x7f0c0277

    goto :goto_3
.end method
Finally, the Flashlight string must be added to the SQL settings database.
You can use the flashable zip located here:
http://xdaforums.com/showpost.php?p=58768266&postcount=415
 

Attachments

  • Flashlight_icons_lollipop.zip
    15.3 KB · Views: 2,024
  • Recent_apps_png.zip
    2.9 KB · Views: 1,756
Last edited:

tdunham

Inactive Recognized Contributor
Jun 21, 2008
13,686
36,465
TampaBay
[Guide How-to] Ascending Ringtone with Toggle Android L
This will allow you to toggle ascending ringtone. No reboot required.
Credits @daxgirl
Telecom.apk smali edit:
smali\com\android\server\telecom\secutils\SecAsyncRingtonePlayer.smali
Search for the string ringtone_escalating and we are going to replace the two lines in RED with the one in BLUE:
Code:
.method static synthetic access$000(Lcom/android/server/telecom/secutils/SecAsyncRingtonePlayer;Landroid/net/Uri;)V
.
.
.
   [COLOR="Red"] const-string v0, "ringtone_escalating"

    invoke-static {v0}, Lcom/android/services/telephony/common/PhoneFeature;->hasFeature(Ljava/lang/String;)Z[/COLOR]

    [COLOR="Blue"]invoke-virtual {p0}, Lcom/android/server/telecom/secutils/SecAsyncRingtonePlayer;->getIncreasingRingtoneToggle()Z[/COLOR]

Add new method to the bottom of this smali:
Code:
.method getIncreasingRingtoneToggle()Z
   .locals 4
   
    iget-object v1, p0, Lcom/android/server/telecom/secutils/SecAsyncRingtonePlayer;->mContext:Landroid/content/Context;
    
    invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
    
    move-result-object v1
    
    const-string v2, "db_inc_volume_disable"
    
    const/4 v3, 0x1
    
    invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
    move-result v3
    
    if-nez v3, :cond_gear
    
    const/4 v3, 0x0
    
    :goto_0
    return v3

   :cond_gear
   const/4 v3, 0x1

   goto :goto_0
    
.end method
CustomSettings toggle line:
Code:
<SwitchPreference android:title="Increasing Ringtone" android:key="db_inc_volume_disable" android:summaryOn="Increasing ringtone enabled" android:summaryOff="Increasing ringtone disabled" />
__________________________________________________
[Guide How-to] End Call Delay for Lollipop
This will make changes to the end call delay.
LegacyInCallUI.apk smali edit:
If you do not want a toggle for adjustable delay, this will disable end call delay:
smali\com\android\incallui\CallList.smali
Change both values in BLUE to the values in RED
Code:
.method private getDelayForDisconnect(Lcom/android/incallui/Call;)I
.
.
    if-eqz v2, :cond_1

    [COLOR="Red"]const/16 v2, 0x1194[/COLOR]
    [COLOR="Blue"]const/16 v2, 0x0[/COLOR]

    invoke-static {p1, v2}, Lcom/android/incallui/operator/usa/InCallUIExtension;->getDelayForDisconnect(Lcom/android/incallui/Call;I)I

    move-result v1

    goto :goto_1

    :cond_1
    [COLOR="Red"]const/16 v2, 0x1194[/COLOR]
    [COLOR="Blue"]const/16 v2, 0x0[/COLOR]

    goto :goto_1
Guide for adjustable delay with customsettings toggle.
smali\com\android\incallui\CallList.smali
Replace the code in RED with the code in BLUE, increase .locals by 3
Note: If you only have one occurrence of the 0x1194 in your smali, you only need to add the toggle code once to replace that single line.
If the toggle does not work, try changing the move-result at the end of the toggle code from v1 to v2 and vice versa.
Code:
.method private getDelayForDisconnect(Lcom/android/incallui/Call;)I
    [COLOR="Blue"].locals 7
[/COLOR].

.
.
.
    if-eqz v2, :cond_1

    [COLOR="Red"]const/16 v2, 0x1194[/COLOR]

    [COLOR="Blue"]invoke-static {}, Lcom/android/incallui/InCallApp;->getInstance()Lcom/android/incallui/InCallApp;

    move-result-object v4

    invoke-virtual {v4}, Lcom/android/incallui/InCallApp;->getApplicationContext()Landroid/content/Context;

    move-result-object v4

    invoke-virtual {v4}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v4

    const-string v5, "db_call_delay"

    const/16 v6, 0x1f4

    invoke-static {v4, v5, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v2
[/COLOR]
    invoke-static {p1, v2}, Lcom/android/incallui/operator/usa/InCallUIExtension;->getDelayForDisconnect(Lcom/android/incallui/Call;I)I

    move-result v1

    goto :goto_1

    :cond_1
    [COLOR="Red"]const/16 v2, 0x1194[/COLOR]

   [COLOR="Blue"] invoke-static {}, Lcom/android/incallui/InCallApp;->getInstance()Lcom/android/incallui/InCallApp;

    move-result-object v4

    invoke-virtual {v4}, Lcom/android/incallui/InCallApp;->getApplicationContext()Landroid/content/Context;

    move-result-object v4

    invoke-virtual {v4}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v4

    const-string v5, "db_call_delay"

    const/16 v6, 0x1f4

    invoke-static {v4, v5, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v1[/COLOR]

    goto :goto_1
CustomSettings.apk toggle edits:
res\xml\preferences.xml
New line:
Code:
<ListPreference android:entries="@array/call_delay_entries" android:title="End Call Delay" android:key="db_call_delay" android:summary="%s" android:defaultValue="5000" android:dialogTitle="End Call Delay (ms)" android:positiveButtonText="Save" android:negativeButtonText="Cancel" android:entryValues="@array/call_delay_values" />
\res\values\arrays.xml
Add new array to bottom before </resources>
Code:
    [COLOR="Blue"]<string-array name="call_delay_entries">
        <item>No delay</item>
        <item>1000ms</item>
        <item>2500ms</item>
        <item>Default (5000ms)</item>
    </string-array>
    <string-array name="call_delay_values">
        <item>0</item>
        <item>1000</item>
        <item>2500</item>
        <item>5000</item>
    </string-array>
[/COLOR]</resources>
__________________________________________________
[Guide How-to] Colorize InCall Dialpad Android L
This will allow you to provide custom colors to the InCall dialpad.
LegacyInCallUI.apk smali edit:
\smali\com\android\incallui\dialpad\DialpadView.smali
Add new line in BLUE
Code:
.field private mRippleColor:Landroid/content/res/ColorStateList;

[COLOR="Blue"].field private mToggleTextColor:I
[/COLOR]
.field private mTranslateDistance:I
Add changes in BLUE
Note that we are increasing the locals value by 1, find your public ID's in RED to find proper ID in the smali for placement
Make certain the value highlighted in GREEN for the invoke matches the checkcast value right before the new lines
Code:
.method private setupKeypad()V
    [COLOR="Blue"].locals 13[/COLOR]
.
.
.
    const v11, 0x7f0f00c5 [COLOR="Red"]## <public type="id" name="dialpad_key_number"[/COLOR] 

    invoke-virtual {v0, v11}, Lcom/android/incallui/dialpad/DialpadKeyButton;->findViewById(I)Landroid/view/View;

    move-result-object v7

    check-cast [COLOR="Green"]v7[/COLOR], Landroid/widget/TextView;

    [COLOR="Blue"]invoke-virtual {p0}, Lcom/android/incallui/dialpad/DialpadView;->setDialpadDigitColor()V

    iget v12, p0, Lcom/android/incallui/dialpad/DialpadView;->mToggleTextColor:I

    invoke-virtual {[COLOR="Green"]v7[/COLOR], v12}, Landroid/widget/TextView;->setTextColor(I)V
[/COLOR]
    const v11, 0x7f0f00c6 [COLOR="Red"]## <public type="id" name="dialpad_key_letters"
[/COLOR]
    invoke-virtual {v0, v11}, Lcom/android/incallui/dialpad/DialpadKeyButton;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast [COLOR="Green"]v4[/COLOR], Landroid/widget/TextView;

    [COLOR="Blue"]invoke-virtual {p0}, Lcom/android/incallui/dialpad/DialpadView;->setDialpadLetterColor()V

    iget v12, p0, Lcom/android/incallui/dialpad/DialpadView;->mToggleTextColor:I

    invoke-virtual {[COLOR="Green"]v4[/COLOR], v12}, Landroid/widget/TextView;->setTextColor(I)V[/COLOR]
Add new methods to the bottom of this same smali:
Code:
.method setDialpadDigitColor()V
    .locals 3

    invoke-virtual {p0}, Lcom/android/incallui/dialpad/DialpadView;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v1, "incall_digit_color"

    const v2, -0x1000000

    invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v0

    iput v0, p0, Lcom/android/incallui/dialpad/DialpadView;->mToggleTextColor:I

    return-void
.end method

.method setDialpadLetterColor()V
    .locals 3

    invoke-virtual {p0}, Lcom/android/incallui/dialpad/DialpadView;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v1, "incall_letter_color"

    const v2, -0x1000000

    invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v0

    iput v0, p0, Lcom/android/incallui/dialpad/DialpadView;->mToggleTextColor:I

    return-void
.end method
CustomSettings edits:
G:\Sync\Android\apktoolsJB\5.0\res\xml\preferences.xml
Code:
<com.ficeto.colorpicker.ColorPickerPreference android:title="Incall dialpad Digits" android:key="incall_digit_color" android:summary="Choose dialpad digit color" />
<com.ficeto.colorpicker.ColorPickerPreference android:title="Incall dialpad Letters" android:key="incall_letter_color" android:summary="Choose dialpad letter color" />
This mod requires an InCallUI restart (easier than a full reboot) so we are going to add one to the existing smali and add a line for doing the restart from customsettings:
Code:
<Preference android:title="Restart InCallUI" android:key="tool#restartincallui" android:summary="Tap to set colors" android:widgetLayout="@layout/round_more_icon" />
CustomSettings.apk smali edit:
\smali\com\ficeto\customsettings\Tools.smali
Note the changes in BLUE
Code:
.method public static dispatch(Landroid/content/Context;[Ljava/lang/String;)V
.
.
.
    :cond_5
    aget-object v0, p1, v2

    const-string v1, "restartsystemui"

    invoke-virtual {v0, v1}, Ljava/lang/String;->contentEquals(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, [COLOR="Blue"]:cond_td
[/COLOR]
    invoke-static {}, Lcom/ficeto/customsettings/Tools;->rebootSystemUi()V

    goto :goto_0

    [COLOR="Blue"]:cond_td
    aget-object v0, p1, v2

    const-string v1, "restartincallui"

    invoke-virtual {v0, v1}, Ljava/lang/String;->contentEquals(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_6

    invoke-static {}, Lcom/ficeto/customsettings/Tools;->rebootInCallUI()V

    goto :goto_0[/COLOR]
Next method edit:
Code:
.method public static dispatch([Ljava/lang/String;)V
.
.
.
    :cond_6
    aget-object v0, p1, v2

    const-string v1, "shell"
    :cond_5
    aget-object v0, p0, v2

    const-string v1, "restartsystemui"

    invoke-virtual {v0, v1}, Ljava/lang/String;->contentEquals(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, [COLOR="Blue"]:cond_td
[/COLOR]
    invoke-static {}, Lcom/ficeto/customsettings/Tools;->rebootSystemUi()V

    goto :goto_0

    [COLOR="Blue"]:cond_td
    aget-object v0, p0, v2

    const-string v1, "restartincallui"

    invoke-virtual {v0, v1}, Ljava/lang/String;->contentEquals(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_6

    invoke-static {}, Lcom/ficeto/customsettings/Tools;->rebootInCallUI()V

    goto :goto_0

[/COLOR]    :cond_6
    aget-object v0, p0, v2

    const-string v1, "shell"
Add new method in BLUE
Code:
.method public static reboot(Landroid/content/Context;)V
    .locals 1
    .param p0    # Landroid/content/Context;

    const-string v0, "now"

    invoke-static {p0, v0}, Lcom/ficeto/customsettings/Tools;->rebootPhone(Landroid/content/Context;Ljava/lang/String;)V

    return-void
.end method

[COLOR="Blue"].method public static rebootInCallUI()V
    .locals 1

    const-string v0, "pkill -TERM -f com.android.incallui"

    invoke-static {v0}, Lcom/ficeto/customsettings/Tools;->shell(Ljava/lang/String;)Ljava/lang/String;

    return-void
.end method[/COLOR]
Lastly for CustomSettings.apk, it will need root access for the reboot incallui to work so verify the existence of the smali/com/stericson folder. If the stericson smali folder is missing, add it from the file attached at the bottom of this post.
__________________________________________________
[Guide How-to] Colorize Lockscreen Pinpad Android L
This will allow you to provide custom colors to the Lockscreen Pinpad.
Digits, letters and key button backgrounds have separate edits.
SystemUI.apk smali edits:
\smali\com\android\keyguard\NumPadKey.smali
Increasing .locals value by 3 and addition new code, changes are in BLUE
NOTE: Make sure the V5 value in the new line for setTextColor matches the value in the surrounding code.
Code:
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    [COLOR="Blue"].locals 11
[/COLOR].
.
.
    check-cast v5, Landroid/widget/TextView;

    iput-object v5, p0, Lcom/android/keyguard/NumPadKey;->mDigitText:Landroid/widget/TextView;

   [COLOR="Blue"] iget-object v8, p0, Lcom/android/keyguard/NumPadKey;->mContext:Landroid/content/Context;
	
    invoke-virtual {v8}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
	
    move-result-object v8

    const-string v9, "keypad_digit_color"

    const/4 v10, -0x1

    invoke-static {v8, v9, v10}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v8
	
    invoke-virtual {v5, v8}, Landroid/widget/TextView;->setTextColor(I)V
[/COLOR]
    iget-object v5, p0, Lcom/android/keyguard/NumPadKey;->mDigitText:Landroid/widget/TextView;

    iget v6, p0, Lcom/android/keyguard/NumPadKey;->mDigit:I

    invoke-static {v6}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    const-string v5, "/system/fonts/SamsungSans-Num4Tv.ttf"

    invoke-static {v5}, Landroid/graphics/Typeface;->createFromFile(Ljava/lang/String;)Landroid/graphics/Typeface;

    move-result-object v4

    iget-object v5, p0, Lcom/android/keyguard/NumPadKey;->mDigitText:Landroid/widget/TextView;

    invoke-virtual {v5, v4}, Landroid/widget/TextView;->setTypeface(Landroid/graphics/Typeface;)V

    sget v5, Lcom/android/keyguard/R$id;->klondike_text:I

    invoke-virtual {p0, v5}, Lcom/android/keyguard/NumPadKey;->findViewById(I)Landroid/view/View;

    move-result-object v5

    check-cast v5, Landroid/widget/TextView;

    iput-object v5, p0, Lcom/android/keyguard/NumPadKey;->mKlondikeText:Landroid/widget/TextView;

    [COLOR="Blue"]iget-object v8, p0, Lcom/android/keyguard/NumPadKey;->mContext:Landroid/content/Context;
	
    invoke-virtual {v8}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v8

    const-string v9, "keypad_letter_color"

    const/4 v10, -0x1

    invoke-static {v8, v9, v10}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v8
	
    invoke-virtual {v5, v8}, Landroid/widget/TextView;->setTextColor(I)V
[/COLOR]
    const-string v5, "/system/fonts/Roboto-Regular.ttf"
\smali\com\android\keyguard\KeyguardPinBasedInputView.smali
Add new/changed code highlighted in BLUE
Code:
.field private mOkButton:Landroid/view/View;

.field protected mPasswordEntry:Lcom/android/keyguard/PasswordTextView;

[COLOR="Blue"].field private mPinpadButtonColor:I
[/COLOR]
Code:
.method protected onFinishInflate()V
    [COLOR="Blue"].locals 4[/COLOR]
.
.
.
[COLOR="Red"]## Find these 11 lines and add the 3 lines of code in [COLOR="Blue"]BLUE[/COLOR] below after [B]EACH[/B] one!
[/COLOR]    iput-object v0, p0, Lcom/android/keyguard/KeyguardPinBasedInputView;->mOkButton:Landroid/view/View;
    iput-object v0, p0, Lcom/android/keyguard/KeyguardPinBasedInputView;->mButton0:Landroid/view/View;
    iput-object v0, p0, Lcom/android/keyguard/KeyguardPinBasedInputView;->mButton1:Landroid/view/View;
    iput-object v0, p0, Lcom/android/keyguard/KeyguardPinBasedInputView;->mButton2:Landroid/view/View;
    iput-object v0, p0, Lcom/android/keyguard/KeyguardPinBasedInputView;->mButton3:Landroid/view/View;
    iput-object v0, p0, Lcom/android/keyguard/KeyguardPinBasedInputView;->mButton4:Landroid/view/View;
    iput-object v0, p0, Lcom/android/keyguard/KeyguardPinBasedInputView;->mButton5:Landroid/view/View;
    iput-object v0, p0, Lcom/android/keyguard/KeyguardPinBasedInputView;->mButton6:Landroid/view/View;
    iput-object v0, p0, Lcom/android/keyguard/KeyguardPinBasedInputView;->mButton7:Landroid/view/View;
    iput-object v0, p0, Lcom/android/keyguard/KeyguardPinBasedInputView;->mButton8:Landroid/view/View;
    iput-object v0, p0, Lcom/android/keyguard/KeyguardPinBasedInputView;->mButton9:Landroid/view/View;

    [COLOR="Blue"]invoke-virtual {p0}, Lcom/android/keyguard/KeyguardPinBasedInputView;->setPinpadButtonColor()V

    iget v3, p0, Lcom/android/keyguard/KeyguardPinBasedInputView;->mPinpadButtonColor:I

    invoke-virtual {v0, v3}, Landroid/view/View;->setBackgroundColor(I)V
[/COLOR]
Same smali add this new method to the bottom.
Code:
.method setPinpadButtonColor()V
    .locals 3

    invoke-virtual {p0}, Lcom/android/keyguard/KeyguardPinBasedInputView;->getContext()Landroid/content/Context;
	
    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
	
    move-result-object v0

    const-string v1, "keypad_button_color"

    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

    iput v0, p0, Lcom/android/keyguard/KeyguardPinBasedInputView;->mPinpadButtonColor:I

    return-void
.end method
CustomSettings entries:
Code:
<com.ficeto.colorpicker.ColorPickerPreference android:title="Lockscreen Pinpad Background" android:key="keypad_button_color" android:summary="Choose pinpad button color" />
<com.ficeto.colorpicker.ColorPickerPreference android:title="Lockscreen Pinpad Digits" android:key="keypad_digit_color" android:summary="Choose pinpad digit color" />
<com.ficeto.colorpicker.ColorPickerPreference android:title="Lockscreen Pinpad Letters" android:key="keypad_letter_color" android:summary="Choose pinpad letter color" />
__________________________________________________
[Guide How-to] Colorize Lockscreen Clock & Date/Time Android L
This will allow you to provide custom colors to the Lockscreen clock, AMPM and date.
Clock, AMPM & Date have separate edits.
SystemUI.apk smali edits:
\smali\com\android\keyguard\sec\SecKeyguardClockSingleView.smali
Add new code in BLUE
Code:
.field protected mSingleTime:Lcom/android/keyguard/sec/SecKeyguardTextClock;

.field private final mUpdateCallback:Lcom/android/keyguard/KeyguardUpdateMonitorCallback;

[COLOR="Blue"].field private mClockTextColor:I

.field private mClockAMPMColor:I

.field private mDateColor:I[/COLOR]
Add new/changed code in BLUE
We are increasing .locals value by 1
Code:
.method protected onFinishInflate()V
    [COLOR="Blue"].locals 3[/COLOR]
.
.
.
    check-cast v0, Lcom/android/keyguard/sec/SecKeyguardTextClock;

    iput-object v0, p0, Lcom/android/keyguard/sec/SecKeyguardClockSingleView;->mSingleTime:Lcom/android/keyguard/sec/SecKeyguardTextClock;

    ## CLOCK COLOR
    [COLOR="Blue"]invoke-virtual {p0}, Lcom/android/keyguard/sec/SecKeyguardClockSingleView;->setClockTextColor()V

    iget v2, p0, Lcom/android/keyguard/sec/SecKeyguardClockSingleView;->mClockTextColor:I

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setTextColor(I)V
[/COLOR]
    sget v0, Lcom/android/keyguard/R$id;->keyguard_single_clock_ampm:I

    invoke-virtual {p0, v0}, Lcom/android/keyguard/sec/SecKeyguardClockSingleView;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/android/keyguard/sec/SecKeyguardTextClock;

    iput-object v0, p0, Lcom/android/keyguard/sec/SecKeyguardClockSingleView;->mSingleAmpmOpen:Lcom/android/keyguard/sec/SecKeyguardTextClock;

    ## AMPM COLOR
    [COLOR="Blue"]invoke-virtual {p0}, Lcom/android/keyguard/sec/SecKeyguardClockSingleView;->setClockAMPMColor()V

    iget v2, p0, Lcom/android/keyguard/sec/SecKeyguardClockSingleView;->mClockAMPMColor:I

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setTextColor(I)V[/COLOR]

    sget v0, Lcom/android/keyguard/R$id;->keyguard_single_clock_ampm_kor:I

    invoke-virtual {p0, v0}, Lcom/android/keyguard/sec/SecKeyguardClockSingleView;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/android/keyguard/sec/SecKeyguardTextClock;

    iput-object v0, p0, Lcom/android/keyguard/sec/SecKeyguardClockSingleView;->mSingleAmpmKor:Lcom/android/keyguard/sec/SecKeyguardTextClock;

    sget v0, Lcom/android/keyguard/R$id;->keyguard_single_clock_date:I

    invoke-virtual {p0, v0}, Lcom/android/keyguard/sec/SecKeyguardClockSingleView;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/android/keyguard/sec/SecKeyguardTextClock;

    iput-object v0, p0, Lcom/android/keyguard/sec/SecKeyguardClockSingleView;->mSingleDate:Lcom/android/keyguard/sec/SecKeyguardTextClock;

    ## DATE COLOR
    [COLOR="Blue"]invoke-virtual {p0}, Lcom/android/keyguard/sec/SecKeyguardClockSingleView;->setDateColor()V

    iget v2, p0, Lcom/android/keyguard/sec/SecKeyguardClockSingleView;->mDateColor:I

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setTextColor(I)V
[/COLOR]
    const-string v0, "/system/fonts/SamsungNeoNum-3T.ttf"
Add new methods to the bottom of this smali:
Code:
.method setClockTextColor()V
    .locals 3

    iget-object v0, p0, Lcom/android/keyguard/sec/SecKeyguardClockSingleView;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
	
	move-result-object v0

    const-string v1, "kg_clock_color"

    const/4 v2, -0x1

    invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v0

    iput v0, p0, Lcom/android/keyguard/sec/SecKeyguardClockSingleView;->mClockTextColor:I

    return-void
.end method

.method setClockAMPMColor()V
    .locals 3

    iget-object v0, p0, Lcom/android/keyguard/sec/SecKeyguardClockSingleView;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
	
	move-result-object v0

    const-string v1, "kg_clock_AMPM_color"

    const/4 v2, -0x1

    invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v0

    iput v0, p0, Lcom/android/keyguard/sec/SecKeyguardClockSingleView;->mClockAMPMColor:I

    return-void
.end method

.method setDateColor()V
    .locals 3

    iget-object v0, p0, Lcom/android/keyguard/sec/SecKeyguardClockSingleView;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
	
	move-result-object v0

    const-string v1, "kg_date_color"

    const/4 v2, -0x1

    invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v0

    iput v0, p0, Lcom/android/keyguard/sec/SecKeyguardClockSingleView;->mDateColor:I

    return-void
.end method
CustomSettings entries.
We will need a SystemUI restart to set the colors (without a reboot) so that line is here as well.
Code:
<com.ficeto.colorpicker.ColorPickerPreference android:title="Lockscreen Clock" android:key="kg_clock_color" android:summary="Choose clock color" />
<com.ficeto.colorpicker.ColorPickerPreference android:title="Lockscreen Clock AMPM" android:key="kg_clock_AMPM_color" android:summary="Choose AMPM color" />
<com.ficeto.colorpicker.ColorPickerPreference android:title="Lockscreen Date" android:key="kg_date_color" android:summary="Choose date color" />
<Preference android:title="Restart SystemUI" android:key="tool#restartsystemui" android:summary="Press to set date and time colors" />
Note:
If SystemUI restart doesn't work, root access is required.
See the bottom of the guide for InCallUI dialpad colors to add stericson folder to CustomSettings
__________________________________________________
[Guide How-to] Enable NFC while screen off & locked Android L
This will allow you to keep NFC enabled while screen is off & locked.
NfcService.apk smali edits:
Note the changes are in BLUE
\smali\com\android\nfc\NfcService.smali
Code:
.method public constructor <init>(Landroid/app/Application;)V
.
.
.
    [COLOR="Red"]const-string v0, "android.intent.action.SCREEN_OFF"
[/COLOR]    [COLOR="Blue"]const-string v0, "android.intent.action.SCREEN_OFFA"
[/COLOR]
    invoke-direct {v3, v0}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    [COLOR="Red"]const-string v0, "android.intent.action.SCREEN_ON"
[/COLOR]    [COLOR="Blue"]const-string v0, "android.intent.action.SCREEN_ONA"
[/COLOR]
    invoke-virtual {v3, v0}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    [COLOR="Red"]const-string v0, "android.intent.action.USER_PRESENT"[/COLOR]
    [COLOR="Blue"]const-string v0, "android.intent.action.USER_PRESENTA"
[/COLOR]
    invoke-virtual {v3, v0}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    [COLOR="Red"]const-string v0, "android.intent.action.USER_SWITCHED"[/COLOR]
    [COLOR="Blue"]const-string v0, "android.intent.action.USER_SWITCHEDA"
[/COLOR]
Same smali
Note the changes are in BLUE
Code:
.method private computeDiscoveryParameters(I)Lcom/android/nfc/NfcDiscoveryParameters;
.
.
.
[COLOR="Red"]    if-lt p1, v2, :cond_8
[/COLOR]
    [COLOR="Blue"]if-lt v2, p1, :cond_8
[/COLOR]
\smali\com\android\nfc\ScreenStateHelper.smali
Make the indicated changes in BLUE
Code:
.method checkScreenState()I
    .locals 1

    iget-object v0, p0, Lcom/android/nfc/ScreenStateHelper;->mPowerManager:Landroid/os/PowerManager;

    invoke-virtual {v0}, Landroid/os/PowerManager;->isScreenOn()Z

    move-result v0

    if-nez v0, :cond_0

    [COLOR="Blue"]const/4 v0, 0x3
[/COLOR]
    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lcom/android/nfc/ScreenStateHelper;->mKeyguardManager:Landroid/app/KeyguardManager;

    invoke-virtual {v0}, Landroid/app/KeyguardManager;->isKeyguardLocked()Z

    move-result v0

    if-eqz v0, :cond_1

    [COLOR="Blue"]const/4 v0, 0x3
[/COLOR]
    goto :goto_0

    :cond_1
    const/4 v0, 0x3

    goto :goto_0
.end method
__________________________________________________
[Guide How-to] Enable Mokee Listview Animations Android L
This will allow you to enable Listview Animations effects.
This was a pretty large guide so it has been given a dedicated thread here --> [Guide] Listview Animations for Lollipop


Credits @remuntada78 for helping with the color mods
Credits @talkingmonkeys for helping with the CustomSettings root access issue
Credits @XlAfbk for the NFC lollipop edits
 

Attachments

  • CustomSettings_smali_for_root.files.zip
    72.1 KB · Views: 1,661
Last edited by a moderator:

tdunham

Inactive Recognized Contributor
Jun 21, 2008
13,686
36,465
TampaBay
[Guide How-to] Replace Carrier in Dropdown Shade with Custom Text
This is a simple edit allowing you to change the Carrier Label in the dropdown.
SystemUI.apk smali edit:
smali/com/android/systemui/statusbar/policy/NetworkController.smali
Search for method:
.method refreshViews()V
Then search within that method for the THIRD occurrence of:
Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

Add this code in BLUE right above the invoke-virtual line.
Change the 'your_custom_text' to what you want to display.
Code:
    check-cast v15, Landroid/widget/TextView;

    [COLOR="Blue"]const-string v13, "your_custom_text"[/COLOR]

    invoke-virtual {v15, v13}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    add-int/lit8 v10, v10, 0x1

    goto :goto_13

    :cond_3c
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/android/systemui/statusbar/policy/NetworkController;->mATTMobileLabelViews:Ljava/util/ArrayList;
__________________________________________________

[Guide How-to] 360 Degree Rotation mod (with a toggle in mind)
I know there is a bools edit for this but this is the smali way so you can add a toggle.
android.policy.jar smali edit:
smali/com/android/internal/policy/impl/PhoneWindowManager.smali
Make the following change in BLUE, eqz to nez
Code:
    iget v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mAllowAllRotations:I

    if-gez v2, :cond_20

    iget-object v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v5, 0x111001f

    invoke-virtual {v2, v5}, Landroid/content/res/Resources;->getBoolean(I)Z

    move-result v2

    if-[COLOR="Blue"]nez[/COLOR] v2, :cond_1f

    move v0, v3

    :cond_1f
    iput v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mAllowAllRotations:I

    :cond_20
    if-ne v1, v6, :cond_21

    iget v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mAllowAllRotations:I
__________________________________________________

[Guide How-to] Enable onscreen Navigation Bar (with a toggle in mind)
Change the v8 value in the construct to match surrounding code if necessary.
I know there is a bools edit for this but this is the smali way so you can add a toggle.
android.policy.jar smali edit:
smali/com/android/internal/policy/impl/PhoneWindowManager.smali
Add the new line in BLUE
Code:
    iput-boolean v8, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mNavigationBarCanMove:Z

    const v8, 0x1110048

    invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getBoolean(I)Z

    move-result v8

    move-object/from16 v0, p0

   [COLOR="Blue"] const/4 v8, 0x1
[/COLOR]
    iput-boolean v8, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHasNavigationBar:Z

    const-string v8, "qemu.hw.mainkeys"
__________________________________________________

[Guide How-to] Remove Wireless Charging Popup Android L Added
This smali edit will allow you to remove the Wireless Charging Popup.
SystemUI.apk smali edit:
smali/com/android/systemui/power/PowerUI$1.smali
Search for the text highlighted in GREEN and delete all three occurrences. There are three total.
Code:
    invoke-virtual/range {v25 .. v26}, Lcom/android/systemui/power/PowerUI;->[COLOR="Green"]showWirelessChargingNotice[/COLOR](I)V
Android L SystemUI smali edits:
\smali\com\android\systemui\power\PowerNotificationWarnings.smali
Add new code in BLUE:
(I think just removing all of the code between .locals and return-void will work as well. Just leave in .locals and return-void.)
Code:
.method public showWirelessChargingNotice()V
    .locals 4

    const/4 v0, 0x0

    const/4 v1, 0x1

    iget-object v2, p0, Lcom/android/systemui/power/PowerNotificationWarnings;->mContext:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v2

    [COLOR="Blue"]goto :goto_td
[/COLOR]
    const-string v3, "SHOULD_SHUT_DOWN"

    invoke-static {v2, v3, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v2

    if-ne v1, v2, :cond_0

    move v0, v1

    :cond_0
    if-eqz v0, :cond_1

    const-string v1, "PowerUI.Notification"

    const-string v2, "don\'t show wireless charging popup while Shutdown is ON"

    invoke-static {v1, v2}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I

    :goto_0
    return-void

    :cond_1
    sget-boolean v2, Lcom/android/systemui/power/PowerUI;->mFTAMode:Z

    if-eqz v2, :cond_2

    const-string v1, "PowerUI.Notification"

    const-string v2, "FTA Mode is ON and don\'t show wireless charging popup"

    invoke-static {v1, v2}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_0

    :cond_2
    iput-boolean v1, p0, Lcom/android/systemui/power/PowerNotificationWarnings;->mWirelessCharger:Z

    invoke-direct {p0}, Lcom/android/systemui/power/PowerNotificationWarnings;->updateNotificationSEC()V

    invoke-virtual {p0}, Lcom/android/systemui/power/PowerNotificationWarnings;->turnOnScreen()V

    goto :goto_0

    [COLOR="Blue"]:goto_td
[/COLOR]
    return-void
.end method
Wireless%20Charging%201.png
__________________________________________________

[Guide How-to] Remove Network Restriction/Toddler Mode Popup
This smali guide will allow you to remove the Toddler Mode confirmation popup.
SystemUI.apk smali edit:
smali/com/android/systemui/statusbar/policy/quicksetting/ToddlerModeQuickSettingButton.smali
.method private showConfirmPopup(Z)V
Add the new code in BLUE
Code:
    const/16 v3, 0x7d9

    invoke-virtual {v2, v3}, Landroid/view/Window;->setType(I)V

    :goto_1
    [COLOR="Blue"]new-instance v7, Lcom/android/systemui/statusbar/policy/quicksetting/ToddlerModeQuickSettingButton$3;

    invoke-direct {v7, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/ToddlerModeQuickSettingButton$3;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/ToddlerModeQuickSettingButton;)V

    iget-object v2, p0, Lcom/android/systemui/statusbar/policy/quicksetting/ToddlerModeQuickSettingButton;->mAlertDialog:Landroid/app/AlertDialog;

    invoke-virtual {v7, v2, v8}, Lcom/android/systemui/statusbar/policy/quicksetting/ToddlerModeQuickSettingButton$3;->onClick(Landroid/content/DialogInterface;I)V

    return-void[/COLOR]

    iget-object v2, p0, Lcom/android/systemui/statusbar/policy/quicksetting/ToddlerModeQuickSettingButton;->mAlertDialog:Landroid/app/AlertDialog;

    invoke-virtual {v2}, Landroid/app/Dialog;->show()V

    return-void
Toddler_mode.png
__________________________________________________

[Guide How-to] Remove WiFi Hotspot confirmation popup
This allows you to remove the WiFi Hotspot confirmation popup.
SystemUI.apk smali edit:
smali/com/android/systemui/statusbar/policy/quicksetting/WiFiHotspotQuickSettingButton.smali
.method private showWarningDialog(Z)V
Add new code in BLUE
Code:
    const/16 v3, 0x7d9

    invoke-virtual {v2, v3}, Landroid/view/Window;->setType(I)V

    :goto_1
    [COLOR="Blue"]new-instance v7, Lcom/android/systemui/statusbar/policy/quicksetting/WiFiHotspotQuickSettingButton$7;

    invoke-direct {v7, p0, p1}, Lcom/android/systemui/statusbar/policy/quicksetting/WiFiHotspotQuickSettingButton$7;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/WiFiHotspotQuickSettingButton;Z)V

    const v5, 0x0

    invoke-virtual {v7, v5, v8}, Lcom/android/systemui/statusbar/policy/quicksetting/WiFiHotspotQuickSettingButton$7;->onClick(Landroid/content/DialogInterface;I)V

    return-void[/COLOR]

    iget-object v2, p0, Lcom/android/systemui/statusbar/policy/quicksetting/WiFiHotspotQuickSettingButton;->mAlertDialog:Landroid/app/AlertDialog;

    invoke-virtual {v2}, Landroid/app/Dialog;->show()V

    goto :goto_0

    :cond_1
WIFI_HOTSPOT.png
__________________________________________________

[Guide How-to] Display true 1x/3G Signal
This guide is specific to SPRINT builds. It may be possible to adapt for other carriers.
SystemUI.apk smali edit:
smali/com/android/systemui/statusbar/policy/NetworkController.smali
Search for first occurrence of updateSPRDataNetType and make change indicated in BLUE
Code:
    :pswitch_4
    invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/NetworkController;->[COLOR="Blue"]updateVZWDataNetType[/COLOR]()V
The rest of the changes are in the following method
.method private final updateVZWDataNetType()V
Find ALL occurrences of DATA_3G in the method and change to DATA_3G_SPR (in the above method only)
Example:
Code:
    sget-object v0, Lcom/android/systemui/statusbar/policy/TelephonyIcons;->[COLOR="Blue"]DATA_3G_SPR[/COLOR]:[[I
Find DATA_4G_LTE and change to DATA_LTE_SPR.
There is only one.
Code:
    :pswitch_9
    sget-object v0, Lcom/android/systemui/statusbar/policy/TelephonyIcons;->[COLOR="Blue"]DATA_LTE_SPR[/COLOR]:[[I
Find the FIRST :pswitch occurrence with mShowAtLeastThreeGees in the method and change the nez to eqz. Change is indicated in BLUE
Code:
    :pswitch_6
    iget-boolean v0, p0, Lcom/android/systemui/statusbar/policy/NetworkController;->mShowAtLeastThreeGees:Z

   [COLOR="Blue"] if-eqz[/COLOR] v0, :cond_4

    sget-object v0, Lcom/android/systemui/statusbar/policy/TelephonyIcons;->DATA_1X:[[I
1X_3G_1.png
. .
1X_3G_2.png
__________________________________________________
[Guide How-to] Enable App Ops Permissions Menu
This will allow you to enable the hidden applications permissions area.
SecSettings.apk xml edits:

New Line in both xml files for where the icon will appear in the menus
SecSettings\res\xml\settings_headers.xml
SecSettings\res\xml\grid_settings_headers.xml
Code:
    <header android:icon="@drawable/ic_setting_grid_applicationpermissions" android:id="@id/appops_settings" android:title="@string/app_ops_settings" android:fragment="com.android.settings.applications.AppOpsSummary" />
res/values/ids.xml
New line
Code:
    <item type="id" name="appops_settings">false</item>
Optional Edit to change Display Name
res/values/strings.xml
Before:
Code:
    <string name="app_ops_settings">App ops</string>
After:
Code:
    <string name="app_ops_settings">Permissions manager</string>
Screenshots represent a custom rom, your icon will be a bit different as well:

App_ops1.png
. .
App_ops2.png
__________________________________________________
[Guide How-to] Enable Lockscreen Widgets
This will allow you to enable the lockscreen widgets that were disabled on the Galaxy S5.
Keyguard.apk smali edits:
\smali\com\android\keyguard\sec\KeyguardProperties.smali
Change the 0x0 value to 0x1 as noted in BLUE
Code:
.method public static isPreviousLook()Z
    .locals 5

    const/4 v1, 0x1

    const/4 v2, [COLOR="Blue"]0x1
[/COLOR]
    const-string v3, "americano"
\smali\com\android\keyguard\KeyguardHostView.smali
Add new line in BLUE
The v5 construct value must match the surrounding code.
Code:
    const-string v8, "kg_multiple_lockscreen"

    invoke-static {v5, v8, v6, v12}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I

    move-result v5

    [COLOR="Blue"]const v5, 0x1[/COLOR] [COLOR="Red"]## Add Toggle here[/COLOR]

    if-ne v5, v6, :cond_c

    move v5, v6
Add new line in blue
The v0 construct value must match the surrounding code.
Code:
    invoke-virtual {v0}, Lcom/android/internal/widget/LockPatternUtils;->isSecure()Z

    move-result v0

    [COLOR="Blue"]const v0, 0x0[/COLOR]

    if-nez v0, :cond_1

    if-ne v3, v1, :cond_3

    invoke-direct {p0}, Lcom/android/keyguard/KeyguardHostView;->cameraDisabledByDpm()Z
Add new line in blue
The v0 construct value must match the surrounding code.
Code:
    iget-object v0, p0, Lcom/android/keyguard/KeyguardHostView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;

    invoke-virtual {v0}, Lcom/android/internal/widget/LockPatternUtils;->isSecure()Z

    move-result v0

    [COLOR="Blue"]const v0, 0x0
[/COLOR]
    if-eqz v0, :cond_2

    :cond_0
    const/4 v0, 0x0

    invoke-direct {p0, v0}, Lcom/android/keyguard/KeyguardHostView;->addDefaultStatusWidget(I)V
Add new line in blue
The v3 construct value must match the surrounding code.
Code:
    iget-object v3, p0, Lcom/android/keyguard/KeyguardHostView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;

    invoke-virtual {v3}, Lcom/android/internal/widget/LockPatternUtils;->isSecure()Z

    move-result v3

   [COLOR="Blue"] const v3, 0x0
[/COLOR]
    invoke-virtual {v0, v3}, Lcom/android/keyguard/SlidingChallengeLayout;->setIsSecured(Z)V
Add new line in blue
The v3 construct value must match the surrounding code.
(this is a second identical change just like the one above, it is just a few lines below the previous one)
Code:
    iget-object v3, p0, Lcom/android/keyguard/KeyguardHostView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;

    invoke-virtual {v3}, Lcom/android/internal/widget/LockPatternUtils;->isSecure()Z

    move-result v3

   [COLOR="Blue"] const v3, 0x0
[/COLOR]
    invoke-virtual {v0, v3}, Lcom/android/keyguard/MultiPaneChallengeLayout;->setIsSecured(Z)V
\smali\com\android\keyguard\KeyguardWidgetPager.smali
Add new line in BLUE
The v0 construct value must match the surrounding code.
Code:
    const-string v3, "kg_multiple_lockscreen"

    invoke-static {v0, v3, v1, v4}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I

    move-result v0

    [COLOR="Blue"]const v0, 0x1[/COLOR] [COLOR="Red"]## Add Toggle here[/COLOR]

    if-ne v0, v1, :cond_3

    :goto_2
Change the 0x1 value to 0x0 as noted in BLUE
Code:
.method public onPageSwitched(Landroid/view/View;I)V
.
.
.
    :cond_0
    if-eqz p1, :cond_1

    invoke-static {p1}, Lcom/android/keyguard/KeyguardWidgetPager;->findClockInHierarchy(Landroid/view/View;)I

    move-result v6

    const/4 v7, 0x3

    if-ne v6, v7, :cond_1

    const/4 v4, [COLOR="Blue"]0x0[/COLOR] 

    :cond_1
    if-eqz v4, :cond_6

    invoke-virtual {p0}, Landroid/view/View;->getSystemUiVisibility()I

    move-result v6

    const/high16 v7, 0x80

    or-int/2addr v6, v7
Find all three occurrences of isSecure and add the new line in BLUE making certain that the v register matches surrounding code.
Code:
    invoke-virtual {v1}, Lcom/android/internal/widget/LockPatternUtils;->isSecure()Z

    move-result v1

    [COLOR="Blue"]const v1, 0x0[/COLOR]

    if-eqz v1, :cond_2
Code:
    invoke-virtual {v3}, Lcom/android/internal/widget/LockPatternUtils;->isSecure()Z

    move-result v3

    [COLOR="Blue"]const v3, 0x0[/COLOR]

    if-eqz v3, :cond_2
Code:
    invoke-virtual {v1}, Lcom/android/internal/widget/LockPatternUtils;->isSecure()Z

    move-result v1

    [COLOR="Blue"]const v1, 0x0
[/COLOR]
    if-eqz v1, :cond_2
\smali\com\android\keyguard\KeyguardActivityLauncher.smali
Change the 0x2 to 0x3 indicated in BLUE
Code:
.method public launchWidgetPicker(I)V
    .locals 7

    const/4 v4, 0x0

    const/4 v3, [COLOR="Blue"]0x3
[/COLOR]
    const/4 v2, 0x0

    new-instance v1, Landroid/content/Intent;

    const-string v0, "android.appwidget.action.KEYGUARD_APPWIDGET_PICK"
__________________________________________________
[Guide How-to] Enable Custom Home Button Functions
This will allow you to set custom Home Button functions on the Galaxy S5.
android.policy.jar smali edits:
First, let's enable the Home DoubleTap and TripleTap features:
smali\com\android\internal\policy\impl\sec\SamsungPhoneWindowManager.smali
Find the method, change the value indicated in BLUE from 0x0 to 0x1:
(Yes, I know DoubleTap is already enabled, but this will also prevent DoubleTap from being disabled by the toggle in Svoice. The method edit is optional I suppose but I got tired of users disabling it accidentally.)
Code:
.method public isDoubleTapOnHomeEnabled()Z
    .locals 1

    iget v0, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mDoubleTapOnHomeBehavior:I

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    [COLOR="Blue"]const/4 v0, 0x1
[/COLOR]
    goto :goto_0
.end method
A little further down in the same smali, find the method for isTripleTapOnHomeEnabled and REPLACE the entire method with this one:
Code:
.method public isTripleTapOnHomeEnabled()Z
    .locals 1

    iget v0, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mTripleTapOnHomeBehavior:I

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method
Now we're moving on to the actual functions for Home button in PhoneWindowManager.smali.
First, I will list all functions we can use and then where in the smali to make line replacements:
Voice Command
invoke-virtual {v0}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->launchVoiceCommand()V

Recent Apps
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->toggleRecentApps()V

Screenshot
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->takeScreenshot()V

Flashlight
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->toggleTorch()V

PhoneWindowManager.smali edits
\smali\com\android\internal\policy\impl\PhoneWindowManager.smali
Add this new method to enable Flashlight function. I added mine right above
.method private updateEasyOneHandState(ZZ)V
Code:
.method private toggleTorch()V
    .locals 5

    const/4 v2, 0x0

    const/4 v1, 0x0

    const/4 v0, 0x2

    iget v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mFlashlight:I

    add-int/lit8 v3, v3, 0x1

    iput v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mFlashlight:I

    iget v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mFlashlight:I

    rem-int/lit8 v3, v3, 0x2

    iput v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mFlashlight:I

    iget v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mFlashlight:I

    const/4 v4, 0x1

    if-ne v3, v4, :cond_0

    const-string v1, "com.sec.samsung.torchwidget.torch_on_3"

    const/4 v0, 0x1

    :goto_0

    new-instance v2, Landroid/content/Intent;

    invoke-direct {v2, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    iget-object v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;

    invoke-virtual {v3, v2}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V

    return-void

    :cond_0
    const-string v1, "com.sec.samsung.torchwidget.torch_off"

    goto :goto_0
.end method
Important Note:
DO NOT make the changes indicated in GREEN when using Flashlight or Screenshot. This will disable them from activating from the lockscreen.
In the indicated method(s), add the new code indicated in GREEN (exception is for Flashlight and Screenshot, see the note right above this one) and BLUE and replace the entire line indicated in RED with one of the lines shown above.
Home DoubleTap Function
Code:
.method private handleDoubleTapOnHome()V
    [COLOR="Green"].locals 3[/COLOR]
.
.
.
.
[COLOR="Green"]    iget-boolean v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

    if-nez v2, :cond_td[/COLOR]

    [COLOR="Red"]invoke-virtual {v0}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->launchVoiceCommand()V
[/COLOR]
    [COLOR="Green"]:cond_td[/COLOR]
    goto :goto_0
.end method
Home TripleTap Function
Code:
.method private handleTripleTapOnHome()V
    [COLOR="Green"].locals 3[/COLOR]
.
.
.
.
    const-string v1, "Home tripleTap : DeviceProvisioned"

    invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSPWM:Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;

[COLOR="Green"]    iget-boolean v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

    if-nez v2, :cond_td2
[/COLOR]    [COLOR="Red"]invoke-virtual {v0}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->sendBroadcastForAccessibility()V[/COLOR]

[COLOR="Green"]    :cond_td2
[/COLOR]    :goto_0
    return-void

    :cond_0
    const-string v0, "WindowManager"

    const-string v1, "Home tripleTap : notDeviceProvisioned"

    invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSPWM:Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;

    invoke-virtual {v0}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->callAccessibilityTalkbackMode()V

    goto :goto_0
.end method
Home Longpress Function
Code:
.method private handleLongPressOnHome()V
    [COLOR="Green"].locals 8[/COLOR]
.
.
.
.
    iget v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mLongPressOnHomeBehavior:I

    [COLOR="Blue"]if-ne v3, v6, :cond_td3
[/COLOR]
    invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->toggleRecentApps()V

    goto :goto_0

    :catch_0
    move-exception v1

    const-string v3, "WindowManager"

    const-string v4, "RemoteException from getTelephonyService()"

    invoke-static {v3, v4, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_1

    [COLOR="Blue"]:cond_td3
[/COLOR]    iget v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mLongPressOnHomeBehavior:I

    const/4 v4, 0x2

    if-ne v3, v4, :cond_0

    const v3, 0x1

[COLOR="Green"]    iget-boolean v7, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

    if-nez v7, :cond_td4[/COLOR]

   [COLOR="Red"] invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->launchAssistAction()V
[/COLOR]
    [COLOR="Green"]:cond_td4[/COLOR]
    goto :goto_0
.end method
__________________________________________________
[Guide How-to] Disable Increasing Ringer Android L
This will allow you to disable the increasing ringtone.
Telecom.apk smali edit:
smali\com\android\server\telecom\secutils\SecAsyncRingtonePlayer.smali
Delete the line in RED.
Code:
.method static synthetic access$000(Lcom/android/server/telecom/secutils/SecAsyncRingtonePlayer;Landroid/net/Uri;)V
.
.
.
    const-string v0, "mHandler: getStreamVolume - "

    new-array v1, v5, [Ljava/lang/Object;

    iget v2, p0, Lcom/android/server/telecom/secutils/SecAsyncRingtonePlayer;->mOriginRingtoneVolume:I

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    aput-object v2, v1, v3

    invoke-static {p0, v0, v1}, Lcom/android/server/telecom/Log;->v(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V

    iget-object v0, p0, Lcom/android/server/telecom/secutils/SecAsyncRingtonePlayer;->mAudioManager:Landroid/media/AudioManager;

    [COLOR="Red"]invoke-virtual {v0, v4, v5, v3}, Landroid/media/AudioManager;->setStreamVolume(III)V[/COLOR]

    iget-object v0, p0, Lcom/android/server/telecom/secutils/SecAsyncRingtonePlayer;->mHandler:Landroid/os/Handler;

    const-wide/16 v2, 0x7d0

    invoke-virtual {v0, v6, v2, v3}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z
 
Last edited:

tdunham

Inactive Recognized Contributor
Jun 21, 2008
13,686
36,465
TampaBay
__________________________________________________
[Guide How-to] Link Notification & Ringer Volume Android 4.4.x & Android L
This will allow you to link Notification and Ringer volume to act as one.
framework.jar 4.4.x smali edit:
smali\android\media\AudioService.smali
Code:
At the very end of the method make the following changes.
[B]Code Before[/B]:
.method public constructor <init>(Landroid/content/Context;)V
.
.
.
    :array_2
    .array-data 0x4
        0x0t 0x0t 0x0t 0x0t
        0x1t 0x0t 0x0t 0x0t
        0x2t 0x0t 0x0t 0x0t
        0x3t 0x0t 0x0t 0x0t
        0x4t 0x0t 0x0t 0x0t
        0x5t 0x0t 0x0t 0x0t
        0x6t 0x0t 0x0t 0x0t
        0x7t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x0t 0x0t
        0x3t 0x0t 0x0t 0x0t
        0x3t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x0t 0x0t
        0x3t 0x0t 0x0t 0x0t
    .end array-data

    :array_3
    .array-data 0x4
        0x0t 0x0t 0x0t 0x0t
        0x1t 0x0t 0x0t 0x0t
        0x2t 0x0t 0x0t 0x0t
        0x3t 0x0t 0x0t 0x0t
        0x4t 0x0t 0x0t 0x0t
        0x2t 0x0t 0x0t 0x0t
        0x6t 0x0t 0x0t 0x0t
        0x7t 0x0t 0x0t 0x0t
        0x3t 0x0t 0x0t 0x0t
        0x3t 0x0t 0x0t 0x0t
        0x3t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x0t 0x0t
        0x3t 0x0t 0x0t 0x0t
    .end array-data
.end method

[B]After[/B]:
Note the new changes in [COLOR="Blue"]BLUE[/COLOR]
Comments added to show what each value controls
    :array_2
    .array-data 0x4
        0x0t 0x0t 0x0t 0x0t  ## STREAM_VOICE_CALL
        0x1t 0x0t 0x0t 0x0t  ## STREAM_SYSTEM
        0x2t 0x0t 0x0t 0x0t  ## STREAM_RING
        0x3t 0x0t 0x0t 0x0t  ## STREAM_MUSIC
        0x4t 0x0t 0x0t 0x0t  ## STREAM_ALARM
        [COLOR="Blue"]0x2t[/COLOR] 0x0t 0x0t 0x0t  ## STREAM_NOTIFICATION
        0x6t 0x0t 0x0t 0x0t  ## STREAM_BLUETOOTH_SCO
        [COLOR="Blue"]0x2t[/COLOR] 0x0t 0x0t 0x0t  ## STREAM_SYSTEM_ENFORCED
        0x0t 0x0t 0x0t 0x0t  ## STREAM_DTMF
        0x3t 0x0t 0x0t 0x0t  ## STREAM_TTS
        0x3t 0x0t 0x0t 0x0t  ## STREAM_FM_RADIO
        0x0t 0x0t 0x0t 0x0t  ## STREAM_VIDEO_CALL
        0x0t 0x0t 0x0t 0x0t  ## STREAM_SEC_COMMUNICATION
        0x3t 0x0t 0x0t 0x0t  ## STREAM_VOICENOTE
    .end array-data

    :array_3
    .array-data 0x4
        0x0t 0x0t 0x0t 0x0t
        0x1t 0x0t 0x0t 0x0t
        0x2t 0x0t 0x0t 0x0t
        0x3t 0x0t 0x0t 0x0t
        0x4t 0x0t 0x0t 0x0t
        0x2t 0x0t 0x0t 0x0t
        0x6t 0x0t 0x0t 0x0t
        [COLOR="Blue"]0x2t[/COLOR] 0x0t 0x0t 0x0t
        0x3t 0x0t 0x0t 0x0t
        0x3t 0x0t 0x0t 0x0t
        0x3t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x0t 0x0t
        0x3t 0x0t 0x0t 0x0t
    .end array-data
.end method

Android L changes:
Code:
[B]framework.jar [COLOR="Red"]5.x[/COLOR] smali edit[/B]:
[B]smali\android\media\AudioService.smali[/B]
At the very end of the method make the following changes.
[B]Before[/B]:
.method public constructor <init>(Landroid/content/Context;)V
.
.
.
    :array_2
    .array-data 4
        0x0
        0x1
        0x2
        0x3
        0x4
        0x5
        0x6
        0x7
        0x0
        0x3
        0x3
        0x0
        0x0
        0x3
    .end array-data

    :array_3
    .array-data 4
        0x3
        0x3
        0x3
        0x3
        0x3
        0x3
        0x3
        0x3
        0x3
        0x3
        0x3
        0x3
        0x3
        0x3
    .end array-data

    :array_4
    .array-data 4
        0x0
        0x1
        0x2
        0x3
        0x4
        0x2
        0x6
        0x7
        0x3
        0x3
        0x3
        0x0
        0x0
        0x3
    .end array-data
.end method

[B]After[/B]: 
Note changes in [COLOR="Blue"]BLUE[/COLOR]:
    :array_2
    .array-data 4
        0x0  ## STREAM_VOICE_CALL
        0x1  ## STREAM_SYSTEM
        0x2  ## STREAM_RING
        0x3  ## STREAM_MUSIC
        0x4  ## STREAM_ALARM
        [COLOR="Blue"]0x2[/COLOR]  ## STREAM_NOTIFICATION
        0x6  ## STREAM_BLUETOOTH_SCO
        [COLOR="Blue"]0x2[/COLOR]  ## STREAM_SYSTEM_ENFORCED
        0x0  ## STREAM_DTMF
        0x3  ## STREAM_TTS
        0x3  ## STREAM_FM_RADIO
        0x0  ## STREAM_VIDEO_CALL
        0x0  ## STREAM_SEC_COMMUNICATION
        0x3  ## STREAM_VOICENOTE
    .end array-data

    :array_3
    .array-data 4
        0x3
        0x3
        0x3
        0x3
        0x3
        0x3
        0x3
        0x3
        0x3
        0x3
        0x3
        0x3
        0x3
        0x3
    .end array-data

    :array_4
    .array-data 4
        0x0
        0x1
        0x2
        0x3
        0x4
        0x2
        0x6
        [COLOR="Blue"]0x2[/COLOR]
        0x3
        0x3
        0x3
        0x0
        0x0
        0x3
    .end array-data
.end method
__________________________________________________
[Guide How-to] Remove Power Saving Notification
This will hide the ongoing Power Saving notification in the pulldown.
SecSettings.apk smali edit:
smali\com\android\settings\powersavingmode\PowerNotiReceiver.smali
Add new code in BLUE to skip to the bottom of the method.
Code:
.method public notificationCreate(Landroid/content/Context;)V
    .locals 11

    [COLOR="Blue"]goto :goto_td[/COLOR]
.
.
.
    [COLOR="Blue"]:goto_td
[/COLOR]    return-void
.end method
__________________________________________________
[Guide How-to] Remove Hotspot Ongoing Notification
This will hide the ongoing Hotspot notification in the pulldown and hide the icon as well.
services.jar smali edit:
smali\com\android\server\connectivity\Tethering.smali
Add the new code in BLUE
Code:
.method private showTetheredVendorNotification(I)V
    .locals 11

    [COLOR="Blue"]goto :goto_td[/COLOR]
.
.
.
    [COLOR="Blue"]:goto_td
    return-void[/COLOR]
.end method
__________________________________________________
[Guide How-to] Back to Kill Mod Lollipop
This will add the long press back to kill.
android.policy.jar smali edits:
ADD NEW SMALI ATTACHED TO THE BOTTOM OF THIS POST INTO:
smali\com\android\internal\policy\impl\

smali\com\android\internal\policy\impl\PhoneWindowManager.smali
Add new code in BLUE
Code:
.field private final mLogDecelerateInterpolator:Lcom/android/internal/policy/impl/LogDecelerateInterpolator;

[COLOR="Blue"].field mLongPressKill:Ljava/lang/Runnable;
[/COLOR]
.field private mLongPressOnHomeBehavior:I
Add new code in BLUE to the end of this method before the return-void:
Code:
.method public constructor <init>()V
.
.
.
    [COLOR="Blue"]new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$LongPressKill;

    invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$LongPressKill;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V

    iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mLongPressKill:Ljava/lang/Runnable;
[/COLOR]
    return-void
.end method
Add new method before
.method private launchAssistAction()V
Code:
.method private BacktoKill()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;->mLongPressKill:Ljava/lang/Runnable;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    return-void
.end method
Add new method before
.method public hasNavigationBar()Z
Code:
.method public handleRightLongPress()V
    .locals 0

    invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->BacktoKill()V

    return-void
.end method
smali\com\android\internal\policy\impl\sec\SamsungPhoneWindowManager.smali
Add new method before
.method public handleWakingUp()V
Code:
.method public handleRightLongPress()V
    .locals 1

    iget-object v0, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mPWM:Lcom/android/internal/policy/impl/PhoneWindowManager;

    invoke-virtual {v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleRightLongPress()V

    return-void
.end method
smali\com\android\internal\policy\impl\multiwindow\MultiPhoneWindowManager.smali
Add new/changed code in BLUE, and also the new code in GREEN above the :cond_td but see the important note below about that value.
Delete the line indicated in RED
Important - Note the value in GREEN in the new code and the entry in GREEN at the bottom that matches it. Your value in the new code must also match this Goto!
Note:
This may look like we're adding a toggle but it is actually using the sql entry for detecting Multiwindows and will disable the back to kill feature when Multiwindows is active to prevent conflict.
Code:
.method public interceptKeyBeforeDispatching(ZIZLandroid/view/WindowManagerPolicy$WindowState;)I
    [COLOR="Blue"].locals 8[/COLOR]
.
.
.
    :cond_2
    if-eqz p1, :cond_5

    iget v3, p0, Lcom/android/internal/policy/impl/multiwindow/MultiPhoneWindowManager;->mEnableMultiWindowUISetting:I

    [COLOR="Red"]if-eqz v3, :cond_4[/COLOR]

    if-ne p2, v4, :cond_3

    if-nez p3, :cond_3

    iget-boolean v3, p0, Lcom/android/internal/policy/impl/multiwindow/MultiPhoneWindowManager;->mIsTrayBarUI:Z

    if-eqz v3, :cond_3

    [COLOR="Blue"]iget-object v5, p0, Lcom/android/internal/policy/impl/multiwindow/MultiPhoneWindowManager;->mContext:Landroid/content/Context;

    invoke-virtual {v5}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v5

    const-string v6, "multi_window_enabled"

    const/4 v7, 0x0

    invoke-static {v5, v6, v7}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v5

    if-nez v5, :cond_td

    iget-object v6, p0, Lcom/android/internal/policy/impl/multiwindow/MultiPhoneWindowManager;->mSPWM:Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;

    invoke-virtual {v6}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->handleRightLongPress()V[/COLOR]

    [COLOR="Green"]goto :goto_0[/COLOR]

    [COLOR="Blue"]:cond_td[/COLOR]

    invoke-virtual {p0, p4}, Lcom/android/internal/policy/impl/multiwindow/MultiPhoneWindowManager;->toggleMultiWindowTray(Landroid/view/WindowManagerPolicy$WindowState;)Z

    move-result v2

    iput-boolean v2, p0, Lcom/android/internal/policy/impl/multiwindow/MultiPhoneWindowManager;->mConsumeBackKeyUp:Z

    const-string v2, "MultiPhoneWindowManager"

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "MultiWindowTrayBar toggle / "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget-boolean v4, p0, Lcom/android/internal/policy/impl/multiwindow/MultiPhoneWindowManager;->mConsumeBackKeyUp:Z

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Landroid/util/Slog;->i(Ljava/lang/String;Ljava/lang/String;)I

    [COLOR="Green"]goto :goto_0[/COLOR]
__________________________________________________
[Guide How-to] Custom Key Mapping for Android L
Remap the capacitive and hardware keys.
Prerequistes:
To make it easier, just add the file attached at the bottom of this post and also the smali's listed below.
All smali edits are in android.policy.jar.
smali\com\android\internal\policy\impl\PhoneWindowManager.smali
Add new method above .method private hideRecentApps(ZZ)V
Code:
.method private hapticFeedback()V
    .locals 4

    iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    const-string v2, "disable_haptic"

    const/4 v3, 0x0

    invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v1

    if-nez v1, :cond_0

    const/4 v1, 0x0

    const/4 v2, 0x0

    const/4 v3, 0x0

    move-object/from16 v0, p0

    invoke-virtual {v0, v1, v2, v3}, Lcom/android/internal/policy/impl/PhoneWindowManager;->performHapticFeedbackLw(Landroid/view/WindowManagerPolicy$WindowState;IZ)Z

    :cond_0
    return-void
.end method
Add new method above .method private updateLockScreenTimeout()V
Code:
.method private toggleTorch()V
    .locals 3

    new-instance v0, Landroid/content/Intent;

    const-string v1, "net.cactii.flash2.TOGGLE_FLASHLIGHT"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    const-string v1, "net.cactii.flash2.EXTRA_DISABLE_NOTIFICATION"

    const/4 v2, 0x1

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;

    invoke-virtual {v1, v0}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V

    return-void
.end method
smali\com\android\internal\policy\impl\sec\SamsungPhoneWindowManager.smali
Add new method above .method public interceptKeyBeforeDispatching(Landroid/view/KeyEvent;)Z
Code:
.method public injectionKeyEventMenu(I)V
    .locals 2

    iget-object v0, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mKeyEventInjectionThread:Ljava/lang/Thread;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mKeyEventInjectionThread:Ljava/lang/Thread;

    invoke-virtual {v0}, Ljava/lang/Thread;->isAlive()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mKeyEventInjectionThread:Ljava/lang/Thread;

    invoke-virtual {v0}, Ljava/lang/Thread;->interrupt()V

    :cond_0
    new-instance v0, Ljava/lang/Thread;

    new-instance v1, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager$9;

    invoke-direct {v1, p0, p1}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager$9;-><init>(Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;I)V

    invoke-direct {v0, v1}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

    iput-object v0, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mKeyEventInjectionThread:Ljava/lang/Thread;

    iget-object v0, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mKeyEventInjectionThread:Ljava/lang/Thread;

    invoke-virtual {v0}, Ljava/lang/Thread;->start()V

    return-void
.end method
Custom Actions:
These are the custom action lines that you can add to the smali in the indicated areas.

Code:
[B]Voicecommand[/B]

    iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSPWM:Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;

    invoke-virtual {v0}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->launchVoiceCommand()V

[B]Recent Apps[/B]

    invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->toggleRecentApps()V

[B]Screenshot[/B]

    invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->takeScreenshot()V


[B]Torch[/B]

    invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->toggleTorch()V


[B]Search[/B]

    invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->launchAssistAction()V


[B]Menu[/B]

    const/16 v1, 0x52

    iget-object v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSPWM:Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;

    invoke-virtual {v2, v1}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->injectionKeyEventMenu(I)V
Left Short Press key mapping

smali\com\android\internal\policy\impl\PhoneWindowManager.smali
Add new lines in BLUE
Make sure the goto value defined in BLUE matches the goto at the bottom of this addition
Code:
.method public interceptKeyBeforeDispatching(Landroid/view/WindowManagerPolicy$WindowState;Landroid/view/KeyEvent;I)J
.
.
.
    invoke-direct/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPreloadRecentApps()V

    const-wide/16 v6, -0x1

    goto/16 :goto_1

    :cond_2d
    [COLOR="Blue"]const v3, 0x1

    move-object/from16 v0, p0

    invoke-direct {v0, v3}, Lcom/android/internal/policy/impl/PhoneWindowManager;->leftShortPress(I)V

    goto :goto_9
[/COLOR]
    invoke-direct/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->toggleRecentApps()V

    goto :goto_9
Add new method above .method public hasNavigationBar()Z
Code:
.method private leftShortPress(I)V
    .locals 3

    # the below lines in GREEN are optional and will disable the feature if the lockscreen is active

    [COLOR="Green"]iget-boolean v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

    if-nez v0, :cond_td[/COLOR]

    [COLOR="Blue"]ADD ACTION LINE(S) HERE!!![/COLOR]

    # the following line in PURPLE will provide haptic feedback for the feature and is optional

    [COLOR="Purple"]invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->hapticFeedback()V[/COLOR]

    [COLOR="Green"]:cond_td[/COLOR]

    return-void
.end method
Left Long Press key mapping

smali\com\android\internal\policy\impl\PhoneWindowManager.smali
Add new method above .method public hasNavigationBar()Z
Code:
.method public handleLeftLongPress()V
    .locals 1

    const v0, 0x1

    invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->leftLongPress(I)V

    return-void
.end method
Add new method above .method public hasNavigationBar()Z
Code:
.method private leftLongPress(I)V
    .locals 3

    # the below lines in GREEN are optional and will disable the feature if the lockscreen is active

    [COLOR="Green"]iget-boolean v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

    if-nez v0, :cond_td[/COLOR]

    [COLOR="Blue"]ADD ACTION LINE(S) HERE!!![/COLOR]

    # the following line in PURPLE will provide haptic feedback for the feature and is optional

    [COLOR="Purple"]invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->hapticFeedback()V[/COLOR]

    [COLOR="Green"]:cond_td[/COLOR]

    return-void
.end method
smali\com\android\internal\policy\impl\sec\SamsungPhoneWindowManager.smali
REPLACE the 4 lines at the bottom of this method in BLUE (the 4 lines right above the last goto)
Code:
.method public handleLongPressOnRecent()V
.
.
.
   :cond_1
    const/4 v2, 0x1

    iput-boolean v2, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mRecentConsumed:Z

    [COLOR="Blue"]iget-object v0, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mPWM:Lcom/android/internal/policy/impl/PhoneWindowManager;

    invoke-virtual {v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleLeftLongPress()V

    const/4 v2, 0x1

    iput-boolean v2, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mRecentConsumed:Z
[/COLOR]
    goto :goto_0
.end method
Home Long Press key mapping

smali\com\android\internal\policy\impl\PhoneWindowManager.smali
Remove the line in RED and replace with the lines in BLUE
Code:
.method private handleLongPressOnHome()V
.
.
.
    :cond_2
    iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mLongPressOnHomeBehavior:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_3

   [COLOR="Red"] invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->launchAssistAction()V
[/COLOR]
    [COLOR="Blue"]const/4 v2, 0x1

    invoke-direct {p0, v2}, Lcom/android/internal/policy/impl/PhoneWindowManager;->HomeLongPress(I)V
[/COLOR]
    goto :goto_0
Add new method above .method public hasNavigationBar()Z
Code:
.method private HomeLongPress(I)V
    .locals 3

    # the below lines in GREEN are optional and will disable the feature if the lockscreen is active

    [COLOR="Green"]iget-boolean v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

    if-nez v0, :cond_td[/COLOR]

    [COLOR="Blue"]ADD ACTION LINE(S) HERE!!![/COLOR]

    # the following line in PURPLE will provide haptic feedback for the feature and is optional

    [COLOR="Purple"]invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->hapticFeedback()V[/COLOR]

    [COLOR="Green"]:cond_td[/COLOR]

    return-void
.end method
Home Double & Tripletap key mapping

smali\com\android\internal\policy\impl\PhoneWindow Manager.smali
Add new methods above .method public hasNavigationBar()Z
Code:
.method public handleDoubleTapOnHome2()V
    .locals 2

    const v0, 0x1

    invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->HomeDoubleTap(I)V

    return-void
.end method

.method public handleTripleTapOnHome()V
    .locals 4

    const v0, 0x1

    invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->HomeTripleTap(I)V

    return-void
.end method
Add new methods above .method public hasNavigationBar()Z
Code:
.method private HomeDoubleTap(I)V
    .locals 3

    # the below lines in GREEN are optional and will disable the feature if the lockscreen is active

    [COLOR="Green"]iget-boolean v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

    if-nez v0, :cond_td[/COLOR]

    [COLOR="Blue"]ADD ACTION LINE(S) HERE!!![/COLOR]

    # the following line in PURPLE will provide haptic feedback for the feature and is optional

    [COLOR="Purple"]invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->hapticFeedback()V[/COLOR]

    [COLOR="Green"]:cond_td[/COLOR]

    return-void
.end method

.method private HomeTripleTap(I)V
    .locals 3

    # the below lines in GREEN are optional and will disable the feature if the lockscreen is active

    [COLOR="Green"]iget-boolean v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

    if-nez v0, :cond_td[/COLOR]

    [COLOR="Blue"]ADD ACTION LINE(S) HERE!!![/COLOR]

    # the following line in PURPLE will provide haptic feedback for the feature and is optional

    [COLOR="Purple"]invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->hapticFeedback()V[/COLOR]

    [COLOR="Green"]:cond_td[/COLOR]


    return-void
.end method
smali\com\android\internal\policy\impl\sec\SamsungPhoneWindowManager.smali
Add new methods above .method public handleHomeKeyInRinging()I
Code:
.method public handleDoubleTapOnHome()V
    .locals 1

    iget-object v0, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mPWM:Lcom/android/internal/policy/impl/PhoneWindowManager;

    invoke-virtual {v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleDoubleTapOnHome2()V

    return-void
.end method

.method public handleTripleTapOnHome()V
    .locals 1

    iget-object v0, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mPWM:Lcom/android/internal/policy/impl/PhoneWindowManager;

    invoke-virtual {v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleTripleTapOnHome()V

    return-void
.end method
Find and replace both of these entire methods.
They aren't located together in the smali.
Code:
.method public isDoubleTapOnHomeEnabled()Z
    .locals 1

    const/4 v0, 0x1

    return v0
.end method

.method public isTripleTapOnHomeEnabled()Z
    .locals 1

    const/4 v0, 0x1

    return v0
.end method
smali\com\android\internal\policy\impl\sec\MultitapKeyManager.smali
Replace the line in RED with the code in BLUE
Code:
.method private handleTripleTapOnHome()V
.
.
.
    const-string v0, "MultitapKeyManager"

    const-string v1, "Home tripleTap : DeviceProvisioned"

    invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    iget-object v0, p0, Lcom/android/internal/policy/impl/sec/MultitapKeyManager;->mSPWM:Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;

    [COLOR="Red"]invoke-virtual {v0}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->sendBroadcastForAccessibility()V
[/COLOR]
    [COLOR="Blue"]invoke-virtual {v0}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->handleTripleTapOnHome()V
[/COLOR]
    :goto_0
    return-void
Replace the line in RED with the code in BLUE
Code:
.method public handleDoubleTapOnHome()V
.
.
.
    :cond_2
    const/4 v1, 0x1

    iput-boolean v1, p0, Lcom/android/internal/policy/impl/sec/MultitapKeyManager;->mHomeConsumed:Z

    iget-object v1, p0, Lcom/android/internal/policy/impl/sec/MultitapKeyManager;->mSPWM:Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;

    [COLOR="Red"]invoke-virtual {v1}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->launchVoiceCommand()V
[/COLOR]
    [COLOR="Blue"]invoke-virtual {v1}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->handleDoubleTapOnHome()V
[/COLOR]
    goto :goto_0
.end method
Power DoubleTap key mapping

smali\com\android\internal\policy\impl\PhoneWindow Manager.smali
Add new method above .method public hasNavigationBar()Z
Code:
.method public handleDoubleTapOnPower()V
    .locals 1

    const v0, 0x1

    invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->PowerDoubleTap(I)V

    return-void
.end method
Add new methods above .method public hasNavigationBar()Z
Code:
.method private PowerDoubleTap(I)V
    .locals 3

    # the below lines in GREEN are optional and will disable the feature if the lockscreen is active

    [COLOR="Green"]iget-boolean v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

    if-nez v0, :cond_td[/COLOR]

    [COLOR="Blue"]ADD ACTION LINE(S) HERE!!![/COLOR]

    # the following line in PURPLE will provide haptic feedback for the feature and is optional

    [COLOR="Purple"]invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->hapticFeedback()V[/COLOR]

    [COLOR="Green"]:cond_td[/COLOR]

    return-void
.end method
smali\com\android\internal\policy\impl\sec\Samsung PhoneWindowManager.smali
Add new method above .method public handleHomeKeyInRinging()I
Code:
.method public handleDoubleTapOnPower()V
    .locals 1

    iget-object p0, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mPWM:Lcom/android/internal/policy/impl/PhoneWindowManager;

    invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleDoubleTapOnPower()V

    return-void
.end method
Replace entire method
Code:
.method public isDoubleTapOnPowerEnabled()Z
    .locals 1

    const/4 v0, 0x1

    return v0
.end method
smali\com\android\internal\policy\impl\sec\MultitapKeyManager.smali Replace the line in RED with the code in BLUE
Code:
.method private handleDoubleTapOnPower()V
.
.
.
    iget-object v0, p0, Lcom/android/internal/policy/impl/sec/MultitapKeyManager;->mSPWM:Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;

   [COLOR="Red"] invoke-virtual {v0}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->callAccessibilityScreenCurtain()V
[/COLOR]
    [COLOR="Blue"]invoke-virtual {v0}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->handleDoubleTapOnPower()V
[/COLOR]
    return-void
.end method
Add screenoff to custom key mapping
 

Attachments

  • Back_to_Kill_smali_v2.zip
    2.9 KB · Views: 1,061
  • key_mapping_file.zip
    129.6 KB · Views: 867
Last edited:

tdunham

Inactive Recognized Contributor
Jun 21, 2008
13,686
36,465
TampaBay
__________________________________________________
[Guide How-to] Remove Last Spoke & Last Message from the InCall Screen with Toggle Android L
This will allow you to remove last spoke and last message from the incall screen.
LegacyInCallUI.apk smali edits:

Remove last spoke item from call card
- static change, no toggle
New or changed lines are in BLUE
\smali\com\android\incallui\callerinfocard\item\LastCallLogItem.smali
Code:
.method protected setItem(Landroid/content/Context;Landroid/net/Uri;Landroid/database/Cursor;Ljava/lang/Object;)V
    [COLOR="blue"].locals 0
    goto :goto_td[/COLOR]
.
.
.
    [COLOR="blue"]:goto_td[/COLOR]
    return-void
.end method


Remove last message item from call card
- static change, no toggle
New or changed lines are in BLUE
\smali\com\android\incallui\callerinfocard\item\MessageItem.smali
Code:
.method protected setItem(Landroid/content/Context;Landroid/net/Uri;Landroid/database/Cursor;Ljava/lang/Object;)V
    [COLOR="blue"].locals 0
    goto :goto_td[/COLOR]
.
.
.
    [COLOR="blue"]:goto_td[/COLOR]
    return-void
.end method

Adding a toggle for the same two items

Remove last spoke item from call card
New or changed lines are in BLUE
\smali\com\android\incallui\callerinfocard\item\LastCallLogItem.smali
Code:
.method protected setItem(Landroid/content/Context;Landroid/net/Uri;Landroid/database/Cursor;Ljava/lang/Object;)V
    [COLOR="Blue"].locals 12

    iget-object v9, p0, Lcom/android/incallui/callerinfocard/item/CallerInfoCardItem;->mContext:Landroid/content/Context;

    invoke-virtual {v9}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v9

    const-string v10, "last_spoke"

    const/4 v11, 0x0

    invoke-static {v9, v10, v11}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v9

    if-nez v9, :cond_td[/COLOR]
.
.
.
    [COLOR="Blue"]:cond_td
[/COLOR]    return-void
.end method
CustomSettings line for the toggle:
Code:
<SwitchPreference android:title="Remove Last spoke" android:key="last_spoke" android:summaryOn="Option will not be shown" android:summaryOff="Option is shown" />
Remove last message item from call card
New or changed lines are in BLUE
\smali\com\android\incallui\callerinfocard\item\MessageItem.smali
Code:
.method protected setItem(Landroid/content/Context;Landroid/net/Uri;Landroid/database/Cursor;Ljava/lang/Object;)V
    [COLOR="Blue"].locals 9

    iget-object v6, p0, Lcom/android/incallui/callerinfocard/item/CallerInfoCardItem;->mContext:Landroid/content/Context;

    invoke-virtual {v6}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v6

    const-string v7, "last_message"

    const/4 v8, 0x0

    invoke-static {v6, v7, v8}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v6

    if-nez v6, :cond_td[/COLOR]
.
.
.
    [COLOR="Blue"]:cond_td
[/COLOR]    return-void
.end method
CustomSettings line for the toggle:
Code:
<SwitchPreference android:title="Remove Last message" android:key="last_message" android:summaryOn="Option will not be shown" android:summaryOff="Option is shown" />
__________________________________________________
[Guide How-to] Remove Sfind/Quickconnect panel properly Android L
This will allow you to remove the sfind/quickconnect panel from the pulldown.
The guide for the toggle for this is located here --> Toggle
SystemUI.apk smali edits:
\smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali
Find the section below. Change the condition number in BLUE as the edit.
Make certain your changed cond number matches the one further on down in the method in GREEN.
(there is no edit for the Green condition, just make sure your condition number matches that one)
Code:
.method private showHideQConnectLayout()V
.
.
.
    iget-boolean v8, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mShowSFinderQConnectView:Z

    if-eqz v8, :cond_5

    iget-object v8, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mQconnectSfinderView:Lcom/android/systemui/statusbar/QconnectSfinderView;

    if-nez v8, [COLOR="Blue"]:cond_5[/COLOR]

    iget-object v8, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mQsQConnectView:Landroid/view/View;

    if-eqz v8, :cond_5
.
.
.
    [COLOR="Green"]:cond_5
    :goto_2
    return-void
[/COLOR]
Credits @daxgirl for this one too :D
__________________________________________________
[Guide How-to] Colorize main dialpad letters & digits Android L
This will allow you to provide custom colors to the main dialers dialpad digits & letters.
SecContacts_Phone_FLAGSHIP_USA.apk smali edits
Your filename may be a little different.
Find the public ID in GREEN to find this area of the smali, new code is in BLUE and the v9 value must match surrounding code in the first edit and the v8 must match in the second edit.
To find the second edit, search for setAccessibilityDelegate, I have highlighted it in GREEN in the edit.
\smali\com\android\dialer\dialpad\a.smali:
Code:
.method protected c(Landroid/view/View;)V
.
.
.
    const v3, 0x[COLOR="Green"]7f0c01e0[/COLOR]  ## type="id" name="dialpad_key_number"

    invoke-virtual {v2, v3}, Lcom/android/dialer/dialpad/DialpadKeyButton;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    move-object v9, v3

    :cond_4
    if-eqz v9, :cond_5

    invoke-virtual {v9, v15}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    [COLOR="Blue"]move-object/from16 v0, p0

    invoke-virtual {v0, v9}, Lcom/android/dialer/dialpad/a;->setDialerDigit(Landroid/widget/TextView;)V
[/COLOR]
    const/4 v3, 0x0

    invoke-virtual {v9, v3}, Landroid/widget/TextView;->setHoverPopupType(I)V
.
.
.
    invoke-virtual {v2, v3}, Lcom/android/dialer/dialpad/DialpadKeyButton;->[COLOR="green"]setAccessibilityDelegate[/COLOR](Landroid/view/View$AccessibilityDelegate;)V

    :cond_6
    if-eqz v8, :cond_7

    aget v3, v10, v7

    invoke-virtual {v13, v3}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v8, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    [COLOR="Blue"]move-object/from16 v0, p0

    invoke-virtual {v0, v8}, Lcom/android/dialer/dialpad/a;->setDialerLetter(Landroid/widget/TextView;)V
[/COLOR]
    sget-object v3, Lcom/android/contacts/ContactsApplication;->m:Landroid/graphics/Typeface;

    invoke-virtual {v8, v3}, Landroid/widget/TextView;->setTypeface(Landroid/graphics/Typeface;)V
Add new methods to the end of this smali:
Code:
.method setDialerDigit(Landroid/widget/TextView;)V
    .locals 3

    invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v1, "main_digit_color"

    const v2, -0x1000000

    invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v0

    invoke-virtual {p1, v0}, Landroid/widget/TextView;->setTextColor(I)V

    return-void
.end method

.method setDialerLetter(Landroid/widget/TextView;)V
    .locals 3

    invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v1, "main_letter_color"

    const v2, -0x1000000

    invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v0

    invoke-virtual {p1, v0}, Landroid/widget/TextView;->setTextColor(I)V

    return-void
.end method
CustomSettings lines:
Code:
<com.ficeto.colorpicker.ColorPickerPreference android:title="Dialpad Digits" android:key="main_digit_color" android:summary="Choose dialpad digit color" />
<com.ficeto.colorpicker.ColorPickerPreference android:title="Dialpad Letters" android:key="main_letter_color" android:summary="Choose dialpad letter color" />
_________________________________________________
[Guide How-to] Multiple InCall backgrounds Android L
This will allow you to have multiple customized InCall backgrounds.
While I really made this for the FullScreen Caller mod, it works fine with stock too. There are all sorts of variations for this but at least this is a starting point.
LegacyInCallUI.apk smali edits:
Search for this public value and make a note of it, we will need it later.
In mine the value is 7f020417, just as shown in the stock code below.
Code:
type="drawable" name="picture_unknown"
\smali\com\android\incallui\CallCardPresenter.smali
Add the new code in BLUE.
Once you add this, go back and make sure the v6 value for the construct matches, all of the v6's in the new code. If it does not, change ALL of the v6's in the NEW code to your value.
Code:
.method public onStateChange(Lcom/android/incallui/InCallPresenter$InCallState;Lcom/android/incallui/CallList;)V
.
.
.
    const v6, 0x7f020417  ## type="drawable" name="picture_unknown" 

    [COLOR="Blue"]invoke-virtual/range {p0 .. p0}, Lcom/android/incallui/CallCardPresenter;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    const-string v2, "incall_background"

    const/4 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_td

    const v2, 0x2

    if-eq v1, v2, :cond_td1

    const v2, 0x3

    if-eq v1, v2, :cond_td2

    const v2, 0x4

    if-eq v1, v2, :cond_td3

    const v2, 0x5

    if-eq v1, v2, :cond_td4

    const v2, 0x6

    if-eq v1, v2, :cond_td5

    const v2, 0x7

    if-eq v1, v2, :cond_td6

    const v2, 0x8

    if-eq v1, v2, :cond_td7

    const v2, 0x9

    if-eq v1, v2, :cond_td8

    const v6, 0x7f020417  ## type="drawable" name="picture_unknown" 

    goto :goto_td

    :cond_td
    const v6, 0x7f0205de  ## type="drawable" name="call_bg_2"

    goto :goto_td

    :cond_td1
    const v6, 0x7f0205df  ## type="drawable" name="call_bg_3"

    goto :goto_td

    :cond_td2
    const v6, 0x7f0205e0  ## type="drawable" name="call_bg_4"

    goto :goto_td

    :cond_td3
    const v6, 0x7f0205e1  ## type="drawable" name="call_bg_5"

    goto :goto_td

    :cond_td4
    const v6, 0x7f0205e2  ## type="drawable" name="call_bg_6"

    goto :goto_td

    :cond_td5
    const v6, 0x7f0205e3  ## type="drawable" name="call_bg_7"

    goto :goto_td

    :cond_td6
    const v6, 0x7f0205e4  ## type="drawable" name="call_bg_8"

    goto :goto_td

    :cond_td7
    const v6, 0x7f0205e5  ## type="drawable" name="call_bg_9"

    goto :goto_td

    :cond_td8
    const v6, 0x7f0205dd  ## type="drawable" name="call_bg_10"

    :goto_td[/COLOR]
\smali\com\android\incallui\ContactInfoCache.smali
Same thing here, search for YOUR public value in the following method, it only occurs once in the method.
Add the new code in BLUE.
Once you add this, go back and make sure the v5 value for the construct matches, all of the v5's in the new code. If it does not, change ALL of the v5's in the NEW code to your value.
Code:
.method private getDefaultPhotoDrawable(Landroid/content/Context;)Landroid/graphics/drawable/Drawable;
    .locals 8

    const v5, 0x7f020417   ## type="drawable" name="picture_unknown" 

    [COLOR="blue"]iget-object v1, p0, Lcom/android/incallui/ContactInfoCache;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    const-string v2, "incall_background"

    const/4 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_td

    const v2, 0x2

    if-eq v1, v2, :cond_td1

    const v2, 0x3

    if-eq v1, v2, :cond_td2

    const v2, 0x4

    if-eq v1, v2, :cond_td3

    const v2, 0x5

    if-eq v1, v2, :cond_td4

    const v2, 0x6

    if-eq v1, v2, :cond_td5

    const v2, 0x7

    if-eq v1, v2, :cond_td6

    const v2, 0x8

    if-eq v1, v2, :cond_td7

    const v2, 0x9

    if-eq v1, v2, :cond_td8

    const v5, 0x7f020417  ## type="drawable" name="picture_unknown" 

    goto :goto_td

    :cond_td
    const v5, 0x7f0205de  ## type="drawable" name="call_bg_2"

    goto :goto_td

    :cond_td1
    const v5, 0x7f0205df  ## type="drawable" name="call_bg_3"

    goto :goto_td

    :cond_td2
    const v5, 0x7f0205e0  ## type="drawable" name="call_bg_4"

    goto :goto_td

    :cond_td3
    const v5, 0x7f0205e1  ## type="drawable" name="call_bg_5"

    goto :goto_td

    :cond_td4
    const v5, 0x7f0205e2  ## type="drawable" name="call_bg_6"

    goto :goto_td

    :cond_td5
    const v5, 0x7f0205e3  ## type="drawable" name="call_bg_7"

    goto :goto_td

    :cond_td6
    const v5, 0x7f0205e4  ## type="drawable" name="call_bg_8"

    goto :goto_td

    :cond_td7
    const v5, 0x7f0205e5  ## type="drawable" name="call_bg_9"

    goto :goto_td

    :cond_td8
    const v5, 0x7f0205dd  ## type="drawable" name="call_bg_10"

    :goto_td
[/COLOR]
From the bottom of this post, download the attached file Multiple_incall_background.default_pic.zip and place the picture_unknown.png into the res/drawable-sw360dp-xxhdpi folder.
This is going to be replacing the stock (if your apk hasn't already had all of the .pkm files converted) picture_unknown.pkm file.
Now go into that folder and find picture_unknown.pkm and delete it so we can use the new .png instead.

We now need to create 9 new backgrounds. Wallpapers work just fine. You can worry about what you will use in the final product later and if they don't display very well, you can deal with that later as well. We are going to make all of these .jpg files. Do NOT use .pngs, if you do it's best just to rename them to .jpg as apktool wont check jpg files; it will just store them.

call_bg_2.jpg
call_bg_3.jpg
call_bg_4.jpg
call_bg_5.jpg
call_bg_6.jpg
call_bg_7.jpg
call_bg_8.jpg
call_bg_9.jpg
call_bg_10.jpg

Place the 9 new files also into the res/drawable-sw360dp-xxhdpi folder.

Important Step:
As you can see in the two new sections above, we have a lot of new public values to deal with. To find these, recompile your newly modified LegacyInCallUI.apk, decompile and open the new res/values/public.xml and search for all the new drawables, beginning with call_bg_2 and go through and match up all these public values in the original code.
Recompile your final apk and let's move on to the customsettings toggle.

Customsettings:
res/values/arrays.xml
Add new lines, before resources. You can rename the items later when you know what the pics will be:
Code:
    [COLOR="Blue"]<string-array name="incall_background_entries">
        <item>Stock</item>
        <item>Custom 1</item>
    	<item>Custom 2</item>
    	<item>Custom 3</item>
    	<item>Custom 4</item>
    	<item>Custom 5</item>
    	<item>Custom 6</item>
    	<item>Custom 7</item>
    	<item>Custom 8</item>
    	<item>Custom 9</item>
    </string-array>
    <string-array name="incall_background_values">
        <item>0</item>
        <item>1</item>
        <item>2</item>
        <item>3</item>
    	<item>4</item>
        <item>5</item>
        <item>6</item>
        <item>7</item>
    	<item>8</item>
        <item>9</item>
    </string-array>
[/COLOR]</resources>
The new line for res/xml/preferences.xml
Code:
<ListPreference android:entries="@array/incall_background_entries" android:title="InCall Backgrounds" android:key="incall_background" android:entryValues="@array/incall_background_values"/>
_________________________________________________
[Guide How-to] Lockscreen Carrier Text Android L
This will allow you to modify the lockscreen carrier text and text color.
SystemUI.apk smali edits:
\smali\com\android\keyguard\CarrierText.smali
Add new code in BLUE
Code:
# instance fields
.field private mCallback:Lcom/android/keyguard/KeyguardUpdateMonitorCallback;

[COLOR="blue"].field private mCarrierColor:I

[/COLOR].field private mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
Add new code in BLUE.
Note the .locals was increased by 3.
Also, make sure the values in ORANGE match in your code.
Code:
.method protected updateCarrierText(Lcom/android/internal/telephony/IccCardConstants$State;Ljava/lang/CharSequence;Ljava/lang/CharSequence;)V
    [COLOR="blue"].locals 6

    iget-object v1, p0, Lcom/android/keyguard/CarrierText;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    const-string v2, "custom_carrier"

    const v3, 0x0

    invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v4

    if-eqz v4, :cond_td

    const-string v5, "custom_carrier_text"

    invoke-static {v1, v5}, Landroid/provider/Settings$System;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;

    move-result-object [COLOR="darkorange"]v0
[/COLOR]
    goto :goto_td

    :cond_td[/COLOR]
.
.
.
    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getText(I)Ljava/lang/CharSequence;

    move-result-object v0

    [COLOR="Blue"]:goto_td[/COLOR]
    invoke-virtual {p0, [COLOR="DarkOrange"]v0[/COLOR]}, Lcom/android/keyguard/CarrierText;->setText(Ljava/lang/CharSequence;)V

    [COLOR="blue"]invoke-virtual {p0}, Lcom/android/keyguard/CarrierText;->updateCarrierTextColor()V

    iget v1, p0, Lcom/android/keyguard/CarrierText;->mCarrierColor:I

    invoke-virtual {p0, v1}, Landroid/widget/TextView;->setTextColor(I)V
[/COLOR]
    return-void

    :cond_1
    invoke-virtual {p0, p1, p2, p3}, Lcom/android/keyguard/CarrierText;->getCarrierTextForSimState(Lcom/android/internal/telephony/IccCardConstants$State;Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v0

    goto :goto_0
.end method
Add new method:
Code:
.method updateCarrierTextColor()V
    .locals 4

    iget-object v1, p0, Lcom/android/keyguard/CarrierText;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    const-string v2, "carrier_color"

    const v3, -0x1

    invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v1

    iput v1, p0, Lcom/android/keyguard/CarrierText;->mCarrierColor:I

    return-void
.end method
CustomSettings lines:
Code:
            <PreferenceScreen android:title="Carrier Text" android:summary="Text options and settings">
                <SwitchPreference android:title="Use Custom Carrier Text" android:key="custom_carrier" android:summaryOn="Enabled" android:summaryOff="Disabled" />
                <EditTextPreference android:title="Carrier Custom Text" android:key="custom_carrier_text" android:summary="Leave BLANK to remove" android:dependency="custom_carrier" android:dialogTitle="Set Custom Text" />
                <com.ficeto.colorpicker.ColorPickerPreference android:title="Carrier Text" android:key="carrier_color" android:summary="Choose carrier color" />
                <Preference android:title="Restart SystemUI" android:key="tool#restartsystemui" android:summary="Press for instant changes" />
            </PreferenceScreen>
Credits @rompnit for this mod
__________________________________________________
[Guide How-to] Add a toggle for StatusBar Ticker Android L
This will allow you to add a toggle to enable/disable the statusbar ticker.
SystemUI.apk smali edits:
\smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali
This is for a standard toggle, it requires a UI restart.
Search for public value that matches the text highlighted in RED, there is only one occurrence. Add the new code in BLUE, making sure the v3 value matches the surrounding code.
Code:
    const v3, 0x7f090025  ## [COLOR="red"]type="bool" name="enable_ticker"[/COLOR]

    move-object/from16 v0, v32

    invoke-virtual {v0, v3}, Landroid/content/res/Resources;->getBoolean(I)Z

    move-result v3
	
    [COLOR="Blue"]move-object/from16 v0, p0

    iget-object v1, v0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    const-string v2, "ticker_toggle"

    const/4 v3, 0x1

    invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v1

    if-eqz v1, :cond_td

    const/4 v3, 0x0

    :cond_td[/COLOR]
	
    move-object/from16 v0, p0

    iput-boolean v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTickerEnabled:Z
Use this instead if you want are using a PhoneStatusBar$SettingsObserver to invoke this new method on changes.
Add new method to bottom of smali.
Code:
.method setTickerToggle()V
    .locals 3

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTickerEnabled:Z

    iget-object v0, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v1, "ticker_toggle"

    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-eqz v0, :cond_td

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTickerEnabled:Z

    :cond_td

    return-void
.end method
CustomSettings lines.
Leave out the UI restart if using the observer method.
Code:
<SwitchPreference android:title="Statusbar Ticker" android:key="ticker_toggle" android:summaryOn="Ticker is hidden" android:summaryOff="Ticker is shown" />
<Preference android:title="Restart SystemUI" android:key="tool#restartsystemui" android:summary="Tap to set ticker toggle" />
 

Attachments

  • Multiple_incall_background.default_pic.zip
    7.7 KB · Views: 878
Last edited:

tdunham

Inactive Recognized Contributor
Jun 21, 2008
13,686
36,465
TampaBay
ALL CURRENT AND NEWER GUIDES ARE PLACED FROM THIS POST AND ON


StatusBar

[Guide] True 1% battery mod for 4.4.2

[Guide][Mod]Change Data and statusbar buttons to any carrier

[MOD][APR 24]Potato Statusbar Gradient

[MOD] 4.4.2 TW Hidden power button

Guide How to remove Carrier Label from Status Bar and Notification Panel

[Guide-Lollipop]Clock center status bar.

[MOD] [GUIDE] Status Bar Network Traffic (Separate In/Out)
Also, see these posts:
http://xdaforums.com/showpost.php?p=59678158&postcount=572
http://xdaforums.com/showpost.php?p=59688168&postcount=577

[Guide] Max Brightness icons in the status bar

[Guide] Center Clock on status bar in Lollipop 5.1.1

[Guide] Statusbar 3 part layout

[Guide] Create Custom breathing/animated notification icons

[Guide] Toggle between 3minit Battery Mod and Stock battery

[MOD][Guide]Toggles for devs to add to Custom Settings [Lollipop]

[Guide] Mod/fix for 5.1.1 status bar overlapping

[Guide] Immersive Mode
- Hide statusbar (fullscreen mode) and navbar

[GUIDE][2.3+]Add real-time CPU info to Statusbar

[MOD][TUT] Merge The WiFi And Signal Icons..Updated!

Mod/fix for status bar displaying on bottom in pulldown Android MM 6.0.x

[Guide] Toggle between 3minit Battery Mod and Stock battery Android Marshmallow 6.0.1

[Guide]Dynamic statusbar android 5.x.x maybe 6.0 (original guide)
[Guide] Dynamic Statusbar Gradient Android MM UPDATE

[Guide] How to colorize status bar icons. Android 6.0.x

[Guide] Signalcluster colors - Wifi, Signalbar, Data (LTE/3G), Notification icons (Volume, Bluetooth, etc)

[Guide] Custom Carrier Label + Color on MM

[Guide] Opaque Status Bar Icons In Marshmallow (Remove Alpha Channel from status bar icons)

[GUIDE] Add Battery Bar to ROM
-- update for Battery Bar v2 positions for "on top" and "down below"

[Guide]How to center clock which disappear on lockscreen

[How-to] Remove the grey status bar when power saving mode is on

[Fix] Statusbar icons too light to read when mms and other apps are open

[Guide] How to hide the multi-user avatar with a toggle MM

[MOD/GUIDE/UPGRADE]Network traffic indicator in status bar (or anywhere else)
[Add-on] Seperated colors for traffic indicator

[Guide] How to color battery percentage on StatusBar

[Guide] How to add open app to statusbar clock

[Guide] How to add open app to statusbar battery percentage

[Guide] How to replace signal strength icon in the dual sim phone. Android 6.0.1

[GUIDE] HOW TO ADD NETWORK TRAFFIC TINT ON LIGHT STATUS BAR

[MOD][GUIDE] Statusbar Weather Text

[MOD][5.0.2][FW 690][DEODEX SYSTEMUI]Dual Line Status Bar and 5 Nav Bar
Additional info for dual statusbar
___________________________________________

Notification Panel & Pulldown

[MOD][Guide]Change Toggles Icon Theme "on the fly"

Add extra toggles on first boot - Instructions page
Final Version is here Credits @daxgirl

Notification Panel Custom Carrier Text Credits @daxgirl
Addendum: Adding color to Notification Panel custom carrier text

[Guide] Multi notification panel custom background & color Credits @remuntada
Note: Lockscreen bug still exists

[Guide] How to add device info to notification panel and lockscreen
- Change text size for device info
- Updated smali for device info color mod
- How to add visibility toggle for Device Info
- How to remove CPU info if it is not displaying properly

[Guide] How to hide ongoing notifications in Lollipop

[Guide] Change toggle buttons background in the notification panel

[Guide] Center Clock + flashing separator + the date at the bottom + lock button

[Guide] Add current state RAM in notification panel or somewhere in SystemUI
- Also see additional guide HERE
[How-to] Color Ram Mod

[Guide] Remove the indents in the notification panel on the left and right

[Guide] Remove the indents in the notification panel on the left and right 5.1.1

[Guide] Adjust vertical gap between notifications

[Guide] StatusBar Expanded Header Custom Color

[Guide] Toggle Color and Toggle Circle Color
- See this post also for alternate observer method


[DEV] [SMALI] A Few Custom Views

[Guide] Cleaning memory in the notification panel

[Guide] How to increase the amount of quickpanel toggles
- Static change no toggle

[Guide] Custom Notification Background Color Android L

[Guide] Custom Notification Background TEXT Color Android L
[Guide] Text color of the low battery notification
[Guide] Color the text notification with Google Play Music
[Guide] How to color the timestamp in notifications

[Guide] Text color of the low battery notification


[Guide] Text color of the low battery notification


[Guide] Text color of the low battery notification


[Guide] Quickpanel Toggles hide text and text color

[Guide] Quickpanel Toggles scrollable toggles view - @remuntada78

[Guide] Quickpanel Toggles scrollable toggles view - @tdunham

[Guide] Brightness Slider background color fix for Lockscreen

[Guide] Sfind Quickconnect custom background color
Also, see this post http://xdaforums.com/showpost.php?p=62482040&postcount=2955

[Guide] Custom Notification Panel Background - lollipop

[Guide] How to toggle Digital or Analog clock in dropdown date
- Addition to How to toggle Digital or Analog clock in dropdown date

Fix for Quick Panel / Toggle background color issue

[Guide]Dynamic Blur on Notification Panel expanded (without effecting lock screen)
- Additional guide [MOD][LP] Dynamic blur - Recents Panel by sys01
- Possible display fix
[Guide] Blur background mod for SPen and Edge screen for Note 5 Roms
[Guide] Mod dynamic blur on app drawer Home app
(Even though they don't belong in this category, keeping the bottom two blur effect guides with the rest so they remain together)


[MOD][GUIDE]Add CPU usage in notification panel
- [Guide] change qconnect/sfinder panel to cpu usage
- [Guide] Change textview color of ram display

[Guide] Coloring the Clock, Date and Icons in expanded Statusbar 5.1.1

[Guide] Memory Cleaner in the notification panel Android 6.0.1

[Guides]StatusBar Expanded Header Custom Color Android Marshmallow 6.0.1
Quick Settings Panel Color Android Marshmallow 6.0.1


[Guides] Notification Panel Color Guides
Expanded header panel bg color
Quick settings panel bg color
Brightness background panel color
Data usage view panel bg color
Quick connect panel bg color
Multi sim panel bg color
Notification Panel background color
With toggle for to apply colors.
Expanded header icon color

[Guide] Colorize StatusBar Expanded Header Clock & Date in real time. Android 6.0.1

[Guide] Disable Ongoing IME Notification

[Guide] Coloring the Clock, Date and Icons in expanded

[Guide] How to transform the permanent non-removable notification into Removable notification
[Guide] Add a toggle for permanent ongoing notifications

[Guide] How to color Quickpanel toggle text, Wifi & Bluetooth connected and Help text on MM

[Guide] Quickpanel Toggle on/off colors for Android MM
[Guide][Addon] Enable animation of toggles if coloring is disabled

[Guide] How to add Multiwindow & Toolbox Toggles back on MM

[Guide] How to color Data Usage text in Expanded view
[Guide] Data_Usage View For Note-4 MM Roms

[Guide] How to toggle Power Saving Mode Ongoing Notification - MM 6.0.1

[Guide] Mod/Guide Custom/Any image background for notification panel
and HERE

[Guide] How to change QuickPanel Toggles scrollable view from 5 to 20 (variable) MM

[Guide] How to color Items of the Notification Panel Header (Clock-Date-Settings-Divider) for MM

[Guide] How to hide Brightness Slider panel for Android MM

[Guide] How to color quickconnect soundpath

[MOD][GUIDE][CUSTOM VIEW] Gear device info in notification panel
[MOD][GUIDE]6htGear Carrier label preferences - as ADDITION to 6thGear device info mod

[Guide] How to remove Charging and Media Connected ongoing notifications - MM

[Guide] 6thGear Data Usage Preferences on the fly without observer and without CSC changes

[Guide] How to add toggle backgrounds for Android MM

[Guide] How to enable background blue for panel - UX

[Fix] Remove that anoying bottom white bar on ui on n7 and UX roms

[MOD/GUIDE][HOW-TO]6thGear change notification bg shape and color
[UPDATE/ADDON/GUIDE] ADD TRANSPARENCY AND TOGGLE CUSTOM COLORS ON/OFF FOR 6THGEAR NOTIFICATION SHAPE&COLOR

[Guide] How to change brightness slider background
Just for reference, a new way to set background color for slider background

[Guide] How to colorize every background on expanded view for "Project Grace"

[MOD/GUIDE]6thGear Brightness panel customization

[GUIDE] How to USE TORCHLIGHT with LOW BATTERYin S5 TW

[GUIDE] How to make BRIGHTNESS available with low battery

[Guide] How to color Screenshot background notification bars in panel

[Guide] How to add open app to pulldown dateview
[GUIDE] How to Add Custom OnClick App to Pull Down Clock and Settings Button

[Guide] Add Touch Sensitivity Toggle On S7Edge SystemUI

[Guide] How to add AOD brightness slider to RomControl
 
Last edited:

tdunham

Inactive Recognized Contributor
Jun 21, 2008
13,686
36,465
TampaBay
Lockscreen

[MOD][GUIDE]Remove cloudy overlay and improve ripple lockscreen - All Samsung Devices
(see my Post #25 for where the smali is located on our device)

[How To] Lockscreen Torchlight Option
Confirmed working for the S5. However, the edit is in res/xml/display_settings_2014.xml.
Screenshots attached.
TORCHLIGHT1.png
. .
TORCHLIGHT2.png

[Guide How-to] KitKat 4.4.2/Android L Music Control - Volume Music Skip
UPDATED for Android L

[MOD][HOW-TO] Quick Unlock on Pin/Password with toggle
I added a KitKat 4.4.2 guide HERE IN POST #54

Guide How To Natively Change Lock Screen Carrier Label Text Verizon S5

[GUIDE][HOW TO] Quick PIN Unlock And Scramble Pad For Lollipop Credits @txr33

[Guide] Change lockscreen clock position in real time Credits @remuntada78

[Guide] How to remove the emergency call button in LOLLIPOP

[Guide] Adding Custom Lockscreen Clock Fonts

[Guide] Extended Weather on the LockScreen
- Visibility toggles for Extended Weather on the LockScreen
- [GUIDE] 5.1.1 Extended weather and next alarm on lockscreen ADD-ON

[Guide] Clock and date centered on the lock screen

[Guide] Next alarm on the lock screen
- Visibility toggle and text color for Next Alarm Mod

[Guide] How to enable Montblanc Ink Effect

[Guide] Random and Static Ink Effect colors
- alternate method [Guide] Random & Static Ink Effect Mod

[Guide] Enable Lockscreen Rotation Lollipop

[Guide] Ambient Display & Ambient Display timeout Toggle
Original Thread - [URL="http://xdaforums.com/google-nexus-5/themes-apps/how-to-add-ambient-display-settings-t2942838"][HOW TO] Add Ambient Display on Settings [Lollipop]
[/URL]
[GUIDE] How to Increase Lockscreen visible notifications in Android 5.x
-- Add a toggle for visible notifications --> HERE
[GUIDE] How to change LOCKSCREEN NOTIFICATION NUMBER on S5 MM 6.0.1

Lockscreen toggles

[Guide] HOW TO SHOW/HIDE ALBUM ART ON LOCK SCREEN 5.0

[Guide] How to enable Album Art on 5.1.1

[Guide] CLOCK WITH REAL NUMBERS IN LOCKSCREEN 5.1.1
- 38 style options for Lockscreen Clock
- Toggle On/Off for Lockscreen Clock w Images 5.0
- Toggle On/Off for Lockscreen Clock w Images 5.1

[Guide] How to Move/Reposition lockscreen notifications

[Guide] HOW TO ADD VIRTUAL LOCK ON TOP-RIGHT IN LOCKSCREEN

[Guide] Center Lockscreen Android 5.1.1

[Guide] How to add Pedometer back to lockscreen 5.1.1

[Guide] Add toggle for lockscreen weather

[Guide] How to remove Phone shortcut from Lockscreen 5.1.1

[Guide] How to Add Missing Phone shortcut to Lockscreen 5.0

[Guide]Toggle For seconds in LockScreen Clock

- Layout addons/fixes for Seconds in Lockscreen
- Color For seconds in LockScreen Clock
- Add Fonts for Seconds Clock

[Guide] How to add lockscreen effects 5.0/4.4


[HOW TO] Add Ambient Display on Settings [Lollipop]
- AMBIENT DISPLAY MARSHMALLOW ONLY

[Guide] Colorize Lockscreen Clock & Date in real time. Android 6.0.1
[How to] inverse font look between Hours and Minutes

[Guide] How to Custom Carrier Label + Color on MM

[Guide] How to remove carrier label on lockscreen for MM

[Guide] Lockscreen Weather for TW MM

[Guide] How to hide clock & date on Lockscreen

[Guide] Lockscreen Timeout Delay - MM

[Guide] How To Colorize Lockscreen Owner Info

[Guide][MOD]Lockscreen Clock Toggle Digital Analog Style with multiple style options for Analog

[Guide]How To Add AmPm On Lockscreen On MM

___________________________________________

Sound & Notifications

[Guide How-to] KitKat 4.4.2/Android L Music Control - Volume Music Skip
UPDATED for Android L

Remove Full Battery notification
Our code is a bit different but the method still works.
Just remove the two lines that contain notifyFullBatteryNotification in the smali.

[Guide How-To] Remove Battery Full notification Android L
Figured I would keep this guide with the one above since they are for battery notifications.
SystemUI.apk smali edit:
Add new lines in BLUE
Code:
.method public showFullBatteryNotice()V
    .locals 12

    [COLOR="Blue"]goto :goto_td
[/COLOR].
.
.
    [COLOR="Blue"]:goto_td
[/COLOR]    return-void
.end method
[Guide How-To] Remove Battery Low notification
Figured I would keep this guide with the one above since they are for battery notifications.
SystemUI.apk smali edit:
Add new line in BLUE
smali/com/android/systemui/power/PowerUI.smali
Code:
.method showLowBatteryWarning()V
    .locals 21

    [COLOR="Blue"]goto :goto_td[/COLOR]

    const-string v18, "PowerUI"

    new-instance v19, Ljava/lang/StringBuilder;

Add new lines in BLUE at the end of the same method:
Code:
    invoke-virtual {v13, v0, v1}, Landroid/os/PowerManager$WakeLock;->acquire(J)V

    goto/16 :goto_2

    [COLOR="Blue"]:goto_td
    return-void
[/COLOR].end method

.method showOverheatShutdownNotice()V
5% Low Battery Mod

[Guide] Remove Charging and Low Battery dialog from Lockscreen

[Guide] Remove Mobile Data Toggle off Warning Dialogue

[Guide] Add Switch On/Off For Battery, Data Disconnection and Keyboard Notifications

[Guide] Permanent Disable of Ongoing Notifications
(Multiple guides)

(Guide)(How To) (Lollipop Volume Increase All Varient's) Credits @blaz1nr

Guide/How-To: Disable Annoying Increasing Ring

[Guide] Add Sound/Volume bar back to Power Menu

[Guide] Unlock items in the volume panel

[Guide] Remove Mobile Data Toggle off Warning Dialogue in Lollipop 5.1.1

[Guide] Remove Safe Volume Warning with Toggle (Lollipop)

[Guide] How to disable Heads Up Notifications with Toggle

[Guide] Disable Hotspot warning popup (5.0.2)

Toggle for battery/USB cover warnings galaxy s5 lollipop

[Guide] Hide SD storage notifications

[Guide] Music/Volume Skip Mod for Android 6.0.x

[Guide] Disable annoying SD card notification

[Guide] Loud Volume Warning Toggle MM

[Guide] Set Background color for notification icons

[Guide] How to hide the Private Mode statusbar notification

[Guide] How to Unlock items in volume panel For TW MM

[Guide] Mod for Volume Panel BG including all Contents with Color Control via Rom Control

[Guide] How to disable Bluetooth Scan Dialog MM

[Guide] Volume Panel Expanded Timeout Delay - MM
___________________________________________

Phone & Dialer

[Guide] Adding Call button to Logs

[MOD]Disable EndCall Screen for Smsung Phone app(SecPhone.apk)

[Mod/Theme/Guide] Galaxy S5 FullScreen Call

[Mod/Theme/Guide] Lollipop Galaxy S5 FullScreen Call Credits @thanhfhuongf - For the original mod

[Mod][Guide] Create multiple main dialer background images or dialer background colors Credits @remuntada78
Also see this post: http://xdaforums.com/showpost.php?p=61347918&postcount=1686

[Guide] Modify Screen Timeout During a call

[Guide] Auto Call Recorder Android L

[Guide] InCall UI user-rotation (with Auto rotation toggle)

Auto Call Recorder Android 5.1.1 and Android 6.0.1

[Guide] Full Screen Dialer - MM
___________________________________________

Launcher

Enable wallpaper scrolling in Touchwiz

TWLauncher left swipe App Picker thanks @daxgirl

TWLauncher swipe app
TWLauncher swipe app version2
Adding swipe support to s6 launcher
Credits @daxgirl

Fix for stock TW launcher landscape view Credits @willowmaker420

[HOWTO] Show lockscreen before launcher after reboot.

[Guide] Gesture anywhere on Home screen: Double tap, Swipe Up, Swipe Down (15 actions) Android 6.0.1

[Guide] How to enable Touchwiz Page Transition effects MM

[MOD/GUIDE]6thGear scrolling wallpaper on TW launcher with observer
___________________________________________

Power Menu

[HOWTO] Extended Power Menu (EPM): adding Recovery & Download

[GUIDE][MOD]Add Safe Mode to 4way reboot menu S5 All Variants 4.4.2[MOD][GUIDE]

[MOD] [TUTORIAL] [5.0 LOLLIPOP] Add Flashlight and Screenshot to Power Menu

[Dev][Modding]TW Lollipop, Torch, 5Way reboot, SystemUI patches [more]
At least a dozen guides. Well worth a look. :)

[Guide] 5Way Reboot TW Marshmallow

[Guide] Screenshot and ScreenRecord on Power menu 6.0.1

[Guide] Add Torch/Flashlight to Power menu 6.0.1

[Guide] How to adjust the Screenshot delay for Extended Power Menu Android 5 & 6

[Guide] How to enable new style power menu on S5 MM
and HERE

[Guide] How to add Reboot Recovery to power menu With toggle

[Guide] How to get Old LP_Power Menu Back On MM

[Guide] Power Menu Custom Background - MM
[Guide] Power Menu Custom Static Background

[GUIDE] How to add extra ITEMS to POWER MENU with ROM CONTROL TOGGLE
___________________________________________

Theming

[MOD]THEMERS] Change LGE keyboard swipe/trace color


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

alternate method
http://xdaforums.com/showpost.php?p=52785153&postcount=12

[MOD] Add top number row to Swype

[MOD][HOW-TO] Enable theme support on N3 launcher

[Guide] Changing dialogs in the system graphics. Android 5.0

[MOD][APP] Multi DPI Samsung Apps (Camera, Keyboard, Contacts/Dialer) & services.jar

[APP] Qmg2Png Tool

[TOOL] Converter QMG/ASTC->PNG

Theming 101

SystemUI In-Depth Theming!!! For All Variants

[Guide] How to make rounded corners
- for recents, notifications & sfind/qconnect panel

[THEME][AROMA]System Animation 8 styles with 6 add-on adjustments
 
Last edited:

tdunham

Inactive Recognized Contributor
Jun 21, 2008
13,686
36,465
TampaBay
Miscellaneous
Lots of useful stuff, don't overlook this category.

[TUTORIAL] How to write/copy/download to the external sd card

Soft keys build prop edit Slightly different -> [GUIDE][MOD] Enable navigation bar 4.2.2

[MOD] Disable On Screen when receiving a Text

Disable ASEC (Forward locked packages)

[HOW-TO] Remove connection optimizer
Our code is a bit different but the method still works.

[GUIDE / HOW-TO] Add screen on/off animations to KitKat 4.4 [CRT/FADE/NONE] < -- Written for the S5

[MOD]Allow Unknown Sources By Default

[Guide] Create CSC features controller tab in settings menu


[MOD][HOW-TO] Fully disable app verification (FOR USER APPS)

[How To][Guide] Change Default Window Animation Scales and Build in New scales
- Same author, but this one is a little different mod than the guide I placed in Post #1.

[MOD][GUIDE] SecMms.apk TouchWiz Mods

[GUIDE] Enable "Device Status Official" - Remove SysScope

[HACK] Removing keyguard and other security policy restrictions from Email apk

[Mod][Guide][How to] Increase Toolbox apps number on new Samsung FWs

[MOD][GUIDE][HOWTO] * Enable Private Mode with KNOX 0x1 and deodex rom*

[MOD][Guide/How to]Increase QuickSettings Maximum number (Android 4.4.2, 4.4.4, 5.0)
[Guide]How to Increase QuickSettings Maximum number and Dual setting in Secsettings2 (Android 6.0.1)

[Guide] How to hide QuickSettings Favorites in MM

[Guide] How to change the number of columns in settings via Rom Control for MM
[Guide] How to go back to normal view from dual columns (addon)
[How-to] Change textview so dual columns in settings displays properly
[Guide] Settings Dashboard Scaling for Android MM

[MOD][GUIDE][12-17-14]MenuBeGone - Lollipop-remap menu button to recent apps

[GUIDE]How-to enable 3 dot menu button in S5 ported apps without xposed modules

[Dev][Modding]TW Lollipop, Torch, 5Way reboot, SystemUI patches [more]
At least a dozen guides. Well worth a look. :)

[Guide] CSC edit to remove Sprint Connections Optimizer Credits @evilvoice

[GUIDE][HOW TO] Add toggle to bypass email exchange security Credits @txr33

[Guide] How to add a SettingsObserver to your Rom

[Guide] Unlock and add items to settings

[Guide] Decrease response time Automatic brightness

[Guide] Tweaks SecMms_Candy Android 5.0.1

[Guide] How to add a SetupWizard custom logo
- Change text in SetupWizard for Lollipop
- Customize the Device name

[Guide] Remove the signature verification application completely
Original thread - thank @CNexus here: [MOD][HOW-TO] Fully disable app verification

[Guide] Fix for Color Fade Memory Leak 5.0.x

[GUIDE][MOD]Permenantly disable CarrierIQ[GUIDE][MOD]

[MOD] [HOW-TO] 4.4.2 TW All apps in multi & pen window | Quad view

How To Recompile TW Contacts/Phone Without Errors

[Guide] How to add Switch Button Style mod

[Guide] How to modify framework to allow installing app older versions over newer
Also see alternate method by Goldie HERE

[Guide] Camera Low Battery & using Flash on Low Battery

[TUTORIAL] How to add Autostarts Option in Settings
Additional info to help with this one from @stangdriver44
http://xdaforums.com/showpost.php?p=64589609&postcount=4452

[Guide] Auto Brightness Fix

[MOD][Guide][How to] Translatable 4-way reboot - outsource hard code to resources

[Guide[MOD] ENABLE EDGE FEATURES FROM S6 edge+

[Guide]HOW TO ADD ANY APP ON MULTIWINDOWS

[Guide] How to add the Auto Restart feature/Smart Manager to 5.1.1

[Guide] How to replace voice assistant with a custom greeting 5.1.1+

A.O.K.P Ram Bar
Additional RamBar layout fixes/changes credits @gvmiguez

Bring back prompt for "Open with" for Task completon - Lollipop Framework Only

[Guide] How to disable DVFS

[Guide] How to add a SettingsObserver to your Rom
UPDATED PhoneStatusBar$SettingsObserver.smali for Android Marshmallow 6.0.1

[Guide] How to re-enable LED indicator settings in TW 5.1.1
[Guide] How to add (Capacitive) touch key light settings back to Display Settings
[Guide] How to use internal key to control Capacitive key timeout with Rom Control

[Guide] How to setup a global Boolean toggle that will work anywhere in SystemUI

[App][SourceCode][Project][forDevs][Android 5.+] Samsung Toolbox Controller

[How-to] Enable USB Debugging on by default for MM

How to replace Device Name upon initial setup & Battery Capacity & Enable Floating Keyboard

[Guide] How to Find view by id without the id
and HERE

[MOD][APP][GUIDE] How to add expanded power (kinda) option to.... well anywhere

[Guide] 3minit quicklaunch for tablet and phone changes

[Guide][tut] Add changelog to your settings of your own rom

[Guide] Long Press BACK BUTTON to KILL current app for Marshmallow

[Guide] How to add Text color to QuickSettings Favorites and Category Settings in MM

[How to] Recompile MM twframework-res.apk

[Guide] Add "Colorpicker" in Settings

[Guide] Add "Clock" option in Settings
See this post too: http://xdaforums.com/showpost.php?p=67632524&postcount=7804

[Guide] LongPress Back to KIll MM
Making the switch between the "Menu" and "Kill app"
[Guide] Long Press BACK BUTTON to FORCE CLOSE current app with OPTIONAL ROM CONTROL TOGGLE in MM 6.0.1

[Guide] How to add Gesture Anywhere in Settings.apk

[Mod][GUIDE][CUSTOM VIEW] 6thGear Custom View for any app

[How-to] Add shortcuts to Settings Menu

[Guide] How to disable Headsup Notifications - MM

[Fix] screen overlay detected bug

[How to] Fix a SystemUI.apk fc after flashing a bad SystemUI.apk and no SystemUI.apk helps

[GUIDE] How to add EXTRA\hidden notification panel TOGGLES in S5 MM 6.0.1

[GUIDE] How to add TorchLight toggle in S5 MM 6.0.1 notification panel settings

[Guide] How to Change Low & Critical Battery Warning Percentage Threshold

[Guide] How to add a global settings observer and apply it to PhoneStatusBar

[Guide] How to enable 'Open With' again instead of 'Open Once'
[GUIDE] How to remove EXTRA WHITE SPACE in DEFAULT APP SELECTOR MM 6.0.1

[Guide] How to add an app to settings menus

[Guide] Toast animations for MM

Guide For Native Blur - Only on Ported S7 Edge & Note 7 Roms

[GUIDE]SCREEN ON FOR TEXT NOTIFICATION ADDING A SWITCH IN STOCK TEXT APP SETTINGS FOR MM

[Guide] How to enable Secret Mode in 5.0.x Browser
[Guide] How to enable Secret Mode in 4.0.x Browser
Flashable versions of secret mode enabled browsers

[Guide] SILENT DELIVERED SMS / MMS REPORTS FOR MM
 
Last edited:

tdunham

Inactive Recognized Contributor
Jun 21, 2008
13,686
36,465
TampaBay
6th Gear Repository
Everything created and supported by the 6thGear Team [Wuby986 & Daxgirl] will be located here (as well as in the organized categories where applicable)
Just like life, programming is always a work in progress.


[Tool] Hex converter for devs

[App][5.0.+][Extended reboot menu + SystemUI + ShutDown][Root][PowerManager Inteface] Lollipop

[SOURCE CODE][DEV TOOL][SDK 21+]6thGear RomControl v2.+ for Devs

[App][Guide][Receiver] Adding/Rearranging/Removing/Changing number of SystemUI Tiles - MAJOR UPDATE FOR MARSHMALLOW

[App] Database editor for MM - UPDATED

[How-to] Push apps to the phone the EASY way

6thGear HexConverter v2.0

[App][SourceCode][Project][forDevs][Android 5.+] Samsung Toolbox Controller
[Mod][Guide][How to] Increase Toolbox apps number on new Samsung FWs

6thGear TwSwipe v2.0

[Mod][GUIDE][CUSTOM VIEW] 6thGear Custom View for any app

[MOD][GUIDE][CUSTOM VIEW] Gear device info in notification panel
[MOD][GUIDE]6htGear Carrier label preferences - as ADDITION to 6thGear device info mod

[Guide] 6thGear Data Usage Preferences on the fly without observer and without CSC changes

[MOD/GUIDE][HOW-TO]6thGear change notification bg shape and color
[UPDATE/ADDON/GUIDE] ADD TRANSPARENCY AND TOGGLE CUSTOM COLORS ON/OFF FOR 6THGEAR NOTIFICATION SHAPE&COLOR


[MOD/GUIDE/UPGRADE]Network traffic indicator in status bar (or anywhere else)
[Add-on] Seperated colors for traffic indicator

[Guide] How to add a global settings observer and apply it to PhoneStatusBar

[MOD/GUIDE]6thGear Brightness panel customization

[MOD/GUIDE]6thGear scrolling wallpaper on TW launcher with observer

An example of a class with observer and global boolean

[TUTORIAL/INFO/INTRODUCTION-TO]6thGear vs android:windowLightStatusBar:
PART 1 of 3: Dark status bar icon tint explained

---------------------------------------------
[GUIDE/TUTORIAL/INFO]6thGear vs android:windowLightStatusBar
Part 2/3 - Example on setting native dark tint on colored clock

----------------------------------------------
[GUIDE/TUTORIAL/INFO]6thGear vs android:windowLightStatusBar
Part 2.1/3 - Example on setting native dark tint on colored status icons (bt, alarm, wifi direct and so on)

----------------------------------------------
[GUIDE/TUTORIAL/INFO][NOT-FOR-THE-WEAK-HEART]6thGear vs android:windowLightStatusBar
Part 3/3 - Coloring signal cluster items with native dark tint - PART 1: GENERAL INFO AND OBSERVER

----------------------------------------------
[Add-on] StatusBar Icon Tint ADDENDUM for Center & Left clock modifications
__________________________________________
[Guides] How to get ID in APK and Framework without pulling public resources

Original Posts are located here tnx to Daxgirl:
[Guide] How to Find view by id without the id
and HERE


Current Guides are Here:

[How-To] Find view by ID without having to find public resource - APK Edition

[How-to] Add framework ID by name without using public resource ID

NEWEST GUIDE
[GUIDE][TUTORIAL]Global context for android application - SystemUI/Improved ID by name without using public resource
Get context from anywhere in SystemUI and further streamlined get ID routine included (all-in-one)
__________________________________________
Tutorials
[6thGear info corner][Android under the hood][Modding by KNOWING] ContentProvider and ContentResolver

[ADVANCED TUTORIAL][NOT-FOR-THE-WEAK-HEART][6THGEAR INFO CORNER] Content observer the 6thGear way

[GUIDE] How to build a Samsung Kernel

How to Port Samsung Rom to other Samsung devices
__________________________________________
Tools & Apps & Other

[TOOL] Public ID Converter

[Tool] Android color conversion

[Tool] Hex converter for devs Credits @daxgirl

[App][5.0.+][Extended reboot menu + SystemUI + ShutDown][Root][PowerManager Inteface] Lollipop

[Tool] ApkTool app for phone on Lollipop

[Tool] apktool for mobile newer version

TW LP settings apk to look like KitKat

[App][Code project][5.0+]Rom Control app for devs
[SOURCE CODE][DEV TOOL][SDK 21+]6thGear RomControl v2.+ for Devs

Apktool - a tool for reverse engineering apk files

XML 101 - XML Modding Made Easy

Find CustomSettings here
[GUIDE][SMALI]Understanding and Creating Smali Mods & General Smali Questions

[GUIDE] How to extract system files from stock firmware

APKtool Github

[Tool] Tickle My Android
Awesome tool for decompiling,recompiling, theming and more.
Frequently updated with latest apktool & baksmali.

[APP] Qmg2Png Tool v1.3

[App][Guide][Receiver] Adding/Rearranging/Removing/Changing number of SystemUI Tiles - MAJOR UPDATE FOR MARSHMALLOW

[Guides & Mods & Links] Galaxy S6/S6edge unified mods thread
Tons of useful guides

JesusFreke smali/baksmali Github

[Guide] How to view and edit the SQL Database on Android
[App] Database editor for MM
[App] Database editor for MM - UPDATED
DBeditor v3: edit your Settings DB

[KITCHEN][LINUX] SuperR's Kitchen

[TOOL] Fulmics Deodexer ◦ Marshmallow ◦ Nougat | for Windows

[BEST ANDROID ROMs & APKs & FILE_SYSTEMs EDITOR] ASSAYYED_KITCHEN

[How-to] Push apps to the phone the EASY way

6thGear HexConverter v2.0

[App][SourceCode][Project][forDevs][Android 5.+] Samsung Toolbox Controller
[Mod][Guide][How to] Increase Toolbox apps number on new Samsung FWs

6thGear TwSwipe v2.0
__________________________________________

MM SecSettings Fixes

fix the "do not disturb "start time" and "end time" selection options"
and HERE

[Guide] How to update older smali to work with Android 6.x in SecSettings
 
Last edited:

vinman12

Senior Member
Dec 28, 2011
3,430
4,395
Great thread, great work. Ty for this, the smali tool aswell and the time you put into this.

+1

Sent from my SM-G900P using Tapatalk
 
  • Like
Reactions: stangdriver44

tdunham

Inactive Recognized Contributor
Jun 21, 2008
13,686
36,465
TampaBay
ONGOING - a couple more guides:
[Guide How-To] ENABLE WiFi & USB Tethering (HOTSPOT)

[Guide How-To] ENABLE DEVELOPER OPTIONS

[Guide How-To] CHANGE DEFAULT ANIMATION SCALES

ONGOING - Started populating Post #2 with additional links.
Cheers - TD
 
Last edited:

tdunham

Inactive Recognized Contributor
Jun 21, 2008
13,686
36,465
TampaBay
Great thread, REQ tutorial to remove sms from call logs (set All Calls only)
Isn't this a CSC tweak?
We don't get this for either mms or sms in our logs with stock I think . Maybe its one of these two:

Code:
<CscFeature_Contact_DisableMessageLog>true</CscFeature_Contact_DisableMessageLog>
<CscFeature_Message_DisableLogs>true</CscFeature_Message_DisableLogs>
 

Top Liked Posts