The Androids Are Marching On The UK

XDA has always been about the community, and as such we are constantly on the lookout for ways to bring … more

One M8 Lollipop, Blackberry CEO Net Neutrality – XDA TV

The HTC One M8 has gotten its first Android 5.0 Lollipop based Sense 6 ROM! … more

Elemental – The Cross Platform Code Editor StartUp

There is not many cross-platform code editors capable to run both on desktop and … more

Dropbox App Available on Windows Phone

The Dropbox app is well known and widely used. The application has finally landed on Windows Phone … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[MOD] [HOW TO] Enable rotation lock tile on 4.4

OP S0bes

8th April 2014, 01:03 PM   |  #1  
S0bes's Avatar
OP Senior Member
Flag Tomsk
Thanks Meter: 459
 
467 posts
Join Date:Joined: Jan 2012
Donate to Me
More
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://forum.xda-developers.com/show...2&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
Code:
<bool name="quick_settings_show_rotation_lock">true</bool>
<bool name="config_showRotationLock">true</bool>
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\poli cy\RotationLockController.smali
Find this:
Code:
invoke-static {v0}, Lcom/android/internal/view/RotationPolicy;->isRotationLockToggleSupported(Landroid/content/Context;)Z
There will be four the same lines. And you should change it four times for each line.
Before:
Code:
invoke-static {v0}, Lcom/android/internal/view/RotationPolicy;->isRotationLockToggleSupported(Landroid/content/Context;)Z

    move-result v0

    if-eqz v0, :cond_0
After:
Code:
invoke-static {v0}, Lcom/android/internal/view/RotationPolicy;->isRotationLockToggleSupported(Landroid/content/Context;)Z

    move-result v0

   # if-eqz v0, :cond_0
3. SystemUI\smali\com\android\systemui\statusbar\phon e\QuickSettings$15.smali
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
After:
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

This is for XT1032 174.44.1.falcon_umts.Retail.en.US :http://forum.xda-developers.com/atta...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.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2014-04-05-23-26-30[1].png
Views:	4916
Size:	127.0 KB
ID:	2674906   Click image for larger version

Name:	Screenshot_2014-04-05-23-26-33[1].png
Views:	4206
Size:	127.5 KB
ID:	2674907  
Attached Files
File Type: zip LOCK.zip - [Click for QR Code] (1.08 MB, 153 views)
Last edited by S0bes; 8th April 2014 at 06:46 PM.
The Following 4 Users Say Thank You to S0bes For This Useful Post: [ View ]
8th April 2014, 05:49 PM   |  #2  
gameeater's Avatar
Senior Member
Thanks Meter: 16
 
107 posts
Join Date:Joined: Mar 2011
More
thanks!!

Can you create others mods to add anothers functions on notification bar?
8th April 2014, 07:04 PM   |  #3  
S0bes's Avatar
OP Senior Member
Flag Tomsk
Thanks Meter: 459
 
467 posts
Join Date:Joined: Jan 2012
Donate to Me
More
Quote:
Originally Posted by gameeater

thanks!!

Can you create others mods to add anothers functions on notification bar?

of course not. I didn't create it. It was created by google and I just let it be visible
The Following User Says Thank You to S0bes For This Useful Post: [ View ]
15th May 2014, 09:43 PM   |  #4  
Junior Member
Thanks Meter: 0
 
9 posts
Join Date:Joined: Apr 2014
More
not work
Thanks for your effort but this mod doesn't work on moto g xt1032 stock ROM and faux123 009m kernek ....
The issue is after flash this by CWM there is not any status bar anymore and there is not any navigation keys anymore
16th May 2014, 06:25 AM   |  #5  
S0bes's Avatar
OP Senior Member
Flag Tomsk
Thanks Meter: 459
 
467 posts
Join Date:Joined: Jan 2012
Donate to Me
More
Quote:
Originally Posted by ekhatooni

Thanks for your effort but this mod doesn't work on moto g xt1032 stock ROM and faux123 009m kernek ....
The issue is after flash this by CWM there is not any status bar anymore and there is not any navigation keys anymore

Is your system version EXACTLY 174.44.1.falcon_umts.Retail.en.US ?Because as I said in 1st post
Quote:

This is for XT1032 174.44.1.falcon_umts.Retail.en.US :http://forum.xda-developers.com/atta...1&d=1396965597 [LOCK.zip]
And I can not guarantee work on any other firmwares

16th May 2014, 09:28 AM   |  #6  
Junior Member
Thanks Meter: 0
 
9 posts
Join Date:Joined: Apr 2014
More
Question Request
HI

you are right ..... My Version is 176.44.1.falcom_umts.TescoSL.en.GB

and my phones SystemUI.apk is already attached .....

Is it possible that enable the Rotation tile ????

thanks ....
Attached Files
File Type: apk SystemUI.apk - [Click for QR Code] (1.54 MB, 5 views)
16th May 2014, 01:25 PM   |  #7  
Senior Member
Thanks Meter: 12
 
109 posts
Join Date:Joined: Jan 2014
More
Thanks, this worked on my Moto G. Not sure if I needed it because I never take off auto rotate but it's good to have it there.
17th May 2014, 01:46 AM   |  #8  
Senior Member
Thanks Meter: 10
 
125 posts
Join Date:Joined: Sep 2013
My god! Why is it that you people never read the WHOLE post BEFORE flashing stuff?!

Sent from my XT1032 using XDA Free mobile app
The Following User Says Thank You to Fede37 For This Useful Post: [ View ]
4th June 2014, 05:26 PM   |  #9  
GodOfPsychos's Avatar
Senior Member
Flag Solingen
Thanks Meter: 214
 
140 posts
Join Date:Joined: Mar 2014
More
For People with XT1032 EU Moto G
i just compiled the SystemUI.apk from the EU version of the Moto G XT1032 to make the Lock Rotation Tile visible

Maybe the Thread starter can put my apk as well to the first post ;D

Note that my modified SystemUI.apk is just for 176.44.1.falcon_umts.EURetail.en.EU (don't know if it works for other versions)
Attached Files
File Type: apk SystemUI.apk - [Click for QR Code] (1.53 MB, 14 views)

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

Advanced Search
Display Modes