Loading services/core/java/com/android/server/am/ActivityRecord.java +18 −11 Original line number Diff line number Diff line Loading @@ -249,6 +249,8 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo // Last configuration reported to the activity in the client process. private MergedConfiguration mLastReportedConfiguration; private int mLastReportedDisplayId; private boolean mLastReportedMultiWindowMode; private boolean mLastReportedPictureInPictureMode; CompatibilityInfo compat;// last used compatibility mode ActivityRecord resultTo; // who started this entry, so will get our reply final String resultWho; // additional identifier for use by resultTo. Loading Loading @@ -289,10 +291,6 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo boolean frozenBeforeDestroy;// has been frozen but not yet destroyed. boolean immersive; // immersive mode (don't interrupt if possible) boolean forceNewConfig; // force re-create with new config next time private boolean mInMultiWindowMode; // whether or not this activity is currently in multi-window // mode (default false) private boolean mInPictureInPictureMode; // whether or not this activity is currently in // picture-in-picture mode (default false) boolean supportsPictureInPictureWhilePausing; // This flag is set by the system to indicate // that the activity can enter picture in picture while pausing (ie. only when another // task is brought to front or started) Loading Loading @@ -535,6 +533,8 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo } if (info != null) { pw.println(prefix + "resizeMode=" + ActivityInfo.resizeModeToString(info.resizeMode)); pw.println(prefix + "mLastReportedMultiWindowMode=" + mLastReportedMultiWindowMode + " mLastReportedPictureInPictureMode=" + mLastReportedPictureInPictureMode); if (info.supportsPictureInPicture()) { pw.println(prefix + "supportsPictureInPicture=" + info.supportsPictureInPicture()); pw.println(prefix + "supportsPictureInPictureWhilePausing: " Loading Loading @@ -637,15 +637,15 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo // An activity is considered to be in multi-window mode if its task isn't fullscreen. final boolean inMultiWindowMode = !task.mFullscreen; if (inMultiWindowMode != mInMultiWindowMode) { mInMultiWindowMode = inMultiWindowMode; if (inMultiWindowMode != mLastReportedMultiWindowMode) { mLastReportedMultiWindowMode = inMultiWindowMode; scheduleMultiWindowModeChanged(getConfiguration()); } } private void scheduleMultiWindowModeChanged(Configuration overrideConfig) { try { app.thread.scheduleMultiWindowModeChanged(appToken, mInMultiWindowMode, app.thread.scheduleMultiWindowModeChanged(appToken, mLastReportedMultiWindowMode, overrideConfig); } catch (Exception e) { // If process died, I don't care. Loading @@ -659,11 +659,11 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo final boolean inPictureInPictureMode = (task.getStackId() == PINNED_STACK_ID) && (targetStackBounds != null); if (inPictureInPictureMode != mInPictureInPictureMode) { if (inPictureInPictureMode != mLastReportedPictureInPictureMode) { // Picture-in-picture mode changes also trigger a multi-window mode change as well, so // update that here in order mInPictureInPictureMode = inPictureInPictureMode; mInMultiWindowMode = inPictureInPictureMode; mLastReportedPictureInPictureMode = inPictureInPictureMode; mLastReportedMultiWindowMode = inPictureInPictureMode; final Configuration newConfig = task.computeNewOverrideConfigurationForBounds( targetStackBounds, null); schedulePictureInPictureModeChanged(newConfig); Loading @@ -673,7 +673,8 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo private void schedulePictureInPictureModeChanged(Configuration overrideConfig) { try { app.thread.schedulePictureInPictureModeChanged(appToken, mInPictureInPictureMode, app.thread.schedulePictureInPictureModeChanged(appToken, mLastReportedPictureInPictureMode, overrideConfig); } catch (Exception e) { // If process died, no one cares. Loading Loading @@ -940,6 +941,12 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo task.addActivityToTop(this); // When an activity is started directly into a split-screen fullscreen stack, we need to // update the initial multi-window modes so that the callbacks are scheduled correctly when // the user leaves that mode. mLastReportedMultiWindowMode = !task.mFullscreen; mLastReportedPictureInPictureMode = (task.getStackId() == PINNED_STACK_ID); onOverrideConfigurationSent(); } Loading Loading
services/core/java/com/android/server/am/ActivityRecord.java +18 −11 Original line number Diff line number Diff line Loading @@ -249,6 +249,8 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo // Last configuration reported to the activity in the client process. private MergedConfiguration mLastReportedConfiguration; private int mLastReportedDisplayId; private boolean mLastReportedMultiWindowMode; private boolean mLastReportedPictureInPictureMode; CompatibilityInfo compat;// last used compatibility mode ActivityRecord resultTo; // who started this entry, so will get our reply final String resultWho; // additional identifier for use by resultTo. Loading Loading @@ -289,10 +291,6 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo boolean frozenBeforeDestroy;// has been frozen but not yet destroyed. boolean immersive; // immersive mode (don't interrupt if possible) boolean forceNewConfig; // force re-create with new config next time private boolean mInMultiWindowMode; // whether or not this activity is currently in multi-window // mode (default false) private boolean mInPictureInPictureMode; // whether or not this activity is currently in // picture-in-picture mode (default false) boolean supportsPictureInPictureWhilePausing; // This flag is set by the system to indicate // that the activity can enter picture in picture while pausing (ie. only when another // task is brought to front or started) Loading Loading @@ -535,6 +533,8 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo } if (info != null) { pw.println(prefix + "resizeMode=" + ActivityInfo.resizeModeToString(info.resizeMode)); pw.println(prefix + "mLastReportedMultiWindowMode=" + mLastReportedMultiWindowMode + " mLastReportedPictureInPictureMode=" + mLastReportedPictureInPictureMode); if (info.supportsPictureInPicture()) { pw.println(prefix + "supportsPictureInPicture=" + info.supportsPictureInPicture()); pw.println(prefix + "supportsPictureInPictureWhilePausing: " Loading Loading @@ -637,15 +637,15 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo // An activity is considered to be in multi-window mode if its task isn't fullscreen. final boolean inMultiWindowMode = !task.mFullscreen; if (inMultiWindowMode != mInMultiWindowMode) { mInMultiWindowMode = inMultiWindowMode; if (inMultiWindowMode != mLastReportedMultiWindowMode) { mLastReportedMultiWindowMode = inMultiWindowMode; scheduleMultiWindowModeChanged(getConfiguration()); } } private void scheduleMultiWindowModeChanged(Configuration overrideConfig) { try { app.thread.scheduleMultiWindowModeChanged(appToken, mInMultiWindowMode, app.thread.scheduleMultiWindowModeChanged(appToken, mLastReportedMultiWindowMode, overrideConfig); } catch (Exception e) { // If process died, I don't care. Loading @@ -659,11 +659,11 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo final boolean inPictureInPictureMode = (task.getStackId() == PINNED_STACK_ID) && (targetStackBounds != null); if (inPictureInPictureMode != mInPictureInPictureMode) { if (inPictureInPictureMode != mLastReportedPictureInPictureMode) { // Picture-in-picture mode changes also trigger a multi-window mode change as well, so // update that here in order mInPictureInPictureMode = inPictureInPictureMode; mInMultiWindowMode = inPictureInPictureMode; mLastReportedPictureInPictureMode = inPictureInPictureMode; mLastReportedMultiWindowMode = inPictureInPictureMode; final Configuration newConfig = task.computeNewOverrideConfigurationForBounds( targetStackBounds, null); schedulePictureInPictureModeChanged(newConfig); Loading @@ -673,7 +673,8 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo private void schedulePictureInPictureModeChanged(Configuration overrideConfig) { try { app.thread.schedulePictureInPictureModeChanged(appToken, mInPictureInPictureMode, app.thread.schedulePictureInPictureModeChanged(appToken, mLastReportedPictureInPictureMode, overrideConfig); } catch (Exception e) { // If process died, no one cares. Loading Loading @@ -940,6 +941,12 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo task.addActivityToTop(this); // When an activity is started directly into a split-screen fullscreen stack, we need to // update the initial multi-window modes so that the callbacks are scheduled correctly when // the user leaves that mode. mLastReportedMultiWindowMode = !task.mFullscreen; mLastReportedPictureInPictureMode = (task.getStackId() == PINNED_STACK_ID); onOverrideConfigurationSent(); } Loading