Dovanchuc7521
Senior Member
English please!! [emoji3] [emoji3]Chào đồng chí [emoji1] [emoji1]
Gửi từ SM-N935S của tôi bằng cách sử dụng Tapatalk
English please!! [emoji3] [emoji3]Chào đồng chí [emoji1] [emoji1]
Gửi từ SM-N935S của tôi bằng cách sử dụng Tapatalk
7. SystemUI/res/layout/keyguard_servicebox_container.xml
below before
addCode:</LinearLayout> </com.android.keyguard.servicebox.KeyguardServiceBoxContainer>
Code:<LinearLayout android:gravity="center_horizontal" android:layout_gravity="center_horizontal" android:orientation="horizontal" android:id="@id/weather_widget" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="1.0dip"> <mickles.app.mAccuWeatherS7.mWeatherIcon android:gravity="start|center" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="2.0dip" /> <mickles.app.mAccuWeatherS7.mWeatherCurrentTemp android:textSize="35.0dip" android:textColor="#ffffffff" android:gravity="start|center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="1.0dip" android:fontFamily="samsung-neo-num3L" style="@style/keyguard_headline_text_shadow" /> <LinearLayout android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="-1.5dip" android:layout_marginEnd="1.0dip"> <LinearLayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="4.5dip"> <mickles.app.mAccuWeatherS7.mWeatherHighTemp android:textSize="15.0dip" android:textColor="#ffffffff" android:gravity="end|center" android:layout_width="fill_parent" android:layout_height="wrap_content" android:fontFamily="samsung-neo-num3L" android:layout_marginStart="6.0dip" android:layout_marginEnd="3.0dip" style="@style/keyguard_headline_text_shadow" /> </LinearLayout> <LinearLayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="2.5dip"> <mickles.app.mAccuWeatherS7.mWeatherLowTemp android:textSize="15.0dip" android:textColor="#ffffffff" android:gravity="end|center" android:layout_width="fill_parent" android:layout_height="wrap_content" android:fontFamily="samsung-neo-num3L" android:layout_marginStart="6.0dip" android:layout_marginEnd="3.0dip" style="@style/keyguard_headline_text_shadow" /> </LinearLayout> </LinearLayout> </LinearLayout> <LinearLayout android:gravity="center|left" android:layout_gravity="center_horizontal" android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="1.0dip"> <LinearLayout android:gravity="center|left" android:orientation="horizontal" android:id="@id/sunrise" android:layout_width="wrap_content" android:layout_height="wrap_content"> <TextView android:textSize="16.0dip" android:textColor="#fff8ecd0" android:gravity="center|left" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="sunrise " style="@style/keyguard_headline_text_shadow" /> <mickles.app.mAccuWeatherS7.mWeatherSunRise android:textSize="16.0dip" android:textColor="#ffffffff" android:gravity="center|left" android:tag="HH:mm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="1.0dip" android:layout_marginStart="6.0dip" style="@style/keyguard_headline_text_shadow" /> <ImageView android:layout_width="13.0dip" android:layout_height="13.0dip" android:src="@drawable/weather_edge_ic_location_mtrl" android:layout_marginStart="11.0dip" /> <mickles.app.mAccuWeatherS7.mWeatherLocation android:textSize="16.0dip" android:textColor="#ffffffff" android:gravity="end|center" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="1.0dip" android:layout_marginStart="1.0dip" style="@style/keyguard_headline_text_shadow" /> </LinearLayout> <LinearLayout android:gravity="center|left" android:orientation="horizontal" android:id="@id/sunset" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="1.0dip"> <TextView android:textSize="16.0dip" android:textColor="#ffe2d7cd" android:gravity="center|left" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="sunset " style="@style/keyguard_headline_text_shadow" /> <mickles.app.mAccuWeatherS7.mWeatherSunSet android:textSize="16.0dip" android:textColor="#ffffffff" android:gravity="center|left" android:tag="HH:mm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="1.0dip" android:layout_marginStart="6.0dip" style="@style/keyguard_headline_text_shadow" /> <mickles.app.mAccuWeatherS7.mWeatherText android:textSize="16.0dip" android:textColor="#ffffffff" android:ellipsize="marquee" android:gravity="end|center" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="1.0dip" android:singleLine="true" android:layout_marginStart="12.0dip" style="@style/keyguard_headline_text_shadow" /> </LinearLayout> </LinearLayout>
9. SystemUI/smali/mickles/app/mAccuWeatherS7/mWeatherIcon.smali
0x7f02075d replace
Code:<public type="drawable" name="weather_level_analog" id="0x7f02075d" />
How to unlock after reboot with fingerprint without pin or pattern
decompile SystemUI.apk
Go to smali/com/android/keyguard
open Keyguardupdatemonitor.smali
add blue
Code:.method private isFingerprintDisabled(I)Z .................. :goto_0 [COLOR="Blue"]const/4 v1, 0x0 [/COLOR] return v1 :cond_0 invoke-virtual {p0}, Lcom/android/keyguard/KeyguardUpdateMonitor;->isSimPinSecure()Z move-result v1 goto :goto_0 .end method
Code:.method public isUnlockCompleted()Z ........................................ move-result v0 [COLOR="blue"]const/4 v0, 0x1 [/COLOR] return v0 .end method
Code:.method public isUnlockWithFingerprintPossible(I)Z ............................................ :cond_3 [COLOR="blue"]const/4 v0, 0x1[/COLOR] return v1 .end method
Open KeyguardUpdateMonitor$StrongAuthTracker.smali
add blue
Code:.method public isUnlockingWithFingerprintAllowed()Z .locals 2 .prologue const/4 v0, 0x0 .line 936 iget-object v1, p0, Lcom/android/keyguard/KeyguardUpdateMonitor;->mStrongAuthTracker:Lcom/android/keyguard/KeyguardUpdateMonitor$StrongAuthTracker; invoke-virtual {v1}, Lcom/android/keyguard/KeyguardUpdateMonitor$StrongAuthTracker;->isUnlockingWithFingerprintAllowed()Z move-result v1 [COLOR="Blue"]const/4 v1, 0x1 [/COLOR] if-eqz v1, :cond_0 .line 937 sget v1, Lcom/android/keyguard/KeyguardUpdateMonitor;->sCurrentUser:I invoke-virtual {p0, v1}, Lcom/android/keyguard/KeyguardUpdateMonitor;->hasFingerprintUnlockTimedOut(I)Z move-result v1 if-eqz v1, :cond_1 .line 936 :cond_0 :goto_0 return v0 .line 937 :cond_1 const/4 v0, 0x1 goto :goto_0 .end method
recompile
Thx @sanoc69
Yes,There are a couple of issues with this on a Galaxy S8 port for the Galaxy S6.
FIRST: this method ".method private isFingerprintDisabled(I)Z" cannot be found inside the mentioned smali file. No problems with the other methods.
SECOND: this method ".method public isUnlockingWithFingerprintAllowed()Z" looks completely different.
Is there any chance to get this super useful feature working?
.method public isUnlockingWithBiometricAllowed()Z
.locals 4 # increase from 2
iget-object v1, p0, Lcom/android/keyguard/KeyguardUpdateMonitor;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "fingerprint_unlock"
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-nez v1, :cond_1 # Match last condition number
const/4 v0, 0x0
iget-object v1, p0, Lcom/android/keyguard/KeyguardUpdateMonitor;->mStrongAuthTracker:Lcom/android/keyguard/KeyguardUpdateMonitor$StrongAuthTracker;
invoke-virtual {v1}, Lcom/android/keyguard/KeyguardUpdateMonitor$StrongAuthTracker;->isUnlockingWithBiometricAllowed()Z
move-result v1
if-eqz v1, :cond_0
iget-boolean v1, p0, Lcom/android/keyguard/KeyguardUpdateMonitor;->mDisabledBiometricBySecurityDialog:Z
if-eqz v1, :cond_1
:cond_0
:goto_0
return v0
:cond_1 # condition number to match in edits at beginning
const/4 v0, 0x1
goto :goto_0
.end method
<com.wubydax.romcontrol.v2.prefs.MySwitchPreference
android:defaultValue="true"
android:key="fingerprint_unlock"
android:summaryOff="Disabled"
android:summaryOn="Enabled"
android:title="Unlocking with fingerprint after boot" />
Yes,
Try this one
https://xdaforums.com/showthread.php?p=73113586
Maybe need to adapt a little, depend of your smali
Exemple for me, i have adapt on S6 Edge G925F Nougat
Code:.method public isUnlockingWithBiometricAllowed()Z .locals 4 # increase from 2 iget-object v1, p0, Lcom/android/keyguard/KeyguardUpdateMonitor;->mContext:Landroid/content/Context; invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver; move-result-object v1 const-string v2, "fingerprint_unlock" 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-nez v1, :cond_1 # Match last condition number const/4 v0, 0x0 iget-object v1, p0, Lcom/android/keyguard/KeyguardUpdateMonitor;->mStrongAuthTracker:Lcom/android/keyguard/KeyguardUpdateMonitor$StrongAuthTracker; invoke-virtual {v1}, Lcom/android/keyguard/KeyguardUpdateMonitor$StrongAuthTracker;->isUnlockingWithBiometricAllowed()Z move-result v1 if-eqz v1, :cond_0 iget-boolean v1, p0, Lcom/android/keyguard/KeyguardUpdateMonitor;->mDisabledBiometricBySecurityDialog:Z if-eqz v1, :cond_1 :cond_0 :goto_0 return v0 :cond_1 # condition number to match in edits at beginning const/4 v0, 0x1 goto :goto_0 .end method
RomControl
Code:<com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:defaultValue="true" android:key="fingerprint_unlock" android:summaryOff="Disabled" android:summaryOn="Enabled" android:title="Unlocking with fingerprint after boot" />
iput-boolean v0, p0, Lcom/android/systemui/statusbar/policy/Clock;->mShowSeconds:Z
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/android/systemui/statusbar/policy/Clock;->mShowSeconds:Z
:cond_0
iput-boolean v0, p0, Lcom/android/systemui/statusbar/policy/Clock;->mShowSeconds:Z
.line 247
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/Clock;->updateShowSeconds()V
:cond_0
const/4 v2, 0x1
const-string v3, "show_seconds"
invoke-static {v3, v2}, Lcom/android/wubydax/GearUtils;->getDbIntForKey(Ljava/lang/String;I)I
move-result v3
if-nez v3, :cond_agc1
const/4 v0, 0x0
goto :goto_agc1
:cond_agc1
const/4 v0, 0x1
:goto_agc1
iput-boolean v0, p0, Lcom/android/systemui/statusbar/policy/Clock;->mShowSeconds:Z
.line 247
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/Clock;->updateShowSeconds()V
<com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:title="Show seconds in statusbar"
android:key="show_seconds"
android:defaultValue="false"
android:summaryOn="Showed"
android:summaryOff="Hided"
app:packageNameToKill="com.android.systemui"
app:isSilent="false"/>
FYI. Showing seconds can be achieved by typing "settings put secure clock_seconds 1" in a terminal. "settings put secure clock_seconds 0" to disable.HOW-TO SHOW/HIDE SECONDS IN STATUSBAR WITH/WITHOUT ROMCONTROL
Hi guys after see how to center-clock for no use 3minitclock I was thinking for show seconds, today i finded the way :good:
1st method - For show always, without RC, decompile SystemUI, go to smali\com\android\systemui\statusbar\policy and open Clock.smali
Findand change forCode:iput-boolean v0, p0, Lcom/android/systemui/statusbar/policy/Clock;->mShowSeconds:Z
Code:const/4 v0, 0x1 iput-boolean v0, p0, Lcom/android/systemui/statusbar/policy/Clock;->mShowSeconds:Z
Recompile and done
2nd method - For use with RC toggle :
NOTE : FOR THIS U NEED GearUtils
Decompile SystemUI, go to smali\com\android\systemui\statusbar\policy and open Clock.smali
Search for iput-boolean v0, p0, Lcom/android/systemui/statusbar/policy/Clock;->mShowSeconds:Z it looks like this :
Code::cond_0 iput-boolean v0, p0, Lcom/android/systemui/statusbar/policy/Clock;->mShowSeconds:Z .line 247 invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/Clock;->updateShowSeconds()V
Replace with :
Code::cond_0 const/4 v2, 0x1 const-string v3, "show_seconds" invoke-static {v3, v2}, Lcom/android/wubydax/GearUtils;->getDbIntForKey(Ljava/lang/String;I)I move-result v3 if-nez v3, :cond_agc1 const/4 v0, 0x0 goto :goto_agc1 :cond_agc1 const/4 v0, 0x1 :goto_agc1 iput-boolean v0, p0, Lcom/android/systemui/statusbar/policy/Clock;->mShowSeconds:Z .line 247 invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/Clock;->updateShowSeconds()V
Look at the start of method and increase .locals by 2
Done with SystemUI, now add this to RomControl :
Code:
Enjoy :good:
Thanks! Its work ok!!HOW-TO SHOW/HIDE SECONDS IN STATUSBAR WITH/WITHOUT ROMCONTROL
Hi guys after see how to center-clock for no use 3minitclock I was thinking for show seconds, today i finded the way :good:
1st method - For show always, without RC, decompile SystemUI, go to smali\com\android\systemui\statusbar\policy and open Clock.smali
Findand change forCode:iput-boolean v0, p0, Lcom/android/systemui/statusbar/policy/Clock;->mShowSeconds:Z
Code:const/4 v0, 0x1 iput-boolean v0, p0, Lcom/android/systemui/statusbar/policy/Clock;->mShowSeconds:Z
Recompile and done
2nd method - For use with RC toggle :
NOTE : FOR THIS U NEED GearUtils
Decompile SystemUI, go to smali\com\android\systemui\statusbar\policy and open Clock.smali
Search for iput-boolean v0, p0, Lcom/android/systemui/statusbar/policy/Clock;->mShowSeconds:Z it looks like this :
Code::cond_0 iput-boolean v0, p0, Lcom/android/systemui/statusbar/policy/Clock;->mShowSeconds:Z .line 247 invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/Clock;->updateShowSeconds()V
Replace with :
Code::cond_0 const/4 v2, 0x1 const-string v3, "show_seconds" invoke-static {v3, v2}, Lcom/android/wubydax/GearUtils;->getDbIntForKey(Ljava/lang/String;I)I move-result v3 if-nez v3, :cond_agc1 const/4 v0, 0x0 goto :goto_agc1 :cond_agc1 const/4 v0, 0x1 :goto_agc1 iput-boolean v0, p0, Lcom/android/systemui/statusbar/policy/Clock;->mShowSeconds:Z .line 247 invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/Clock;->updateShowSeconds()V
Look at the start of method and increase .locals by 2
Done with SystemUI, now add this to RomControl :
Code:<com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:title="Show seconds in statusbar" android:key="show_seconds" android:defaultValue="false" android:summaryOn="Showed" android:summaryOff="Hided" app:packageNameToKill="com.android.systemui" app:isSilent="false"/>
Enjoy :good:
FYI. Showing seconds can be achieved by typing "settings put secure clock_seconds 1" in a terminal. "settings put secure clock_seconds 0" to disable.
Edit. I simply use rom control to initiate the shell command
Sent from my SM-G955F using Tapatalk
.method isSecureLocked(Lcom/android/server/wm/WindowState;)Z
.method isSecureLocked(Lcom/android/server/wm/WindowState;)Z
.locals 1
const/4 v0, 0x0
return v0
.end method
.method isSecureLocked(Lcom/android/server/wm/WindowState;)Z
.method isSecureLocked(Lcom/android/server/wm/WindowState;)Z
.locals 4
.param p1, "w" # Lcom/android/server/wm/WindowState;
.prologue
const/4 v3, 0x1
const/4 v2, 0x0
iget-object v1, p0, Lcom/android/server/wm/WindowManagerService;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string/jumbo v0, "is_flag_secure_disabled"
invoke-static {v1, v0, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
.line 2715
iget-object v0, p1, Lcom/android/server/wm/WindowState;->mAttrs:Landroid/view/WindowManager$LayoutParams;
iget v0, v0, Landroid/view/WindowManager$LayoutParams;->flags:I
and-int/lit16 v0, v0, 0x2000
if-eqz v0, :cond_0
.line 2716
return v3
.line 2718
:cond_0
iget v0, p1, Lcom/android/server/wm/WindowState;->mOwnerUid:I
invoke-static {v0}, Landroid/os/UserHandle;->getUserId(I)I
move-result v0
invoke-virtual {p0, v0}, Lcom/android/server/wm/WindowManagerService;->isScreenCaptureDisabledLocked(I)Z
move-result v0
if-nez v0, :cond_1
.line 2720
iget-object v0, p0, Lcom/android/server/wm/WindowManagerService;->mBridge:Lcom/android/server/wm/IWindowManagerServiceBridge;
iget v1, p1, Lcom/android/server/wm/WindowState;->mOwnerUid:I
invoke-static {v1}, Landroid/os/UserHandle;->getUserId(I)I
move-result v1
invoke-interface {v0, v1}, Lcom/android/server/wm/IWindowManagerServiceBridge;->getScreenCaptureMDMPolicy(I)Z
move-result v0
.line 2718
if-eqz v0, :cond_2
.line 2722
:cond_1
return v3
.line 2724
:cond_2
return v2
.end method
<com.wubydax.romcontrol.v2.prefs.MySwitchPreference
android:title="hack some restricted security"
android:key="is_flag_secure_disabled"
android:defaultValue="1"
android:summaryOn="Enabled"
android:summaryOff="Disabled" />
Great [emoji16] thanks tomorrow i test this guide [emoji4][emoji106]How to Disable Flag_Secure in Nougat TW Rom
This mod enable Screenshots and Screen Record into Secure apps
Credits @edzamber
Special thanks to @fOmey who help me to find in witch jar file looking for
Without RomControl (permanent disabled)
Services.jar/smali/com/android/server/wm/WindowManagerService.smali
Code:.method isSecureLocked(Lcom/android/server/wm/WindowState;)Z
Replace complete method by this :
Code:.method isSecureLocked(Lcom/android/server/wm/WindowState;)Z .locals 1 const/4 v0, 0x0 return v0 .end method
With RomControl to Toogle On/Off
Credits to @mwilky for Toogle Method and credit to @thereassaad for RC2 edits
Thanks brothers
Code:.method isSecureLocked(Lcom/android/server/wm/WindowState;)Z
Replace complete method by this :
Code:.method isSecureLocked(Lcom/android/server/wm/WindowState;)Z .locals 4 .param p1, "w" # Lcom/android/server/wm/WindowState; .prologue const/4 v3, 0x1 const/4 v2, 0x0 iget-object v1, p0, Lcom/android/server/wm/WindowManagerService;->mContext:Landroid/content/Context; invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver; move-result-object v1 const-string/jumbo v0, "is_flag_secure_disabled" invoke-static {v1, v0, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I move-result v3 .line 2715 iget-object v0, p1, Lcom/android/server/wm/WindowState;->mAttrs:Landroid/view/WindowManager$LayoutParams; iget v0, v0, Landroid/view/WindowManager$LayoutParams;->flags:I and-int/lit16 v0, v0, 0x2000 if-eqz v0, :cond_0 .line 2716 return v3 .line 2718 :cond_0 iget v0, p1, Lcom/android/server/wm/WindowState;->mOwnerUid:I invoke-static {v0}, Landroid/os/UserHandle;->getUserId(I)I move-result v0 invoke-virtual {p0, v0}, Lcom/android/server/wm/WindowManagerService;->isScreenCaptureDisabledLocked(I)Z move-result v0 if-nez v0, :cond_1 .line 2720 iget-object v0, p0, Lcom/android/server/wm/WindowManagerService;->mBridge:Lcom/android/server/wm/IWindowManagerServiceBridge; iget v1, p1, Lcom/android/server/wm/WindowState;->mOwnerUid:I invoke-static {v1}, Landroid/os/UserHandle;->getUserId(I)I move-result v1 invoke-interface {v0, v1}, Lcom/android/server/wm/IWindowManagerServiceBridge;->getScreenCaptureMDMPolicy(I)Z move-result v0 .line 2718 if-eqz v0, :cond_2 .line 2722 :cond_1 return v3 .line 2724 :cond_2 return v2 .end method
RC2 edits :
Code:<com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:title="hack some restricted security" android:key="is_flag_secure_disabled" android:defaultValue="1" android:summaryOn="Enabled" android:summaryOff="Disabled" />
Enjoy
Did you install both framework-res.apk and Samsung-framework-res.apk in TMA ? (option 3)?Could someone please take a look into the log i provided and tell me why i keep getting Recompiling Error? Thanks
I did install just framework resDid you install both framework-res.apk and Samsung-framework-res.apk in TMA ? (option 3)?
Strange because your log say that ressources not found. @ android:style mean ressource in framework-res.apk/res/values/style. So Maybe this SystemUI is from a ported Rom... Then you need same framework-res.apk that was used to compil this SystemUII did install just framework res
EDIT: ok i just installed samsung framework res also...still error...
I would also like to mention that i decompiled edited and recompiled a couple of apks previously without any error.(smusic.apk)
...
move-result-object v4
invoke-static {v1, v4}, Lcom/sec/android/app/sysscope/engine/i;->c(Ljava/lang/String;Ljava/lang/String;)I
[B][COLOR="#0000FF"] const v0, 0x1[/COLOR][/B]
invoke-virtual {p0, v0}, Lcom/sec/android/app/sysscope/engine/SystemDiagnosisManager;->storeResult(I)I
move-result v1
....
.method private b(Ljava/lang/String;)Z
.locals 2
const/4 v0, 0x1
return v0
.end method
.method public native checkIsApprivedProcess(Ljava/lang/String;)I
.end method
.method public checkIsApprivedProcess(Ljava/lang/String;)I
.locals 2
const v0, 0x1
return v0
.end method
.method public a()I
.locals 2
const v0, 0x1
return v0
.end method
Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
<string name="qs_screen_grid_3_2">3X2</string>
<string name="qs_screen_grid_4_2">4X2</string>
<string name="qs_screen_grid_5_2">5X2</string>
Add this :
<string name="qs_screen_grid_3_4">3X4</string>
<string name="qs_screen_grid_4_4">4X4</string>
<string name="qs_screen_grid_5_4">5X4</string>
<string name="qs_screen_grid_3_5">3X5</string>
<string name="qs_screen_grid_4_5">4X5</string>
<string name="qs_screen_grid_5_5">5X5</string>
<item type="id" name="gid_save_position">false</item>
qs_screen_grid_3_2
qs_screen_grid_4_2
qs_screen_grid_5_2
<string-array name="config_globalActionsList">
<item>power</item>
<item>datamode</item>
<item>airplane</item>
<item>restart</item>
<item>lockdown</item>
<item>bugreport</item>
<item>users</item>
[COLOR="Blue"]<item>rebootrecovery</item>[/COLOR]
<item>emergencymode</item>
<item>subscreen</item>
<item>screenrec</item>
</string-array>
<string name="charging_connected_via_usb">Charging connected device via USB...</string>
<string name="config_tspstate_threshold">10,32,768,10,60</string>
[COLOR="Blue"]<string name="tw_ic_do_rebootrecovery">Reboot Recovery</string>[/COLOR]
</resources>
.field mEmergencyStringId:I
[COLOR="Blue"].field private mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;[/COLOR]
.field private mGlobalActionsFrameLayout:Landroid/app/GlobalActionsFrameLayout
if-eqz v4, :cond_8
const v4, 0x10809f4
:goto_4
const v6, 0x10406e2
move-object/from16 v0, p0
invoke-direct {v5, v0, v4, v6}, Lcom/android/server/policy/GlobalActions$20;-><init>(Lcom/android/server/policy/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v5, v0, Lcom/android/server/policy/GlobalActions;->mRestart:Lcom/android/server/policy/GlobalActions$SinglePressAction;
[COLOR="blue"]new-instance v4, Lcom/android/server/policy/GlobalActions$47;
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const-string v1, "tw_ic_do_rebootrecovery"
const-string v2, "drawable"
const-string v3, "android"
invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v5
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const-string v1, "tw_ic_do_rebootrecovery"
const-string v2, "string"
const-string v3, "android"
invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v6
move-object/from16 v0, p0
invoke-direct {v4, v0, v5, v6}, Lcom/android/server/policy/GlobalActions$47;-><init>(Lcom/android/server/policy/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v4, v0, Lcom/android/server/policy/GlobalActions;->mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;[/COLOR]
invoke-static {}, Lcom/samsung/android/feature/SemCscFeature;->getInstance()Lcom/samsung/android/feature/SemCscFeature;
move-result-object v4
const-string/jumbo v5, "CscFeature_Common_ConfigBikeMode"
const/16 v6, 0x80
const/4 v7, 0x1
move-object/from16 v0, p0
invoke-direct {v0, v6, v4, v5, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions$Action;Ljava/util/ArrayList;Z)Z
new-instance v4, Lcom/android/server/policy/GlobalActions$BugReportAction;
move-object/from16 v0, p0
invoke-direct {v4, v0}, Lcom/android/server/policy/GlobalActions$BugReportAction;-><init>(Lcom/android/server/policy/GlobalActions;)V
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;
[COLOR="Blue"]const/16 v6, 0x100
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/server/policy/GlobalActions;->mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;
const/4 v7, 0x1
move-object/from16 v0, p0
invoke-direct {v0, v6, v4, v5, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions$Action;Ljava/util/ArrayList;Z)Z [/COLOR]
const/16 v6, 0x200 [COLOR="Magenta"]#before was 0x100[/COLOR]
const/4 v7, 0x1
move-object/from16 v0, p0
invoke-direct {v0, v6, v4, v5, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions$Action;Ljava/util/ArrayList;Z)Z
const-string/jumbo v4, "emergencymode"
invoke-virtual {v4, v11}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_15
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mEmergency:Lcom/android/server/policy/GlobalActions$ToggleAction;
invoke-virtual {v4, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto/16 :[COLOR="Yellow"]goto_7[/COLOR] #look that green part match this
:cond_15
[COLOR="Blue"]const-string/jumbo v4, "rebootrecovery"
invoke-virtual {v4, v11}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_asc1
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;
invoke-virtual {v4, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto/16 :[COLOR="Green"]goto_7 [/COLOR]
:cond_asc1[/COLOR]
const-string/jumbo v4, "silent"
.method static synthetic access$500(Lcom/android/server/policy/GlobalActions;)Landroid/content/Context;
.locals 1
iget-object v0, p0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;
return-object v0
.end method
<com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:title="Reboot Recovery Button" android:key="reboot_recovery" android:defaultValue="false" android:summaryOn="Reboot Recovery will be shown" android:summaryOff="Currently removed" />
...
const-string v21, [B]"config_lowBatteryWarningLevel"[/B]
const-string v22, "integer"
const-string v23, "android"
invoke-virtual/range {v20 .. v23}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v20
invoke-virtual/range {v19 .. v20}, Landroid/content/res/Resources;->getInteger(I)I
move-result v19
move/from16 v0, v19
move-object/from16 v1, p0
[COLOR="blue"][B]const v0, 0x0[/B][/COLOR] # 0 = flash always available, 0x5 = Flash available while the battery level is greater than 5% ... select your desired value...or make a custom prefernce and read here its value (camara app should be restarted or .. .)
iput v0, v1, Lcom/sec/android/app/camera/Camera;->[B]mLowBatteryWarningLevel:I[/B]
...