# Improve auto rotate speed?



## miketoasty (Jun 10, 2011)

So I finally got to the point where I have to ask this question, has anyone found anyway to improve the time it takes to auto rotate? It usually takes at least 2 to 3 seconds and just now took 5. More specifically does anyone know if this is a phone problem or an ICS problem?

I have tried on complete stock and it was still slow on 2 different phones.

Not a huge issue as it does auto rotate but with everything on this phone being so smooth and quick the couple seconds it takes to do this really kills the experience.


----------



## Zacisblack (Sep 5, 2011)

miketoasty said:


> So I finally got to the point where I have to ask this question, has anyone found anyway to improve the time it takes to auto rotate? It usually takes at least 2 to 3 seconds and just now took 5. More specifically does anyone know if this is a phone problem or an ICS problem?
> 
> I have tried on complete stock and it was still slow on 2 different phones.
> 
> Not a huge issue as it does auto rotate but with everything on this phone being so smooth and quick the couple seconds it takes to do this really kills the experience.


Its a software issue. Youll notice that if you go to the camera app and turn your phone, the icons react very swiftly.


----------



## miketoasty (Jun 10, 2011)

Zacisblack said:


> Its a software issue. Youll notice that if you go to the camera app and turn your phone, the icons react very swiftly.


Good pick up! Opened up Camera, and tried this a couple different times and just like you said almost as quickly as I could turn my phone the apps moved as well. Really wander if what kind of fix this would take to get it working just as well in all other apps. Probably have to wait for a update from google...


----------



## poontab (Jun 7, 2011)

I doubt the delay is on accident though in all likelihood it is a modifiable value.

If using the phone camera you wouldn't want a delay at all as most movements will be purposeful whereas on another app you may want there to be some delay to prevent accidental perspective changes.


----------



## Snow02 (Jun 14, 2011)

What rom are you on?


----------



## miketoasty (Jun 10, 2011)

poontab said:


> What rom are you on?


RootzBoat, may try something different while being super bored at work. Any recommendations?


----------



## Snow02 (Jun 14, 2011)

miketoasty said:


> RootzBoat, may try something different while being super bored at work. Any recommendations?


Nah. Me too. I'll post a fix shortly.


----------



## FSXv13 (Dec 16, 2011)

Zacisblack said:


> Its a software issue. Youll notice that if you go to the camera app and turn your phone, the icons react very swiftly.


Son of a... I was so annoyed with this when I first got the phone. I checked against my ipad2 which auto-rotates immediately and was kind of annoyed but you are right. Camera icons rotate immediately, so it has to be ICS.


----------



## miketoasty (Jun 10, 2011)

FSXv13 said:


> Son of a... I was so annoyed with this when I first got the phone. I checked against my ipad2 which auto-rotates immediately and was kind of annoyed but you are right. Camera icons rotate immediately, so it has to be ICS.


Yes but if it was ICS then Camera wouldn't work properly.


----------



## omniphil (Dec 19, 2011)

Same here. The autorotate speed is very annoying for doing some quick emails and texting. Hopefully someone figures out where the delay value is hidden.

Sent from my AN10G2 using Tapatalk


----------



## TechSavvy (Oct 7, 2011)

I think too many people complained about every slight rotate making it flip. I know I was one of them with my TB. Given how annoying it was before, I kinda appreciate it on ICS

Sent from my Galaxy Nexus using Tapatalk


----------



## miketoasty (Jun 10, 2011)

Well maybe I got a little carried away with this one, just pulled out my Thunderbolt running CM7 and it's literally about 1/3 second quicker than the Nexus in terms of rotating. Tried with several different apps with the same results. Just a tad bit slower but definitely makes me realize it's not as bad as I thought it was.


----------



## Joel S (Dec 20, 2011)

TechSavvy said:


> I think too many people complained about every slight rotate making it flip. I know I was one of them with my TB. Given how annoying it was before, I kinda appreciate it on ICS
> 
> Sent from my Galaxy Nexus using Tapatalk


This is a good point. It's def ICS, and is likely a definable variable buried in the code. If it's too sensitive, the phone could bounce back and forth if you're using it at an odd angle (laying in bed for example). Another test is to just play a game that uses the accelerometer, they all work fine.









I'd like it to be more sensitive, it's a little slow as it stands.


----------



## Snow02 (Jun 14, 2011)

miketoasty said:


> Well maybe I got a little carried away with this one, just pulled out my Thunderbolt running CM7 and it's literally about 1/3 second quicker than the Nexus in terms of rotating. Tried with several different apps with the same results. Just a tad bit slower but definitely makes me realize it's not as bad as I thought it was.


Maybe. Try this. It's rotating in about one second.

Mount system and flash. Wipe dalvik. Reboot.
http://db.tt/3Pe7qpPG

I tested it, but as always, have a backup handy.


----------



