FORUMS

Analysis & Opinion

Top Forum Discussions

[Guides & Links] THE GALAXY S5 UNIFIED MODS THREAD

10,532 posts
Thanks Meter: 27,138
 
By tdunham, Recognized Contributor on 29th June 2014, 11:58 AM
Post Reply Subscribe to Thread Email Thread
GALAXY S5 UNIFIED MODS THREAD - GUIDES & LINKS

This thread is posted in the Galaxy S5 Unified Development Thread and can be viewed across all S5 Variants.



Always a work in progress. Refer here for guides and links to various mods to help improve the S5 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

    if-eqz 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
    .locals 14
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

    invoke-virtual {v7, v4, v5}, Landroid/os/PowerManager$WakeLock;->acquire(J)V

    :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

    goto :goto_td
    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

    :goto_td
    :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

    const v1, 0x0

    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

    goto :goto_td

    if-ne v6, v7, :cond_4

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

    :goto_td
    :cond_4
    monitor-exit v5
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    goto :goto_0
.end method
__________________________________________________ __

[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

    if-ne v2, v5, :cond_6

    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/ContextV, change if-nez to if-eqz as indicated in BLUE:
Code:
    move-result-object v0

    .line 106
    if-eqz 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
    const/4 v0, 0x1

    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
    const/4 v1, 0x1

    .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

__________________________________________________ __

[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">false</bool>
Notes:
This should also resolve the battery cover toast from appearing for a split second after a reboot and the screen is unlocked.
. .
__________________________________________________ __

[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

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

    return-void
.end method
__________________________________________________ __

[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">100.0%</item>
    <item type="dimen" name="system_icon_area_alpha">1.0</item>
    <item type="dimen" name="notification_icon_area_alpha">1.0</item>
. .
__________________________________________________ __

[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

    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

    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\AirplaneModeTi le.smali
Code:
    const/16 v5, 0x7d9

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

    :goto_3


    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

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

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

    return-void
__________________________________________________ __

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

    const/4 v2, 0x0

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

    const-string v0, "Tethering"

    const-string v1, "Set dun requiered as 1"
__________________________________________________

[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" />
Credits @rompnit for this one as well.
__________________________________________________

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

    const/high16 v9, 0x3f00

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

    const/high16 v9, 0x3f00

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

    const/high16 v9, 0x3f00

    iput v9, p0, Lcom/android/server/wm/WindowManagerService;->mAnimatorDurationScale:F
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">false</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

    :sswitch_4

    return v1

    nop

    :sswitch_data_0
    .sparse-switch
        0x3 -> :sswitch_4
        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

    invoke-virtual/range {v30 .. v30}, Lcom/android/phone/NotificationMgr;->showDataDisconnectedRoaming()V

    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

    invoke-virtual/range {v30 .. v30}, Lcom/android/phone/NotificationMgr;->hideDataDisconnectedRoaming()V

    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
    const/4 v1, 0x0
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
    invoke-virtual {p0, v0}, Landroid/widget/AbsListView;->setScrollingCacheEnabled(Z)V
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
    .parameter "disabled"

    .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, "SPX"

    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, "SPX"

    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, "SPR"

    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;

    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;

    move v1, v2

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

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

    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/feature.xml"

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

    const-string v10, "/system/csc/ultimate.xml"
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, 0x1

    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.smal i
Find and delete the following line:
Code:
    invoke-direct/range {p0 .. p0}, Lcom/android/settings/DeviceInfoSettings;->showKnoxVersion()V

GUIDES CONTINUED IN POST #4.

Note:
Many many hours go into developing the mods and creating guides for them.
It is also considered good form to hit the Thanks button rather than saying it in open forum. (it just creates unnecessary clutter)
Attached Files
File Type: zip JB_KK_L_VRTheme_Template.zip - [Click for QR Code] (775.3 KB, 284 views)
Last edited by tdunham; 22nd July 2015 at 12:08 PM.
The Following 271 Users Say Thank You to tdunham For This Useful Post: [ View ]
 
 
29th June 2014, 11:58 AM |#2  
tdunham's Avatar
OP Recognized Contributor
TampaBay
Thanks Meter: 27,138
 
Donate to Me
More
Cool
I'll start posting links to other threads of interest here as I find them.
Feel free to send me some as well.

[GUIDE][SMALI]Understanding and Creating Smali Mods & General Smali Questions
Very useful smali programming info with tons of good stuff. Tnx @Goldie

[Guide] True 1% battery mod for 4.4.2

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

Guide/How-To: Disable Annoying Increasing Ring

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

[MOD][HOW-TO]To disable signature checks - xda-developers

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

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

    goto :goto_td
.
.
.
    :goto_td
    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

    goto :goto_td

    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

    :goto_td
    return-void
.end method

.method showOverheatShutdownNotice()V

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

[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] Adding Call button to Logs

[Guide] Create CSC features controller tab in settings menu


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

[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

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

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

[GUIDE] Enable "Device Status Official" - Remove SysScope

[HACK] Removing keyguard and other security policy restrictions from Email apk

[MOD][APR 24]Potato Statusbar Gradient

[MOD] 4.4.2 TW Hidden power button

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

[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

[Mod/Theme/Guide] Galaxy S5 FullScreen Call

[GUIDE][MOD]Permenantly disable CarrierIQ[GUIDE][MOD]

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

[Mod][Guide][How to] Increase Toolbox apps number on new Samsung FWs

[MOD][GUIDE][HOWTO] * Enable Private Mode with KNOX 0x1 and deodex rom*

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

[MOD][Guide/How to]Increase QuickSettings Maximum number (Android 4.4.2, 4.4.4, 5.0)

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

[Guide-Lollipop]Clock center status bar.

[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

[HOWTO] Show lockscreen before launcher after reboot.

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

Enable wallpaper scrolling in Touchwiz

TWLauncher left swipe App Picker thanks @daxgirl

[MOD] [GUIDE] Status Bar Network Traffic (Separate In/Out)
Also, see these posts:
http://forum.xda-developers.com/show...&postcount=572
http://forum.xda-developers.com/show...&postcount=577

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

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

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

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

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

[Guide] CSC edit to remove Sprint Connections Optimizer Credits @evilvoice

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

[GUIDE][HOW TO] Add toggle to bypass email exchange security Credits @txr33

Fix for stock TW launcher landscape view Credits @willowmaker420

[Mod][Guide] Create multiple main dialer background images or dialer background colors Credits @remuntada78
Also see this post: http://forum.xda-developers.com/show...postcount=1686


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

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

[Guide] How to add a SettingsObserver to your Rom

5% Low Battery Mod

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

[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


[Guide] How to hide ongoing notifications in - How to remove CPU info if it is not displaying properlyLollipop

[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] 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] Change toggle buttons background in the notification panel

[Guide] Unlock items in the volume panel

XML 101 - XML Modding Made Easy

[Guide] Max Brightness icons in the status bar

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

[Guide] Unlock and add items to settings

[Guide] Add current state RAM in notification panel or somewhere in SystemUI

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

[Guide] How to enable Montblanc Ink Effect

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

[Guide] Center Clock on status bar in Lollipop 5.1.1

[Guide] Decrease response time Automatic brightness

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

[Guide] StatusBar Expanded Header Custom Color

[Guide] Toggle Color and Toggle Circle Color

[Guide] Statusbar 3 part layout

[Guide] Tweaks SecMms_Candy Android 5.0.1

[DEV] [SMALI] A Few Custom Views

[Guide] Modify Screen Timeout During a call

[Guide] Auto Call Recorder Android L

[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] How to add a SetupWizard custom logo
- Change text in SetupWizard for Lollipop
- Customize the Device name

[Guide] Remove Charging and Low Battery dialog from Lockscreen

[Guide] Quickpanel Toggles hide text and text color

[Guide] Quickpanel Toggles scrollable toggles view - @remuntada78

[Guide] Quickpanel Toggles scrollable toggles view - @tdunham

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

[Guide] Brightness Slider background color fix for Lockscreen

[Guide] Enable Lockscreen Rotation Lollipop

[Guide] Sfind Quickconnect custom background color
Also, see this post http://forum.xda-developers.com/show...postcount=2955

[Guide] Create Custom breathing/animated notification icons

[Guide] Remove the signature verification application completely
Original thread - thank @CNexus here: [MOD][HOW-TO] Fully disable app verification

[Guide] Toggle between 3minit Battery Mod and Stock battery
Last edited by tdunham; 26th August 2015 at 12:21 PM.
The Following 16 Users Say Thank You to tdunham For This Useful Post: [ View ]
29th June 2014, 11:58 AM |#3  
tdunham's Avatar
OP Recognized Contributor
TampaBay
Thanks Meter: 27,138
 
Donate to Me
More
Cool
[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:
<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>
. .

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="0.0dip" android:paddingTop="@dimen/button_holder_margin_top" android:paddingRight="0.0dip" android:paddingBottom="@dimen/button_holder_margin_bottom" android:focusable="true" android:layout_width="0.0dip" 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="0.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_toRightOf="@id/sfinder_button" />
. .


[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" android:background="@drawable/tw_custom_bg" 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" />
    <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" />
    <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.


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


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

alternate method
http://forum.xda-developers.com/show...3&postcount=12

[MOD] Add top number row to Swype

[MOD][HOW-TO] Enable theme support on N3 launcher
__________________________________________________
[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.s mali
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
.
.
.
    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;

    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:
    <string name="notification_panel_flashlight">Flashlight</string>
</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\PhoneSt atusBar.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
    const/4 v3, 0x0
    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

    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:
    <string name="quickpanel_flashlight_text">Flashlight</string>
</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, 0x7f0206e8  ## 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, 0x7f0206e7  ## 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://forum.xda-developers.com/show...&postcount=415
[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

TW LP settings apk to look like KitKat
Attached Files
File Type: zip Recent_apps_png.zip - [Click for QR Code] (2.9 KB, 82 views)
File Type: zip Flashlight_icons_lollipop.zip - [Click for QR Code] (15.3 KB, 216 views)
Last edited by tdunham; 2nd August 2015 at 09:56 PM.
The Following 11 Users Say Thank You to tdunham For This Useful Post: [ View ]
29th June 2014, 11:58 AM |#4  
tdunham's Avatar
OP Recognized Contributor
TampaBay
Thanks Meter: 27,138
 
Donate to Me
More
Cool
[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/CharSequenceV

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;

    const-string v13, "your_custom_text"

    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-nez 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

    const/4 v8, 0x1

    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;->showWirelessChargingNotice(I)V
Android L SystemUI smali edits:
\smali\com\android\systemui\power\PowerNotificatio nWarnings.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

    goto :goto_td

    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

    :goto_td

    return-void
.end method
__________________________________________________

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

    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
__________________________________________________

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

    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
__________________________________________________

[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;->updateVZWDataNetType()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;->DATA_3G_SPR:[[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;->DATA_LTE_SPR:[[I
Find the FIRST switch 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

    if-eqz v0, :cond_4

    sget-object v0, Lcom/android/systemui/statusbar/policy/TelephonyIcons;->DATA_1X:[[I
. .
__________________________________________________
[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:

. .
__________________________________________________
[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, 0x1

    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

    const v5, 0x1 ## Add Toggle here

    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

    const v0, 0x0

    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

    const v0, 0x0

    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

    const v3, 0x0

    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

    const v3, 0x0

    invoke-virtual {v0, v3}, Lcom/android/keyguard/MultiPaneChallengeLayout;->setIsSecured(Z)V
\smali\com\android\keyguard\KeyguardWidgetPager.sm ali
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

    const v0, 0x1 ## Add Toggle here

    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, 0x0 

    :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

    const v1, 0x0

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

    move-result v3

    const v3, 0x0

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

    move-result v1

    const v1, 0x0

    if-eqz v1, :cond_2
\smali\com\android\keyguard\KeyguardActivityLaunch er.smali
Change the 0x2 to 0x3 indicated in BLUE
Code:
.method public launchWidgetPicker(I)V
    .locals 7

    const/4 v4, 0x0

    const/4 v3, 0x3

    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\Samsung PhoneWindowManager.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
    const/4 v0, 0x1

    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\PhoneWindo wManager.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
    .locals 3
.
.
.
.
    iget-boolean v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

    if-nez v2, :cond_td

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

    :cond_td
    goto :goto_0
.end method
Home TripleTap Function
Code:
.method private handleTripleTapOnHome()V
    .locals 3
.
.
.
.
    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;

    iget-boolean v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

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

    :cond_td2
    :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
    .locals 8
.
.
.
.
    iget v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mLongPressOnHomeBehavior:I

    if-ne v3, v6, :cond_td3

    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

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

    const/4 v4, 0x2

    if-ne v3, v4, :cond_0

    const v3, 0x1

    iget-boolean v7, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

    if-nez v7, :cond_td4

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

    :cond_td4
    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\SecAsync RingtonePlayer.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;

    invoke-virtual {v0, v4, v5, v3}, Landroid/media/AudioManager;->setStreamVolume(III)V

    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 by tdunham; 2nd June 2015 at 09:43 PM.
The Following 12 Users Say Thank You to tdunham For This Useful Post: [ View ]
2nd July 2014, 02:33 AM |#5  
tdunham's Avatar
OP Recognized Contributor
TampaBay
Thanks Meter: 27,138
 
Donate to Me
More
__________________________________________________
[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.
Code Before:
.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

After:
Note the new changes in BLUE
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
        0x2t 0x0t 0x0t 0x0t  ## STREAM_NOTIFICATION
        0x6t 0x0t 0x0t 0x0t  ## STREAM_BLUETOOTH_SCO
        0x2t 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
        0x2t 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:
framework.jar 5.x smali edit:
smali\android\media\AudioService.smali
At the very end of the method make the following changes.
Before:
.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

After: 
Note changes in BLUE:
    :array_2
    .array-data 4
        0x0  ## STREAM_VOICE_CALL
        0x1  ## STREAM_SYSTEM
        0x2  ## STREAM_RING
        0x3  ## STREAM_MUSIC
        0x4  ## STREAM_ALARM
        0x2  ## STREAM_NOTIFICATION
        0x6  ## STREAM_BLUETOOTH_SCO
        0x2  ## 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
        0x2
        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\PowerNo tiReceiver.smali
Add new code in BLUE to skip to the bottom of the method.
Code:
.method public notificationCreate(Landroid/content/Context;)V
    .locals 11

    goto :goto_td
.
.
.
    :goto_td
    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.sm ali
Add the new code in BLUE
Code:
.method private showTetheredVendorNotification(I)V
    .locals 11

    goto :goto_td
.
.
.
    :goto_td
    return-void
.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\PhoneWindow Manager.smali
Add new code in BLUE
Code:
.field private final mLogDecelerateInterpolator:Lcom/android/internal/policy/impl/LogDecelerateInterpolator;

.field mLongPressKill:Ljava/lang/Runnable;

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

    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\Samsung PhoneWindowManager.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
    .locals 8
.
.
.
    :cond_2
    if-eqz p1, :cond_5

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

    if-eqz v3, :cond_4

    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

    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

    goto :goto_0

    :cond_td

    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

    goto :goto_0
__________________________________________________
[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\PhoneWindow Manager.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\Samsung PhoneWindowManager.smali
Add new method above .method public interceptKeyBeforeDispatching(Landroid/view/KeyEventZ
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:
Voicecommand

    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

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


Torch

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


Search

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


Menu

    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\PhoneWindow Manager.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
    const v3, 0x1

    move-object/from16 v0, p0

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

    goto :goto_9

    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

    iget-boolean v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

    if-nez v0, :cond_td

    ADD ACTION LINE(S) HERE!!!

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

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

    :cond_td

    return-void
.end method
Left Long Press key mapping

smali\com\android\internal\policy\impl\PhoneWindow Manager.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

    iget-boolean v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

    if-nez v0, :cond_td

    ADD ACTION LINE(S) HERE!!!

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

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

    :cond_td

    return-void
.end method
smali\com\android\internal\policy\impl\sec\Samsung PhoneWindowManager.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

    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

    goto :goto_0
.end method
Home Long Press key mapping

smali\com\android\internal\policy\impl\PhoneWindow Manager.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

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

    const/4 v2, 0x1

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

    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

    iget-boolean v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

    if-nez v0, :cond_td

    ADD ACTION LINE(S) HERE!!!

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

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

    :cond_td

    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

    iget-boolean v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

    if-nez v0, :cond_td

    ADD ACTION LINE(S) HERE!!!

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

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

    :cond_td

    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

    iget-boolean v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

    if-nez v0, :cond_td

    ADD ACTION LINE(S) HERE!!!

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

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

    :cond_td


    return-void
.end method
smali\com\android\internal\policy\impl\sec\Samsung PhoneWindowManager.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\Multita pKeyManager.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;

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

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

    :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;

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

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

    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

    iget-boolean v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

    if-nez v0, :cond_td

    ADD ACTION LINE(S) HERE!!!

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

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

    :cond_td

    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\Multita pKeyManager.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;

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

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

    return-void
.end method
Add screenoff to custom key mapping
Attached Files
File Type: zip Back_to_Kill_smali_v2.zip - [Click for QR Code] (2.9 KB, 92 views)
File Type: zip key_mapping_file.zip - [Click for QR Code] (129.6 KB, 40 views)
Last edited by tdunham; 2nd June 2015 at 09:38 PM.
The Following 69 Users Say Thank You to tdunham For This Useful Post: [ View ]
2nd July 2014, 02:34 AM |#6  
tdunham's Avatar
OP Recognized Contributor
TampaBay
Thanks Meter: 27,138
 
Donate to Me
More
[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\SecAsync RingtonePlayer.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
.
.
.
    const-string v0, "ringtone_escalating"

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

    invoke-virtual {p0}, Lcom/android/server/telecom/secutils/SecAsyncRingtonePlayer;->getIncreasingRingtoneToggle()Z
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

    const/16 v2, 0x1194
    const/16 v2, 0x0

    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
    const/16 v2, 0x1194
    const/16 v2, 0x0

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

.
.
.
    if-eqz v2, :cond_1

    const/16 v2, 0x1194

    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

    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
    const/16 v2, 0x1194

    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

    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:
    <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>
</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.sm ali
Add new line in BLUE
Code:
.field private mRippleColor:Landroid/content/res/ColorStateList;

.field private mToggleTextColor:I

.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
    .locals 13
.
.
.
    const v11, 0x7f0f00c5 ## <public type="id" name="dialpad_key_number" 

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

    move-result-object v7

    check-cast v7, Landroid/widget/TextView;

    invoke-virtual {p0}, Lcom/android/incallui/dialpad/DialpadView;->setDialpadDigitColor()V

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

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

    const v11, 0x7f0f00c6 ## <public type="id" name="dialpad_key_letters"

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

    move-result-object v4

    check-cast v4, Landroid/widget/TextView;

    invoke-virtual {p0}, Lcom/android/incallui/dialpad/DialpadView;->setDialpadLetterColor()V

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

    invoke-virtual {v4, v12}, Landroid/widget/TextView;->setTextColor(I)V
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, :cond_td

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

    goto :goto_0

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

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

    goto :goto_0

    :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

    :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

.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
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
    .locals 11
.
.
.
    check-cast v5, Landroid/widget/TextView;

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

    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

    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;

    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

    const-string v5, "/system/fonts/Roboto-Regular.ttf"
\smali\com\android\keyguard\KeyguardPinBasedInputV iew.smali
Add new/changed code highlighted in BLUE
Code:
.field private mOkButton:Landroid/view/View;

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

.field private mPinpadButtonColor:I
Code:
.method protected onFinishInflate()V
    .locals 4
.
.
.
## Find these 11 lines and add the 3 lines of code in BLUE below after EACH one!
    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;

    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
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\SecKeyguardClockSi ngleView.smali
Add new code in BLUE
Code:
.field protected mSingleTime:Lcom/android/keyguard/sec/SecKeyguardTextClock;

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

.field private mClockTextColor:I

.field private mClockAMPMColor:I

.field private mDateColor:I
Add new/changed code in BLUE
We are increasing .locals value by 1
Code:
.method protected onFinishInflate()V
    .locals 3
.
.
.
    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
    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

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

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

    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
.
.
.
    const-string v0, "android.intent.action.SCREEN_OFF"
    const-string v0, "android.intent.action.SCREEN_OFFA"

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

    const-string v0, "android.intent.action.SCREEN_ON"
    const-string v0, "android.intent.action.SCREEN_ONA"

    invoke-virtual {v3, v0}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    const-string v0, "android.intent.action.USER_PRESENT"
    const-string v0, "android.intent.action.USER_PRESENTA"

    invoke-virtual {v3, v0}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    const-string v0, "android.intent.action.USER_SWITCHED"
    const-string v0, "android.intent.action.USER_SWITCHEDA"
Same smali
Note the changes are in BLUE
Code:
.method private computeDiscoveryParameters(I)Lcom/android/nfc/NfcDiscoveryParameters;
.
.
.
    if-lt p1, v2, :cond_8

    if-lt v2, p1, :cond_8
\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

    const/4 v0, 0x3

    :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

    const/4 v0, 0x3

    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
Attached Files
File Type: zip CustomSettings_smali_for_root.files.zip - [Click for QR Code] (72.1 KB, 238 views)
Last edited by tdunham; 15th June 2015 at 04:45 PM.
The Following 60 Users Say Thank You to tdunham For This Useful Post: [ View ]
2nd July 2014, 02:34 AM |#7  
tdunham's Avatar
OP Recognized Contributor
TampaBay
Thanks Meter: 27,138
 
Donate to Me
More
__________________________________________________
[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\La stCallLogItem.smali
Code:
.method protected setItem(Landroid/content/Context;Landroid/net/Uri;Landroid/database/Cursor;Ljava/lang/Object;)V
    .locals 0
    goto :goto_td
.
.
.
    :goto_td
    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\Me ssageItem.smali
Code:
.method protected setItem(Landroid/content/Context;Landroid/net/Uri;Landroid/database/Cursor;Ljava/lang/Object;)V
    .locals 0
    goto :goto_td
.
.
.
    :goto_td
    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\La stCallLogItem.smali
Code:
.method protected setItem(Landroid/content/Context;Landroid/net/Uri;Landroid/database/Cursor;Ljava/lang/Object;)V
    .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
.
.
.
    :cond_td
    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\Me ssageItem.smali
Code:
.method protected setItem(Landroid/content/Context;Landroid/net/Uri;Landroid/database/Cursor;Ljava/lang/Object;)V
    .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
.
.
.
    :cond_td
    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\PhoneS tatusBar.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, :cond_5

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

    if-eqz v8, :cond_5
.
.
.
    :cond_5
    :goto_2
    return-void
Credits @daxgirl for this one too
__________________________________________________
[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, 0x7f0c01e0  ## 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

    move-object/from16 v0, p0

    invoke-virtual {v0, v9}, Lcom/android/dialer/dialpad/a;->setDialerDigit(Landroid/widget/TextView;)V

    const/4 v3, 0x0

    invoke-virtual {v9, v3}, Landroid/widget/TextView;->setHoverPopupType(I)V
.
.
.
    invoke-virtual {v2, v3}, Lcom/android/dialer/dialpad/DialpadKeyButton;->setAccessibilityDelegate(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

    move-object/from16 v0, p0

    invoke-virtual {v0, v8}, Lcom/android/dialer/dialpad/a;->setDialerLetter(Landroid/widget/TextView;)V

    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.smal i
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" 

    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
\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" 

    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
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:
    <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>
</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;

.field private mCarrierColor:I

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

    goto :goto_td

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

    move-result-object v0

    :goto_td
    invoke-virtual {p0, v0}, Lcom/android/keyguard/CarrierText;->setText(Ljava/lang/CharSequence;)V

    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

    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\PhoneS tatusBar.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  ## type="bool" name="enable_ticker"

    move-object/from16 v0, v32

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

    move-result v3
	
    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
	
    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" />
Last edited by tdunham; 25th June 2015 at 02:50 AM.
The Following 62 Users Say Thank You to tdunham For This Useful Post: [ View ]
2nd July 2014, 04:30 AM |#8  
metalfan78's Avatar
Senior Member
Flag Lakewood, CO
Thanks Meter: 2,122
 
More
Sweet, good to see all your stuff in one place
The Following User Says Thank You to metalfan78 For This Useful Post: [ View ]
2nd July 2014, 04:32 AM |#9  
vinman12's Avatar
Recognized Contributor / Themer
Thanks Meter: 2,478
 
Donate to Me
More
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
The Following User Says Thank You to vinman12 For This Useful Post: [ View ]
2nd July 2014, 04:45 AM |#10  
tdunham's Avatar
OP Recognized Contributor
TampaBay
Thanks Meter: 27,138
 
Donate to Me
More
I think I'll rest now.
If you guys see anything interesting feel free to post it here. Might as well try to keep things all in one spot.
The Following 12 Users Say Thank You to tdunham For This Useful Post: [ View ]
2nd July 2014, 08:17 AM |#11  
Senior Member
Chicktoria, B.C
Thanks Meter: 46
 
More
Is the Smali Editing zip just a tutorial or does it actually re map the recent apps function to the home button after you flash?

Read More
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes