[MOD][guide] 4-Way Reboot - Samsung Galaxy Star

kahvitahra said:
Samsung JB roms
What you need to do is:
-Decompile android.policy.jar of your rom
-Copy attached JB folder to yours (POST 1)
-In file "GlobalActions$99.smali" there is id 0x1110008, you might want to check that this id is same in you roms puplic.xml ( config_sf_slowBlur ).
( check also that ids 0x104000a = "ok" -string and 0x104 = "cancel" -string matches in your framework. )
-Open GlobalActions.smali
-Search line "new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$5;" ( some roms might have different number on reboot button. You find right one by for example tracking mRestart. See example below. )
-Change number 5 to 99 ( two of them )
Before
Code:
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$5;
const v1, 0x1080640
const v2, 0x1040165
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$5;->(Lcom/android/internal/policy/impl/GlobalActions;II)V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
After
Code:
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$99;
const v1, 0x1080640
const v2, 0x1040165
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$99;->(Lcom/android/internal/policy/impl/GlobalActions;II)V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
-Open GlobalActions$SinglePressAction.smali
-Before line "# instance fields"
paste following code
Code:
# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;
-Then after line "# direct methods"
paste following code
Code:
.method static constructor <clinit>()V
.registers 3
const/4 v0, 0x4
new-array v0, v0, [Ljava/lang/String;
const/4 v1, 0x0
const-string v2, "Reboot"
aput-object v2, v0, v1
const/4 v1, 0x1
const-string v2, "Hot Boot"
aput-object v2, v0, v1
const/4 v1, 0x2
const-string v2, "Download"
aput-object v2, v0, v1
const/4 v1, 0x3
const-string v2, "Recovery"
aput-object v2, v0, v1
sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
return-void
.end method
-So your file should look something like this after those changes
Code:
.class abstract Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.super Ljava/lang/Object;
.source "GlobalActions.java"
# interfaces
.implements Lcom/android/internal/policy/impl/GlobalActions$Action;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/internal/policy/impl/GlobalActions;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x40a
name = "SinglePressAction"
.end annotation
# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;
# instance fields
.field private final mIconResId:I
.field private final mMessageResId:I
# direct methods
.method static constructor <clinit>()V
.registers 3
const/4 v0, 0x4
new-array v0, v0, [Ljava/lang/String;
const/4 v1, 0x0
const-string v2, "Reboot"
aput-object v2, v0, v1
const/4 v1, 0x1
const-string v2, "Hot Boot"
aput-object v2, v0, v1
const/4 v1, 0x2
const-string v2, "Download"
aput-object v2, v0, v1
const/4 v1, 0x3
const-string v2, "Recovery"
aput-object v2, v0, v1
sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
return-void
.end method
.method protected constructor <init>(II)V
.registers 3
.parameter "iconResId"
.........
.........
-Compile .jar and your done.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click to expand...
Click to collapse
Note : This is not my work..I'm just sharing the work of the XDA Member kahvitahra :
Original Thread - http://forum.xda-developers.com/showpost.php?p=38379872&postcount=184

Batt. %
ImBJ said:
original thread - http://forum.xda-developers.com/show...&postcount=184 Samsung JB roms
What you need to do is:
-Decompile android.policy.jar of your rom
-Copy attached JB folder to yours (POST 1)
-In file "GlobalActions$99.smali" there is id 0x1110008, you might want to check that this id is same in you roms puplic.xml ( config_sf_slowBlur ).
( check also that ids 0x104000a = "ok" -string and 0x104 = "cancel" -string matches in your framework. )
-Open GlobalActions.smali
-Search line "new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$5;" ( some roms might have different number on reboot button. You find right one by for example tracking mRestart. See example below. )
-Change number 5 to 99 ( two of them )
Before
Code:
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$5;
const v1, 0x1080640
const v2, 0x1040165
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$5;->(Lcom/android/internal/policy/impl/GlobalActions;II)V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
After
Code:
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$99;
const v1, 0x1080640
const v2, 0x1040165
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$99;->(Lcom/android/internal/policy/impl/GlobalActions;II)V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
-Open GlobalActions$SinglePressAction.smali
-Before line "# instance fields"
paste following code
Code:
# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;
-Then after line "# direct methods"
paste following code
Code:
.method static constructor <clinit>()V
.registers 3
const/4 v0, 0x4
new-array v0, v0, [Ljava/lang/String;
const/4 v1, 0x0
const-string v2, "Reboot"
aput-object v2, v0, v1
const/4 v1, 0x1
const-string v2, "Hot Boot"
aput-object v2, v0, v1
const/4 v1, 0x2
const-string v2, "Download"
aput-object v2, v0, v1
const/4 v1, 0x3
const-string v2, "Recovery"
aput-object v2, v0, v1
sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
return-void
.end method
-So your file should look something like this after those changes
Code:
.class abstract Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.super Ljava/lang/Object;
.source "GlobalActions.java"
# interfaces
.implements Lcom/android/internal/policy/impl/GlobalActions$Action;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/internal/policy/impl/GlobalActions;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x40a
name = "SinglePressAction"
.end annotation
# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;
# instance fields
.field private final mIconResId:I
.field private final mMessageResId:I
# direct methods
.method static constructor <clinit>()V
.registers 3
const/4 v0, 0x4
new-array v0, v0, [Ljava/lang/String;
const/4 v1, 0x0
const-string v2, "Reboot"
aput-object v2, v0, v1
const/4 v1, 0x1
const-string v2, "Hot Boot"
aput-object v2, v0, v1
const/4 v1, 0x2
const-string v2, "Download"
aput-object v2, v0, v1
const/4 v1, 0x3
const-string v2, "Recovery"
aput-object v2, v0, v1
sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
return-void
.end method
.method protected constructor <init>(II)V
.registers 3
.parameter "iconResId"
.........
.........
-Compile .jar and your done.
Click to expand...
Click to collapse
[/QUOTE]
Are the screen shots of sg star??? If yes how did u enabled battery percentage????

deleted

Are the screen shots of sg star??? If yes how did u enabled battery percentage????[/QUOTE]
its galaxy young !! i'll post the tutorial for battery percentage later..

U can also do this using xposed module xblast tools
Sent from my GT-S5282 using Tapatalk

T3snake said:
U can also do this using xposed module xblast tools
Sent from my GT-S5282 using Tapatalk
Click to expand...
Click to collapse
i agree !! but this is for custom roms !! so people can have it without xblast tool !!

nice tut thank bro for this mod

Are the screen shots of sg star??? If yes how did u enabled battery percentage????[/QUOTE]
charging lol

Related

[TUTORIAL] How to add various framework mods

SKIP TRACK VIA VOL LONG PRESS
Requirements
1) android.policy.jar
2) APKTOOL
3) Notepad++
4)winrar or 7zip
5) and some patience.
1-STEP
open the android.policy.jar with winrar or 7zip archive and pull classes.dex file to ur apktool folder.
2-STEP
decompile the classes.dex using apktool
for this press shift and right mouse click to open cmd prompt..
then add the cmd in cmd prompt to decompile ..
Code:
java -jar baksmali.jar -o classout/ classes.dex
after that u will get a classout folder in apktool folder.
3-STEP
inside the classout folder navigate to com\android\internal\policy\impl\PhoneWindowManager.smali
once u open PhoneWindowManager.smali add the following lines.
Find:
Code:
.field static final LONG_PRESS_POWER_SHUT_OFF:I = 0x2
.field static final NAVIGATION_BAR_LAYER:I = 0x12
.field static final PHONE_LAYER:I = 0x3
Add the RED color highlighted lines between them
Code:
.field static final LONG_PRESS_POWER_SHUT_OFF:I = 0x2
[COLOR="Red"].field private static final LONG_PRESS_TIMEOUT:I = 0x3e8[/COLOR]
.field static final NAVIGATION_BAR_LAYER:I = 0x12
.field static final PHONE_LAYER:I = 0x3
Find:
Code:
.field mIncallPowerBehavior:I
.field mKeyboardTapVibePattern:[J
.field mKeyguard:Landroid/view/WindowManagerPolicy$WindowState;
Add the RED color highlighted lines between them
Code:
.field mIncallPowerBehavior:I
[COLOR="red"].field mIsLongPress:Z
[/COLOR]
.field mKeyboardTapVibePattern:[J
.field mKeyguard:Landroid/view/WindowManagerPolicy$WindowState;
Find:
Code:
.field private mVolumeDownKeyTriggered:Z
.field private mVolumeUpKeyTriggered:Z
.field mWindowManager:Landroid/view/IWindowManager;
.field mWindowManagerFuncs:Landroid/view/WindowManagerPolicy$WindowManagerFuncs;
Add the RED color highlighted lines between them
Code:
.field private mVolumeDownKeyTriggered:Z
[COLOR="red"].field private final mVolumeDownLongPress:Ljava/lang/Runnable;[/COLOR]
.field private mVolumeUpKeyTriggered:Z
[COLOR="red"].field private final mVolumeUpLongPress:Ljava/lang/Runnable;[/COLOR]
.field mWindowManager:Landroid/view/IWindowManager;
.field mWindowManagerFuncs:Landroid/view/WindowManagerPolicy$WindowManagerFuncs;
Find:
Code:
.line 3586
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$21;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$21;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mScreenLockTimeout:Ljava/lang/Runnable;
return-void
.end method
Add the RED color highlighted lines between them
Code:
.line 3586
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$21;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$21;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mScreenLockTimeout:Ljava/lang/Runnable;
[COLOR="red"]
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$23;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$23;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$24;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$24;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;[/COLOR]
return-void
.end method
Find:
Code:
iget-object v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v3}, Landroid/os/PowerManager$WakeLock;->release()V
throw v2
.end method
.method public hasNavigationBar()Z
.registers 2
Add the RED color highlighted lines between them
Code:
iget-object v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v3}, Landroid/os/PowerManager$WakeLock;->release()V
throw v2
.end method
[COLOR="red"].method handleVolumeLongPress(I)V
.registers 6
.parameter "keycode"
.prologue
const/16 v1, 0x18
if-eq p1, v1, :cond_7
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
goto :goto_9
:cond_7
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
:goto_9
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
sget v2, Lcom/android/internal/policy/impl/PhoneWindowManager;->LONG_PRESS_TIMEOUT:I
int-to-long v2, v2
invoke-virtual {v1, v0, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
return-void
.end method
.method handleVolumeLongPressAbort()V
.registers 3
.prologue
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
return-void
.end method[/COLOR]
.method public hasNavigationBar()Z
.registers 2
Find:
Code:
.line 2841
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPendingScreenshotChordAction()V
goto :goto_c2
.line 2843
Add the RED color highlighted lines between them
Code:
.line 2841
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPendingScreenshotChordAction()V
[COLOR="red"]invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPressAbort()V
invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->isMusicActive()Z
move-result v12
if-eqz v12, :cond_c2
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
move v12, v0
if-nez v12, :cond_c2
and-int/lit8 v12, v10, 0x1
if-nez v12, :cond_c2
const/4 v12, 0x3
move-object/from16 v0, p0
invoke-virtual {v0, v12, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
[/COLOR]
goto :goto_c2
.line 2843
Find:
Code:
.line 2853
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPendingScreenshotChordAction()V
goto/16 :goto_c2
.line 2879
Add the RED color highlighted lines between them
Code:
.line 2853
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPendingScreenshotChordAction()V
[COLOR="Red"] invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPressAbort()V
invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->isMusicActive()Z
move-result v12
if-eqz v12, :cond_c2
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
move v12, v0
if-nez v12, :cond_c2
and-int/lit8 v12, v10, 0x1
if-nez v12, :cond_c2
const/4 v12, 0x3
move-object/from16 v0, p0
invoke-virtual {v0, v12, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V[/COLOR]
goto/16 :goto_c2
.line 2879
Find:
Code:
if-nez v12, :cond_23
.line 2894
const/4 v12, 0x3
invoke-virtual {p0, v12, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
goto/16 :goto_23
.line 2902
Add the RED color highlighted lines between them
Code:
if-nez v12, :cond_23
.line 2894
const/4 v12, 0x3
[COLOR="red"]const/4 v7, 0x0[/COLOR]
invoke-virtual {p0, v12, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
[COLOR="red"]move v0, v7
move-object/from16 v1, p0
iput-boolean v0, v1, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
move-object/from16 v0, p0
invoke-virtual {v0, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPress(I)V
[/COLOR]
goto/16 :goto_23
.line 2902
Find:
Code:
.method sendCloseSystemWindows(Ljava/lang/String;)V
.registers 3
.parameter "reason"
.prologue
.line 3246
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-static {v0, p1}, Lcom/android/internal/policy/impl/PhoneWindowManager;->sendCloseSystemWindows(Landroid/content/Context;Ljava/lang/String;)V
.line 3247
return-void
.end method
.method setAttachedWindowFrames(Landroid/view/WindowManagerPolicy$WindowState;IILandroid/view/WindowManagerPolicy$WindowState;ZLandroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;)V
.registers 12
.parameter "win"
Add the RED color highlighted lines between them
Code:
.method sendCloseSystemWindows(Ljava/lang/String;)V
.registers 3
.parameter "reason"
.prologue
.line 3246
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-static {v0, p1}, Lcom/android/internal/policy/impl/PhoneWindowManager;->sendCloseSystemWindows(Landroid/content/Context;Ljava/lang/String;)V
.line 3247
return-void
.end method
[COLOR="red"].method protected sendFMBroadcast(Landroid/content/Intent;)V
.registers 3
.parameter "intent"
.prologue
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v0, p1}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
return-void
.end method
.method protected sendMediaButtonEvent(I)V
.registers 15
.parameter "code"
.prologue
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v1
.local v1, eventtime:J
new-instance v11, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v11, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
.local v11, downIntent:Landroid/content/Intent;
new-instance v0, Landroid/view/KeyEvent;
const/4 v5, 0x0
const/4 v7, 0x0
move-wide v3, v1
move v6, p1
invoke-direct/range {v0 .. v7}, Landroid/view/KeyEvent;-><init>(JJIII)V
.local v0, downEvent:Landroid/view/KeyEvent;
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v11, v4, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v11, v5}, Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;)V
new-instance v12, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v12, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
.local v12, upIntent:Landroid/content/Intent;
new-instance v3, Landroid/view/KeyEvent;
const/4 v8, 0x1
const/4 v10, 0x0
move-wide v4, v1
move-wide v6, v1
move v9, p1
invoke-direct/range {v3 .. v10}, Landroid/view/KeyEvent;-><init>(JJIII)V
.local v3, upEvent:Landroid/view/KeyEvent;
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v12, v4, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v12, v5}, Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;)V
return-void
.end method[/COLOR]
.method setAttachedWindowFrames(Landroid/view/WindowManagerPolicy$WindowState;IILandroid/view/WindowManagerPolicy$WindowState;ZLandroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;)V
.registers 12
.parameter "win"
4-STEP
add the following smali files in classoutcom\android\internal\policy\impl
PhoneWindowManager$23.smali
PhoneWindowManager$24.smali
(i have provided these two files in resources.zip attached below this post)
5-STEP
recompiling
come back to apktool main folder.and in the cmd prompt type this cmd to recompile..
Code:
java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
and once its recompiled rename the new-classes.dex to classes.dex
and open the android.policy.jar with winrar archive drag the newly recompiled classes.dex into the archive and select compression level to store.
and ur done..
6-STEP
push the android.policy.jar into system/framework..
flash it via cwm using a flashable zip (i have also provided a flashable zip formate see attachment)
and u have a working skip to track in ur rom
Hope it helps u guys
if u guys are having trouble making it ...make a req to me ill make one for u when iam free..
ps-when it comes to making a thread iam really bad at it plz co-operate
How to add xperia S/T lockscreen and small apps
Xperia S/T Lockscreen TUT​
requirements.
framework-res.apk
android.policy.jar
notpad++
winrar
knowledge of how to decompile and recompile
If u guys want a good tut for de/recompiling here is good guide by my good friend Stanlin salu
http://forum.xda-developers.com/showthread.php?t=2011254
1-STEP
decompile framework-res.apk
navigate to res/values
and open strings.xml
here add these two at the end (see pic for reference.) and save it
Code:
<string name="permlab_external_lockscreen">xperia lockscreen</string>
<string name="permdesc_external_lockscreen">xperia loxkscreen</string>
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
2-STEP
in the same values folder
open public.xml
and these strings just below the line show in the below pic and save it
Code:
<public type="string" name="permlab_external_lockscreen" id="0x01040525" />
<public type="string" name="permdesc_external_lockscreen" id="0x01040526" />
IMPORTANT
0x01040525 ,0x01040526 these are called hex codes and should in a proper order
for ex from the above codes the last 4 hex codes should in this way
0x01040524
0x01040525
0x01040526
0x01040527
a little info about hex codes
hex codes starts from 0-9 and a-f and so one
so they must in the order according to it.
Click to expand...
Click to collapse
3-STEP
come back to main framework-res folder
and open AndroidManifest.xml
and add these line just below line shown in the pic and save it
Code:
<permission android:label="@string/permlab_external_lockscreen" android:name="com.sonyericsson.permission.EXTERNAL_LOCKSCREEN" android:protectionLevel="signatureOrSystem" android:description="@string/permdesc_external_lockscreen" />
4-STEP
recompile the framework-res.apk
5-STEP
decompile android.policy.jar
navigate to com\android\internal\policy\impl\
and add this ExternalLockScreen.smali file there (smali file is provided by in the resources zip attached in this post)
and recompile it back
6-STEP
i have attached a flashable zip for format in this post below
put the following files it
uxpnxtlockscreen.apk (provided in resorces zip by me)
settings.apk (which supports XS LS , which can be found easily in this forum) (or may be later ill tell how to add them in ur settings)
android.policy.jar
framework-res.apk
zip and flash it..and ur done ...
HOW TO ADD SMALL APPS​
1-STEP
Decompile framework-res.apk
and navigate to res/values/strings.xml
and add these 4 lines at the end as shown in the pic. and save it
Code:
<string name="permlab_smallapp">Small application overlay</string>
<string name="permdesc_smallapp">Allows running movable small applications on top of other applications.</string>
<string name="permlab_externalTaskSwitcher">Start as an external task switcher</string>
<string name="permdesc_externalTaskSwitcher">Allows the application to be an external task switcher replacing the native task switcher</string>
2-STEP
in the same values folder open public.xml
and add these 4 lines below the line shown in the pic and save it
Code:
<public type="string" name="permlab_smallapp" id="0x01040550" />
<public type="string" name="permdesc_smallapp" id="0x01040551" />
<public type="string" name="permlab_externalTaskSwitcher" id="0x01040552" />
<public type="string" name="permdesc_externalTaskSwitcher" id="0x01040553" />
3-STEP
come back to main framework-res folder
and open AndroidManifest.xml
now add this line as shown in the pic
Code:
<permission android:label="@string/permlab_externalTaskSwitcher" android:name="com.sonymobile.permission.EXTERNAL_TASK_SWITCHER" android:protectionLevel="signatureOrSystem" android:description="@string/permdesc_externalTaskSwitcher" />
and this line as shown in pic .and save it
Code:
<permission android:label="@string/permlab_smallapp" android:name="com.sony.smallapp.permission.SMALLAPP" android:protectionLevel="dangerous" android:description="@string/permdesc_smallapp" />
Now recompile the framework-res.apk
4-STEP
decompile framework.jar
and the whole sony folder which consists of small apps samli (i have provided in small apps resources.zip )
recompile it
done
5-STEP
u need some framework files and some permissions files ( provided in resources.zip)
1-etc/permissions
2- small app framework jar file
3-small apps supported services.
4-the small apps
6-STEP
now all mods are ready only thing need is small apps (which i have provided in small apps resources.zip)
and also make u use the small apps supported susyemUI.apk (which can be found in this forum)
put all these files in the flashable zip formate i have provided below..
and enjoy ur small apps
CREDITS:
AOEN WORLD -for resources.
hmm
might need also
i better stop reserving posts...hehe
Wow nice :thumbup: request for hold back to kill app
hehe
Sent from my WT19i using Tapatalk 2
respect bro thanks
Sent from my SK17i using xda premium
tonnitube said:
Wow nice :thumbup: request for hold back to kill app
hehe
Sent from my WT19i using Tapatalk 2
Click to expand...
Click to collapse
no iam not adding back to kill tut...bcz its more complicated (even iam trying to understand it day by day) no req will be taken for back to kill
Nice, let's try the skip tracking on miui
anerik said:
Nice, let's try the skip tracking on miui
Click to expand...
Click to collapse
try it bro...if ur not successful make me a req ill do it ok
sandy7 said:
try it bro...if ur not successful make me a req ill do it ok
Click to expand...
Click to collapse
Sure, thanks!
I'll try this on xperia nexus and let u know asap....
Regards,
AJ
Sent from my Xperia Mini Pro using Tapatalk 2
Works fine on MIUI bro, thx!!
anerik said:
Works fine on MIUI bro, thx!!
Click to expand...
Click to collapse
so learnt some thing ,,,good for u..
You rock my friend!!!! :laugh:
Great thread!!!!
Nice guide
very nicely explained
serajr said:
You rock my friend!!!! :laugh:
Great thread!!!!
Click to expand...
Click to collapse
thanks buddy ...u are the inspiration for me
mv_style said:
Nice guide
very nicely explained
Click to expand...
Click to collapse
thanks ...still more coming up
xperia s lockscreen and small apps tut added.
Nice guide sandy7. Surely it will help me. Thanks btw.
A very useful guide! And well written too. Thanks!
Sent from my SK17i using xda premium
Ticklefish said:
A very useful guide! And well written too. Thanks!
Sent from my SK17i using xda premium
Click to expand...
Click to collapse
Ho thanks...I think my presentation is not so bad after all.
Sent from my SK17i using XDA Premium HD app

[TUTORIAL] How to add various framework mods

SKIP TRACK VIA VOL LONG PRESS
Requirements
1) android.policy.jar
2) APKTOOL
3) Notepad++
4)winrar or 7zip
5) and some patience.
1-STEP
open the android.policy.jar with winrar or 7zip archive and pull classes.dex file to ur apktool folder.
2-STEP
decompile the classes.dex using apktool
for this press shift and right mouse click to open cmd prompt..
then add the cmd in cmd prompt to decompile ..
Code:
java -jar baksmali.jar -o classout/ classes.dex
after that u will get a classout folder in apktool folder.
3-STEP
inside the classout folder navigate to com\android\internal\policy\impl\PhoneWindowManager.smali
once u open PhoneWindowManager.smali add the following lines.
Find:
Code:
.field static final LONG_PRESS_POWER_SHUT_OFF:I = 0x2
.field static final NAVIGATION_BAR_LAYER:I = 0x12
.field static final PHONE_LAYER:I = 0x3
Add the RED color highlighted lines between them
Code:
.field static final LONG_PRESS_POWER_SHUT_OFF:I = 0x2
[COLOR="Red"].field private static final LONG_PRESS_TIMEOUT:I = 0x3e8[/COLOR]
.field static final NAVIGATION_BAR_LAYER:I = 0x12
.field static final PHONE_LAYER:I = 0x3
Find:
Code:
.field mIncallPowerBehavior:I
.field mKeyboardTapVibePattern:[J
.field mKeyguard:Landroid/view/WindowManagerPolicy$WindowState;
Add the RED color highlighted lines between them
Code:
.field mIncallPowerBehavior:I
[COLOR="red"].field mIsLongPress:Z
[/COLOR]
.field mKeyboardTapVibePattern:[J
.field mKeyguard:Landroid/view/WindowManagerPolicy$WindowState;
Find:
Code:
.field private mVolumeDownKeyTriggered:Z
.field private mVolumeUpKeyTriggered:Z
.field mWindowManager:Landroid/view/IWindowManager;
.field mWindowManagerFuncs:Landroid/view/WindowManagerPolicy$WindowManagerFuncs;
Add the RED color highlighted lines between them
Code:
.field private mVolumeDownKeyTriggered:Z
[COLOR="red"].field private final mVolumeDownLongPress:Ljava/lang/Runnable;[/COLOR]
.field private mVolumeUpKeyTriggered:Z
[COLOR="red"].field private final mVolumeUpLongPress:Ljava/lang/Runnable;[/COLOR]
.field mWindowManager:Landroid/view/IWindowManager;
.field mWindowManagerFuncs:Landroid/view/WindowManagerPolicy$WindowManagerFuncs;
Find:
Code:
.line 3586
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$21;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$21;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mScreenLockTimeout:Ljava/lang/Runnable;
return-void
.end method
Add the RED color highlighted lines between them
Code:
.line 3586
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$21;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$21;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mScreenLockTimeout:Ljava/lang/Runnable;
[COLOR="red"]
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$23;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$23;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$24;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$24;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;[/COLOR]
return-void
.end method
Find:
Code:
iget-object v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v3}, Landroid/os/PowerManager$WakeLock;->release()V
throw v2
.end method
.method public hasNavigationBar()Z
.registers 2
Add the RED color highlighted lines between them
Code:
iget-object v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v3}, Landroid/os/PowerManager$WakeLock;->release()V
throw v2
.end method
[COLOR="red"].method handleVolumeLongPress(I)V
.registers 6
.parameter "keycode"
.prologue
const/16 v1, 0x18
if-eq p1, v1, :cond_7
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
goto :goto_9
:cond_7
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
:goto_9
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
sget v2, Lcom/android/internal/policy/impl/PhoneWindowManager;->LONG_PRESS_TIMEOUT:I
int-to-long v2, v2
invoke-virtual {v1, v0, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
return-void
.end method
.method handleVolumeLongPressAbort()V
.registers 3
.prologue
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
return-void
.end method[/COLOR]
.method public hasNavigationBar()Z
.registers 2
Find:
Code:
.line 2841
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPendingScreenshotChordAction()V
goto :goto_c2
.line 2843
Add the RED color highlighted lines between them
Code:
.line 2841
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPendingScreenshotChordAction()V
[COLOR="red"]invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPressAbort()V
invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->isMusicActive()Z
move-result v12
if-eqz v12, :cond_c2
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
move v12, v0
if-nez v12, :cond_c2
and-int/lit8 v12, v10, 0x1
if-nez v12, :cond_c2
const/4 v12, 0x3
move-object/from16 v0, p0
invoke-virtual {v0, v12, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
[/COLOR]
goto :goto_c2
.line 2843
Find:
Code:
.line 2853
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPendingScreenshotChordAction()V
goto/16 :goto_c2
.line 2879
Add the RED color highlighted lines between them
Code:
.line 2853
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPendingScreenshotChordAction()V
[COLOR="Red"] invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPressAbort()V
invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->isMusicActive()Z
move-result v12
if-eqz v12, :cond_c2
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
move v12, v0
if-nez v12, :cond_c2
and-int/lit8 v12, v10, 0x1
if-nez v12, :cond_c2
const/4 v12, 0x3
move-object/from16 v0, p0
invoke-virtual {v0, v12, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V[/COLOR]
goto/16 :goto_c2
.line 2879
Find:
Code:
if-nez v12, :cond_23
.line 2894
const/4 v12, 0x3
invoke-virtual {p0, v12, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
goto/16 :goto_23
.line 2902
Add the RED color highlighted lines between them
Code:
if-nez v12, :cond_23
.line 2894
const/4 v12, 0x3
[COLOR="red"]const/4 v7, 0x0[/COLOR]
invoke-virtual {p0, v12, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
[COLOR="red"]move v0, v7
move-object/from16 v1, p0
iput-boolean v0, v1, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
move-object/from16 v0, p0
invoke-virtual {v0, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPress(I)V
[/COLOR]
goto/16 :goto_23
.line 2902
Find:
Code:
.method sendCloseSystemWindows(Ljava/lang/String;)V
.registers 3
.parameter "reason"
.prologue
.line 3246
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-static {v0, p1}, Lcom/android/internal/policy/impl/PhoneWindowManager;->sendCloseSystemWindows(Landroid/content/Context;Ljava/lang/String;)V
.line 3247
return-void
.end method
.method setAttachedWindowFrames(Landroid/view/WindowManagerPolicy$WindowState;IILandroid/view/WindowManagerPolicy$WindowState;ZLandroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;)V
.registers 12
.parameter "win"
Add the RED color highlighted lines between them
Code:
.method sendCloseSystemWindows(Ljava/lang/String;)V
.registers 3
.parameter "reason"
.prologue
.line 3246
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-static {v0, p1}, Lcom/android/internal/policy/impl/PhoneWindowManager;->sendCloseSystemWindows(Landroid/content/Context;Ljava/lang/String;)V
.line 3247
return-void
.end method
[COLOR="red"].method protected sendFMBroadcast(Landroid/content/Intent;)V
.registers 3
.parameter "intent"
.prologue
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v0, p1}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
return-void
.end method
.method protected sendMediaButtonEvent(I)V
.registers 15
.parameter "code"
.prologue
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v1
.local v1, eventtime:J
new-instance v11, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v11, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
.local v11, downIntent:Landroid/content/Intent;
new-instance v0, Landroid/view/KeyEvent;
const/4 v5, 0x0
const/4 v7, 0x0
move-wide v3, v1
move v6, p1
invoke-direct/range {v0 .. v7}, Landroid/view/KeyEvent;-><init>(JJIII)V
.local v0, downEvent:Landroid/view/KeyEvent;
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v11, v4, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v11, v5}, Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;)V
new-instance v12, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v12, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
.local v12, upIntent:Landroid/content/Intent;
new-instance v3, Landroid/view/KeyEvent;
const/4 v8, 0x1
const/4 v10, 0x0
move-wide v4, v1
move-wide v6, v1
move v9, p1
invoke-direct/range {v3 .. v10}, Landroid/view/KeyEvent;-><init>(JJIII)V
.local v3, upEvent:Landroid/view/KeyEvent;
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v12, v4, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v12, v5}, Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;)V
return-void
.end method[/COLOR]
.method setAttachedWindowFrames(Landroid/view/WindowManagerPolicy$WindowState;IILandroid/view/WindowManagerPolicy$WindowState;ZLandroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;)V
.registers 12
.parameter "win"
4-STEP
add the following smali files in classoutcom\android\internal\policy\impl
PhoneWindowManager$23.smali
PhoneWindowManager$24.smali
(i have provided these two files in resources.zip attached below this post)
5-STEP
recompiling
come back to apktool main folder.and in the cmd prompt type this cmd to recompile..
Code:
java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
and once its recompiled rename the new-classes.dex to classes.dex
and open the android.policy.jar with winrar archive drag the newly recompiled classes.dex into the archive and select compression level to store.
and ur done..
6-STEP
push the android.policy.jar into system/framework..
flash it via cwm using a flashable zip (i have also provided a flashable zip formate see attachment)
and u have a working skip to track in ur rom
Hope it helps u guys
if u guys are having trouble making it ...make a req to me ill make one for u when iam free..
ps-when it comes to making a thread iam really bad at it plz co-operate
How to add xperia S/T lockscreen and small apps
Xperia S/T Lockscreen TUT​
requirements.
framework-res.apk
android.policy.jar
notpad++
winrar
knowledge of how to decompile and recompile
If u guys want a good tut for de/recompiling here is good guide by my good friend Stanlin salu
http://forum.xda-developers.com/showthread.php?t=2011254
1-STEP
decompile framework-res.apk
navigate to res/values
and open strings.xml
here add these two at the end (see pic for reference.) and save it
Code:
<string name="permlab_external_lockscreen">xperia lockscreen</string>
<string name="permdesc_external_lockscreen">xperia loxkscreen</string>
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
2-STEP
in the same values folder
open public.xml
and these strings just below the line show in the below pic and save it
Code:
<public type="string" name="permlab_external_lockscreen" id="0x01040525" />
<public type="string" name="permdesc_external_lockscreen" id="0x01040526" />
IMPORTANT
0x01040525 ,0x01040526 these are called hex codes and should in a proper order
for ex from the above codes the last 4 hex codes should in this way
0x01040524
0x01040525
0x01040526
0x01040527
a little info about hex codes
hex codes starts from 0-9 and a-f and so one
so they must in the order according to it.
Click to expand...
Click to collapse
3-STEP
come back to main framework-res folder
and open AndroidManifest.xml
and add these line just below line shown in the pic and save it
Code:
<permission android:label="@string/permlab_external_lockscreen" android:name="com.sonyericsson.permission.EXTERNAL_LOCKSCREEN" android:protectionLevel="signatureOrSystem" android:description="@string/permdesc_external_lockscreen" />
4-STEP
recompile the framework-res.apk
5-STEP
decompile android.policy.jar
navigate to com\android\internal\policy\impl\
and add this ExternalLockScreen.smali file there (smali file is provided by in the resources zip attached in this post)
and recompile it back
6-STEP
i have attached a flashable zip for format in this post below
put the following files it
uxpnxtlockscreen.apk (provided in resorces zip by me)
settings.apk (which supports XS LS , which can be found easily in this forum) (or may be later ill tell how to add them in ur settings)
android.policy.jar
framework-res.apk
zip and flash it..and ur done ...
HOW TO ADD SMALL APPS​
1-STEP
Decompile framework-res.apk
and navigate to res/values/strings.xml
and add these 4 lines at the end as shown in the pic. and save it
Code:
<string name="permlab_smallapp">Small application overlay</string>
<string name="permdesc_smallapp">Allows running movable small applications on top of other applications.</string>
<string name="permlab_externalTaskSwitcher">Start as an external task switcher</string>
<string name="permdesc_externalTaskSwitcher">Allows the application to be an external task switcher replacing the native task switcher</string>
2-STEP
in the same values folder open public.xml
and add these 4 lines below the line shown in the pic and save it
Code:
<public type="string" name="permlab_smallapp" id="0x01040550" />
<public type="string" name="permdesc_smallapp" id="0x01040551" />
<public type="string" name="permlab_externalTaskSwitcher" id="0x01040552" />
<public type="string" name="permdesc_externalTaskSwitcher" id="0x01040553" />
3-STEP
come back to main framework-res folder
and open AndroidManifest.xml
now add this line as shown in the pic
Code:
<permission android:label="@string/permlab_externalTaskSwitcher" android:name="com.sonymobile.permission.EXTERNAL_TASK_SWITCHER" android:protectionLevel="signatureOrSystem" android:description="@string/permdesc_externalTaskSwitcher" />
and this line as shown in pic .and save it
Code:
<permission android:label="@string/permlab_smallapp" android:name="com.sony.smallapp.permission.SMALLAPP" android:protectionLevel="dangerous" android:description="@string/permdesc_smallapp" />
Now recompile the framework-res.apk
4-STEP
decompile framework.jar
and the whole sony folder which consists of small apps samli (i have provided in small apps resources.zip )
recompile it
done
5-STEP
u need some framework files and some permissions files ( provided in resources.zip)
1-etc/permissions
2- small app framework jar file
3-small apps supported services.
4-the small apps
6-STEP
now all mods are ready only thing need is small apps (which i have provided in small apps resources.zip)
and also make u use the small apps supported susyemUI.apk (which can be found in this forum)
put all these files in the flashable zip formate i have provided below..
and enjoy ur small apps
CREDITS:
AOEN WORLD -for resources.
me want this post
Nice tutorial mate good work :good:
added xperis S lockscreen and small apps TUT
Thread closed as it's cross-posted in Arc section. Please use the other thread: http://forum.xda-developers.com/showthread.php?t=2122258

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

GUIDE TO CHANGE QUICKSETTING TOGGLES ICON THEME
work perfectly in my JB rom 4.1.2 xwlsd based
Before modding do a Nandroid Backup
thanks and credit to Goldie for his help to achieve this mod:good:
thanks and credit to Didact74 for how to add a listpreference:good:
thanks and credit to CNexus for his shared observer code:good:
To achieve you need:
SecSettings.apk
SystemUI.apk
tool for decompile and compile like apktool 1.5.2;
tool for text edit like notepad++:
Start with SecSettings.apk:
Decompile SecSettings.apk ,go in res/xml ,open with text editor display_settings.xml and add the red line
Code:
<CheckBoxPreference android:persistent="false" android:title="@string/display_saving" android:key="power_saving_mode" android:summary="@string/display_saving_mode_summary" />
<CheckBoxPreference android:persistent="false" android:title="@string/notification_pulse_title" android:key="notification_pulse" />
[COLOR="Red"]<PreferenceCategory android:title="@string/statusbar_options" android:key="statusbar_options">
<ListPreference android:persistent="false" android:entries="@array/toggles_chooser_entries" android:title="@string/icon_toggles_chooser" android:key="toggles_chooser" android:summary="@string/icon_toggles_chooser_summary" android:entryValues="@array/toggles_chooser_values" />
</PreferenceCategory>[/COLOR]
Go in res/value open with text editor arrays.xml and add at the end the red line
Code:
[COLOR="Red"]<string-array name="toggles_chooser_entries">
<item>S2 Stock Toggles</item>
<item>S5 Stock Toggles</item>
<item>Green Toggles</item>
</string-array>
<string-array name="toggles_chooser_values">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>[/COLOR]
</resources>
Go in res/value open with text editor strings.xml and add at the end this line
Code:
<string name="statusbar_options">Statusbar Options</string>
<string name="icon_toggles_chooser">Toggles Theme</string>
<string name="icon_toggles_chooser_summary">Select toggles\'s icons theme</string>
</resources>
Go in smali\com\android\settings\DisplaySettings.smal i and add the following lines in RED
Code:
.field mSupportFolderType:Z
[COLOR="Red"].field private mTogglesTheme:Landroid/preference/ListPreference;[/COLOR]
.field private mTouchKeyLight:Landroid/preference/ListPreference;
In the same file find .method public onCreate and add the following lines in RED
Code:
iput-object v12, p0, Lcom/android/settings/DisplaySettings;->mFontSizePref:Landroid/preference/ListPreference;
.line 424
iget-object v12, p0, Lcom/android/settings/DisplaySettings;->mFontSizePref:Landroid/preference/ListPreference;
invoke-virtual {v12, p0}, Landroid/preference/ListPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
[COLOR="Red"]
const-string v12, "toggles_chooser"
invoke-virtual {p0, v12}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v12
check-cast v12, Landroid/preference/ListPreference;
iput-object v12, p0, Lcom/android/settings/DisplaySettings;->mTogglesTheme:Landroid/preference/ListPreference;
const-string v12, "toggles_chooser"
const/4 v13, 0x0
invoke-static {v8, v12, v13}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
iget-object v13, p0, Lcom/android/settings/DisplaySettings;->mTogglesTheme:Landroid/preference/ListPreference;
invoke-static {v12}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v12
invoke-virtual {v13, v12}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V
iget-object v13, p0, Lcom/android/settings/DisplaySettings;->mTogglesTheme:Landroid/preference/ListPreference;
invoke-virtual {v13, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V[/COLOR]
.line 426
In the same file find .method public onPreferenceChange then find this code and add the red lines ,in blue line some explanation
Code:
const-string v2, "contextualpage_settings"
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :[COLOR="Red"]cond_togglestheme[/COLOR] [COLOR="Blue"]change this from cond_2 to cond_togglestheme[/COLOR]
.line 1089
check-cast p2, Ljava/lang/Boolean;
invoke-virtual {p2}, Ljava/lang/Boolean;->booleanValue()Z
move-result v0
if-eqz v0, :cond_e
Code:
.line 1100
const-string v1, "DisplaySettings"
const-string v3, "CONTEXTUALPAGE_SWITCH_CHANGED changed = false"
invoke-static {v1, v3}, Landroid/util/Log;->secD(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_7
:cond_11
move-wide v0, v4
goto/16 :goto_3
[COLOR="Red"]:cond_togglestheme
iget-object v1, p0, Lcom/android/settings/DisplaySettings;->mTogglesTheme:Landroid/preference/ListPreference;
if-ne p1, v1, :cond_2
check-cast p2, Ljava/lang/String;
invoke-static {p2}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I
move-result v0
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "toggles_chooser"
invoke-static {v1, v2, v0}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_4[/COLOR]
.end method
Save all changes and compile SecSettings
SystemUI part
Decompile SystemUI.apk ,download this zip View attachment togglestheme.zip and put the drawable png in res\drawable-hdpi
Compile SystemUI and decompile the new SystemUI.apk to obtain the new ids of the new pngs
So open SystemUI\res\value\public and leave it open
Go in SystemUI\smali\com\android\systemui\statusbar\policy\quicksetting and open AirplaneModeQuickSettingButton,smali and add the following red lines, in blue lines some explanation
find .method public constructor <init>(Landroid/content/ContextV and change the code from this
Code:
.method public constructor <init>(Landroid/content/Context;)V
.locals 9
.parameter "context"
.prologue
const/4 v7, 0x0
.line 112
const/4 v2, 0x0
const v3, 0x7f0a00f5
const v4, 0x7f0201ba
const v5, 0x7f0201b9
const v6, 0x7f0201b8
move-object v0, p0
move-object v1, p1
move v8, v7
invoke-direct/range {v0 .. v8}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;IIIIII)V
.line 53
to this
Code:
.method public constructor <init>(Landroid/content/Context;)V
.locals 9
.parameter "context"
.prologue
[COLOR="Red"] invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "toggles_chooser"
const v3, 0x0
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
const v2, 0x1
if-eq v2, v1, :cond_themes5
const v2, 0x2
if-eq v2, v1, :cond_green
const v3, 0x7f0a00f5 [COLOR="Blue"] <--this is id of text show under the icon, this remain the same in each theme[/COLOR]
const v4, 0x7f0201ba[COLOR="Blue"] <--this id is of stock tw_quick_panel_icon_airplane_on, check if it's the same of you public[/COLOR]
const v5, 0x7f0201b9[COLOR="Blue"] <--this id is of stock tw_quick_panel_icon_airplane_off, check if it's the same of you public[/COLOR]
const v6, 0x7f0201b8[COLOR="Blue"] <--this id is of stock tw_quick_panel_icon_airplane_dim, check if it's the same of you public[/COLOR]
goto :goto_new
:cond_themes5
const v3, 0x7f0a00f5
const v4, 0x7f021104[COLOR="Blue"] <--this id is of s5tw_quick_panel_icon_airplane_on, check if it's the same of you public[/COLOR]
const v5, 0x7f021103[COLOR="Blue"] <--this id is of s5tw_quick_panel_icon_airplane_off, check if it's the same of you public[/COLOR]
const v6, 0x7f021102[COLOR="Blue"] <--this id is of s5tw_quick_panel_icon_airplane_dim, check if it's the same of you public[/COLOR]
goto :goto_new
:cond_green
const v3, 0x7f0a00f5
const v4, 0x7f0210d2[COLOR="Blue"] <--this id is of greentw_quick_panel_icon_airplane_on, check if it's the same of you public[/COLOR]
const v5, 0x7f0210d1[COLOR="Blue"] <--this id is of greentw_quick_panel_icon_airplane_off, check if it's the same of you public[/COLOR]
const v6, 0x7f0210d0[COLOR="Blue"] <--this id is of greentw_quick_panel_icon_airplane_dim, check if it's the same of you public[/COLOR]
:goto_new[/COLOR]
const/4 v7, 0x0
.line 112
const/4 v2, 0x0
move-object v0, p0
move-object v1, p1
move v8, v7
invoke-direct/range {v0 .. v8}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;IIIIII)V
.line 53
then apply the same code for these others smali file:
AllShareCastQuickSettingButton
AutoRotateQuickSettingButton
BluetoothQuickSettingButton
DoNotDisturbQuickSettingButton
DormantModeQuickSettingButton
DrivingModeQuickSettingButton
LocationQuickSettingButton
MobileDataQuickSettingButton
MultiWindowQuickSettingButton
NfcP2pQuickSettingButton
PowerSavingQuickSettingButton
SBeamQuickSettingButton
SilentModeQuickSettingButton
SmartStayQuickSettingButton
SyncQuickSettingButton
WifiQuickSettingButton
In the SilentModeQuickSettingButton.smali change code from this
Code:
.method public constructor <init>(Landroid/content/Context;)V
.locals 9
.parameter "context"
.prologue
const/4 v2, 0x0
const v5, 0x7f0201ed
.line 53
const v3, 0x7f0a00ed
const v4, 0x7f0201ec
const/4 v6, 0x0
const v7, 0x7f0201eb
move-object v0, p0
move-object v1, p1
move v8, v5
invoke-direct/range {v0 .. v8}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;IIIIII)V
.line 36
iput-object v2, p0, Lcom/android/systemui/statusbar/policy/quicksetting/SilentModeQuickSettingButton;->mAudioManager:Landroid/media/AudioManager;
to this
Code:
.method public constructor <init>(Landroid/content/Context;)V
.locals 9
.parameter "context"
.prologue
[COLOR="Red"] invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "toggles_chooser"
const v3, 0x0
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
const v2, 0x1
if-eq v2, v1, :cond_themes5
const v2, 0x2
if-eq v2, v1, :cond_green
const v5, 0x7f0201ed [COLOR="Blue"] this id is stock tw_quick_panel_icon_silent_on [/COLOR]
const v3, 0x7f0a00ed[COLOR="Blue"] this id is for the text[/COLOR]
const v4, 0x7f0201ec[COLOR="Blue"] this id is stock tw_quick_panel_icon_silent_off [/COLOR]
const v7, 0x7f0201eb[COLOR="Blue"] this id is stock tw_quick_panel_icon_silent_on_on [/COLOR]
goto :goto_new
:cond_themes5
const v5, 0x7f02112a[COLOR="Blue"] this id is s5tw_quick_panel_icon_silent_on [/COLOR]
const v3, 0x7f0a00ed
const v4, 0x7f021128[COLOR="Blue"] this id is s5tw_quick_panel_icon_silent_on [/COLOR]
const v7, 0x7f021127[COLOR="Blue"] this id is s5tw_quick_panel_icon_silent_on [/COLOR]
goto :goto_new
:cond_green
const v5, 0x7f0210f8[COLOR="Blue"] this id is greentw_quick_panel_icon_silent_on [/COLOR]
const v3, 0x7f0a00ed
const v4, 0x7f0210f7[COLOR="Blue"] this id is greentw_quick_panel_icon_silent_on [/COLOR]
const v7, 0x7f0210f6[COLOR="Blue"] this id is greentw_quick_panel_icon_silent_on [/COLOR]
:goto_new[/COLOR]
const/4 v2, 0x0
.line 53
const/4 v6, 0x0
move-object v0, p0
move-object v1, p1
move v8, v5
invoke-direct/range {v0 .. v8}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;IIIIII)V
.line 36
iput-object v2, p0, Lcom/android/systemui/statusbar/policy/quicksetting/SilentModeQuickSettingButton;->mAudioManager:Landroid/media/AudioManager;
For each smali files check each ids with yours in your public.xml
This part add the observer, is to change the icons theme in real time, whitout this part you need to restart device to show the changes
Go in SystemUI\smali\com\android\systemui\statusbar\policy\quicksetting and open QuickSettingPanel
find .method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V and add the following red lines at the end
Code:
.line 99
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;->update()V
.line 100
[COLOR="Red"]iget-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
invoke-direct {p0, v0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;->regObserver(Landroid/content/ContentResolver;)V[/COLOR]
return-void
.end method
then add this entire in red method like this
Code:
.method static synthetic access$100(Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;)I
.locals 1
.parameter "x0"
.prologue
.line 51
iget v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;->mButtonCnt:I
return v0
.end method
[COLOR="Red"].method static synthetic access$500(Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;)V
.locals 0
.parameter
.prologue
.line 83
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;->refreshView()V
return-void
.end method[/COLOR]
.method private disableQuickSettingButton([Ljava/lang/String;)[Ljava/lang/String;
.locals 3
then add this entire in red method like this
Code:
:cond_2
invoke-virtual {p0, v11}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;->prepareTranslationX(Z)V
.line 345
return-void
.end method
[COLOR="Red"].method private regObserver(Landroid/content/ContentResolver;)V
.locals 3
.parameter "cs"
.prologue
const/4 v2, 0x0
new-instance v0, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel$SettingsObserver;
new-instance v1, Landroid/os/Handler;
invoke-direct {v1}, Landroid/os/Handler;-><init>()V
invoke-direct {v0, p0, p0, v1}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel$SettingsObserver;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;Landroid/os/Handler;)V
.local v0, ob:Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel$SettingsObserver;
const-string v1, "toggles_chooser"
invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
invoke-virtual {p1, v1, v2, v0}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
return-void
.end method[/COLOR]
.method private setViewWidth()I
.locals 5
then add this smali file View attachment QuickSettingPanel$SettingsObserver.zip in SystemUI\smali\com\android\systemui\statusbar\policy\quicksetting
Save all changes and compile SystemUI, the put SecSettings.apk and SystemUI.apk in your device.
reserved
hey buddy.
been trying to do this mod this morning but having problems.
my code doesn't match yours as im using android4.4 so its alittle different.
can you see from the below how I should change mine?
Code:
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.locals 8
.parameter "context"
.prologue
const v1, 0x7f0a00e5
const/4 v7, 0x1
const/4 v5, 0x0
.line 145
const/4 v2, 0x0
sget-boolean v0, Lcom/android/systemui/statusbar/Feature;->mUseJellyBeanGUI:Z
if-nez v0, :cond_0
move v0, v7
:goto_0
invoke-direct {p0, p1, v2, v0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Z)V
.line 64
iput-boolean v5, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mIsTurningOn:Z
.line 65
iput-boolean v5, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mIsTurningOff:Z
.line 68
iput-boolean v5, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mIsWaitingForEcmExit:Z
.line 79
new-instance v0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$1;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$1;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mIntentReceiver:Landroid/content/BroadcastReceiver;
.line 117
new-instance v0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$2;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$2;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mPhoneStateListener:Landroid/telephony/PhoneStateListener;
.line 147
sget-boolean v0, Lcom/android/systemui/statusbar/Feature;->mUseJellyBeanGUI:Z
if-eqz v0, :cond_1
.line 148
const v2, 0x7f0201ac
const v3, 0x7f0201ab
const v4, 0x7f0201aa
move-object v0, p0
move v6, v5
invoke-virtual/range {v0 .. v6}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;->initLayout(IIIIII)V
maskerwsk said:
hey buddy.
been trying to do this mod this morning but having problems.
my code doesn't match yours as im using android4.4 so its alittle different.
can you see from the below how I should change mine?
Code:
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.locals 8
.parameter "context"
.prologue
const v1, 0x7f0a00e5
const/4 v7, 0x1
const/4 v5, 0x0
.line 145
const/4 v2, 0x0
sget-boolean v0, Lcom/android/systemui/statusbar/Feature;->mUseJellyBeanGUI:Z
if-nez v0, :cond_0
move v0, v7
:goto_0
invoke-direct {p0, p1, v2, v0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Z)V
.line 64
iput-boolean v5, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mIsTurningOn:Z
.line 65
iput-boolean v5, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mIsTurningOff:Z
.line 68
iput-boolean v5, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mIsWaitingForEcmExit:Z
.line 79
new-instance v0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$1;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$1;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mIntentReceiver:Landroid/content/BroadcastReceiver;
.line 117
new-instance v0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$2;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$2;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mPhoneStateListener:Landroid/telephony/PhoneStateListener;
.line 147
sget-boolean v0, Lcom/android/systemui/statusbar/Feature;->mUseJellyBeanGUI:Z
if-eqz v0, :cond_1
.line 148
const v2, 0x7f0201ac
const v3, 0x7f0201ab
const v4, 0x7f0201aa
move-object v0, p0
move v6, v5
invoke-virtual/range {v0 .. v6}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;->initLayout(IIIIII)V
Click to expand...
Click to collapse
what are refer those three ids in your constructor?
const v2, 0x7f0201ac --> tw_quick_panel_icon_airplane_on
const v3, 0x7f0201ab --> tw_quick_panel_icon_airplane_off
const v4, 0x7f0201aa --> tw_quick_panel_icon_airplane_dim
maskerwsk said:
const v2, 0x7f0201ac --> tw_quick_panel_icon_airplane_on
const v3, 0x7f0201ab --> tw_quick_panel_icon_airplane_off
const v4, 0x7f0201aa --> tw_quick_panel_icon_airplane_dim
Click to expand...
Click to collapse
try with this
Code:
.method public constructor <init>(Landroid/content/Context;)V
.locals 8
.parameter "context"
.prologue
const v1, 0x7f0a00e5
const/4 v7, 0x1
const/4 v5, 0x0
.line 145
const/4 v2, 0x0
sget-boolean v0, Lcom/android/systemui/statusbar/Feature;->mUseJellyBeanGUI:Z
if-nez v0, :cond_0
move v0, v7
:goto_0
invoke-direct {p0, p1, v2, v0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Z)V
.line 64
iput-boolean v5, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mIsTurningOn:Z
.line 65
iput-boolean v5, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mIsTurningOff:Z
.line 68
iput-boolean v5, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mIsWaitingForEcmExit:Z
.line 79
new-instance v0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$1;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$1;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mIntentReceiver:Landroid/content/BroadcastReceiver;
.line 117
new-instance v0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$2;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$2;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mPhoneStateListener:Landroid/telephony/PhoneStateListener;
.line 147
sget-boolean v0, Lcom/android/systemui/statusbar/Feature;->mUseJellyBeanGUI:Z
if-eqz v0, :cond_1
.line 148
[COLOR="Red"] invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "toggles_chooser"
const v3, 0x0
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
const v2, 0x1
if-eq v2, v1, :cond_themes5
const v2, 0x2
if-eq v2, v1, :cond_green
const v2, 0x7f0201ac --> tw_quick_panel_icon_airplane_on
const v3, 0x7f0201ab --> tw_quick_panel_icon_airplane_off
const v4, 0x7f0201aa --> tw_quick_panel_icon_airplane_dim
goto :goto_new
:cond_themes5
const v2, 0xxxxxxxx <--this id is of s5tw_quick_panel_icon_airplane_on, check if it's the same of you public
const v3, 0xxxxxxxx <--this id is of s5tw_quick_panel_icon_airplane_off, check if it's the same of you public
const v4, 0xxxxxxxx <--this id is of s5tw_quick_panel_icon_airplane_dim, check if it's the same of you public
goto :goto_new
:cond_green
const v2, 0xxxxxxxx <--this id is of greentw_quick_panel_icon_airplane_on, check if it's the same of you public
const v3, 0xxxxxxxx <--this id is of greentw_quick_panel_icon_airplane_off, check if it's the same of you public
const v4, 0xxxxxxxx <--this id is of greentw_quick_panel_icon_airplane_dim, check if it's the same of you public
:goto_new[/COLOR]
move-object v0, p0
move v6, v5
invoke-virtual/range {v0 .. v6}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;->initLayout(IIIIII)V
instead of 0xxxxxxxx you need to check your ids,if this not work try to concact Goldie , now he is with 4.4 with his galaxy s5
thanks buddy, I've tried what you posted but still having issues.
when icon list is set to S2 Stock toggles, the airplane mode toggle is there but has no text.
when set to S5/Green toggles the airplane mode toggle disappears completely.
maskerwsk said:
thanks buddy, I've tried what you posted but still having issues.
when icon list is set to S2 Stock toggles, the airplane mode toggle is there but has no text.
when set to S5/Green toggles the airplane mode toggle disappears completely.
Click to expand...
Click to collapse
i suppose your const v1, 0x7f0a00e5 is for text, try with this
Code:
.method public constructor <init>(Landroid/content/Context;)V
.locals 8
.parameter "context"
.prologue
[COLOR="Red"] invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "toggles_chooser"
const v3, 0x0
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
const v2, 0x1
if-eq v2, v1, :cond_themes5
const v2, 0x2
if-eq v2, v1, :cond_green
const v1, 0x7f0a00e5
const v2, 0x7f0201ac --> tw_quick_panel_icon_airplane_on
const v3, 0x7f0201ab --> tw_quick_panel_icon_airplane_off
const v4, 0x7f0201aa --> tw_quick_panel_icon_airplane_dim
goto :goto_new
:cond_themes5
const v1, 0x7f0a00e5
const v2, 0xxxxxxxx <--this id is of s5tw_quick_panel_icon_airplane_on, check if it's the same of you public
const v3, 0xxxxxxxx <--this id is of s5tw_quick_panel_icon_airplane_off, check if it's the same of you public
const v4, 0xxxxxxxx <--this id is of s5tw_quick_panel_icon_airplane_dim, check if it's the same of you public
goto :goto_new
:cond_green
const v1, 0x7f0a00e5
const v2, 0xxxxxxxx <--this id is of greentw_quick_panel_icon_airplane_on, check if it's the same of you public
const v3, 0xxxxxxxx <--this id is of greentw_quick_panel_icon_airplane_off, check if it's the same of you public
const v4, 0xxxxxxxx <--this id is of greentw_quick_panel_icon_airplane_dim, check if it's the same of you public
:goto_new[/COLOR]
const/4 v7, 0x1
const/4 v5, 0x0
.line 145
const/4 v2, 0x0
sget-boolean v0, Lcom/android/systemui/statusbar/Feature;->mUseJellyBeanGUI:Z
if-nez v0, :cond_0
move v0, v7
:goto_0
invoke-direct {p0, p1, v2, v0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Z)V
.line 64
iput-boolean v5, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mIsTurningOn:Z
.line 65
iput-boolean v5, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mIsTurningOff:Z
.line 68
iput-boolean v5, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mIsWaitingForEcmExit:Z
.line 79
new-instance v0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$1;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$1;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mIntentReceiver:Landroid/content/BroadcastReceiver;
.line 117
new-instance v0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$2;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$2;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mPhoneStateListener:Landroid/telephony/PhoneStateListener;
.line 147
sget-boolean v0, Lcom/android/systemui/statusbar/Feature;->mUseJellyBeanGUI:Z
if-eqz v0, :cond_1
move-object v0, p0
move v6, v5
invoke-virtual/range {v0 .. v6}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;->initLayout(IIIIII)V
PERFECT!!!!!
thanks a lot mate, works great!! well done!!!
now for all the other toggles lol
maskerwsk said:
PERFECT!!!!!
thanks a lot mate, works great!! well done!!!
now for all the other toggles lol
Click to expand...
Click to collapse
You are welcome
Inviato dal mio GT-I9100 utilizzando Tapatalk
remuntada78 said:
You are welcome
Inviato dal mio GT-I9100 utilizzando Tapatalk
Click to expand...
Click to collapse
Hi again buddy.
just found a little issue with the mod.
When the toggle is turned off, the icons show as they should,
however when I turn on the toggle the icon disappears.
the toggle still works etc, just no icon.
any ideas
EDIT - here is the code im using in red (I removed one set of icons, only want stock and s5)
Code:
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.locals 8
.parameter "context"
.prologue
[COLOR="Red"]invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "toggles_chooser"
const v3, 0x0
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
const v2, 0x1
if-eq v2, v1, :cond_themes5
const v1, 0x7f0a00e1
const v2, 0x7f0201ef #tw_quick_panel_icon_airplane_on
const v3, 0x7f0201ee #tw_quick_panel_icon_airplane_off
goto :goto_new
:cond_themes5
const v1, 0x7f0a00e1
const v2, 0x7f0202fd #s5tw_quick_panel_icon_airplane_on
const v3, 0x7f0202fc #s5tw_quick_panel_icon_airplane_off
:goto_new[/COLOR]
const/4 v4, 0x0
.line 98
const/4 v2, 0x0
sget-boolean v0, Lcom/android/systemui/statusbar/Feature;->mUseJellyBeanGUI:Z
if-nez v0, :cond_0
const/4 v0, 0x1
:goto_0
invoke-direct {p0, p1, v2, v0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Z)V
.line 57
new-instance v0, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton$AutoRotationObserver;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton$AutoRotationObserver;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton;->mAutoRotationObserver:Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton$AutoRotationObserver;
.line 65
iput-boolean v4, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton;->mSupportFolderType:Z
.line 68
new-instance v0, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton$1;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton$1;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton;->mIntentReceiver:Landroid/content/BroadcastReceiver;
.line 100
sget-boolean v0, Lcom/android/systemui/statusbar/Feature;->mUseJellyBeanGUI:Z
if-eqz v0, :cond_1
move-object v0, p0
move v5, v4
move v6, v4
invoke-virtual/range {v0 .. v6}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;->initLayout(IIIIII)V
.line 111
:goto_1
invoke-virtual {p0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;->setListener(Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton$Listener;)V
.line 112
return-void
:cond_0
move v0, v4
.line 98
goto :goto_0
.line 108
:cond_1
const v0, 0x7f0201f0
invoke-virtual {p0, v1, v0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;->initLayout(II)V
goto :goto_1
.end method
maskerwsk said:
Hi again buddy.
just found a little issue with the mod.
When the toggle is turned off, the icons show as they should,
however when I turn on the toggle the icon disappears.
the toggle still works etc, just no icon.
any ideas
Click to expand...
Click to collapse
have you added the right ids of the toggles on?
Inviato dal mio GT-I9100 utilizzando Tapatalk
remuntada78 said:
have you added the right ids of the toggles on?
Inviato dal mio GT-I9100 utilizzando Tapatalk
Click to expand...
Click to collapse
yeah ids are correct, checked them several times.
I edited my post above btw incase you missed it
maskerwsk said:
Hi again buddy.
just found a little issue with the mod.
When the toggle is turned off, the icons show as they should,
however when I turn on the toggle the icon disappears.
the toggle still works etc, just no icon.
any ideas
EDIT - here is the code im using in red (I removed one set of icons, only want stock and s5)
Code:
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.locals 8
.parameter "context"
.prologue
[COLOR="Red"]invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "toggles_chooser"
const v3, 0x0
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
const v2, 0x1
if-eq v2, v1, :cond_themes5
const v1, 0x7f0a00e1
const v2, 0x7f0201ef #tw_quick_panel_icon_airplane_on
const v3, 0x7f0201ee #tw_quick_panel_icon_airplane_off
goto :goto_new
:cond_themes5
const v1, 0x7f0a00e1
const v2, 0x7f0202fd #s5tw_quick_panel_icon_airplane_on
const v3, 0x7f0202fc #s5tw_quick_panel_icon_airplane_off
:goto_new[/COLOR]
const/4 v4, 0x0
.line 98
const/4 v2, 0x0
sget-boolean v0, Lcom/android/systemui/statusbar/Feature;->mUseJellyBeanGUI:Z
if-nez v0, :cond_0
const/4 v0, 0x1
:goto_0
invoke-direct {p0, p1, v2, v0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Z)V
.line 57
new-instance v0, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton$AutoRotationObserver;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton$AutoRotationObserver;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton;->mAutoRotationObserver:Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton$AutoRotationObserver;
.line 65
iput-boolean v4, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton;->mSupportFolderType:Z
.line 68
new-instance v0, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton$1;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton$1;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton;->mIntentReceiver:Landroid/content/BroadcastReceiver;
.line 100
sget-boolean v0, Lcom/android/systemui/statusbar/Feature;->mUseJellyBeanGUI:Z
if-eqz v0, :cond_1
move-object v0, p0
move v5, v4
move v6, v4
invoke-virtual/range {v0 .. v6}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;->initLayout(IIIIII)V
.line 111
:goto_1
invoke-virtual {p0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;->setListener(Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton$Listener;)V
.line 112
return-void
:cond_0
move v0, v4
.line 98
goto :goto_0
.line 108
:cond_1
const v0, 0x7f0201f0
invoke-virtual {p0, v1, v0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;->initLayout(II)V
goto :goto_1
.end method
Click to expand...
Click to collapse
try to change your code like this, in blue what i changed
Code:
.method public constructor <init>(Landroid/content/Context;)V
.locals 8
.parameter "context"
.prologue
[COLOR="Red"]invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "toggles_chooser"
const v3, 0x0
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
const v2, 0x1
if-eq v2, v1, :cond_themes5
const[COLOR="Blue"] v3[/COLOR], 0x7f0a00e1
const[COLOR="Blue"] v4[/COLOR], 0x7f0201ef #tw_quick_panel_icon_airplane_on
const[COLOR="Blue"] v5[/COLOR], 0x7f0201ee #tw_quick_panel_icon_airplane_off
goto :goto_new
:cond_themes5
const[COLOR="Blue"] v3[/COLOR], 0x7f0a00e1
const[COLOR="Blue"] v4[/COLOR], 0x7f0202fd #s5tw_quick_panel_icon_airplane_on
const[COLOR="Blue"] v5[/COLOR], 0x7f0202fc #s5tw_quick_panel_icon_airplane_off
:goto_new[/COLOR]
const/4 v4, 0x0
.line 98
const/4 v2, 0x0
maskerwsk said:
Hi again buddy.
just found a little issue with the mod.
When the toggle is turned off, the icons show as they should,
however when I turn on the toggle the icon disappears.
the toggle still works etc, just no icon.
any ideas
EDIT - here is the code im using in red (I removed one set of icons, only want stock and s5)
Code:
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.locals 8
.parameter "context"
.prologue
[COLOR="Red"]invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "toggles_chooser"
const v3, 0x0
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
const v2, 0x1
if-eq v2, v1, :cond_themes5
const v1, 0x7f0a00e1
const v2, 0x7f0201ef #tw_quick_panel_icon_airplane_on
const v3, 0x7f0201ee #tw_quick_panel_icon_airplane_off
goto :goto_new
:cond_themes5
const v1, 0x7f0a00e1
const v2, 0x7f0202fd #s5tw_quick_panel_icon_airplane_on
const v3, 0x7f0202fc #s5tw_quick_panel_icon_airplane_off
:goto_new[/COLOR]
const/4 v4, 0x0
.line 98
const/4 v2, 0x0
sget-boolean v0, Lcom/android/systemui/statusbar/Feature;->mUseJellyBeanGUI:Z
if-nez v0, :cond_0
const/4 v0, 0x1
:goto_0
invoke-direct {p0, p1, v2, v0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Z)V
.line 57
new-instance v0, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton$AutoRotationObserver;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton$AutoRotationObserver;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton;->mAutoRotationObserver:Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton$AutoRotationObserver;
.line 65
iput-boolean v4, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton;->mSupportFolderType:Z
.line 68
new-instance v0, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton$1;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton$1;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton;->mIntentReceiver:Landroid/content/BroadcastReceiver;
.line 100
sget-boolean v0, Lcom/android/systemui/statusbar/Feature;->mUseJellyBeanGUI:Z
if-eqz v0, :cond_1
move-object v0, p0
move v5, v4
move v6, v4
invoke-virtual/range {v0 .. v6}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;->initLayout(IIIIII)V
.line 111
:goto_1
invoke-virtual {p0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;->setListener(Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton$Listener;)V
.line 112
return-void
:cond_0
move v0, v4
.line 98
goto :goto_0
.line 108
:cond_1
const v0, 0x7f0201f0
invoke-virtual {p0, v1, v0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;->initLayout(II)V
goto :goto_1
.end method
Click to expand...
Click to collapse
are you sure you are doing in the right way?, because in your code you talk about tw_quick_panel_icon_airplane but the file is for AutoRotateQuickSettingButton
Yeah i just left those # values to show me which ones relate to on, off, and dim. The ids are definatly right plus i would get airplane icon when toggle is off if it was wrong. Which i dont
Sent from my SM-N9005 using XDA Premium 4 mobile app
---------- Post added at 07:01 PM ---------- Previous post was at 06:59 PM ----------
And thanks ill try those new v values
Sent from my SM-N9005 using XDA Premium 4 mobile app
Didnt work with the new values. Lost toggle completly. Wondering if theres an easier way to do it using quickbutton smali rather than having to mod every toggle. Maybe setvisibility on exsisting s5 toggle files the note 3 has
Sent from my SM-N9005 using XDA Premium 4 mobile app
maskerwsk said:
Didnt work with the new values. Lost toggle completly. Wondering if theres an easier way to do it using quickbutton smali rather than having to mod every toggle. Maybe setvisibility on exsisting s5 toggle files the note 3 has
Sent from my SM-N9005 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
yes my was just an attempt
you lost your toggles because the original toggles are set with v1, v2, v3 registers so you need tu use this value
i don't understand why your code doesn't work it's right
Im wondering if it has something to do with another mod i have. I can color the toggle icons, text and background so maybe its something to do with that.
Sent from my SM-N9005 using XDA Premium 4 mobile app
maskerwsk said:
Im wondering if it has something to do with another mod i have. I can color the toggle icons, text and background so maybe its something to do with that.
Sent from my SM-N9005 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
maybe yes if the added code is in the same file where you want add the code for change the toggles

[Q] Instagram toggle slide button - Smali to Java Problems

I need a help to create a toggle slide button like the one in the instagram android app. With smaliToJava tool i got the code, but, some methods came very messy.
If we succeed, we may create a github project for everyone who want use this feature too //Sorry about the english
Smali2Java Code:
Code:
package com.instagram.ui.widget.switchbutton;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.ViewConfiguration;
import android.view.ViewParent;
import android.widget.CompoundButton;
public class IgSwitch
extends CompoundButton
{
private Drawable a;
private Drawable b;
private Drawable c;
private Rect d = new Rect();
private int e;
private float f;
private int g;
private VelocityTracker h;
private float i;
private float j;
private int k;
private int l;
private int m;
private boolean n;
public IgSwitch(Context paramContext)
{
super(paramContext);
a();
}
public IgSwitch(Context paramContext, AttributeSet paramAttributeSet)
{
super(paramContext, paramAttributeSet);
a();
}
public IgSwitch(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
{
super(paramContext, paramAttributeSet, paramInt);
a();
}
private void a()
{
setClickable(true);
ViewConfiguration localViewConfiguration = ViewConfiguration.get(getContext());
this.l = localViewConfiguration.getScaledTouchSlop();
this.m = localViewConfiguration.getScaledMinimumFlingVelocity();
this.a = getResources().getDrawable(R.drawable.toggle);
this.b = getResources().getDrawable(R.drawable.toggle_active);
this.c = getResources().getDrawable(R.drawabletoggle_nub);
this.e = this.c.getIntrinsicWidth();
this.g = (this.a.getIntrinsicWidth() - this.e);
}
private void a(MotionEvent paramMotionEvent)
{
MotionEvent localMotionEvent = MotionEvent.obtain(paramMotionEvent);
localMotionEvent.setAction(3);
super.onTouchEvent(localMotionEvent);
localMotionEvent.recycle();
}
private void a(boolean paramBoolean)
{
this.n = true;
setChecked(paramBoolean);
}
private boolean a(float paramFloat1, float paramFloat2)
{
int i1 = getPaddingTop() - this.l;
int i2 = (int)(getPaddingLeft() + (0.5F + this.f) - this.l);
int i3 = i2 + this.e + 2 * this.l;
int i4 = i1 + this.c.getIntrinsicHeight() + 2 * this.l;
return (paramFloat1 > i2) && (paramFloat1 < i3) && (paramFloat2 > i1) && (paramFloat2 < i4);
}
[COLOR="Red"] private void b(MotionEvent paramMotionEvent)
{
int i1 = 1;
this.k = 0;
if ((paramMotionEvent.getAction() == i1) && (isEnabled()))
{
int i2 = i1;
a(paramMotionEvent);
if (i2 == 0) {
break label97;
}
this.h.computeCurrentVelocity(1000);
float f1 = this.h.getXVelocity();
if (Math.abs(f1) <= this.m) {
break label89;
}
if (f1 <= 0.0F) {
break label84;
}
}
for (;;)
{
a(i1);
return;
int i3 = 0;
break;
label84:
boolean bool = false;
continue;
label89:
bool = getTargetCheckedState();
}
label97:
a(isChecked());
}[/COLOR]
private boolean getTargetCheckedState()
{
return this.f >= this.g / 2;
}
protected void onDetachedFromWindow()
{
super.onDetachedFromWindow();
if (this.h != null)
{
this.h.recycle();
this.h = null;
}
}
protected void onDraw(Canvas paramCanvas)
{
super.onDraw(paramCanvas);
float f1 = this.f / this.g;
this.b.setAlpha((int)(f1 * 255.0F));
this.a.draw(paramCanvas);
this.b.draw(paramCanvas);
int i1 = (int)(0.5F + this.f);
this.c.setBounds(i1 + getPaddingLeft(), getPaddingTop(), i1 + this.e + getPaddingLeft(), getPaddingTop() + this.c.getIntrinsicHeight());
this.c.draw(paramCanvas);
}
[COLOR="Red"] protected void onLayout(boolean paramBoolean, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
{
super.onLayout(paramBoolean, paramInt1, paramInt2, paramInt3, paramInt4);
this.d.set(getPaddingLeft(), getPaddingTop(), this.a.getIntrinsicWidth() + getPaddingLeft(), this.a.getIntrinsicHeight() + getPaddingTop());
this.a.setBounds(this.d);
this.b.setBounds(this.d);
if (isChecked()) {}
for (float f1 = this.g;; f1 = 0.0F)
{
this.f = f1;
return;
}
}[/COLOR]
protected void onMeasure(int paramInt1, int paramInt2)
{
setMeasuredDimension(this.b.getIntrinsicWidth() + getPaddingLeft() + getPaddingRight(), this.b.getIntrinsicHeight() + getPaddingTop() + getPaddingBottom());
}
[COLOR="red"] public boolean onTouchEvent(MotionEvent paramMotionEvent)
{
int i1 = 1;
if (this.h == null) {
this.h = VelocityTracker.obtain();
}
this.h.addMovement(paramMotionEvent);
switch (paramMotionEvent.getActionMasked())
{
}
for (;;)
{
i1 = super.onTouchEvent(paramMotionEvent);
float f1;
float f2;
do
{
return i1;
float f5 = paramMotionEvent.getX();
float f6 = paramMotionEvent.getY();
if ((!isEnabled()) || (!a(f5, f6))) {
break;
}
this.k = i1;
this.i = f5;
this.j = f6;
break;
switch (this.k)
{
case 0:
default:
break;
case 1:
float f3 = paramMotionEvent.getX();
float f4 = paramMotionEvent.getY();
if ((Math.abs(f3 - this.i) <= this.l) && (Math.abs(f4 - this.j) <= this.l)) {
break;
}
this.k = 2;
getParent().requestDisallowInterceptTouchEvent(i1);
this.i = f3;
this.j = f4;
return i1;
case 2:
f1 = paramMotionEvent.getX();
f2 = Math.max(0.0F, Math.min(f1 - this.i + this.f, this.g));
}
} while (f2 == this.f);
this.f = f2;
this.i = f1;
invalidate();
return i1;
if (this.k == 2)
{
b(paramMotionEvent);
return i1;
}
this.k = 0;
this.h.clear();
this.h.recycle();
this.h = null;
}
}[/COLOR]
public boolean performClick()
{
this.n = true;
return super.performClick();
}
[COLOR="Red"] public void setChecked(boolean paramBoolean)
{
super.setChecked(paramBoolean);
int i1;
if (paramBoolean)
{
i1 = this.g;
if ((!this.n) || (getWindowToken() == null)) {
break label62;
}
clearAnimation();
startAnimation(new b(this, this.f, i1, null));
}
for (;;)
{
this.n = false;
return;
i1 = 0;
break;
label62:
this.f = i1;
invalidate();
}
}[/COLOR]
}
Smali Code:
Code:
.class public Lcom/instagram/ui/widget/switchbutton/IgSwitch;
.super Landroid/widget/CompoundButton;
.source "IgSwitch.java"
# instance fields
.field private a:Landroid/graphics/drawable/Drawable;
.field private b:Landroid/graphics/drawable/Drawable;
.field private c:Landroid/graphics/drawable/Drawable;
.field private d:Landroid/graphics/Rect;
.field private e:I
.field private f:F
.field private g:I
.field private h:Landroid/view/VelocityTracker;
.field private i:F
.field private j:F
.field private k:I
.field private l:I
.field private m:I
.field private n:Z
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.locals 1
.parameter "context"
.prologue
.line 56
invoke-direct {p0, p1}, Landroid/widget/CompoundButton;-><init>(Landroid/content/Context;)V
.line 33
new-instance v0, Landroid/graphics/Rect;
invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
iput-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->d:Landroid/graphics/Rect;
.line 57
invoke-direct {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->a()V
.line 58
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 1
.parameter "context"
.parameter "attrs"
.prologue
.line 61
invoke-direct {p0, p1, p2}, Landroid/widget/CompoundButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.line 33
new-instance v0, Landroid/graphics/Rect;
invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
iput-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->d:Landroid/graphics/Rect;
.line 62
invoke-direct {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->a()V
.line 63
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.locals 1
.parameter "context"
.parameter "attrs"
.parameter "defStyle"
.prologue
.line 66
invoke-direct {p0, p1, p2, p3}, Landroid/widget/CompoundButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.line 33
new-instance v0, Landroid/graphics/Rect;
invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
iput-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->d:Landroid/graphics/Rect;
.line 67
invoke-direct {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->a()V
.line 68
return-void
.end method
.method static synthetic a(Lcom/instagram/ui/widget/switchbutton/IgSwitch;F)F
.locals 0
.parameter
.parameter
.prologue
.line 20
iput p1, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->f:F
return p1
.end method
.method static synthetic a(Lcom/instagram/ui/widget/switchbutton/IgSwitch;)I
.locals 1
.parameter
.prologue
.line 20
iget v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->g:I
return v0
.end method
.method private a()V
.locals 2
.prologue
.line 71
const/4 v0, 0x1
invoke-virtual {p0, v0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->setClickable(Z)V
.line 73
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->getContext()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Landroid/view/ViewConfiguration;->get(Landroid/content/Context;)Landroid/view/ViewConfiguration;
move-result-object v0
.line 74
invoke-virtual {v0}, Landroid/view/ViewConfiguration;->getScaledTouchSlop()I
move-result v1
iput v1, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->l:I
.line 75
invoke-virtual {v0}, Landroid/view/ViewConfiguration;->getScaledMinimumFlingVelocity()I
move-result v0
iput v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->m:I
.line 77
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->getResources()Landroid/content/res/Resources;
move-result-object v0
sget v1, Lcom/facebook/av;->toggle:I
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v0
iput-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->a:Landroid/graphics/drawable/Drawable;
.line 78
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->getResources()Landroid/content/res/Resources;
move-result-object v0
sget v1, Lcom/facebook/av;->toggle_active:I
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v0
iput-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->b:Landroid/graphics/drawable/Drawable;
.line 80
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->getResources()Landroid/content/res/Resources;
move-result-object v0
sget v1, Lcom/facebook/av;->toggle_nub:I
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v0
iput-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->c:Landroid/graphics/drawable/Drawable;
.line 81
iget-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->c:Landroid/graphics/drawable/Drawable;
invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I
move-result v0
iput v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->e:I
.line 82
iget-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->a:Landroid/graphics/drawable/Drawable;
invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I
move-result v0
iget v1, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->e:I
sub-int/2addr v0, v1
iput v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->g:I
.line 83
return-void
.end method
.method private a(Landroid/view/MotionEvent;)V
.locals 2
.parameter
.prologue
.line 254
invoke-static {p1}, Landroid/view/MotionEvent;->obtain(Landroid/view/MotionEvent;)Landroid/view/MotionEvent;
move-result-object v0
.line 255
const/4 v1, 0x3
invoke-virtual {v0, v1}, Landroid/view/MotionEvent;->setAction(I)V
.line 256
invoke-super {p0, v0}, Landroid/widget/CompoundButton;->onTouchEvent(Landroid/view/MotionEvent;)Z
.line 257
invoke-virtual {v0}, Landroid/view/MotionEvent;->recycle()V
.line 258
return-void
.end method
.method private a(Z)V
.locals 1
.parameter
.prologue
.line 288
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->n:Z
.line 289
invoke-virtual {p0, p1}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->setChecked(Z)V
.line 290
return-void
.end method
.method private a(FF)Z
.locals 5
.parameter
.parameter
.prologue
.line 173
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->getPaddingTop()I
move-result v0
iget v1, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->l:I
sub-int/2addr v0, v1
.line 174
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->getPaddingLeft()I
move-result v1
int-to-float v1, v1
iget v2, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->f:F
const/high16 v3, 0x3f00
add-float/2addr v2, v3
add-float/2addr v1, v2
iget v2, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->l:I
int-to-float v2, v2
sub-float/2addr v1, v2
float-to-int v1, v1
.line 175
iget v2, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->e:I
add-int/2addr v2, v1
iget v3, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->l:I
mul-int/lit8 v3, v3, 0x2
add-int/2addr v2, v3
.line 176
iget-object v3, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->c:Landroid/graphics/drawable/Drawable;
invoke-virtual {v3}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I
move-result v3
add-int/2addr v3, v0
iget v4, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->l:I
mul-int/lit8 v4, v4, 0x2
add-int/2addr v3, v4
.line 177
int-to-float v1, v1
cmpl-float v1, p1, v1
if-lez v1, :cond_0
int-to-float v1, v2
cmpg-float v1, p1, v1
if-gez v1, :cond_0
int-to-float v0, v0
cmpl-float v0, p2, v0
if-lez v0, :cond_0
int-to-float v0, v3
cmpg-float v0, p2, v0
if-gez v0, :cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method private b(Landroid/view/MotionEvent;)V
.locals 5
.parameter
.prologue
const/4 v1, 0x1
const/4 v2, 0x0
.line 266
iput v2, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->k:I
.line 268
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
move-result v0
if-ne v0, v1, :cond_0
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->isEnabled()Z
move-result v0
if-eqz v0, :cond_0
move v0, v1
.line 270
:goto_0
invoke-direct {p0, p1}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->a(Landroid/view/MotionEvent;)V
.line 272
if-eqz v0, :cond_3
.line 274
iget-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->h:Landroid/view/VelocityTracker;
const/16 v3, 0x3e8
invoke-virtual {v0, v3}, Landroid/view/VelocityTracker;->computeCurrentVelocity(I)V
.line 275
iget-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->h:Landroid/view/VelocityTracker;
invoke-virtual {v0}, Landroid/view/VelocityTracker;->getXVelocity()F
move-result v0
.line 276
invoke-static {v0}, Ljava/lang/Math;->abs(F)F
move-result v3
iget v4, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->m:I
int-to-float v4, v4
cmpl-float v3, v3, v4
if-lez v3, :cond_2
.line 277
const/4 v3, 0x0
cmpl-float v0, v0, v3
if-lez v0, :cond_1
.line 281
:goto_1
invoke-direct {p0, v1}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->a(Z)V
.line 285
:goto_2
return-void
:cond_0
move v0, v2
.line 268
goto :goto_0
:cond_1
move v1, v2
.line 277
goto :goto_1
.line 279
:cond_2
invoke-direct {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->getTargetCheckedState()Z
move-result v1
goto :goto_1
.line 283
:cond_3
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->isChecked()Z
move-result v0
invoke-direct {p0, v0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->a(Z)V
goto :goto_2
.end method
.method private getTargetCheckedState()Z
.locals 2
.prologue
.line 293
iget v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->f:F
iget v1, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->g:I
div-int/lit8 v1, v1, 0x2
int-to-float v1, v1
cmpl-float v0, v0, v1
if-ltz v0, :cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
# virtual methods
.method protected onDetachedFromWindow()V
.locals 1
.prologue
.line 161
invoke-super {p0}, Landroid/widget/CompoundButton;->onDetachedFromWindow()V
.line 163
iget-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->h:Landroid/view/VelocityTracker;
if-eqz v0, :cond_0
.line 164
iget-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->h:Landroid/view/VelocityTracker;
invoke-virtual {v0}, Landroid/view/VelocityTracker;->recycle()V
.line 165
const/4 v0, 0x0
iput-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->h:Landroid/view/VelocityTracker;
.line 167
:cond_0
return-void
.end method
.method protected onDraw(Landroid/graphics/Canvas;)V
.locals 6
.parameter "canvas"
.prologue
.line 110
invoke-super {p0, p1}, Landroid/widget/CompoundButton;->onDraw(Landroid/graphics/Canvas;)V
.line 115
iget v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->f:F
iget v1, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->g:I
int-to-float v1, v1
div-float/2addr v0, v1
.line 116
iget-object v1, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->b:Landroid/graphics/drawable/Drawable;
const/high16 v2, 0x437f
mul-float/2addr v0, v2
float-to-int v0, v0
invoke-virtual {v1, v0}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
.line 118
iget-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->a:Landroid/graphics/drawable/Drawable;
invoke-virtual {v0, p1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V
.line 119
iget-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->b:Landroid/graphics/drawable/Drawable;
invoke-virtual {v0, p1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V
.line 124
iget v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->f:F
const/high16 v1, 0x3f00
add-float/2addr v0, v1
float-to-int v0, v0
.line 125
iget-object v1, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->c:Landroid/graphics/drawable/Drawable;
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->getPaddingLeft()I
move-result v2
add-int/2addr v2, v0
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->getPaddingTop()I
move-result v3
iget v4, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->e:I
add-int/2addr v0, v4
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->getPaddingLeft()I
move-result v4
add-int/2addr v0, v4
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->getPaddingTop()I
move-result v4
iget-object v5, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->c:Landroid/graphics/drawable/Drawable;
invoke-virtual {v5}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I
move-result v5
add-int/2addr v4, v5
invoke-virtual {v1, v2, v3, v0, v4}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V
.line 131
iget-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->c:Landroid/graphics/drawable/Drawable;
invoke-virtual {v0, p1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V
.line 132
return-void
.end method
.method protected onLayout(ZIIII)V
.locals 6
.parameter "changed"
.parameter "left"
.parameter "top"
.parameter "right"
.parameter "bottom"
.prologue
.line 144
invoke-super/range {p0 .. p5}, Landroid/widget/CompoundButton;->onLayout(ZIIII)V
.line 146
iget-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->d:Landroid/graphics/Rect;
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->getPaddingLeft()I
move-result v1
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->getPaddingTop()I
move-result v2
iget-object v3, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->a:Landroid/graphics/drawable/Drawable;
invoke-virtual {v3}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I
move-result v3
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->getPaddingLeft()I
move-result v4
add-int/2addr v3, v4
iget-object v4, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->a:Landroid/graphics/drawable/Drawable;
invoke-virtual {v4}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I
move-result v4
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->getPaddingTop()I
move-result v5
add-int/2addr v4, v5
invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Rect;->set(IIII)V
.line 153
iget-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->a:Landroid/graphics/drawable/Drawable;
iget-object v1, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->d:Landroid/graphics/Rect;
invoke-virtual {v0, v1}, Landroid/graphics/drawable/Drawable;->setBounds(Landroid/graphics/Rect;)V
.line 154
iget-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->b:Landroid/graphics/drawable/Drawable;
iget-object v1, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->d:Landroid/graphics/Rect;
invoke-virtual {v0, v1}, Landroid/graphics/drawable/Drawable;->setBounds(Landroid/graphics/Rect;)V
.line 156
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->isChecked()Z
move-result v0
if-eqz v0, :cond_0
iget v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->g:I
int-to-float v0, v0
:goto_0
iput v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->f:F
.line 157
return-void
.line 156
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method protected onMeasure(II)V
.locals 3
.parameter "widthMeasureSpec"
.parameter "heightMeasureSpec"
.prologue
.line 136
iget-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->b:Landroid/graphics/drawable/Drawable;
invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I
move-result v0
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->getPaddingLeft()I
move-result v1
add-int/2addr v0, v1
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->getPaddingRight()I
move-result v1
add-int/2addr v0, v1
iget-object v1, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->b:Landroid/graphics/drawable/Drawable;
invoke-virtual {v1}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I
move-result v1
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->getPaddingTop()I
move-result v2
add-int/2addr v1, v2
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->getPaddingBottom()I
move-result v2
add-int/2addr v1, v2
invoke-virtual {p0, v0, v1}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->setMeasuredDimension(II)V
.line 140
return-void
.end method
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
.locals 6
.parameter "ev"
.prologue
const/4 v5, 0x2
const/4 v0, 0x1
.line 182
iget-object v1, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->h:Landroid/view/VelocityTracker;
if-nez v1, :cond_0
.line 183
invoke-static {}, Landroid/view/VelocityTracker;->obtain()Landroid/view/VelocityTracker;
move-result-object v1
iput-object v1, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->h:Landroid/view/VelocityTracker;
.line 186
:cond_0
iget-object v1, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->h:Landroid/view/VelocityTracker;
invoke-virtual {v1, p1}, Landroid/view/VelocityTracker;->addMovement(Landroid/view/MotionEvent;)V
.line 187
invoke-virtual {p1}, Landroid/view/MotionEvent;->getActionMasked()I
move-result v1
.line 188
packed-switch v1, :pswitch_data_0
.line 250
:cond_1
:goto_0
:pswitch_0
invoke-super {p0, p1}, Landroid/widget/CompoundButton;->onTouchEvent(Landroid/view/MotionEvent;)Z
move-result v0
:cond_2
:goto_1
return v0
.line 190
:pswitch_1
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result v1
.line 191
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
move-result v2
.line 192
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->isEnabled()Z
move-result v3
if-eqz v3, :cond_1
invoke-direct {p0, v1, v2}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->a(FF)Z
move-result v3
if-eqz v3, :cond_1
.line 193
iput v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->k:I
.line 194
iput v1, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->i:F
.line 195
iput v2, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->j:F
goto :goto_0
.line 201
:pswitch_2
iget v1, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->k:I
packed-switch v1, :pswitch_data_1
goto :goto_0
.line 207
:pswitch_3
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result v1
.line 208
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
move-result v2
.line 209
iget v3, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->i:F
sub-float v3, v1, v3
invoke-static {v3}, Ljava/lang/Math;->abs(F)F
move-result v3
iget v4, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->l:I
int-to-float v4, v4
cmpl-float v3, v3, v4
if-gtz v3, :cond_3
iget v3, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->j:F
sub-float v3, v2, v3
invoke-static {v3}, Ljava/lang/Math;->abs(F)F
move-result v3
iget v4, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->l:I
int-to-float v4, v4
cmpl-float v3, v3, v4
if-lez v3, :cond_1
.line 211
:cond_3
iput v5, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->k:I
.line 213
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->getParent()Landroid/view/ViewParent;
move-result-object v3
invoke-interface {v3, v0}, Landroid/view/ViewParent;->requestDisallowInterceptTouchEvent(Z)V
.line 214
iput v1, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->i:F
.line 215
iput v2, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->j:F
goto :goto_1
.line 222
:pswitch_4
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result v1
.line 223
iget v2, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->i:F
sub-float v2, v1, v2
.line 224
const/4 v3, 0x0
iget v4, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->f:F
add-float/2addr v2, v4
iget v4, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->g:I
int-to-float v4, v4
invoke-static {v2, v4}, Ljava/lang/Math;->min(FF)F
move-result v2
invoke-static {v3, v2}, Ljava/lang/Math;->max(FF)F
move-result v2
.line 225
iget v3, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->f:F
cmpl-float v3, v2, v3
if-eqz v3, :cond_2
.line 226
iput v2, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->f:F
.line 227
iput v1, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->i:F
.line 228
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->invalidate()V
goto :goto_1
.line 238
:pswitch_5
iget v1, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->k:I
if-ne v1, v5, :cond_4
.line 239
invoke-direct {p0, p1}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->b(Landroid/view/MotionEvent;)V
goto/16 :goto_1
.line 242
:cond_4
const/4 v0, 0x0
iput v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->k:I
.line 243
iget-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->h:Landroid/view/VelocityTracker;
invoke-virtual {v0}, Landroid/view/VelocityTracker;->clear()V
.line 244
iget-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->h:Landroid/view/VelocityTracker;
invoke-virtual {v0}, Landroid/view/VelocityTracker;->recycle()V
.line 245
const/4 v0, 0x0
iput-object v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->h:Landroid/view/VelocityTracker;
goto/16 :goto_0
.line 188
:pswitch_data_0
.packed-switch 0x0
:pswitch_1
:pswitch_5
:pswitch_2
:pswitch_5
.end packed-switch
.line 201
:pswitch_data_1
.packed-switch 0x0
:pswitch_0
:pswitch_3
:pswitch_4
.end packed-switch
.end method
.method public performClick()Z
.locals 1
.prologue
.line 87
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->n:Z
.line 88
invoke-super {p0}, Landroid/widget/CompoundButton;->performClick()Z
move-result v0
return v0
.end method
.method public setChecked(Z)V
.locals 5
.parameter "checked"
.prologue
const/4 v1, 0x0
.line 93
invoke-super {p0, p1}, Landroid/widget/CompoundButton;->setChecked(Z)V
.line 95
if-eqz p1, :cond_0
iget v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->g:I
.line 97
:goto_0
iget-boolean v2, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->n:Z
if-eqz v2, :cond_1
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->getWindowToken()Landroid/os/IBinder;
move-result-object v2
if-eqz v2, :cond_1
.line 98
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->clearAnimation()V
.line 99
new-instance v2, Lcom/instagram/ui/widget/switchbutton/b;
iget v3, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->f:F
int-to-float v0, v0
const/4 v4, 0x0
invoke-direct {v2, p0, v3, v0, v4}, Lcom/instagram/ui/widget/switchbutton/b;-><init>(Lcom/instagram/ui/widget/switchbutton/IgSwitch;FFLcom/instagram/ui/widget/switchbutton/a;)V
invoke-virtual {p0, v2}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->startAnimation(Landroid/view/animation/Animation;)V
.line 105
:goto_1
iput-boolean v1, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->n:Z
.line 106
return-void
:cond_0
move v0, v1
.line 95
goto :goto_0
.line 101
:cond_1
int-to-float v0, v0
iput v0, p0, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->f:F
.line 102
invoke-virtual {p0}, Lcom/instagram/ui/widget/switchbutton/IgSwitch;->invalidate()V
goto :goto_1
.end method
The button:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

Samsung Galaxy Note 4 Phone Mods Thread-Guides & Links Updated 12/3/2014

Howdy I have been compiling a list mods for the Verizon Note 4, but most should work across all variants!!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This thread is posted in the Samsung Galaxy Note 4 Unified Development Thread and can be viewed across all Note 4 Variants.
This is and will always be a work in progress, so feel free to contribute and please do!!!!
This thread assumes you know how to decompile and compile using APKTOOL.
Enjoy!!!
[Guide How-to] Verizon Note 4 Remove CD Installer & ASEC Note 4
This removes the annoying CD installer that pops up when you plug into your computer and your phone will go straight to MTP.
Enjoy!!
Remove CD Installer Download: http://d-h.st/Wm7
Just flash with TWRP
[Guide How-to] Verizon Note 4 Enable Native Call Recording Note 4
Smali edit for InCallUI.apk:
com/android/services/telephony/common/PhoneFeature.smali
Add the lines that are highlighted in RED
Code:
const-string v3, "CscFeature_VoiceCall_ConfigRecording"
invoke-virtual {v0, v3}, Lcom/sec/android/app/CscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
[COLOR="Red"]const-string v0, "RecordingAllowed"[/COLOR]
.line 1693
sget-object v3, Lcom/android/services/telephony/common/PhoneFeature;->mFeatureList:Ljava/util/HashMap;
const-string v6, "voice_call_recording"
const-string v7, "RecordingAllowed"
const-string v3, "CscFeature_VoiceCall_ConfigRecording"
invoke-virtual {v0, v3}, Lcom/sec/android/app/CscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
const-string v0, "RecordingAllowed"
.line 1693
sget-object v3, Lcom/android/services/telephony/common/PhoneFeature;->mFeatureList:Ljava/util/HashMap;
const-string v6, "voice_call_recording"
const-string v7, "RecordingAllowed"
For those not capable of doing smali edits just flash this via TWRP. Enable Call Recording
[Guide How-to] Remove Lockscreen Carrier Note 4
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
.param p0, "plmn" # Ljava/lang/CharSequence;
.param p1, "spn" # Ljava/lang/CharSequence;
.prologue
const/4 v2, 0x1
const/4 v3, 0x0
.line 310
invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v4
[COLOR="Blue"]if-eqz[/COLOR] v4, :cond_1
move v0, v2
For those of you not capable of smali edit's, just flash this via TWRP Remove Lock Screen Carrier Text
[Guide How-to] Remove Safe Volume Warning Note 4
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:
iget-object v6, p0, Landroid/media/AudioService;->mSafeMediaVolumeState:Ljava/lang/Integer;
invoke-virtual {v6}, Ljava/lang/Integer;->intValue()I
move-result v6
[COLOR="Blue"]goto :goto_td[/COLOR]
if-ne v6, v7, :cond_4
Code:
goto :goto_1
.line 6873
.end local v0 # "e":Ljava/lang/Exception;
.end local v1 # "pm":Landroid/os/PowerManager;
.end local v3 # "wl":Landroid/os/PowerManager$WakeLock;
[COLOR="Blue"]:goto_td[/COLOR]
:cond_4
monitor-exit v5
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
goto :goto_0
.end method
For those not capable of smali edit's just flash this in TWRP Remove Safe Volume Warning
[Guide How-To] Enable Call & MSG Blocking Note 4
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>
For those of you not capable of this edit, just flash this with TWRP Native Call & Message Block
[Guide How-to] Replace Recents with Menu Note 4
Keylayout edits:
system/usr/keylayout/Generic.kl
Change key 254 from APP_SWITCH to MENU
key 254 MENU
Download: Generic.kl
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.
[Guide How-to] VZW Note 4 4 Way Reboot Power Menu EPM Note 4
This will work with Odex or Deodexed Rom. To see the 4 way Menu you must hit restart on the Primary Menu!!!
First grab your Deodexed android.policy.jar from system/framework
Decompile it with APKTOOL. Look in smali\com\android\internal\policy\impl\
Find GlobalActions$SinglePressAction.smali and open with NotePad++
Look for this:
Code:
.class abstract Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.super Ljava/lang/Object;
.source "GlobalActions.java"
# interfaces
.implements Lcom/android/internal/policy/impl/GlobalActions$Action;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/internal/policy/impl/GlobalActions;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x40a
name = "SinglePressAction"
.end annotation
# instance fields
.field public customAction:I
.field public isKnoxCustom:Z
.field private final mIcon:Landroid/graphics/drawable/Drawable;
.field private final mIconResId:I
.field mLayoutId:I
.field private final mMessage:Ljava/lang/CharSequence;
.field private final mMessageResId:I
# direct methods
.method protected constructor <init>(II)V
.locals 2
.param p1, "iconResId" # I
.param p2, "messageResId" # I
Add in the Red Text to look like this:
Code:
.class abstract Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.super Ljava/lang/Object;
.source "GlobalActions.java"
# interfaces
.implements Lcom/android/internal/policy/impl/GlobalActions$Action;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/internal/policy/impl/GlobalActions;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x40a
name = "SinglePressAction"
.end annotation
[COLOR="Red"]# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;[/COLOR]
# instance fields
.field public customAction:I
.field public isKnoxCustom:Z
.field private final mIcon:Landroid/graphics/drawable/Drawable;
.field private final mIconResId:I
.field mLayoutId:I
.field private final mMessage:Ljava/lang/CharSequence;
.field private final mMessageResId:I
# direct methods
[COLOR="Red"].method static constructor <clinit>()V
.locals 3
const/4 v0, 0x4
new-array v0, v0, [Ljava/lang/String;
const/4 v1, 0x0
const-string v2, "Reboot"
aput-object v2, v0, v1
const/4 v1, 0x1
const-string v2, "Hot Boot"
aput-object v2, v0, v1
const/4 v1, 0x2
const-string v2, "Download"
aput-object v2, v0, v1
const/4 v1, 0x3
const-string v2, "Recovery"
aput-object v2, v0, v1
sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
return-void
.end method[/COLOR]
.method protected constructor <init>(II)V
.locals 2
.param p1, "iconResId" # I
.param p2, "messageResId" # I
Save file and look for GlobalActions.smali in the same folder.
Find this:
Code:
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$7;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.line 1126
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$8;
const-string v2, "VZW"
sget-object v4, Lcom/android/internal/policy/impl/GlobalActions;->mSalesCode:Ljava/lang/String;
invoke-virtual {v2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_3
const v2, 0x1080b2d
:goto_2
const v4, 0x10401cf
move-object/from16 v0, p0
invoke-direct {v3, v0, v2, v4}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.line 1164
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$9;
Change the red text to look like this:
Code:
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$7;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.line 1126
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$[COLOR="Red"]99[/COLOR];
const-string v2, "VZW"
sget-object v4, Lcom/android/internal/policy/impl/GlobalActions;->mSalesCode:Ljava/lang/String;
invoke-virtual {v2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_3
const v2, 0x1080b2d
:goto_2
const v4, 0x10401cf
move-object/from16 v0, p0
invoke-direct {v3, v0, v2, v4}, Lcom/android/internal/policy/impl/GlobalActions$[COLOR="Red"]99[/COLOR];-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.line 1164
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$9;
Save file.
Add the 3 smali files in this zip to the same folder: Smali-Files-Zip
Now recompile. That's it.
For those of you not able to edit smali. Here is a zip flashable with TWRP. VZW Note 4 4 Way EPM Menu
To see the 4 way Menu you must hit restart on the Primary Menu!!!
Enjoy!!!
Framework Mods- Note 4 Native WiFi Tether, All Rotations, Safe Media Volume Disabled, Dreams enabled, Battery Critical Warnings lowered to 1%.
Here is the download: Framework Mods
Here is the download to return to stock: Stock Framework
Enjoy!!!
[Guide How-to] Remove NFC notification icon in status bar Note 4
First grab your Features.xml from /system/csc/
Open with Notepad++ and look for following text:
Code:
<!-- NFC -->
<CscFeature_NFC_SetSecureEventType>ISIS</CscFeature_NFC_SetSecureEventType>
<CscFeature_NFC_StatusBarIconType>Vzw</CscFeature_NFC_StatusBarIconType>
<CscFeature_SmartcardSvc_SetAccessControlType>GPAC, MODE1</CscFeature_SmartcardSvc_SetAccessControlType>
<CscFeature_SmartcardSvc_HideTerminalCapability>eSE</CscFeature_SmartcardSvc_HideTerminalCapability>
<CscFeature_NFC_CardModeRoutingTypeForUicc>ROUTE_ON_WHEN_SCREEN_UNLOCK</CscFeature_NFC_CardModeRoutingTypeForUicc>
<CscFeature_NFC_EnableSecurityPromptPopup>all</CscFeature_NFC_EnableSecurityPromptPopup>
<CscFeature_NFC_EnableInvalidTagPopup>true</CscFeature_NFC_EnableInvalidTagPopup>
<CscFeature_NFC_ConfigAdvancedSettings>Disable</CscFeature_NFC_ConfigAdvancedSettings>
<CscFeature_NFC_DefaultCardModeConfig>DH:UICC</CscFeature_NFC_DefaultCardModeConfig>
Change the red text to look like this:
Code:
<!-- NFC -->
<CscFeature_NFC_SetSecureEventType>ISIS</CscFeature_NFC_SetSecureEventType>
<CscFeature_NFC_StatusBarIconType>[COLOR="Red"]none[/COLOR]</CscFeature_NFC_StatusBarIconType>
<CscFeature_SmartcardSvc_SetAccessControlType>GPAC, MODE1</CscFeature_SmartcardSvc_SetAccessControlType>
<CscFeature_SmartcardSvc_HideTerminalCapability>eSE</CscFeature_SmartcardSvc_HideTerminalCapability>
<CscFeature_NFC_CardModeRoutingTypeForUicc>ROUTE_ON_WHEN_SCREEN_UNLOCK</CscFeature_NFC_CardModeRoutingTypeForUicc>
<CscFeature_NFC_EnableSecurityPromptPopup>all</CscFeature_NFC_EnableSecurityPromptPopup>
<CscFeature_NFC_EnableInvalidTagPopup>true</CscFeature_NFC_EnableInvalidTagPopup>
<CscFeature_NFC_ConfigAdvancedSettings>Disable</CscFeature_NFC_ConfigAdvancedSettings>
<CscFeature_NFC_DefaultCardModeConfig>DH:UICC</CscFeature_NFC_DefaultCardModeConfig>
Save file and copy back to /system/csc, reboot and boom its gone!!!
Enjoy!!
[Guide How-to] Enable Private Mode with a deodexed Rom and SecureStorage=false Note 4
First thing you need to do is grab PersonalPageService.apk from system/priv-app
Decompile with APKTOOL
Find PersonalPageService\smali\com\samsung\android\personalpage\service\util\SecureProperties.smali open with Notepad++
Find the follow code:
Code:
.method public constructor <init>(Landroid/content/Context;)V
.locals 2
.param p1, "context" # Landroid/content/Context;
.prologue
const/4 v1, 0x1
.line 61
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 54
const/4 v0, 0x0
iput-object v0, p0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->mImpl:Lcom/samsung/android/personalpage/service/util/SecureProperties$PropertiesImpl;
.line 63
invoke-static {}, Landroid/os/Debug;->isProductShip()I
move-result v0
if-nez v0, :cond_3
.line 64
invoke-static {}, Lcom/sec/android/securestorage/SecureStorage;->isSupported()Z
move-result v0
if-nez v0, :cond_2
.line 65
const/4 v0, 0x0
sput-boolean v0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->SUPPORT_SECURE_STORAGE_FEATURE:Z
.line 72
:goto_0
sget-boolean v0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->SUPPORT_SECURE_STORAGE_FEATURE:Z
if-eqz v0, :cond_0
Replace the items in Red like this:
Code:
.method public constructor <init>(Landroid/content/Context;)V
.locals 2
.param p1, "context" # Landroid/content/Context;
.prologue
const/4 v1, 0x1
.line 61
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 54
const/4 v0, 0x0
iput-object v0, p0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->mImpl:Lcom/samsung/android/personalpage/service/util/SecureProperties$PropertiesImpl;
.line 63
invoke-static {}, Landroid/os/Debug;->isProductShip()I
move-result v0
[COLOR="Red"]if-nez v0, :cond_0[/COLOR]
.line 64
invoke-static {}, Lcom/sec/android/securestorage/SecureStorage;->isSupported()Z
move-result v0
[COLOR="Red"]if-nez v0, :cond_0[/COLOR]
.line 65
const/4 v0, 0x0
sput-boolean v0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->SUPPORT_SECURE_STORAGE_FEATURE:Z
.line 72
:goto_0
sget-boolean v0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->SUPPORT_SECURE_STORAGE_FEATURE:Z
if-eqz v0, :cond_0
Save file and compile apk. Push to system/priv-app
For those not capable of changing smali files here is a flashable zip: PersonalPageService.apk
Enjoy!!!
[Guide How-To] Enable Lockscreen Rotation Note 4
First grab Keyguard.apk from system/priv-app
Decompile with APKTOOL.
Open smali file smali/com/android/keyguard/KeyguardViewManager.smali
Look for the following:
Code:
.method private shouldEnableScreenRotation()Z
.locals 3
.prologue
const/4 v1, 0x0
.line 249
iget-object v2, p0, Lcom/android/keyguard/KeyguardViewManager;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
.line 250
.local v0, "res":Landroid/content/res/Resources;
const-string v2, "lockscreen.rot_override"
invoke-static {v2, v1}, Landroid/os/SystemProperties;->getBoolean(Ljava/lang/String;Z)Z
move-result v2
Replace the Red text to look like this:
Code:
Code:
.method private shouldEnableScreenRotation()Z
.locals 3
.prologue
[COLOR="Red"]const/4 v1, 0x1[/COLOR]
.line 249
iget-object v2, p0, Lcom/android/keyguard/KeyguardViewManager;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
.line 250
.local v0, "res":Landroid/content/res/Resources;
const-string v2, "lockscreen.rot_override"
invoke-static {v2, v1}, Landroid/os/SystemProperties;->getBoolean(Ljava/lang/String;Z)Z
move-result v2
Compile and push to system/priv-app
For those that are unable to edit smali here is a flashable zip: LockSceen Rotation
Enjoy!!
[Guide How-to] Disable Screen Wake Plugged/Unplugged Note 4
First grab your services.jar from system/framework and decompile with APKTOOL
Find smali\com\android\server\power\PowerManagerService .smali and open PowerManagerService with Notepad++
Look for the following:
Code:
.method private shouldWakeUpWhenPluggedOrUnpluggedLocked(ZIZ)Z
.locals 4
.param p1, "wasPowered" # Z
.param p2, "oldPlugType" # I
.param p3, "dockedOnWirelessCharger" # Z
.prologue
const/4 v1, 0x1
const/4 v0, 0x0
.line 2216
iget-boolean v2, p0, Lcom/android/server/power/PowerManagerService;->mWakeUpWhenPluggedOrUnpluggedConfig:Z
if-nez v2, :cond_1
Change to Red text to look like this:
Code:
.method private shouldWakeUpWhenPluggedOrUnpluggedLocked(ZIZ)Z
.locals 4
.param p1, "wasPowered" # Z
.param p2, "oldPlugType" # I
.param p3, "dockedOnWirelessCharger" # Z
.prologue
[COLOR="Red"]const/4 v1, 0x0[/COLOR]
const/4 v0, 0x0
.line 2216
iget-boolean v2, p0, Lcom/android/server/power/PowerManagerService;->mWakeUpWhenPluggedOrUnpluggedConfig:Z
if-nez v2, :cond_1
That's it. Compile and push to system/framework
For those of you not capable of editing smali files here is a flashable zip: Disable Screen Wake Plug/unpluged
Enjoy!!!
[Guide How-to] Bluetooth Scan Dialog Removal
First grab your SecSettings.apk from system/priv-app and decompile with APKTOOL
Find smali/com/android/settings/Bluetooth/BluetoothScanDialog.smali
Look for the follow in .method private initialize()V method:
Code:
.line 79
new-instance v4, Lcom/android/settings/bluetooth/BluetoothScanDialog$3;
invoke-direct {v4, p0, v0}, Lcom/android/settings/bluetooth/BluetoothScanDialog$3;-><init>(Lcom/android/settings/bluetooth/BluetoothScanDialog;Landroid/app/AlertDialog;)V
invoke-virtual {v0, v4}, Landroid/app/Dialog;->setOnCancelListener(Landroid/content/DialogInterface$OnCancelListener;)V
.line 86
[COLOR="Red"]invoke-virtual {v0}, Landroid/app/Dialog;->show()V[/COLOR]
.line 87
return-void
.end method
Delete the text in Red, save file and compile. That's it. push to system/priv-app
Enjoy!!!
Flashlight Toggle & Battery Stats Toggle Mod Flashable-Settings-About Phone-Status-OFFICIAL Zip Updated 12-3-2014
Here is the flashable Flashlight Toggle Mod: VZW Flash Light Battery Stats Toggle Mod-Official Status
YOU MUST WAIT AT LEAST 5-10 MINS AFTER FLASHING FOR THE MOD TO WORK.
Some of you might also have to add "Flashlight" to your settings DB via SQLite. To see the toggle.
1) Download sqlite editor app. I got it from here.
2) Open the app and give it root permissions. It should populate a list.
3) Scroll and Tap the "Settings Storage"
4) Tap "Settings.db"
5) Tap "System"
6) Scroll down until you find "notification_panel_active_app_list", tap to highlight it. I noticed its a little hard to get it highlighted because it seems to want to highlight the one under it. So you might have to tap the one right above it to get it highlighted. Make sure its the notification_panel_active_app_list, and I also updated my notification_panel_active_app_list_reset NOT the notification_panel_default_active_app_list. I picked the wrong one the first time and it didnt work.
7) Once it is highlighted tap the phones menu button.
8) Tap "Edit Record"
9) You'll see a list of all the toggles that are currently enabled to show in notification area.
10) At the bottom of the list or anywhere else in the list add ; and the words Flashlight and Battery then another ;. So it will look like this at the end. ;TouchSensitivity;Flashlight;Battery; Then press Save.
11) Reboot and you should have a Flashlight and a Battery Stats toggle now. You can now use the edit feature and move it anywhere you want in the list of toggles.
This might also have a positive side effect of the following:
When you go to Settings-About Phone-Status it might say OFFICIAL!!!
Enjoy!!!
Enable Tab view in Settings
First grab your SecSettings.apk from system/priv-app
Decompile with APKTOOL and open res.values/bools with Notepad++
look for the following 2 lines:
Code:
<bool name="settings_list">false</bool>
<bool name="settings_grid">true</bool>
Change them to look like this:
Code:
<bool name="settings_list">[COLOR="Red"]true[/COLOR]</bool>
<bool name="settings_grid">[COLOR="Red"]false[/COLOR]</bool>
That's it. Compile and push to System/priv-app
Enjoy!!
How to enable Flashlight operation with Volume
First grab your SecSettings.apk from system/priv-app and decompile with APKTOOL.
Look in res/xml for display_settings_2014.xml and open with Notepad++
Add the following line in Red. When you are done look in settings-Display and you will see Torch Light options menu
Code:
<CheckBoxPreference android:title="@string/led_indicator_settings" android:key="key_simple_led_indicator_settings" android:summary="@string/led_indicator_settings_summary" android:widgetLayout="@touchwiz:layout/preference_widget_twcheckbox" />
[COLOR="Red"]<PreferenceScreen android:title="@string/torchlight_settings" android:key="torchlight" android:fragment="com.android.settings.torchlight.TorchlightSettings" />[/COLOR]
<ListPreference android:persistent="false" android:entries="@array/touch_key_light_entries" android:title="@string/touch_key_light" android:key="touch_key_light" android:summary="@string/touch_key_light_summary" android:widgetLayout="@layout/round_more_icon" android:entryValues="@array/touch_key_light_values" />
Compile and push to system/priv-app
That's it.
Enjoy!!!!
How to Enable add Apps Ops to Settings.
First grab SecSettings.apk from system/priv-app and decompile with APKTOOL
Get gridlist_settings_headers.xml from res/xml and edit with Notepad++
Look for:
Code:
<header android:icon="@drawable/ic_setting_grid_powersaving" android:id="@id/power_saving" android:title="@string/power_saving_mode_title_k" android:fragment="com.android.settings.powersavingmode.MenuPowerSavingModeSettings" />
and add right below it the following:
Code:
<header android:icon="@drawable/ic_settings_applicationpermissions" android:title="@string/app_ops_settings" android:fragment="com.android.settings.applications.AppOpsSummary" />
Save file and compile. That's it.
Push to system/priv-app
Enjoy!!!
Great post...
Will the Wi-Fi tether mod work with the ATT Variant?
thesilentnight said:
Great post...
Will the Wi-Fi tether mod work with the ATT Variant?
Click to expand...
Click to collapse
I have not seen the AT&T firmware. You must be rooted. If you are rooted and want to send me your framework-res.apk I can take a look for you.
Sadly as far as i know, root isnt yet available yet for the ATT variant....
thesilentnight said:
Sadly as far as i know, root isnt yet available yet for the ATT variant....
Click to expand...
Click to collapse
OMG, I'm sooo glad I could write what's written in my signature.
EMSpilot said:
...Here is the flashable Flashlight Toggle Mod...
Click to expand...
Click to collapse
You sir, ROCK!!! Very good work
the "Verizon Note 4 Enable Native Call Recording Note 4"
Will this work on N910G snapdragon variant ? also, does this enable automatic call recording ?
pratik_193 said:
the "Verizon Note 4 Enable Native Call Recording Note 4"
Will this work on N910G snapdragon variant ? also, does this enable automatic call recording ?
Click to expand...
Click to collapse
If you can send me your InCallUI.apk I can take a look. No automatic call recording. When you get a call or make a call you simply tap the call recording button once on the screen.
EMSpilot said:
If you can send me your InCallUI.apk I can take a look. No automatic call recording. When you get a call or make a call you simply tap the call recording button once on the screen.
Click to expand...
Click to collapse
Here it is..
Can you make a modded secphone something we had for note 3 ? link below
http://forum.xda-developers.com/showthread.php?t=2498449
CZ Eddie said:
OMG, I'm sooo glad I could write what's written in my signature.
Click to expand...
Click to collapse
Why is that?
thesilentnight said:
Sadly as far as i know, root isnt yet available yet for the ATT variant....
Click to expand...
Click to collapse
CZ Eddie said:
OMG, I'm sooo glad I could write what's written in my signature.
Click to expand...
Click to collapse
thesilentnight said:
Why is that?
Click to expand...
Click to collapse
My sig is pretty self explanatory in regards to your earlier statement.
I ditched my grandfathered unlimited data plan with AT&T in November 2014 because AT&T won't let anyone root their Galaxy phones.
Hello, T-Mobile!
Click to expand...
Click to collapse
pratik_193 said:
Here it is..
Can you make a modded secphone something we had for note 3 ? link below
http://forum.xda-developers.com/showthread.php?t=2498449
Click to expand...
Click to collapse
Hey @EMSpilot any luck ?
pratik_193 said:
Hey @EMSpilot any luck ?
Click to expand...
Click to collapse
Where did this InCallUI.apk come from? It won't build.
EMSpilot said:
Where did this InCallUI.apk come from? It won't build.
Click to expand...
Click to collapse
i got it from the current ROM i have a N910G snapdragon... you need anything else ?
Hmm, get a whole bunch of errors when trying to decompile SecSettings.apk. I can decompile other apks fine so don't think it's something with my setup.
Code:
W: Skipping "android" package group
W: Could not decode attr value, using undecoded value instead: ns=android, name=widgetLayout, value=0x02030015
Can't find framework resources for package of id: 2. You must install proper framework files, see project website for more info
Great post op!!
Did by any chance someone tried this in an international N4?
Awesome thread!
Subscribed!
Thanks contributors!
@EMSpilot
when i try to add the torchlight mod it makes all the checkboxes in the settings menu disappear.
any idea what the problem could be? the mod itself works perfect, but the checkboxes are pretty usefull as well.
thanks in advance :good:
Psycho_666 said:
@EMSpilot
when i try to add the torchlight mod it makes all the checkboxes in the settings menu disappear.
any idea what the problem could be? the mod itself works perfect, but the checkboxes are pretty usefull as well.
thanks in advance :good:
Click to expand...
Click to collapse
What Rom are you running? NJ5? or? The mods are based on NI2. If you are running NJ5 you have to decompile do the mod compile and push back to the phone.
I'm running an ANK5 rom.
but I don't understand how it has anything to do with the checkboxes.
it's pretty frustrating
Sent from my Note 4

Categories

Resources