## psycho_maniac (Jun 9, 2011)

Joel S said:


> This is a good point. It's def ICS, and is likely a definable variable buried in the code. If it's too sensitive, the phone could bounce back and forth if you're using it at an odd angle (laying in bed for example). Another test is to just play a game that uses the accelerometer, they all work fine.
> 
> 
> 
> ...


this makes sense if thats the case i might just keep it


----------



## chefb (Sep 4, 2011)

ive been getting randkm laggyness on the browser and also being bumped out to the home screen? wtf


----------



## Snow02 (Jun 14, 2011)

chefb said:


> ive been getting randkm laggyness on the browser and also being bumped out to the home screen? wtf


Doesn't sound related to this thread.


----------



## miketoasty (Jun 10, 2011)

Snow02 said:


> Maybe. Try this. It's rotating in about one second.
> 
> Mount system and flash. Wipe dalvik. Reboot.
> http://db.tt/3Pe7qpPG
> ...


Tried it but doesn't seem any quicker. Like I said a little earlier though, after comparing with my TB it doesn't seem that bad anymore, just that little half second longer that seems like an hour because it's not what your used to.


----------



## Snow02 (Jun 14, 2011)

miketoasty said:


> Tried it but doesn't seem any quicker. Like I said a little earlier though, after comparing with my TB it doesn't seem that bad anymore, just that little half second longer that seems like an hour because it's not what your used to.


Hmm. I'll look at it again tonight.


----------



## mwaters33 (Jun 6, 2011)

Mine annoys the crap outta me. Seems like it's quick to rotate initially but getting it to rotate back is terrible

Sent from my Galaxy Nexus using RootzWiki


----------



## abqnm (Jul 3, 2011)

Considering how rarely I actually use it in landscape, I appreciate that it doesn't rotate as easily. I hated always having my apps rotate when I didn't actually turn the phone far enough and I don't want to run an app to control that for me. So this is fine with me as long as it doesn't get to 5 seconds like OP said.


----------



## Kejar31 (Jun 9, 2011)

right now if feels like about 1 sec maybe a little more... I will take a look at it tonight ans see what I can do.. I don't like it when it happens to easily but I def want it to go a little faster.


----------



## sephtin (Dec 11, 2011)

Kejar31 said:


> right now if feels like about 1 sec maybe a little more... I will take a look at it tonight ans see what I can do.. I don't like it when it happens to easily but I def want it to go a little faster.


Be nice if it was an option.
I rarely ever use landscape, so prefer it doesn't change unnecessarily. I love the way it is now, and prefer it not change (Or at least have the option of it not changing now).


----------



## Bots (Jul 16, 2011)

Also, if I recall correctly (haven't coded in a while,) in android when going from portrait to landscape and vice-versa, the main activity of the app has to actually restart itself. I'm not sure if this is what causes the lag, or what was previously stated, or a combination of the two.


----------



## Kejar31 (Jun 9, 2011)

fixed guys.. me and xoomdev worked together and got it taken care of...









Expect it in the next GummyNex


----------



## Snow02 (Jun 14, 2011)

Kejar31 said:


> fixed guys.. me and xoomdev worked together and got it taken care of...
> 
> Expect it in the next GummyNex


Don't hold out. What'd you edit?


----------



## Kejar31 (Jun 9, 2011)

Snow02 said:


> Don't hold out. What'd you edit?


lol ok you asked


```
base/core/java/android/view/WindowOrientationListener.java
```
I changed this


```
SETTLE_TIME_MS = 200
```
to this


```
SETTLE_TIME_MS = 50
```


----------



## Snow02 (Jun 14, 2011)

Kejar31 said:


> lol ok you asked
> 
> 
> ```
> ...


Thanks!


----------



## Bots (Jul 16, 2011)

Hell yes. Thank you so much for confirming that this is indeed a setting, and not a particular downfall. How long did you have to search for that? I once searched & stared at CM7 source code for like 2 weeks just to understand how the notification power widget worked lol. Good work!


----------



## omniphil (Dec 19, 2011)

Kejar31 said:


> lol ok you asked
> 
> 
> ```
> ...


Is that and easy thing for us to change? Or do we have to recompile some stuff?


----------



## Snow02 (Jun 14, 2011)

omniphil said:


> Is that and easy thing for us to change? Or do we have to recompile some stuff?


It's editable in smali. What rom are you on? If rootzboat, I have it. If another rom, link me your framework.jar.


----------



## omniphil (Dec 19, 2011)

Snow02 said:


> It's editable in smali. What rom are you on? If rootzboat, I have it. If another rom, link me your framework.jar.


RootzBoat V5. Thank you!!!


----------



## Snow02 (Jun 14, 2011)

omniphil said:


> RootzBoat V5. Thank you!!!


Flash in recovery. Wipe dalvik. Reboot. May have to re-add Google account afterwards.
http://db.tt/2fDnxDjp


----------



## omniphil (Dec 19, 2011)

Snow02 said:


> Flash in recovery. Wipe dalvik. Reboot. May have to re-add Google account afterwards.
> http://db.tt/2fDnxDjp


Didn't seem to make any difference... still takes about 1 full second to rotate


----------



## Snow02 (Jun 14, 2011)

omniphil said:


> Didn't seem to make any difference... still takes about 1 full second to rotate


Let it settle for a minute. It is a bit quicker.

But that value alone won't make a huge difference I think. The rotation control ensures the device is locked into a rotated position, then that timer starts. In other words, once the device is still. So without additional tweaks, there's still going to be a perceived delay. But it also prevents inadvertent rotations, which is preferable to an extra quarter second decrease.

Also, note the device doesn't rotate, or is much slower to rotate, when the phone is laying flat (or nearly so), face up, or upside down (such as when laying down with the phone above you). So depending on the orientation you may also be introducing an additional delay.


----------



## omniphil (Dec 19, 2011)

Snow02 said:


> Let it settle for a minute. It is a bit quicker.
> 
> But that value alone won't make a huge difference I think. The rotation control ensures the device is locked into a rotated position, then that timer starts. In other words, once the device is still. So without additional tweaks, there's still going to be a perceived delay. But it also prevents inadvertent rotations, which is preferable to an extra quarter second decrease.
> 
> Also, note the device doesn't rotate, or is much slower to rotate, when the phone is laying flat (or nearly so), face up, or upside down (such as when laying down with the phone above you). So depending on the orientation you may also be introducing an additional delay.


Still pretty much the same for me, I even went in and set the window animations to 0.5, that made the screen rotate faster, but the delay before it rotates is still there, it should be instant if you ask me. If Google/Samsung is worried about it bouncing back and forth just put in a delay BETWEEN rotations, not before the initial rotation.


----------



## chopper the dog (Aug 6, 2011)

Thanks for the location of the edit!!! I found "0x32" to be perfect for myself.

good day.


----------



## Kejar31 (Jun 9, 2011)

Bots said:


> Hell yes. Thank you so much for confirming that this is indeed a setting, and not a particular downfall. How long did you have to search for that? I once searched & stared at CM7 source code for like 2 weeks just to understand how the notification power widget worked lol. Good work!


lol XoomDev found the file I found the settings changed it and confirmed it worked.. We looked for about 45 min.


----------



## Kejar31 (Jun 9, 2011)

Snow02 said:


> Let it settle for a minute. It is a bit quicker.
> 
> But that value alone won't make a huge difference I think. The rotation control ensures the device is locked into a rotated position, then that timer starts. In other words, once the device is still. So without additional tweaks, there's still going to be a perceived delay. But it also prevents inadvertent rotations, which is preferable to an extra quarter second decrease.
> 
> Also, note the device doesn't rotate, or is much slower to rotate, when the phone is laying flat (or nearly so), face up, or upside down (such as when laying down with the phone above you). So depending on the orientation you may also be introducing an additional delay.


This is true.. the settings I changed will only shorten the timer on the wait time after the phone is locked into position..


----------



## Kejar31 (Jun 9, 2011)

omniphil said:


> Didn't seem to make any difference... still takes about 1 full second to rotate


Its def faster than a second for me... where as it took a full second before


----------



## sparks639 (Jul 30, 2011)

Kejar31 said:


> Its def faster than a second for me... where as it took a full second before


Your change is in 0.3.5 right? Cause it seems more responsive. That's without changing the animation setting.

Sent from my Galaxy Nexus using Tapatalk


----------



## bp328i (Jul 22, 2011)

Kejar31 said:


> Thanks!


I was able to make this edit on the ROM I'm running. Thanks for finding and sharing it, it really helps. One question, what are you guys using to break the code down to this level? I'm able the decompile jar files so I can edit smali but the code Kejar31 posted does not look like where I found it or what it looked like. This was mine


```
android\view\WindowOrientationListener$SensorEventListenerImpl.smali
```


```
SETTLE_TIME_MS:I = 0xc8
```
I have been theming for awhile and I am starting to try to get more into the dev side of android. Again, just wondering what tools you guys are using.


----------



## cubarican84 (Aug 2, 2011)

Not to state the obvious, but you do know that a simple tap on the screen instantly changes the landscape when so desired. The delay is a defense against unwanted rotation

Sent from my Galaxy Nexus using RootzWiki


----------



## TeeX (Jun 6, 2011)

cubarican84 said:


> Not to state the obvious, but you do know that a simple tap on the screen instantly changes the landscape when so desired. The delay is a defense against unwanted rotation
> 
> Sent from my Galaxy Nexus using RootzWiki


ya I usually just swipe along the screen when I'm changing orientation as general practice now.


----------

