Related
Hi
im currently working on my new rom, but i have a big problem on status bar.
see the icons between the orange arrows, they are set to Alpha parameter.
{
"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"
}
it seems the samsung's developers are defined the alpha parameter on icons into statusbar, i do a search on xml files. it seems the parameter is defined on smali files, buti can't find that, anyone can help me? i can't read the smali files.
the xml file
Code:
<com.android.systemui.statusbar.phone.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentLeft="true" />
the smali file.
PHP:
.class public Lcom/android/systemui/statusbar/phone/IconMerger;
.super Landroid/widget/LinearLayout;
.source "IconMerger.java"
# static fields
.field private static final DEBUG:Z = false
.field private static final TAG:Ljava/lang/String; = "IconMerger"
# instance fields
.field public mCarrierNameShown:Z
.field private mIconSize:I
.field public mLongCarrierNameShown:Z
.field private mMoreView:Landroid/view/View;
# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 2
.parameter "context"
.parameter "attrs"
.prologue
const/4 v0, 0x0
.line 49
invoke-direct {p0, p1, p2}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.line 44
iput-boolean v0, p0, Lcom/android/systemui/statusbar/phone/IconMerger;->mLongCarrierNameShown:Z
.line 45
iput-boolean v0, p0, Lcom/android/systemui/statusbar/phone/IconMerger;->mCarrierNameShown:Z
.line 51
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const v1, 0x7f0c000d
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
move-result v0
iput v0, p0, Lcom/android/systemui/statusbar/phone/IconMerger;->mIconSize:I
.line 57
return-void
.end method
.method static synthetic access$000(Lcom/android/systemui/statusbar/phone/IconMerger;)Landroid/view/View;
.locals 1
.parameter "x0"
.prologue
.line 36
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/IconMerger;->mMoreView:Landroid/view/View;
return-object v0
.end method
.method private checkOverflow(I)V
.locals 10
.parameter "width"
.prologue
const/16 v9, 0x8
const/4 v6, 0x1
const/4 v7, 0x0
.line 78
iget-object v8, p0, Lcom/android/systemui/statusbar/phone/IconMerger;->mMoreView:Landroid/view/View;
if-nez v8, :cond_1
.line 115
:cond_0
:goto_0
return-void
.line 80
:cond_1
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/IconMerger;->getChildCount()I
move-result v0
.line 81
.local v0, N:I
const/4 v5, 0x0
.line 82
.local v5, visibleChildren:I
const/4 v2, 0x0
.local v2, i:I
:goto_1
if-ge v2, v0, :cond_3
.line 83
invoke-virtual {p0, v2}, Lcom/android/systemui/statusbar/phone/IconMerger;->getChildAt(I)Landroid/view/View;
move-result-object v8
invoke-virtual {v8}, Landroid/view/View;->getVisibility()I
move-result v8
if-eq v8, v9, :cond_2
add-int/lit8 v5, v5, 0x1
.line 82
:cond_2
add-int/lit8 v2, v2, 0x1
goto :goto_1
.line 85
:cond_3
iget-object v8, p0, Lcom/android/systemui/statusbar/phone/IconMerger;->mMoreView:Landroid/view/View;
invoke-virtual {v8}, Landroid/view/View;->getVisibility()I
move-result v8
if-nez v8, :cond_6
move v4, v6
.line 87
.local v4, overflowShown:Z
:goto_2
if-eqz v4, :cond_4
add-int/lit8 v5, v5, -0x1
.line 88
:cond_4
iget v8, p0, Lcom/android/systemui/statusbar/phone/IconMerger;->mIconSize:I
mul-int/2addr v8, v5
if-le v8, p1, :cond_7
move v3, v6
.line 90
.local v3, moreRequired:Z
:goto_3
iget v8, p0, Lcom/android/systemui/statusbar/phone/IconMerger;->mIconSize:I
if-gt p1, v8, :cond_5
iget v8, p0, Lcom/android/systemui/statusbar/phone/IconMerger;->mIconSize:I
if-ne p1, v8, :cond_8
:cond_5
move v1, v6
.line 92
.local v1, availableWidth:Z
:goto_4
if-eq v3, v4, :cond_9
.line 93
new-instance v6, Lcom/android/systemui/statusbar/phone/IconMerger$1;
invoke-direct {v6, p0, v3, v1}, Lcom/android/systemui/statusbar/phone/IconMerger$1;-><init>(Lcom/android/systemui/statusbar/phone/IconMerger;ZZ)V
invoke-virtual {p0, v6}, Lcom/android/systemui/statusbar/phone/IconMerger;->post(Ljava/lang/Runnable;)Z
goto :goto_0
.end local v1 #availableWidth:Z
.end local v3 #moreRequired:Z
.end local v4 #overflowShown:Z
:cond_6
move v4, v7
.line 85
goto :goto_2
.restart local v4 #overflowShown:Z
:cond_7
move v3, v7
.line 88
goto :goto_3
.restart local v3 #moreRequired:Z
:cond_8
move v1, v7
.line 90
goto :goto_4
.line 109
.restart local v1 #availableWidth:Z
:cond_9
iget-boolean v6, p0, Lcom/android/systemui/statusbar/phone/IconMerger;->mCarrierNameShown:Z
if-eqz v6, :cond_a
if-eqz v3, :cond_a
if-nez v1, :cond_a
.line 110
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/IconMerger;->mMoreView:Landroid/view/View;
invoke-virtual {v6, v9}, Landroid/view/View;->setVisibility(I)V
goto :goto_0
.line 111
:cond_a
iget-boolean v6, p0, Lcom/android/systemui/statusbar/phone/IconMerger;->mLongCarrierNameShown:Z
if-eqz v6, :cond_0
.line 112
if-eqz v3, :cond_0
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/IconMerger;->mMoreView:Landroid/view/View;
invoke-virtual {v6, v9}, Landroid/view/View;->setVisibility(I)V
goto :goto_0
.end method
# virtual methods
.method protected onLayout(ZIIII)V
.locals 1
.parameter "changed"
.parameter "l"
.parameter "t"
.parameter "r"
.parameter "b"
.prologue
.line 73
invoke-super/range {p0 .. p5}, Landroid/widget/LinearLayout;->onLayout(ZIIII)V
.line 74
sub-int v0, p4, p2
invoke-direct {p0, v0}, Lcom/android/systemui/statusbar/phone/IconMerger;->checkOverflow(I)V
.line 75
return-void
.end method
.method protected onMeasure(II)V
.locals 3
.parameter "widthMeasureSpec"
.parameter "heightMeasureSpec"
.prologue
.line 65
invoke-super {p0, p1, p2}, Landroid/widget/LinearLayout;->onMeasure(II)V
.line 67
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/IconMerger;->getMeasuredWidth()I
move-result v0
.line 68
.local v0, width:I
iget v1, p0, Lcom/android/systemui/statusbar/phone/IconMerger;->mIconSize:I
rem-int v1, v0, v1
sub-int v1, v0, v1
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/IconMerger;->getMeasuredHeight()I
move-result v2
invoke-virtual {p0, v1, v2}, Lcom/android/systemui/statusbar/phone/IconMerger;->setMeasuredDimension(II)V
.line 69
return-void
.end method
.method public setOverflowIndicator(Landroid/view/View;)V
.locals 0
.parameter "v"
.prologue
.line 60
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/IconMerger;->mMoreView:Landroid/view/View;
.line 61
return-void
.end method
can anybody help me?
<< Power Menu Safe Mode Reboot Addon >>
{
"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"
}
Hi xda mates,,
Have anyone of you heard about the android safe mode and for what it is used?
Well the safe mode does exist in android device to help you to uninstall any third party application that causes lag or trouble in your android OS or even boot loop that prevents you from uninstalling that app which causes the problem by the normal way.. This should be your first attempt to fix your phone before doing a full wipe..!!
To get into Safe Mode, you need to power off your phone then turn it on and then hold volume up and down until it boots completely,, You will find a little black babble in the left lower side of the phone that indicates that you are in safe mode.
To boot into safe mode using adb shell, you can try these commands:
Code:
setprop persist.sys.safemode 1
reboot
The following video will show how is the buttons combination done..
OK, I know the buttons combination could be like a pain in a$$, and because most of manufactures had disabled the long press way to boot into safe mode (thanks Samsung..!!!), so I thought of integrating it into power menu as in above screenshots using the shell commands as a source of my smali codes.. So here we go :laugh:
The Guide:
Needed Tools:
1) APK Tool. You can use APK Multi-Tool from here.
2) Baksmali Tool. You can use my manager from here.
3) Notepad++ for editing xml and smali from here.
4) And of course little amount of patience..!!!
The procedure:
The procedure will not be different from the usual integrating addons into power menu..!!
First of all, download the resources [View attachment PM_SafeMode_Resources.rar].
1) framework-res.apk
- Decompile framework-res.apk
- Go to res\drawable-xhdpi folder and put the image resources there [tw_ic_lock_safemode.png]
- Go to res\values folder and open strings.xml file and add the following line at the end before </resources> and save:
Code:
<string name="global_action_safemode_txt">Reboot to safe mode</string>
- Now Recompile your framework-res.apk to create new ids.. Now DECOMPILE the NEW framework-res.apk and go to res\values and open public.xml file and locate these 2 ids:
Code:
<public type="drawable" name="tw_ic_lock_safemode" id="0x01080a98" />
<public type="string" name="global_action_safemode_txt" id="0x01040785" />
N.B: You might have different id numbers, but don't wary, the principle will be the same..!!
Click to expand...
Click to collapse
Keep the public.xml file opened for the moment and let's go to the next step.
2) android.policy.jar
- Baksmali android.policy.jar
- Go to classout\com\android\internal\policy\impl folder and paste the smali resource there [GlobalActions$SafeMode.smali]
- Now in the same folder find GlobalActions.smali and open it.
- In GlobalActions.smali, find the instance fields section and go to its end and add the following blue line just after ".field private mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;":
Code:
.field private mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
[B][COLOR="Blue"].field private mSafeMode:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR][/B]
.field private mRingerModeReceiver:Landroid/content/BroadcastReceiver;
- Now, Search for "[Lcom/android/internal/policy/impl/GlobalActions$Action;" for power menu arrays and increase the number of arrays (the line above it) to accommodate the total number of new arrays:
Code:
.line 418
const/4 v1, 0x[B][COLOR="Red"]5[/COLOR][/B] [B][COLOR="Green"]<!--- You need to increase the arrays number here[/COLOR][/B]
new-array v1, v1, [Lcom/android/internal/policy/impl/GlobalActions$Action;
so it will be:
Code:
.line 418
const/4 v1, 0x[B][COLOR="Blue"]6[/COLOR][/B]
new-array v1, v1, [Lcom/android/internal/policy/impl/GlobalActions$Action;
- Now, above the newly modified "const/4 v1, 0x6" add these action lines:
Code:
new-instance [B][COLOR="Red"]v1[/COLOR][/B], Lcom/android/internal/policy/impl/GlobalActions$99;
const [B][COLOR="Red"]v2[/COLOR][/B], 0x10808ad
const [B][COLOR="Red"]v3[/COLOR][/B], 0x1040193
move-object/from16 [B][COLOR="Red"]v0, p0[/COLOR][/B]
invoke-direct {[B][COLOR="Red"]v1, v0, v2, v3[/COLOR][/B]}, Lcom/android/internal/policy/impl/GlobalActions$99;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 [B][COLOR="Red"]v0, p0[/COLOR][/B]
iput-object [B][COLOR="Red"]v1, v0[/COLOR][/B], Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
[B][COLOR="Blue"]new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$SafeMode;
const v2, [COLOR="SeaGreen"]0x1080a98[/COLOR]
const v3, [COLOR="SeaGreen"]0x1040785[/COLOR]
move-object/from16 v0, p0
invoke-direct {v1, v0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$SafeMode;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mSafeMode:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR][/B]
invoke-direct/range {p0 .. p0}, Lcom/android/internal/policy/impl/GlobalActions;->onAirplaneModeChanged()V
.line 418
const/4 v1, 0x6
new-array v1, v1, [Lcom/android/internal/policy/impl/GlobalActions$Action;
Here, the ids above are obtained from public.xml file from framework-res.apk. The first id will represent the image resource and the second id will represent the string resource (don't forget to omit the first 0).
Also pay attention to variables and parameters, it should be matched (the red v and p)
- Now we will add new array to show in power menu. So bellow modified "const/4 v1, 0x6" add new arrays to show after the last array:
Code:
.line 418
const/4 v1, 0x6
new-array v1, v1, [Lcom/android/internal/policy/impl/GlobalActions$Action;
...
...
const/4 [B][COLOR="Red"]v2[/COLOR][/B], 0x4
move-object/from16 [B][COLOR="Red"]v0, p0[/COLOR][/B]
iget-object [B][COLOR="Red"]v3, v0[/COLOR][/B], Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object [B][COLOR="Red"]v3, v1, v2[/COLOR][/B]
[B][COLOR="Blue"]const/4 v2, 0x5
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mSafeMode:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2[/COLOR][/B]
Again, you should match all variables and parameters (v and p values)
- Save changes.. smali (recompile)
Now push the finished framework-res.apk and android.policy.jar to framework folder in your device, fix permissions to 644 and reboot and viola you made it,,,
Pre-made mod:
You don't have technical skills to do all these complicated things..!! Here you can download the mod and flash it in your GT-N7000 device..
The mod is based on LT9 firmware and I suppose it will work on any LTx firmware increment number.
I have included:
- PM ScreenShot mod
- PM Safe mode reboot mod
- PM Fixed Hot reboot mod
- Volume rocker mod
All in one flashable file,, so what you are waiting for,, backup your phone and give it a try
Download
(md5 sum: 8f764c74e8ec63fc6072015668811fac)
Any ROM's developer can include this mod in his/her ROM without asking for permission, although small credit in the OP will be nice.. :good:
N.B: For toggle on and off of Power Menu addons, see post #3
Cheers,,
This is great
Adding Setting Toggle For Power Menu Addons
<< Adding Setting Toggle For Power Menu Addons >>
Let's increase the heat little bit..!! Do you want to add toggle to switch on and off the extra power menu addons like these pictures bellow:
OK let's start this extra step tutorial.. :victory:
I will assume you already add Safe Mode and Screenshot extra power menu addons..
1) android.policy.jar:
- Baksmali android.policy.jar
- Go to classout\com\android\internal\policy\impl folder
- Now, the truth is I didn't invent any new codes here, I traced one toggle-able power menu addon which is "accessibility", the tracing will take you into GlobalActions$3.smali, I opened it and I found this code in ".method public showConditional()Z"
Code:
.method public showConditional()Z
.registers 5
const/4 v0, 0x1
const/4 v1, 0x0
iget-object v2, p0, Lcom/android/internal/policy/impl/[B][COLOR="Red"]GlobalActions$3[/COLOR][/B];->this$0:Lcom/android/internal/policy/impl/GlobalActions;
# getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v2}, Lcom/android/internal/policy/impl/GlobalActions;->access$200(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v2
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "[B][COLOR="Red"]power_key_hold[/COLOR][/B]"
invoke-static {v2, v3, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-ne v2, v0, :cond_15
:goto_14
return v0
:cond_15
move v0, v1
goto :goto_14
.end method
- So what you need to do is to open GlobalActions$SafeMode.smali and GlobalActions$ScreenCap.smali and change the method ".method public showConditional()Z" to the previous method mentioned above.
Note:
Don't forget to change GlobalActions$3 to the name of smali you are using (i.e, GlobalActions$SafeMode.smali or GlobalActions$ScreenCap.smali).
You need to put new key for referral in your modified smali instead of "power_key_hold"
Click to expand...
Click to collapse
So by the end, GlobalActions$SafeMode.smali method will be:
Code:
.method public showConditional()Z
.registers 5
const/4 v0, 0x1
const/4 v1, 0x0
iget-object v2, p0, Lcom/android/internal/policy/impl/[B][COLOR="Blue"]GlobalActions$SafeMode[/COLOR][/B];->this$0:Lcom/android/internal/policy/impl/GlobalActions;
# getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v2}, Lcom/android/internal/policy/impl/GlobalActions;->access$200(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v2
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, [B][COLOR="Blue"]"pm_safe_mode"[/COLOR][/B]
invoke-static {v2, v3, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-ne v2, v0, :cond_15
:goto_14
return v0
:cond_15
move v0, v1
goto :goto_14
.end method
.method public showDuringKeyguard()Z
.registers 2
.prologue
.line 389
const/4 v0, 0x1
return v0
.end method
And GlobalActions$ScreenCap.smali method will be:
Code:
.method public showConditional()Z
.registers 5
const/4 v0, 0x1
const/4 v1, 0x0
iget-object v2, p0, Lcom/android/internal/policy/impl/[B][COLOR="Blue"]GlobalActions$ScreenCap[/COLOR][/B];->this$0:Lcom/android/internal/policy/impl/GlobalActions;
# getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v2}, Lcom/android/internal/policy/impl/GlobalActions;->access$200(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v2
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, [B][COLOR="Blue"]"pm_screenshot"[/COLOR][/B]
invoke-static {v2, v3, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-ne v2, v0, :cond_15
:goto_14
return v0
:cond_15
move v0, v1
goto :goto_14
.end method
- Save changes .. and that's for android.policy.jar
2) SecSettings.apk:
- Decompile SecSettings.apk
- Go to res\values folder and open strings.xml file and add these new resources at the end before </resources>:
Code:
<string name="PM_Glory_addons">GloryROM Power Menu Addons</string>
<string name="pm_safe_mode_title">Safe Mode Reboot</string>
<string name="pm_screenshot_title">Take Screenshot</string>
<string name="pm_on">Toggle is Enabled</string>
<string name="pm_off">Toggle is Disabled</string>
- Go to res\xml and open display_settings.xml and add these lines on the place you your addon to appear later on on the device:
Code:
<PreferenceCategory android:title="@string/PM_Glory_addons" android:key="PM_Glory_settings" />
<CheckBoxPreference android:title="@string/pm_safe_mode_title" android:key="pm_safe_mode" android:defaultValue="true" android:summaryOn="@string/pm_on" android:summaryOff="@string/pm_off" />
<CheckBoxPreference android:title="@string/pm_screenshot_title" android:key="pm_screenshot" android:defaultValue="true" android:summaryOn="@string/pm_on" android:summaryOff="@string/pm_off" />
- Now for the smali source, go to classout\com\android\settings folder and open DisplaySettings.smali.. Also here, I didn't invent new codes, I used mult-windows toggle codes as reference..!! I will use Blue color for Safe Mode toggle codes and Green color for Screenshot toggle codes. Add these lines to [# instance fields] section:
Code:
[B][COLOR="Blue"].field private mSafeModePref:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Green"].field private mScreenShotPref:Landroid/preference/CheckBoxPreference;[/COLOR][/B]
- Search for ""key_multi_window"" and add these lines:
Code:
.line 570
const-string v11, "key_multi_window"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/CheckBoxPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
[B][COLOR="Blue"]const-string v11, "pm_safe_mode"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/CheckBoxPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mSafeModePref:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Green"]const-string v11, "pm_screenshot"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/CheckBoxPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mScreenShotPref:Landroid/preference/CheckBoxPreference;[/COLOR][/B]
- Now search for the method ".method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z" and search for ""multi_window_enabled"" to locate this part at the end:
Code:
.line 1021
:cond_15c
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, [B][COLOR="Red"]:cond_1c[/COLOR][/B]
.line 1022
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 1023
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "multi_window_enabled"
if-eqz v0, :cond_177
:goto_172
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1c
:cond_177
move v1, v2
goto :goto_172
.end method
Add new codes before [.end method] in the previous section, so that section will be like this:
Code:
.line 1021
:cond_15c
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, [B][COLOR="Blue"]:cond_SafeM[/COLOR][/B]
.line 1022
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 1023
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "multi_window_enabled"
if-eqz v0, :cond_177
:goto_172
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1c
:cond_177
move v1, v2
goto :goto_172
[B][COLOR="Blue"]:cond_SafeM
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mSafeModePref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_ScSh
.line 1022
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mSafeModePref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 1023
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "pm_safe_mode"
if-eqz v0, :cond_majdiSafe
:goto_njsafe
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1c
:cond_majdiSafe
move v1, v2
goto :goto_njsafe[/COLOR]
[B][COLOR="Green"]:cond_ScSh
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mScreenShotPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, [COLOR="Red"]:cond_1c[/COLOR]
.line 1022
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mScreenShotPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 1023
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "pm_screenshot"
if-eqz v0, :cond_majdiSS
:goto_njSS
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1c
:cond_majdiSS
move v1, v2
goto :goto_njSS[/COLOR][/B][/B]
.end method
- Pay attention to the red color condition..!!!
- Now go to the next method ".method public onResume()V" and search for ""multi_window_enabled"" and locate this part:
Code:
:cond_9d
sget-boolean v0, Lcom/android/settings/DisplaySettings;->UseMultiWindow:Z
if-eqz v0, [B][COLOR="Red"]:cond_c1[/COLOR][/B]
.line 847
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "multi_window_enabled"
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-ne v3, v1, :cond_de
:goto_af
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 848
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "multi_window_enabled"
invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowModeObserver:Landroid/database/ContentObserver;
invoke-virtual {v0, v1, v2, v3}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
line 850
:cond_c1
return-void
:cond_c2
move v0, v2
And do this modification:
Code:
:cond_9d
sget-boolean v0, Lcom/android/settings/DisplaySettings;->UseMultiWindow:Z
if-eqz v0, [B][COLOR="Blue"]:cond_Safemajdi[/COLOR][/B]
.line 847
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "multi_window_enabled"
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-ne v3, v1, :cond_de
:goto_af
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 848
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "multi_window_enabled"
invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowModeObserver:Landroid/database/ContentObserver;
invoke-virtual {v0, v1, v2, v3}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
[B][COLOR="Blue"].line 1000
:cond_Safemajdi
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mSafeModePref:Landroid/preference/CheckBoxPreference;
if-eqz v0, :cond_NewScSh
.line 1001
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mSafeModePref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "pm_safe_mode"
const/4 v1, 0x0
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-eqz v3, :cond_noSafe
const/4 v1, 0x1
goto :goto_yesSafe
:cond_noSafe
const/4 v1, 0x0
:goto_yesSafe
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V[/COLOR]
[COLOR="Green"].line 2000
:cond_NewScSh
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mScreenShotPref:Landroid/preference/CheckBoxPreference;
if-eqz v0, [COLOR="Red"]:cond_c1[/COLOR]
.line 2001
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mScreenShotPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "pm_screenshot"
const/4 v1, 0x0
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-eqz v3, :cond_noShot
const/4 v1, 0x1
goto :goto_yesShot
:cond_noShot
const/4 v1, 0x0
:goto_yesShot
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V[/COLOR][/B]
.line 850
:cond_c1
return-void
:cond_c2
move v0, v2
- Also pay attention to the red color condition..!!!
- Save changes.. and that's all
For DisplaySettings.smali, I will attach the smali before and after, so you could use it to understand well
Also, I will attach the modified GlobalActions$SafeMode.smali and GlobalActions$ScreenCap.smali
Have fun,,, :good:
Another great mod from u brother.
Thanks for your efforr
Sent from my GT-N7000 using xda premium
Thank you!!!!!!!! Very very great Mod! Thanks bro!
mjrifath said:
Another great mod from u brother.
Thanks for your efforr
Sent from my GT-N7000 using xda premium
Click to expand...
Click to collapse
BVB-Fan said:
Thank you!!!!!!!! Very very great Mod! Thanks bro!
Click to expand...
Click to collapse
Thanks for testing mates
Now my phone sometimes reboot is that a bug ?
BVB-Fan said:
Now my phone sometimes reboot is that a bug ?
Click to expand...
Click to collapse
It is fine here,,,
could you tell me how it gets reboot? Is it after opening the power menu, or opening any other application, so I can reproduce it if it is a bug to fix it.
Try wiping cache and dalvik cache in the moment..
This comes when I opened an application then my Note freeze for a moment and it restarts. I wiped the Cache but the same problem.
Now I flashed my Rom (LTA) again and the problem is solved :thumbup:
BVB-Fan said:
This comes when I opened an application then my Note freeze for a moment and it restarts. I wiped the Cache but the same problem.
Now I flashed my Rom (LTA) again and the problem is solved :thumbup:
Click to expand...
Click to collapse
I think the mod is working fine isn't it??
Thanks God,, I didn't sleep well since last time,, you just save me bro,, :good:
thank you majdinj great job (as usual). on xxlta works fine
asmanao said:
thank you majdinj great job (as usual). on xxlta works fine
Click to expand...
Click to collapse
Thanks for testing bro
Toggle on and off of Power Menu addons, see post #3
Yeh! Now I feel bad about using up the 2nd post.
majdinj said:
Toggle on and off of Power Menu addons, see post #3
Click to expand...
Click to collapse
Great work thanks for tutorials. Just one idea, is it possible to get other toggles on power menu like wifi?
Sent from my GT-N7000 using Tapatalk 4
nokiamodeln91 said:
Yeh! Now I feel bad about using up the 2nd post.
Click to expand...
Click to collapse
No Problem mate,, It is good like this,, I have no complain about it since I already have post #3,, I hope it is clear guide (I spent the whole day to do it, a lot of bootloop happened but I got it to work at the end..!!!! and finally it is here :laugh
kmokhtar79 said:
Great work thanks for tutorials. Just one idea, is it possible to get other toggles on power menu like wifi?
Sent from my GT-N7000 using Tapatalk 4
Click to expand...
Click to collapse
If you have smali resource then yes,,, The good thing about safe mode smali is, it is made by shell commands and if you look at power off GlobalAction smali, you will see it is done by shell command too,,, So here is the trick that I used to create safe mode smali.
I don't think the wifi is going to be the same,, but we have already the quick toggle for that (on the moment..!!)... I will see if I can locate the wifi onClick / onPress method
Yes Perfect! as always.
Nice Mod!!!
Is it possible to create an icon on the home screen to invoke power menu instead of long press on power button?
Thank You
can it works backwards?
hi i'm actually stuck on safe mode on mi S3 (i know this isn't the right site for my model) but i think that this may be a solution, is anyway posible that we can disable the safe mode from de ROM itself?
EMSpilot said:
Is it possible to create an icon on the home screen to invoke power menu instead of long press on power button?
Thank You
Click to expand...
Click to collapse
There is a way to add the lock button to the status bar or the pull down menu.. Search for it..
Ok, it seems that I am on toggles now
After this guide, you will be able to switch on or off the full battery notification after the device is being fully charged..
{
"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"
}
So here we go..
We will be working with two files, SystemUI.apk and SecSettings.apk
Setting The Toggle Switch >>>
1) SecSettings.apk
- Decompile SecSettings.apk
- Go to res\values folder and open strings.xml and add these new lines:
Code:
<string name="set_remove_bat">Full Battery Notification</string>
<string name="notif_on">Notification is Enabled</string>
<string name="notif_off">Notification is Disabled</string>
- Go to res\xml folder and open display_settings.xml and add these codes where you want to display the toggle check box:
Code:
<CheckBoxPreference android:title="@string/set_remove_bat" android:key="bat_sbar" android:summaryOn="@string/notif_on" android:summaryOff="@string/notif_off" />
- Now for the smali.. Go to classout\com\android\settings folder and open DisplaySettings.smali.
- Add this line to [# instance fields] section:
Code:
.field private mBatPref:Landroid/preference/CheckBoxPreference;
- On the method ".method public onCreate(Landroid/os/Bundle;)V", search for ""key_multi_window"" and add these lines:
Code:
.line 570
const-string v11, "key_multi_window"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/CheckBoxPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
[B][COLOR="Blue"]const-string v11, "bat_sbar"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/CheckBoxPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;[/COLOR][/B]
- Now in the method ".method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z", search for ""multi_window_enabled"" to locate this part at the end:
Code:
:cond_15c
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, [B][COLOR="Red"]:cond_179[/COLOR][/B]
.line 1022
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 1023
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "multi_window_enabled"
if-eqz v0, :cond_177
:goto_172
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 [B][COLOR="Lime"]:goto_1c[/COLOR][/B]
:cond_177
move v1, v2
goto :goto_172
.end method
Add new codes before [.end method] in the previous section. Pay attention to the red color condition and the green color condition..!!!, so that section will be like this:
Code:
:cond_15c
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, [B][COLOR="Blue"]:cond_batteryToggle[/COLOR][/B]
.line 1022
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 1023
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "multi_window_enabled"
if-eqz v0, :cond_177
:goto_172
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 [B][COLOR="Lime"]:goto_1c[/COLOR][/B]
:cond_177
move v1, v2
goto :goto_172
[B][COLOR="Blue"]:cond_batteryToggle
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, [COLOR="Red"]:cond_179[/COLOR]
.line 1022
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 1023
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "bat_sbar"
if-eqz v0, :cond_majdiB
:goto_njB
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 [B][COLOR="Lime"]:goto_1c[/COLOR][/B]
:cond_majdiB
move v1, v2
goto :goto_njB[/COLOR][/B]
.end method
- Now in the method ".method public onResume()V", search for ""multi_window_enabled"" and locate this part, pay attention to the red color condition..!!!:
Code:
:cond_9d
sget-boolean v0, Lcom/android/settings/DisplaySettings;->UseMultiWindow:Z
if-eqz v0, [B][COLOR="Red"]:cond_c1[/COLOR][/B]
.line 847
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "multi_window_enabled"
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-ne v3, v1, :cond_de
:goto_af
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 848
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "multi_window_enabled"
invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowModeObserver:Landroid/database/ContentObserver;
invoke-virtual {v0, v1, v2, v3}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
line 850
:cond_c1
return-void
:cond_c2
move v0, v2
And do these modification:
Code:
:cond_9d
sget-boolean v0, Lcom/android/settings/DisplaySettings;->UseMultiWindow:Z
if-eqz v0, [B][COLOR="Blue"]:cond_newBattery[/COLOR][/B]
.line 847
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "multi_window_enabled"
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-ne v3, v1, :cond_de
:goto_af
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 848
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "multi_window_enabled"
invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowModeObserver:Landroid/database/ContentObserver;
invoke-virtual {v0, v1, v2, v3}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
[B][COLOR="Blue"]:cond_newBattery
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;
if-eqz v0, [COLOR="Red"]:cond_c1[/COLOR]
.line 3001
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "bat_sbar"
const/4 v1, 0x0
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-eqz v3, :cond_noShow
const/4 v1, 0x1
goto :goto_yesShow
:cond_noShow
const/4 v1, 0x0
:goto_yesShow
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V[/COLOR][/B]
line 850
:cond_c1
return-void
:cond_c2
move v0, v2
- Save all changes and compile and push to phone and prof working then continue to next step.
Setting The Referral Switch >>>
2) SystemUI.apk
- Baksmali SystemUI.apk.
- Go to classes/com/android/systemui/power/ folder and open PowerUI.smali.
- Search for this method ".method notifyFullBatteryNotification()V" and add the blue lines and delete or comment out the red line:
Code:
.method notifyFullBatteryNotification()V
.registers 12
.prologue
const/4 v10, 0x0
.line 827
iget-object v7, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
const-string v8, "notification"
invoke-virtual {v7, v8}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v2
check-cast v2, Landroid/app/NotificationManager;
.line 829
.local v2, "notificationManager":Landroid/app/NotificationManager;
[B][COLOR="Blue"]move-object v0, p0
iget-object v5, v0, Lcom/android/systemui/power/PowerUI;->mContext:Landroid/content/Context;
invoke-virtual {v5}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v5
const-string v6, "bat_sbar"
const/4 v7, 0x1
invoke-static {v5, v6, v7}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v5
if-nez v5, :cond_15
[COLOR="Red"]#if-nez v2, :cond_15[/COLOR][/COLOR] [COLOR="Green"]<!--- Put the same condition value in the above new condition[/COLOR][/B]
.line 830
const-string v7, "PowerUI"
const-string v8, "notifyFullBatteryNotification : fail to get NotificationManager reference"
invoke-static {v7, v8}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 860
:goto_14
return-void
.line 834
:cond_15
iget-object v7, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
- Save changes and compile and push to phone...
For those who just want to disable full battery notification without having headache of adding toggle switch, please see this thread here,,,
A lot of toggle tutorials could be done easily if you just understand the main principle here.. and for giving more options to users, use TOGGLES,,,
Cheers
More referral switches
<< Here is some switch referral settings for some notifications >>
★ For keyboard notification ★
- Baksmali services.jar
- Navigate to classout/com/android/server/InputMethodManagerService.smali
- Find ".method public setImeWindowStatus(Landroid/os/IBinder;II)V" and add the blue codes and delete the red line:
Code:
.method public setImeWindowStatus(Landroid/os/IBinder;II)V
.registers 23
.param p1, "token" # Landroid/os/IBinder;
.param p2, "vis" # I
.param p3, "backDisposition" # I
.prologue
.line 1640
invoke-static {}, Landroid/os/Binder;->getCallingUid()I
move-result v11
.line 1641
.local v11, "uid":I
invoke-static {}, Landroid/os/Binder;->clearCallingIdentity()J
move-result-wide v4
.line 1643
.local v4, "ident":J
if-eqz p1, :cond_12
:try_start_a
move-object/from16 v0, p0
iget-object v12, v0, Lcom/android/server/InputMethodManagerService;->mCurToken:Landroid/os/IBinder;
move-object/from16 v0, p1
[B][COLOR="Blue"].line 2000
move-object/from16 v0, p0
iget-object v12, v0, Lcom/android/server/InputMethodManagerService;->mContext:Landroid/content/Context;
invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v12
const-string v13, "ime_sbar"
const/4 v14, 0x1
invoke-static {v12, v13, v14}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
if-nez v12, :cond_3a[/COLOR]
[COLOR="Red"] #if-eq v12, v0, :cond_3a[/COLOR][/B]
.line 1644
:cond_12
const-string v12, "InputMethodManagerService"
new-instance v13, Ljava/lang/StringBuilder;
invoke-direct {v13}, Ljava/lang/StringBuilder;-><init>()V
const-string v14, "Ignoring setImeWindowStatus of uid "
★ For mobile data connection toggle off dialogue ★
- Baksmali SystemUI.apk
- Navigate to classout\com\android\systemui\statusbar\policy\quicksetting\MobileDataQuickSettingButton.smali
- Find ".method private setMobileData(Z)V" and add the blue codes and delete the red line:
Code:
.method private setMobileData(Z)V
.registers 6
.param p1, "on" # Z
.prologue
.line 248
iget-object v1, p0, Lcom/android/systemui/statusbar/policy/quicksetting/MobileDataQuickSettingButton;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "quickpanel_mobiledata_checked"
const/4 v3, 0x0
invoke-static {v1, v2, v3}, Landroid/provider/Settings$Secure;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
.line 250
.local v0, "mChecked":I
const-string v1, "STATUSBAR-MobileDataQuickSettingButton"
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "Mobile data waring checked : "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-static {v1, v2}, Landroid/util/Slog;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 252
[B][COLOR="Blue"]move-object v0, p0
iget-object v1, v0, Lcom/android/systemui/statusbar/policy/quicksetting/MobileDataQuickSettingButton;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "quickpanel_mobiledata_dialogue"
const/4 v3, 0x1
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
if-eqz v1, :cond_2d[/COLOR][/B]
if-nez p1, :cond_2d
[B][COLOR="Red"]#if-nez v0, :cond_2d[/COLOR][/B]
.line 253
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/quicksetting/MobileDataQuickSettingButton;->onDisplayMobileDataOffAlert()V
.line 257
:goto_2c
return-void
.line 255
:cond_2d
invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/policy/quicksetting/MobileDataQuickSettingButton;->setMobileDataEnabled(Z)V
goto :goto_2c
.end method
★ For low battery notification ★
- Baksmali SystemUI.apk.
- Go to classes/com/android/systemui/power/ folder and open PowerUI.smali.
- Search for this method ".method showLowBatteryWarning()V" and add the blue lines:
Code:
.method showLowBatteryWarning()V
.registers 20
.prologue
.line 433
const-string v16, "PowerUI"
new-instance v17, Ljava/lang/StringBuilder;
invoke-direct/range {v17 .. v17}, Ljava/lang/StringBuilder;-><init>()V
move-object/from16 v0, p0
iget-object v15, v0, Lcom/android/systemui/power/PowerUI;->mBatteryLevelTextView:Landroid/widget/TextView;
if-nez v15, :cond_78
const-string v15, "showing"
:goto_f
move-object/from16 v0, v17
invoke-virtual {v0, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v15
const-string v17, " low battery warning: level="
move-object/from16 v0, v17
invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v15
move-object/from16 v0, p0
[B][COLOR="Blue"]move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/systemui/power/PowerUI;->mContext:Landroid/content/Context;
invoke-virtual {v5}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v5
const-string v6, "bat_low"
const/4 v7, 0x1
invoke-static {v5, v6, v7}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v5
if-eqz v5, :goto_77[/COLOR] [COLOR="Green"]#<!--- goto_77 will return-void (go down & see..!!)[/COLOR][/B]
iget v0, v0, Lcom/android/systemui/power/PowerUI;->mBatteryLevel:I
move/from16 v17, v0
move/from16 v0, v17
invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v15
const-string v17, " ["
move-object/from16 v0, v17
invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v15
move-object/from16 v0, p0
iget v0, v0, Lcom/android/systemui/power/PowerUI;->mBatteryLevel:I
move/from16 v17, v0
move-object/from16 v0, p0
move/from16 v1, v17
invoke-direct {v0, v1}, Lcom/android/systemui/power/PowerUI;->findBatteryLevelBucket(I)I
move-result v17
move/from16 v0, v17
invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v15
const-string v17, "]"
move-object/from16 v0, v17
invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v15
invoke-virtual {v15}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v15
move-object/from16 v0, v16
invoke-static {v0, v15}, Landroid/util/Slog;->i(Ljava/lang/String;Ljava/lang/String;)I
...
...
...
.line 539
[B][COLOR="Red"]:goto_77[/COLOR] [COLOR="Green"]<!--- You should put this defined goto value in the new if-eqz[/COLOR][/B]
return-void
You will need to add the switch toggle in SecSettings.apk using the same principle in post #1
CRT-OFF Animation Toggle
Here: http://forum.xda-developers.com/showthread.php?t=2194003
Working on Note.
:good:
@kmokhtar79
I'll try them all, so some android.policy.jar can be removed from my Aroma Installer.
@majdinj
How long do you keep your note?
I ask only because of your Pimp my Phone project.
I'm staying for now on Note 1.
- there is no big difference between Note 1 and Note 2 (I mean general use)
- Note 3 isn't good as Phone (it's too big for me as phone, or my fingers are too short)
It's just your opinion.
kmokhtar79 said:
CRT-OFF Animation Toggle
Here: http://forum.xda-developers.com/showthread.php?t=2194003
Working on Note.
Click to expand...
Click to collapse
Excellent,, it has the same principle to add toggle switch in SecSettings.apk.
So it is almost the same for all.. what is left to tackle is only switch referral codes (where to incorporate key code in other jar or apk other than SecSettings.apk) which needs several testings..
tkari4 said:
@majdinj
How long do you keep your note?
I ask only because of your Pimp my Phone project.
I'm staying for now on Note 1.
- there is no big difference between Note 1 and Note 2 (I mean general use)
- Note 3 isn't good as Phone (it's too big for me as phone, or my fingers are too short)
It's just your opinion.
Click to expand...
Click to collapse
Unless I hard brick it of whatever the reason, I will stay with Note 1
Although having a new phone is not bad idea
Guys! just to let you know that on LSA firmware, mentioned toggle switches in SystemUI are already enabled by default, the only thing I had to do was link them with their referral switches to Settings.
Thanks btw for this tutorial
Just love ua stuff
Ty
Sent from my GT-N7000 using xda app-developers app
nice:good:
Nice guide... work for me for full battery notification
Just little question
for add switch on/off
there are
Code:
.field private [COLOR="Red"]mBatPref[/COLOR]:Landroid/preference/CheckBoxPreference;
and this
Code:
const-string v11,[COLOR="Red"] "bat_sbar"[/COLOR]
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/CheckBoxPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;
and this
Code:
:cond_[COLOR="Red"]batteryToggle[/COLOR]
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_179
My question, to which is marked in red, I have to refer to where to make it?
because I am trying to make a toggle for mobile data and does not affect anything when i checked in setting.
thanks.
Sorry My Bad English
Click to expand...
Click to collapse
thank you so much for your guide i am trying to do this for my tab 4 running kitkat and i seem to be running into some issues with recompiling. Do you think you could help me out i really want this mod in my ROM. I attached a screenshot for the errror im recieving and i also attached the decompiled secsettings folder i modified
Thanks if you can help a bro out
Download here: https://drive.google.com/file/d/0B_Sw043dvZeoZkZHNkVPSnNtZnc/view?usp=sharing
View attachment 4248531
syaeful said:
Nice guide... work for me for full battery notification
Just little question
for add switch on/off
there are
Code:
.field private [COLOR="Red"]mBatPref[/COLOR]:Landroid/preference/CheckBoxPreference;
and this
Code:
const-string v11,[COLOR="Red"] "bat_sbar"[/COLOR]
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/CheckBoxPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;
and this
Code:
:cond_[COLOR="Red"]batteryToggle[/COLOR]
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_179
My question, to which is marked in red, I have to refer to where to make it?
because I am trying to make a toggle for mobile data and does not affect anything when i checked in setting.
thanks.
Click to expand...
Click to collapse
Could you help me out bro if you could?
***Here is a guide for activating AOSP Lockscreen on Samsung ICS devices ***
This guide is specially for GT-S7562. But should work for other Samsung ICS devices also. Values may differ.
Things you need:
Tool for decompiling/compiling work (I will not cover this, there are many guides for this)
Notepad++
Patience
Some common sense
Click to expand...
Click to collapse
Here, we will edit two files:
SecSettings.apk
android.policy.jar
Here we start---
First, we will activate Aosp lockscreen:
Decomiple android.policy.jar
Open smali/com/android/internal/policy/impl/LockPatternKeyguardView.smali
Search for
Code:
.method createLockScreen()Landroid/view/View;
Add blue lines
Code:
.method createLockScreen()Landroid/view/View;
.registers 7
.prologue
.line 1460
[COLOR="Blue"] iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "aosp_lock"
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-nez v0, :cond_1f[/COLOR]
new-instance v0, Lcom/android/internal/policy/impl/CircleLockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/CircleLockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
.line 1466
.local v0, lockView:Landroid/view/View;
invoke-virtual {p0, v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->initializeTransportControlView(Landroid/view/View;)V
.line 1467
return-object v0
.end method
Save and recompile android.policy.jar
Aosp Lockscreen is activated.
Now we will create on/off toggle in settings
Decompile SecSettings.apk
Open /smali/com/android/settings/LockscreenSettings.smali
Remove red line and add blue one
Code:
# instance fields
.field private isWeatherEnabled:Z
[COLOR="Blue"].field private mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
.field private mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
.field private mClock:Landroid/preference/CheckBoxPreference;
.field private mDualclock:Landroid/preference/SwitchPreferenceScreen;
.field private mHelpText:Landroid/preference/CheckBoxPreference;
.field private mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
.field private mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
.field private mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
.field private mMotionDialog:Landroid/app/AlertDialog;
.field private mRippleEffect:Landroid/preference/CheckBoxPreference;
[COLOR="Red"].field private mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
.field private mWeather:Landroid/preference/SwitchPreferenceScreen;
Search-
Code:
const-string v6, "unlock_text"
-In line 363
Code:
const-string v6, "unlock_text"
invoke-static {v2, v6, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-eqz v2, :cond_ed
move v2, v3
:goto_a2
invoke-virtual {v5, v2}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 248
:cond_a5
[COLOR="Red"]iget-object v2, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="blue"]iget-object v2, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
if-eqz v2, :cond_bb
.line 249
[COLOR="Red"]iget-object v5, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Blue"]iget-object v5, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
[COLOR="Blue"]const-string v6, "aosp_lock"[/COLOR]
[COLOR="red"]const-string v6, "wake_up_lock_screen"[/COLOR]
invoke-static {v2, v6, v4}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
Search-
Code:
const-string v5, "say_your_wakeup"
-In line 991
Code:
const-string v5, "say_your_wakeup"
invoke-virtual {p0, v5}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v5
check-cast v5, Landroid/preference/CheckBoxPreference;
[COLOR="blue"]iput-object v5, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Red"]iput-object v5, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
.line 183
[COLOR="red"]iget-object v5, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="blue"]iget-object v5, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v8
const v9, 0x7f0d0b8f
Search-
Code:
.local v1, pm:Landroid/content/pm/PackageManager;
-In line 1081
Code:
.local v1, pm:Landroid/content/pm/PackageManager;
invoke-virtual {v1, v4, v7}, Landroid/content/pm/PackageManager;->queryIntentActivities(Landroid/content/Intent;I)Ljava/util/List;
move-result-object v0
.line 199
.local v0, list:Ljava/util/List;,"Ljava/util/List<Landroid/content/pm/ResolveInfo;>;"
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v5
[COLOR="blue"]if-ge v5, v6, :cond_1aa[/COLOR]
[COLOR="red"]if-ge v5, v6, :cond_1b3[/COLOR]
.line 200
[COLOR="red"]iget-object v5, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="blue"]iget-object v5, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference; [/COLOR]
[COLOR="red"]if-eqz v5, :cond_1aa[/COLOR]
[COLOR="blue"]if-eqz v5, :cond_1a1[/COLOR]
[COLOR="red"].line 201
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v5
iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;
invoke-virtual {v5, v6}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z[/COLOR]
.line 202
[COLOR="red"]:cond_1aa
if-eqz v3, :cond_1b3[/COLOR]
[COLOR="blue"]:cond_1a1
if-eqz v3, :cond_1aa[/COLOR]
.line 203
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v5
invoke-virtual {v5, v3}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 208
.end local v0 #list:Ljava/util/List;,"Ljava/util/List<Landroid/content/pm/ResolveInfo;>;"
.end local v1 #pm:Landroid/content/pm/PackageManager;
[COLOR="red"]:cond_1b3[/COLOR]
[COLOR="blue"]:cond_1aa[/COLOR]
return-void
.end local v3 #setWakeupCommand:Landroid/preference/PreferenceScreen;
.end local v4 #set_wakeup_commant_intent:Landroid/content/Intent;
[COLOR="red"]:cond_1b4[/COLOR]
[COLOR="blue"]:cond_1ab[/COLOR]
move v5, v7
Search-
Code:
wake_up_lock_screen
-In line 2382 (after editing all above lines)
Code:
.line 282
:cond_ad
[COLOR="red"]iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="blue"]iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference; [/COLOR]
invoke-virtual {p2, v4}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_1e
.line 283
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
[COLOR="red"] const-string v5, "wake_up_lock_screen"
iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="blue"]const-string v5, "aosp_lock"
iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
invoke-virtual {v6}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v6
if-eqz v6, :cond_c8
:goto_c3
invoke-static {v4, v5, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1e
:cond_c8
move v2, v3
goto :goto_c3
.end method
Save it and now open res/xml/lockscreen_settings.xml
add edit-
Code:
[COLOR="red"]<CheckBoxPreference android:title="@string/samsung_unlock_option_say_your_wakeup_command_to_unlock_screen" android:key="say_your_wakeup" android:summary="@string/wakeup_in_lockscreen_summary" />[/COLOR]
[COLOR="Blue"]<CheckBoxPreference android:title="@string/aosp_title" android:key="say_your_wakeup" android:summary="@string/aosp_summary" />[/COLOR]
Save it.
Now open res/values/strings.xml and add these lines in the end.
Code:
<string name="aosp_title">AOSP Lockscreen</string>
<string name="aosp_summary">Official ICS lock screen</string>
Save it and recompile SecSettings.apk
Thats it.
These screenshots are from PMP™ Ultra ROM
{
"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"
}
Credits:
Me
Codename13
bombaybadboy
Mirko ddd
Click to expand...
Click to collapse
Enjoy AOSP Lockscreen on your Samsung ICS Device :laugh::good:
lockscreen shortcuts
Mohitash said:
***Here is a guide for activating AOSP Lockscreen on Samsung ICS devices ***
This guide is specially for GT-S7562. But should work for other Samsung ICS devices also. Values may differ.
Here, we will edit two files:
SecSettings.apk
android.policy.jar
Here we start---
First, we will activate Aosp lockscreen:
Decomiple android.policy.jar
Open smali/com/android/internal/policy/impl/LockPatternKeyguardView.smali
Search for
Code:
.method createLockScreen()Landroid/view/View;
Add blue lines
Code:
.method createLockScreen()Landroid/view/View;
.registers 7
.prologue
.line 1460
[COLOR="Blue"] iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "aosp_lock"
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-nez v0, :cond_1f[/COLOR]
new-instance v0, Lcom/android/internal/policy/impl/CircleLockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/CircleLockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
.line 1466
.local v0, lockView:Landroid/view/View;
invoke-virtual {p0, v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->initializeTransportControlView(Landroid/view/View;)V
.line 1467
return-object v0
.end method
Save and recompile android.policy.jar
Aosp Lockscreen is activated.
Now we will create on/off toggle in settings
Decompile SecSettings.apk
Open /smali/com/android/settings/LockscreenSettings.smali
Remove red line and add blue one
Code:
# instance fields
.field private isWeatherEnabled:Z
[COLOR="Blue"].field private mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
.field private mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
.field private mClock:Landroid/preference/CheckBoxPreference;
.field private mDualclock:Landroid/preference/SwitchPreferenceScreen;
.field private mHelpText:Landroid/preference/CheckBoxPreference;
.field private mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
.field private mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
.field private mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
.field private mMotionDialog:Landroid/app/AlertDialog;
.field private mRippleEffect:Landroid/preference/CheckBoxPreference;
[COLOR="Red"].field private mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
.field private mWeather:Landroid/preference/SwitchPreferenceScreen;
Search-
Code:
const-string v6, "unlock_text"
-In line 363
Code:
const-string v6, "unlock_text"
invoke-static {v2, v6, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-eqz v2, :cond_ed
move v2, v3
:goto_a2
invoke-virtual {v5, v2}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 248
:cond_a5
[COLOR="Red"]iget-object v2, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="blue"]iget-object v2, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
if-eqz v2, :cond_bb
.line 249
[COLOR="Red"]iget-object v5, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Blue"]iget-object v5, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
[COLOR="Blue"]const-string v6, "aosp_lock"[/COLOR]
[COLOR="red"]const-string v6, "wake_up_lock_screen"[/COLOR]
invoke-static {v2, v6, v4}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
Search-
Code:
const-string v5, "say_your_wakeup"
-In line 991
Code:
const-string v5, "say_your_wakeup"
invoke-virtual {p0, v5}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v5
check-cast v5, Landroid/preference/CheckBoxPreference;
[COLOR="blue"]iput-object v5, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Red"]iput-object v5, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
.line 183
[COLOR="red"]iget-object v5, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="blue"]iget-object v5, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v8
const v9, 0x7f0d0b8f
Search-
Code:
.local v1, pm:Landroid/content/pm/PackageManager;
-In line 1081
Code:
.local v1, pm:Landroid/content/pm/PackageManager;
invoke-virtual {v1, v4, v7}, Landroid/content/pm/PackageManager;->queryIntentActivities(Landroid/content/Intent;I)Ljava/util/List;
move-result-object v0
.line 199
.local v0, list:Ljava/util/List;,"Ljava/util/List<Landroid/content/pm/ResolveInfo;>;"
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v5
[COLOR="blue"]if-ge v5, v6, :cond_1aa[/COLOR]
[COLOR="red"]if-ge v5, v6, :cond_1b3[/COLOR]
.line 200
[COLOR="red"]iget-object v5, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="blue"]iget-object v5, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference; [/COLOR]
[COLOR="red"]if-eqz v5, :cond_1aa[/COLOR]
[COLOR="blue"]if-eqz v5, :cond_1a1[/COLOR]
[COLOR="red"].line 201
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v5
iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;
invoke-virtual {v5, v6}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z[/COLOR]
.line 202
[COLOR="red"]:cond_1aa
if-eqz v3, :cond_1b3[/COLOR]
[COLOR="blue"]:cond_1a1
if-eqz v3, :cond_1aa[/COLOR]
.line 203
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v5
invoke-virtual {v5, v3}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 208
.end local v0 #list:Ljava/util/List;,"Ljava/util/List<Landroid/content/pm/ResolveInfo;>;"
.end local v1 #pm:Landroid/content/pm/PackageManager;
[COLOR="red"]:cond_1b3[/COLOR]
[COLOR="blue"]:cond_1aa[/COLOR]
return-void
.end local v3 #setWakeupCommand:Landroid/preference/PreferenceScreen;
.end local v4 #set_wakeup_commant_intent:Landroid/content/Intent;
[COLOR="red"]:cond_1b4[/COLOR]
[COLOR="blue"]:cond_1ab[/COLOR]
move v5, v7
Search-
Code:
wake_up_lock_screen
-In line 2382 (after editing all above lines)
Code:
.line 282
:cond_ad
[COLOR="red"]iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="blue"]iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference; [/COLOR]
invoke-virtual {p2, v4}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_1e
.line 283
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
[COLOR="red"] const-string v5, "wake_up_lock_screen"
iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="blue"]const-string v5, "aosp_lock"
iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
invoke-virtual {v6}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v6
if-eqz v6, :cond_c8
:goto_c3
invoke-static {v4, v5, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1e
:cond_c8
move v2, v3
goto :goto_c3
.end method
Save it and now open res/xml/lockscreen_settings.xml
add edit-
Code:
[COLOR="red"]<CheckBoxPreference android:title="@string/samsung_unlock_option_say_your_wakeup_command_to_unlock_screen" android:key="say_your_wakeup" android:summary="@string/wakeup_in_lockscreen_summary" />[/COLOR]
[COLOR="Blue"]<CheckBoxPreference android:title="@string/aosp_title" android:key="say_your_wakeup" android:summary="@string/aosp_summary" />[/COLOR]
Save it.
Now open res/values/strings.xml and add these lines in the end.
Code:
<string name="aosp_title">AOSP Lockscreen</string>
<string name="aosp_summary">Official ICS lock screen</string>
Save it and recompile SecSettings.apk
Thats it.
These screenshots are from PMP™ Ultra ROM
Enjoy AOSP Lockscreen on your Samsung ICS Device :laugh::good:
Click to expand...
Click to collapse
Is it possible to add other shortcuts like camera is already there ?? (it is possible through gravity box module which is not compatible with ICS :'( )
hey
Is it possible to add other shortcuts like camera any game etc ??
Sharique244777 said:
Is it possible to add other shortcuts like camera any game etc ??
Click to expand...
Click to collapse
Tried for one time but failed....
To bad that it only works on 4.0.4
safariking said:
To bad that it only works on 4.0.4
Click to expand...
Click to collapse
It can also be done on many Samsung Galaxy devices that are running 4.1.2.. The instructions are quite similar to this one and can be found among many other instructions for different mods.. Here's the link:
http://forum.xda-developers.com/showpost.php?p=35229966&postcount=3
(But I don't know if it will work with 4.2.2 and above though)
Thanks
any possibility that this'll work on non-samsung devices? ZTE grand x pro here...
Can I make it for my ZTE Stock ICS device?
Can I make it for my ZTE Stock ICS device?
heraSK said:
any possibility that this'll work on non-samsung devices? ZTE grand x pro here...
Click to expand...
Click to collapse
I don't think so....
But may be witg different edits...
Sent from my GT-S7562 using XDA Premium 4 mobile app
KK2ZTE said:
Can I make it for my ZTE Stock ICS device?
Click to expand...
Click to collapse
I dont know about files of ZTE device(s)
But if you think you can try...you just need to study the lines in my guide and then in your.....but this is only possible if you already know some stuffs about editing smali...
You will need to find the file(s) for editing in your device and then the editings....
Hope you are getting that what i am saying.
Regards
Mohitash
Sent from my GT-S7562 using XDA Premium 4 mobile app
[Guide] Full Screen Dialer - MM
DO NOT QUOTE THE OP WHEN POSTING!!!
This guide assumes you are already proficient at de/recompiling stock apk's.
Features:
- Choose between any custom background or solid or gradient color backgrounds
- Dialpad digits, letters, divider & digits pressed are colorable
- All options can be turned on or off so they will not conflict with installed themes
We are modifying SecContacts_M.apk.
These modification were done on a Note 5 - 6.0.1 smali. Yours may be different and you will need to adapt.
One user already pointed out that on the S7, the ap.smali edits are in an.smali
There is an example of the an.smali edits here: http://forum.xda-developers.com/showpost.php?p=68686947&postcount=61
*** Add new files attached to the bottom of this post.
res\values\ids.xml
Add new ID
Code:
<item type="id" name="gear_panel_bg_view">false</item>
smali\com\android\dialer\dialpad\DialpadFragment.smali
Add new fields.
Code:
# instance fields
[COLOR="blue"].field private final mFullscreenBG:Z
.field private final mThemeoverride:Z
[/COLOR]
Increase .locals by 3 and add new code in BLUE
Code:
.method private K()V
.locals [COLOR="blue"]7[/COLOR]
.
.
.
const v2, 0x7f0201cc ## type="drawable" name="dialpad_fragment_background"
[COLOR="blue"] iget-boolean v4, p0, Lcom/android/dialer/dialpad/DialpadFragment;->mFullscreenBG:Z
if-eqz v4, :cond_td
invoke-virtual {p0}, Lcom/android/dialer/dialpad/DialpadFragment;->getContext()Landroid/content/Context;
move-result-object v4
const-string v5, "dialpad_fragment_background_fullscreen" # This is your resource name
const-string v6, "drawable" # This is the resource type
invoke-static {v4, v5, v6}, Lcom/android/wubydax/IdUtils;->getIdentifier(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)I
move-result v2
:cond_td
[/COLOR] invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/view/View;->setBackground(Landroid/graphics/drawable/Drawable;)V
goto :goto_1
.end method
Increase .locals by 3 and add new code in BLUE
Code:
.method private N()V
.locals [COLOR="blue"]5[/COLOR]
.
.
.
invoke-virtual {p0}, Lcom/android/dialer/dialpad/DialpadFragment;->getResources()Landroid/content/res/Resources;
move-result-object v0
const v1, 0x7f0201cd ## type="drawable" name="dialpad_fragment_bg"
[COLOR="blue"]iget-boolean v2, p0, Lcom/android/dialer/dialpad/DialpadFragment;->mFullscreenBG:Z
if-eqz v2, :cond_td
invoke-virtual {p0}, Lcom/android/dialer/dialpad/DialpadFragment;->getContext()Landroid/content/Context;
move-result-object v2
const-string v3, "dialpad_fragment_bg_fullscreen" # This is your resource name
const-string v4, "drawable" # This is the resource type
invoke-static {v2, v3, v4}, Lcom/android/wubydax/IdUtils;->getIdentifier(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)I
move-result v1
:cond_td
[/COLOR] invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
Increase .locals by 3 and add new code in BLUE
Code:
.method private g(Landroid/view/View;)V
.locals [COLOR="blue"]5[/COLOR]
.
.
.
invoke-virtual {p0}, Lcom/android/dialer/dialpad/DialpadFragment;->getResources()Landroid/content/res/Resources;
move-result-object v0
const v1, 0x7f0201cc ## type="drawable" name="dialpad_fragment_background"
[COLOR="blue"]iget-boolean v2, p0, Lcom/android/dialer/dialpad/DialpadFragment;->mFullscreenBG:Z
if-eqz v2, :cond_td
invoke-virtual {p0}, Lcom/android/dialer/dialpad/DialpadFragment;->getContext()Landroid/content/Context;
move-result-object v2
const-string v3, "dialpad_fragment_background_fullscreen" # This is your resource name
const-string v4, "drawable" # This is the resource type
invoke-static {v2, v3, v4}, Lcom/android/wubydax/IdUtils;->getIdentifier(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)I
move-result v1
:cond_td
[/COLOR] invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v0
invoke-virtual {p1, v0}, Landroid/view/View;->setBackground(Landroid/graphics/drawable/Drawable;)V
goto :goto_1
.end method
Add new code in BLUE
Code:
.method public b(Landroid/view/View;)V
.
.
.
const v0, 0x7f0e021a ## type="id" name="digits"
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Lcom/android/dialer/dialpad/EllipsisTextView;
iput-object v0, p0, Lcom/android/dialer/dialpad/DialpadFragment;->c:Lcom/android/dialer/dialpad/EllipsisTextView;
[COLOR="blue"]move-object/from16 v2, p0
invoke-virtual {v2, v0}, Lcom/android/dialer/dialpad/DialpadFragment;->setDialerDigitPressed(Landroid/widget/TextView;)V
[/COLOR]
iget-object v0, p0, Lcom/android/dialer/dialpad/DialpadFragment;->c:Lcom/android/dialer/dialpad/EllipsisTextView;
iget-object v2, p0, Lcom/android/dialer/dialpad/DialpadFragment;->v:Landroid/content/Context;
invoke-static {v2}, Lcom/android/dialer/dialpad/w;->a(Landroid/content/Context;)Lcom/android/dialer/dialpad/w;
move-result-object v2
invoke-virtual {v0, v2}, Lcom/android/dialer/dialpad/EllipsisTextView;->setKeyListener(Landroid/text/method/KeyListener;)V
Increase .locals by 5 and add new code in BLUE
Code:
.method public onCreateView(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;
.locals [COLOR="blue"]10[/COLOR]
const/4 v4, 0x0
[COLOR="blue"] invoke-virtual {p0}, Lcom/android/dialer/dialpad/DialpadFragment;->setSDBackground()V
invoke-virtual {p0}, Lcom/android/dialer/dialpad/DialpadFragment;->setThemeOverride()V
[/COLOR]
sget-object v0, Lcom/android/dialer/dialpad/DialpadFragment;->O:Ljava/lang/String;
const-string/jumbo v1, "onCreateView >>>>>"
invoke-static {v0, v1}, Landroid/util/secutil/Log;->secI(Ljava/lang/String;Ljava/lang/String;)I
const v0, 0x7f030098 ## type="layout" name="dialpad_fragment"
[COLOR="blue"]iget-boolean v6, p0, Lcom/android/dialer/dialpad/DialpadFragment;->mFullscreenBG:Z
if-eqz v6, :cond_td
invoke-virtual {p0}, Lcom/android/dialer/dialpad/DialpadFragment;->getContext()Landroid/content/Context;
move-result-object v6
invoke-virtual {v6}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v6
const-string v7, "dialpad_fragment_fullscreen" # This is the resource name
const-string v8, "layout" # this is resource type
invoke-virtual {p0}, Lcom/android/dialer/dialpad/DialpadFragment;->getContext()Landroid/content/Context;
move-result-object v9
invoke-virtual {v9}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object v9
invoke-virtual {v6, v7, v8, v9}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v0 #This now holds your id number
:cond_td
[/COLOR] invoke-virtual {p1, v0, p2, v4}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
Add new methods to bottom of smali.
Code:
.method setDialerDigit(Landroid/widget/TextView;)V
.locals 3
iget-boolean v1, p0, Lcom/android/dialer/dialpad/DialpadFragment;->mThemeoverride:Z
if-eqz v1, :cond_td
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v0
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "main_digit_color"
const v2, -0x1000000
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
invoke-virtual {p1, v0}, Landroid/widget/TextView;->setTextColor(I)V
:cond_td
return-void
.end method
.method setDialerDigitPressed(Landroid/widget/TextView;)V
.locals 3
iget-boolean v1, p0, Lcom/android/dialer/dialpad/DialpadFragment;->mThemeoverride:Z
if-eqz v1, :cond_td
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v0
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "main_digit_color_pressed"
const v2, -0x1000000
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
invoke-virtual {p1, v0}, Landroid/widget/TextView;->setTextColor(I)V
:cond_td
return-void
.end method
.method setDialerLetter(Landroid/widget/TextView;)V
.locals 3
iget-boolean v1, p0, Lcom/android/dialer/dialpad/DialpadFragment;->mThemeoverride:Z
if-eqz v1, :cond_td
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v0
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "main_letter_color"
const v2, -0x1000000
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
invoke-virtual {p1, v0}, Landroid/widget/TextView;->setTextColor(I)V
:cond_td
return-void
.end method
.method public setSDBackground()V
.locals 5
invoke-virtual {p0}, Lcom/android/dialer/dialpad/DialpadFragment;->getContext()Landroid/content/Context;
move-result-object v0
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "enable_dialer_custom_bg"
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-eqz v0, :cond_td
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/android/dialer/dialpad/DialpadFragment;->mFullscreenBG:Z
:cond_td
return-void
.end method
.method public setThemeOverride()V
.locals 4
const/4 v2, 0x0
iput-boolean v2, p0, Lcom/android/dialer/dialpad/DialpadFragment;->mThemeoverride:Z
invoke-virtual {p0}, Lcom/android/dialer/dialpad/DialpadFragment;->getContext()Landroid/content/Context;
move-result-object v1
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "dialer_theme_override"
const/4 v3, 0x0
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
if-eqz v1, :cond_td
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/android/dialer/dialpad/DialpadFragment;->mThemeoverride:Z
:cond_td
return-void
.end method
Next smali...
smali\com\android\dialer\dialpad\DialpadKeyButton.smali
Increase .locals by 3 and add new code in BLUE
Code:
.method public a()V
.locals [COLOR="blue"]6[/COLOR]
.
.
.
invoke-virtual {p0}, Lcom/android/dialer/dialpad/DialpadKeyButton;->getResources()Landroid/content/res/Resources;
move-result-object v0
## entire dialpad background setup for transparency
const v1, 0x7f020072 ## type="drawable" name="call_dial_btn_bg_easy_dialpad_button_white" id="0x7f020072" />
[COLOR="blue"] invoke-virtual {p0}, Lcom/android/dialer/dialpad/DialpadKeyButton;->getContext()Landroid/content/Context;
move-result-object v3
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "enable_dialer_custom_bg"
const/4 v5, 0x0
invoke-static {v3, v4, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-eqz v3, :cond_td
invoke-virtual {p0}, Lcom/android/dialer/dialpad/DialpadKeyButton;->getContext()Landroid/content/Context;
move-result-object v3
const-string v4, "call_dial_btn_bg_easy_dialpad_button_transparent" # This is your resource name
const-string v5, "drawable" # This is the resource type
invoke-static {v3, v4, v5}, Lcom/android/wubydax/IdUtils;->getIdentifier(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)I
move-result v1
:cond_td
[/COLOR] invoke-virtual {v0, v1, v2}, Landroid/content/res/Resources;->getDrawable(ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
move-result-object v0
invoke-virtual {p0, v0}, Lcom/android/dialer/dialpad/DialpadKeyButton;->setBackground(Landroid/graphics/drawable/Drawable;)V
goto :goto_0
.end method
Next smali...
smali\com\samsung\dialer\dialpad\ap.smali
Increase .locals by 3 and add new code in BLUE
Code:
.method private a(Landroid/widget/ImageView;Z)V
.locals [COLOR="blue"]4[/COLOR]
.
.
.
if-nez p1, :cond_0
:goto_0
return-void
:cond_0
if-eqz p2, :cond_1
const/4 v0, 0x0
invoke-virtual {p1, v0}, Landroid/widget/ImageView;->setVisibility(I)V
invoke-direct {p0}, Lcom/samsung/dialer/dialpad/ap;->c()I
move-result v0
invoke-virtual {p1, v0}, Landroid/widget/ImageView;->setImageResource(I)V
invoke-direct {p0}, Lcom/samsung/dialer/dialpad/ap;->f()I
move-result v0
[COLOR="blue"] invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v1
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "dialer_theme_override"
const/4 v3, 0x0
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
if-eqz v1, :cond_td
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v1
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "main_letter_color"
const v3, -0x1000000
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
:cond_td
[/COLOR] invoke-static {v0}, Landroid/content/res/ColorStateList;->valueOf(I)Landroid/content/res/ColorStateList;
move-result-object v0
invoke-virtual {p1, v0}, Landroid/widget/ImageView;->setImageTintList(Landroid/content/res/ColorStateList;)V
Add new code in BLUE
Code:
.method private a(Landroid/widget/TextView;I)V
.locals 1
if-nez p1, :cond_0
:goto_0
return-void
:cond_0
iget-object v0, p0, Lcom/samsung/dialer/dialpad/ap;->s:[I
aget v0, v0, p2
invoke-virtual {p1, v0}, Landroid/widget/TextView;->setText(I)V
iget-object v0, p0, Lcom/samsung/dialer/dialpad/ap;->e:Landroid/graphics/Typeface;
invoke-virtual {p1, v0}, Landroid/widget/TextView;->setTypeface(Landroid/graphics/Typeface;)V
invoke-direct {p0}, Lcom/samsung/dialer/dialpad/ap;->e()I
move-result v0
invoke-virtual {p1, v0}, Landroid/widget/TextView;->setTextColor(I)V
[COLOR="Blue"]move-object/from16 v1, p0
invoke-virtual {v1, p1}, Lcom/samsung/dialer/dialpad/ap;->setDialerDigit(Landroid/widget/TextView;)V[/COLOR]
Add new code in BLUE
Code:
.method private b(Landroid/widget/TextView;I)V
.
.
.
invoke-virtual {p1, v0}, Landroid/widget/TextView;->setText(I)V
iget-object v0, p0, Lcom/samsung/dialer/dialpad/ap;->f:Landroid/graphics/Typeface;
invoke-virtual {p1, v0}, Landroid/widget/TextView;->setTypeface(Landroid/graphics/Typeface;)V
invoke-direct {p0}, Lcom/samsung/dialer/dialpad/ap;->f()I
move-result v0
invoke-virtual {p1, v0}, Landroid/widget/TextView;->setTextColor(I)V
[COLOR="blue"]move-object/from16 v1, p0
invoke-virtual {v1, p1}, Lcom/samsung/dialer/dialpad/ap;->setDialerLetter(Landroid/widget/TextView;)V
[/COLOR]
invoke-direct {p0, p1}, Lcom/samsung/dialer/dialpad/ap;->g(Landroid/widget/TextView;)V
iget-boolean v0, p0, Lcom/samsung/dialer/dialpad/ap;->d:Z
invoke-direct {p0, p1, v0}, Lcom/samsung/dialer/dialpad/ap;->a(Landroid/widget/TextView;Z)V
invoke-direct {p0, p1}, Lcom/samsung/dialer/dialpad/ap;->i(Landroid/widget/TextView;)V
goto :goto_0
.end method
Add new code in BLUE
Code:
.method private c(Landroid/view/View;)V
.locals 5
invoke-virtual {p0}, Lcom/samsung/dialer/dialpad/ap;->a()I
move-result v1
invoke-virtual {p0}, Lcom/samsung/dialer/dialpad/ap;->b()I
move-result v2
[COLOR="blue"] invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v0
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v3, "dialer_theme_override"
const/4 v4, 0x0
invoke-static {v0, v3, v4}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-eqz v0, :cond_td
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v0
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v3, "main_divider_color"
const v2, -0x1000000
invoke-static {v0, v3, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
:cond_td[/COLOR]
const/4 v0, 0x0
:goto_0
Add new methods to the bottom of this smali.
Code:
.method setDialerDigit(Landroid/widget/TextView;)V
.locals 3
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v0
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "dialer_theme_override"
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
if-eqz v1, :cond_td
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v0
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "main_digit_color"
const v2, -0x1000000
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
invoke-virtual {p1, v0}, Landroid/widget/TextView;->setTextColor(I)V
:cond_td
return-void
.end method
.method setDialerLetter(Landroid/widget/TextView;)V
.locals 3
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v0
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "dialer_theme_override"
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
if-eqz v1, :cond_td
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v0
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "main_letter_color"
const v2, -0x1000000
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
invoke-virtual {p1, v0}, Landroid/widget/TextView;->setTextColor(I)V
:cond_td
return-void
.end method
Rom Control V2 Entries
[SOURCE CODE][DEV TOOL][SDK 21+]6thGear RomControl v2.+ for Devs by daxgirl
Add arrays
Code:
<string-array name="crop_entries">
<item>Center Crop (default)</item>
<item>Center Inside</item>
<item>Fit XY</item>
</string-array>
<string-array name="crop_values">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="custom_bg_type_entries">
<item>Image</item>
<item>Solid color</item>
<item>Gradient</item>
</string-array>
<string-array name="custom_bg_type_values">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="gradient_entries">
<item>Top to bottom</item>
<item>Bottom to top</item>
<item>Left to right</item>
<item>Right to left</item>
</string-array>
<string-array name="gradient_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
</string-array>
Add to your pref
Code:
<PreferenceCategory
android:title="Main Dialer Backgrounds and Colors" />
<PreferenceScreen
android:title="Main Dialer Options"
android:summary="Set backgrounds or color">
<com.wubydax.romcontrol.v2.prefs.MySwitchPreference
android:defaultValue="false"
android:key="enable_dialer_custom_bg"
android:summaryOff="Disabled"
android:summaryOn="Enabled \n> You must also enable custom colors and modify them or the dialpad will not be very visible."
android:title="Enable custom background"/>
<com.wubydax.romcontrol.v2.prefs.MyListPreference
android:defaultValue="0"
android:dependency="enable_dialer_custom_bg"
android:entries="@array/custom_bg_type_entries"
android:entryValues="@array/custom_bg_type_values"
android:key="dialer_custom_bg_type"
android:title="Background type"/>
<com.wubydax.romcontrol.v2.prefs.UriSelectionPreference
android:dependency="enable_dialer_custom_bg"
android:key="dialer_bg"
android:title="Select image for Background"/>
<com.wubydax.romcontrol.v2.prefs.MyListPreference
android:defaultValue="0"
android:dependency="enable_dialer_custom_bg"
android:entries="@array/crop_entries"
android:entryValues="@array/crop_values"
android:key="dialer_crop_type"
android:title="Set Image Scaling Type"/>
<com.wubydax.romcontrol.v2.prefs.ColorPickerPreference
android:defaultValue="#00000000"
android:dependency="enable_dialer_custom_bg"
android:key="dialer_bg_primary_color"
android:title="Select primary color"/>
<com.wubydax.romcontrol.v2.prefs.ColorPickerPreference
android:defaultValue="#00000000"
android:dependency="enable_dialer_custom_bg"
android:key="dialer_second_gradient_color"
android:title="Secondary Color (for gradient)"/>
<com.wubydax.romcontrol.v2.prefs.MyListPreference
android:defaultValue="0"
android:dependency="enable_dialer_custom_bg"
android:entries="@array/gradient_entries"
android:entryValues="@array/gradient_values"
android:key="dialer_bg_gradient_orientation"
android:title="Gradient orientation"/>
<com.wubydax.romcontrol.v2.prefs.MySeekBarPreference
android:defaultValue="255"
android:dependency="enable_dialer_custom_bg"
android:key="dialer_opacity"
app:maxValue="255"
android:title="Background Opacity"/>
<PreferenceCategory
android:title="Dialer Colors - disable if Theme conflicts" />
<com.wubydax.romcontrol.v2.prefs.MySwitchPreference
android:title="Digit and Letter Colors On/Off Toggle"
android:key="dialer_theme_override"
android:defaultValue="false"
android:summaryOn="Colors enabled"
android:summaryOff="Colors disabled" />
<com.wubydax.romcontrol.v2.prefs.ColorPickerPreference
android:title="Dialer Digits"
android:key="main_digit_color"
android:summary="Set digit color"
android:dependency="dialer_theme_override"
app:packageNameToKill="com.android.contacts"
android:defaultValue="#ff000000" />
<com.wubydax.romcontrol.v2.prefs.ColorPickerPreference
android:title="Dialer Letters"
android:key="main_letter_color"
android:summary="Choose letter color"
android:dependency="dialer_theme_override"
app:packageNameToKill="com.android.contacts"
android:defaultValue="#ff000000" />
<com.wubydax.romcontrol.v2.prefs.ColorPickerPreference
android:title="Dialer Divider"
android:key="main_divider_color"
android:summary="Choose divider color"
android:dependency="dialer_theme_override"
android:defaultValue="#ff000000" />
<com.wubydax.romcontrol.v2.prefs.ColorPickerPreference
android:title="Dialer Digits Pressed"
android:key="main_digit_color_pressed"
android:summary="Set digit color"
android:dependency="dialer_theme_override"
android:defaultValue="#ff000000" />
</PreferenceScreen>
Additional Notes:
- This is designed to be compatible with theme store themes. Enabling custom backgrounds or colors my conflict with themes.
Credits:
- This modification uses two really awesome modifications provided on my guide thread:
[Mod][GUIDE][CUSTOM VIEW] 6thGear Custom View for any app
and also I utilized the [How-To] Find view by ID without having to find public resource - APK Edition which has additional links provided for that one in Post #10.
I highly recommend the new method how to find public resource without public value. It has made this guide far easier for you!!! :highfive:
Reserved
Sorry sir.
I mod custumbackgound incallui so choise color and gradient ok but image not show. You have thng about this
Gửi từ SM-J710F của tôi bằng cách sử dụng Tapatalk
Works like a charm on s7 edge dialer. had to edit an.smali instead of ap.smali though. now to change that ugly green bar at the top. lol
{
"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"
}
thanks @tdunham for another awesome guide
OvrDriVE said:
Works like a charm on s7 edge dialer. had to edit an.smali instead of ap.smali though. now to change that ugly green bar at the top. lol
View attachment 3828063
thanks @tdunham for another awesome guide
Click to expand...
Click to collapse
Great job sir! Did you have any issue with the signature? I am using an older version of apktool on this one (just sticking with what I was using at the time) and ended up having to resign with TickleMyAndroid for it to work.
I know what you mean about the green. I created a different version for myself with slightly blue themed. If anyone would like to share their own customizations here as they accomplish them, I am sure it would be welcome.
These are the color edits I did to change green to blue.
Code:
<color name="dial_button_bg_easy_solid_green">#ff3ebf10</color>
<color name="dial_button_ripple_color">#4c6ebd52</color>
<color name="dialpad_button_left_icon_tint_color">#ff3ebf10</color>
<color name="dialpad_floating_action_button_color">#ff3ebf10</color>
<color name="dialpad_floating_action_button_color_call">#ff3ebf10</color>
<color name="dialpad_multisim_button_color_call">#ff3ebf10</color>
<color name="dialtacts_color_primary">#ff6ebd52</color>
<color name="dialtacts_status_bar_color">#ff6ebd52</color>
<color name="list_item_checkbox_color_on">#ff6ebd52</color>
On the OP, I have added credits with links to additional guides on some of the concepts and modifications used to create this little monster.
Please take the time to visit those posts if you are not familiar with them.
Tnx - Troy
sonnguyenpg said:
Sorry sir.
I mod custumbackgound incallui so choise color and gradient ok but image not show. You have thng about this
Click to expand...
Click to collapse
I cannot support InCallUI edits.
tdunham said:
Great job sir! Did you have any issue with the signature? I am using an older version of apktool on this one (just sticking with what I was using at the time) and ended up having to resign with TickleMyAndroid for it to work.
I know what you mean about the green. I created a different version for myself with slightly blue themed. If anyone would like to share their own customizations here as they accomplish them, I am sure it would be welcome.
Click to expand...
Click to collapse
Yes on S7 contact there is a signature issues that's gaves Parsing errors , just my friend he do it & told me about that , so i just told him to try it with new signature compiling , only this way can fixed Parsing errors ...
tdunham said:
Great job sir! Did you have any issue with the signature? I am using an older version of apktool on this one (just sticking with what I was using at the time) and ended up having to resign with TickleMyAndroid for it to work.
I know what you mean about the green. I created a different version for myself with slightly blue themed. If anyone would like to share their own customizations here as they accomplish them, I am sure it would be welcome.
Click to expand...
Click to collapse
i used apktool 2.2.0 dirty. i also dirty flashed it. but havn't tryed on a clean install yet. i did sign it though.
err my bad. it's a 2.2.0 snapshot i use
edit: just deleted seccontacts_m and /data/data for contacts and phone.. rebooted and flashed seccontacts_m and works like a charm. no parse error.
OvrDriVE said:
i used apktool 2.2.0 dirty. i also dirty flashed it. but havn't tryed on a clean install yet. i did sign it though.
err my bad. it's a 2.2.0 snapshot i use
edit: just deleted seccontacts_m and /data/data for contacts and phone.. rebooted and flashed seccontacts_m and works like a charm. no parse error.
Click to expand...
Click to collapse
Do you keep the original signature when compiling? Please report how you do your the recompiled.
I apktool use 2.1.2 dirty.
aceqott said:
Do you keep the original signature when compiling? Please report how you do your the recompiled.
I apktool use 2.1.2 dirty.
Click to expand...
Click to collapse
actually i use advancedapktool4.2.0, when i recompile i just by habit automatically tell it to sign the apk. it's probably a bad habit but hasn't failed me yet
I followed the guide without skipping a point, but the category "Dialer Colors - Theme disable if conflicts" nothing works.
Here I leave 3 smalis amending if someone can help me please.
I've already reviewed several times, I do not know what went wrong.
aceqott said:
I followed the guide without skipping a point, but the category "Dialer Colors - Theme disable if conflicts" nothing works.
Here I leave 3 smalis amending if someone can help me please.
I've already reviewed several times, I do not know what went wrong.
Click to expand...
Click to collapse
tdunham also here too , as im sure i did everything correctly my locales my edited same as mentioned on op , i even try it many times with s7/n5/s6 contact & all its same dialer colors not worked , sorry for not providing logs as i didn't find any fatal or error with contact , any help hint any idea , ? Thank u
Here my log maybe u can find something that i couldn't find it
https://mega.nz/#!Wt4mQZYQ!FRLwU_dzQAOu3gJudJUyJcuhJucrfcBAkGwNW9WSbOg
???
aceqott said:
I followed the guide without skipping a point, but the category "Dialer Colors - Theme disable if conflicts" nothing works.
Here I leave 3 smalis amending if someone can help me please.
I've already reviewed several times, I do not know what went wrong.
Click to expand...
Click to collapse
thereassaad said:
tdunham also here too , as im sure i did everything correctly my locales my edited same as mentioned on op , i even try it many times with s7/n5/s6 contact & all its same dialer colors not worked , sorry for not providing logs as i didn't find any fatal or error with contact , any help hint any idea , ? Thank u
Click to expand...
Click to collapse
Are you guys using Rom Control V2?
The filepreference toggle requires two smali edits if NOT using version 2 or it will never work.
Code:
.method public setThemeOverride()V
.
.
.
const-string v1, "/data/data/com.wubydax.romcontrol[COLOR="Red"].v2[/COLOR]/files/modcfg_theme_override"
tdunham said:
Are you guys using Rom Control V2?
The filepreference toggle requires two smali edits if NOT using version 2 or it will never work.
Code:
.method public setThemeOverride()V
.
.
.
const-string v1, "/data/data/com.wubydax.romcontrol[COLOR="Red"].v2[/COLOR]/files/modcfg_theme_override"
Click to expand...
Click to collapse
Im sure im using rom control v2 my friend
thereassaad said:
Im sure im using rom control v2 my friend
Click to expand...
Click to collapse
Well, that is the Boolean that controls the toggle in both smalis ap & DialpadFragment.
To test if it is not working, try removing any occurrences for mThemeoverride:Z
(this example is in ap.smali)
Code:
iget-boolean v1, p0, Lcom/samsung/dialer/dialpad/ap;->mThemeoverride:Z
if-eqz v1, :cond_td
.
.
.
:cond_td
tdunham said:
Well, that is the Boolean that controls the toggle in both smalis ap & DialpadFragment.
To test if it is not working, try removing any occurrences for mThemeoverride:Z
(this example is in ap.smali)
Code:
iget-boolean v1, p0, Lcom/samsung/dialer/dialpad/ap;->mThemeoverride:Z
if-eqz v1, :cond_td
.
.
.
:cond_td
Click to expand...
Click to collapse
U mean this right
iget-boolean v1, p0, Lcom/samsung/dialer/dialpad/ap;->mThemeoverride:Z
if-eqz v1, :cond_td
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v0
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "main_digit_color"
const v2, -0x1000000
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
invoke-virtual {p1, v0}, Landroid/widget/TextView;->setTextColor(I)V
:cond_td
If this one then not recompiled
Log
ther:
SecContacts_M_310716115726.apk\smali\com\samsung\dialer\dialpad\ap.smali[3177,4] no viable alternative at input 'return-void'
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: com/samsung/dialer/dialpad/ap.smali
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:67)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:51)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:38)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:364)
at brut.androlib.Androlib.buildSources(Androlib.java:295)
at brut.androlib.Androlib.build(Androlib.java:278)
at brut.androlib.Androlib.build(Androlib.java:254)
at brut.apktool.Main.cmdBuild(Main.java:224)
at brut.apktool.Main.main(Main.java:84)
???
thereassaad said:
U mean this right
iget-boolean v1, p0, Lcom/samsung/dialer/dialpad/ap;->mThemeoverride:Z
if-eqz v1, :cond_td
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v0
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "main_digit_color"
const v2, -0x1000000
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
invoke-virtual {p1, v0}, Landroid/widget/TextView;->setTextColor(I)V
:cond_td
If this one then not recompiled
Log
ther:
SecContacts_M_310716115726.apk\smali\com\samsung\dialer\dialpad\ap.smali[3177,4] no viable alternative at input 'return-void'
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: com/samsung/dialer/dialpad/ap.smali
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:67)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:51)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:38)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:364)
at brut.androlib.Androlib.buildSources(Androlib.java:295)
at brut.androlib.Androlib.build(Androlib.java:278)
at brut.androlib.Androlib.build(Androlib.java:254)
at brut.apktool.Main.cmdBuild(Main.java:224)
at brut.apktool.Main.main(Main.java:84)
???
Click to expand...
Click to collapse
I only ask you to remove three lines where they occur so I dont know what you did.
tdunham said:
Well, that is the Boolean that controls the toggle in both smalis ap & DialpadFragment.
To test if it is not working, try removing any occurrences for mThemeoverride:Z
(this example is in ap.smali)
Code:
iget-boolean v1, p0, Lcom/samsung/dialer/dialpad/ap;->mThemeoverride:Z
if-eqz v1, :cond_td
.
.
.
:cond_td
Click to expand...
Click to collapse
Remove these three lines everywhere(path is different in dialpadfragment and they may not be exactly the same) in both smalis to see if the problem is setting Boolean with filepref.