As I know, this feature was hidden by google for any phone which screen size is smaller than 600 dp. ( dp = (px / dpi) * 160 ).
If you have root you can install GravityBox and easily get this tile. But if for some reason you do not wanna use gravitybox, there are few ways to do it:
How to simply enable it by changing framework.jar you can find here http://xdaforums.com/showpost.php?p=29209182&postcount=13
How to enable this tile using only SystemUI.apk I'm gonna show you
This is for XT1032 174.44.1.falcon_umts.Retail.en.US :http://xdaforums.com/attachment.php?attachmentid=2674905&stc=1&d=1396965597 [LOCK.zip]
And I can not guarantee work on any other firmwares
Backup your original SystemUI.apk just in case if something goes wrong and you'll get bootloop or black screen.
If you have root you can install GravityBox and easily get this tile. But if for some reason you do not wanna use gravitybox, there are few ways to do it:
How to simply enable it by changing framework.jar you can find here http://xdaforums.com/showpost.php?p=29209182&postcount=13
How to enable this tile using only SystemUI.apk I'm gonna show you
1. SystemUI/res/values/bools.xml
find this bools and change them to true
Actually, I think this is not necessary. You can skip this step and return if it wont work
2.SystemUI\smali\com\android\systemui\statusbar\policy\RotationLockController.smali
Find this:
There will be four the same lines. And you should change it four times for each line.
Before:
After:
3. SystemUI\smali\com\android\systemui\statusbar\phone\QuickSettings$15.smali
find method public refreshView
Before:
After:
find this bools and change them to true
Code:
<bool name="quick_settings_show_rotation_lock">true</bool>
<bool name="config_showRotationLock">true</bool>
2.SystemUI\smali\com\android\systemui\statusbar\policy\RotationLockController.smali
Find this:
Code:
invoke-static {v0}, Lcom/android/internal/view/RotationPolicy;->isRotationLockToggleSupported(Landroid/content/Context;)Z
Before:
Code:
invoke-static {v0}, Lcom/android/internal/view/RotationPolicy;->isRotationLockToggleSupported(Landroid/content/Context;)Z
move-result v0
if-eqz v0, :cond_0
Code:
invoke-static {v0}, Lcom/android/internal/view/RotationPolicy;->isRotationLockToggleSupported(Landroid/content/Context;)Z
move-result v0
# if-eqz v0, :cond_0
find method public refreshView
Before:
Code:
.line 1118
.local v0, "rotationLockState":Lcom/android/systemui/statusbar/phone/QuickSettingsModel$RotationLockState;
iget-boolean v1, v0, Lcom/android/systemui/statusbar/phone/QuickSettingsModel$RotationLockState;->visible:Z
if-eqz v1, :cond_2
const/4 v1, 0x0
Code:
.line 1118
.local v0, "rotationLockState":Lcom/android/systemui/statusbar/phone/QuickSettingsModel$RotationLockState;
iget-boolean v1, v0, Lcom/android/systemui/statusbar/phone/QuickSettingsModel$RotationLockState;->visible:Z
#if-eqz v1, :cond_2
const/4 v1, 0x0
And I can not guarantee work on any other firmwares
Backup your original SystemUI.apk just in case if something goes wrong and you'll get bootloop or black screen.
Attachments
Last edited: