Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have a similar problem. If quickly rotate the device 180 degrees, then onConfigurationChanged() is not called. Also, if you remove the android:configChanges = "orientation" and rapidly rotate, then do not call onCreate().</p> <p>Log, slow rotation:</p> <pre><code>01-14 03:03:23.401: D/WindowManager(27840): [rotationForOrientationLw] return curRotation: curRotation 0 01-14 03:03:23.401: I/WindowManager(27840): Setting rotation to 0, animFlags=0 01-14 03:03:23.401: I/ActivityManager(27840): Config changed: { scale=1.0 imsi=257/4 loc=ru_RU touch=3 keys=1/1/2 nav=3/1 orien=2 layout=35 uiMode=17 seq=1163} 01-14 03:03:23.411: D/TestActivity(30737): onConfigurationChanged 01-14 03:03:23.411: D/TestActivity(30737): getRotation:newOrientation = 0 01-14 03:03:23.431: D/PinyinIME(27909): onStartInput ccontentType: 0 Restarting:true 01-14 03:03:23.451: W/com.skype.raider.MainApp(28091): onConfigurationChanged changed:{ scale=1.0 imsi=257/4 loc=ru_RU touch=3 keys=1/1/2 nav=3/1 orien=2 layout=35 uiMode=17 seq=1163} 01-14 03:03:23.501: I/MyEvent(28098): onReceive:Action=android.intent.action.CONFIGURATION_CHANGED 01-14 03:03:23.501: I/MyEvent(28098): updateUI 01-14 03:03:23.501: I/MyEvent(28098): updateUI,len=1 01-14 03:03:23.511: I/MyEvent(28098): MyEventAppWidgetProvider onUpdate 01-14 03:03:23.511: I/MyEvent(28098): MyEventAppWidgetProvider onUpdate: for=0 01-14 03:03:23.511: I/MyEvent(28098): widgetid=7 01-14 03:03:23.531: E/MyEvent(28098): MyEventAppWidgetService onStart 01-14 03:03:23.701: D/Chi-TRACE(27840): ________current Screen is ORIENTATION_2 01-14 03:03:23.871: D/CChi(27840): ________pause = false 01-14 03:03:24.301: D/skia(30737): purging 195K from font cache [28 entries] </code></pre> <p>Log, fast rotation:</p> <pre><code>01-14 03:03:55.314: D/WindowManager(27840): [rotationForOrientationLw] return curRotation: curRotation 3 01-14 03:03:55.314: I/WindowManager(27840): Setting rotation to 3, animFlags=0 </code></pre> <p>We can see that the system sees the rotation, but does not says about this no one. Why? How do I fix it?</p> <p>HuaweyS7, Android 2.2.2.</p> <p><strong>UPD</strong></p> <p>I found answer: "but landscape is landscape, regardless if it's 180 degrees, so the system may not consider it to be a configuration change." <a href="http://groups.google.com/group/android-developers/browse_thread/thread/219676c074b1a558#" rel="nofollow">full discussion here</a></p> <p><strong>ALSO</strong> From Android sources:</p> <p>Accelerometer listener com.android.internal.policy.impl.PhoneWindowManager.MyOrientationListener.onOrientationChanged() - pay attention to second parameter in function call, it named alwaysSendConfiguration:</p> <pre><code>mWindowManager.setRotation(rotation, false, mFancyRotationAnimation); </code></pre> <p>setRotation() calls:</p> <pre><code>setRotationUnchecked(rotation, alwaysSendConfiguration, animFlags); </code></pre> <p>And, finally, in setRotationUnchecked:</p> <pre><code>synchronized(mWindowMap) { changed = setRotationUncheckedLocked(rotation, animFlags); } if (changed || alwaysSendConfiguration) { sendNewConfiguration(); } </code></pre> <p>Where in sendNewConfiguration() calls ActivityManager, and it calls only if configuration changed or if alwaysSendConfiguration set to true.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload