Initialize last-orientation to ensure we don't skip loading config.

- This was a regression introduced in ag/2297883

Bug: 62191663
Test: Launch PiP, open settings
Change-Id: I66c28b57361143f2df927776dba5bc58a022bcb4
This commit is contained in:
Winson Chung
2017-06-02 09:58:00 -07:00
parent 4e73123c52
commit 8068ec2ef1

View File

@@ -239,7 +239,11 @@ public class PipManager implements BasePipManager {
}
}
loadConfigurationsAndApply(mContext.getResources().getConfiguration());
// Initialize the last orientation and apply the current configuration
Configuration initialConfig = mContext.getResources().getConfiguration();
mLastOrientation = initialConfig.orientation;
loadConfigurationsAndApply(initialConfig);
mMediaSessionManager =
(MediaSessionManager) mContext.getSystemService(Context.MEDIA_SESSION_SERVICE);