Merge "Move Activity multi-window event logic out of the public methods" into nyc-dev am: 56e2aeba8f
am: 6e90b67dfa
* commit '6e90b67dfaf02c236b542951dfaac3a7d805ef21':
Move Activity multi-window event logic out of the public methods
Change-Id: I1eb6677d8ecd2208b20c2094eb4d708f6e20bc14
This commit is contained in:
@@ -1879,14 +1879,9 @@ public class Activity extends ContextThemeWrapper
|
|||||||
*
|
*
|
||||||
* @param isInMultiWindowMode True if the activity is in multi-window mode.
|
* @param isInMultiWindowMode True if the activity is in multi-window mode.
|
||||||
*/
|
*/
|
||||||
@CallSuper
|
|
||||||
public void onMultiWindowModeChanged(boolean isInMultiWindowMode) {
|
public void onMultiWindowModeChanged(boolean isInMultiWindowMode) {
|
||||||
if (DEBUG_LIFECYCLE) Slog.v(TAG,
|
// Left deliberately empty. There should be no side effects if a direct
|
||||||
"onMultiWindowModeChanged " + this + ": " + isInMultiWindowMode);
|
// subclass of Activity does not call super.
|
||||||
mFragments.dispatchMultiWindowModeChanged(isInMultiWindowMode);
|
|
||||||
if (mWindow != null) {
|
|
||||||
mWindow.onMultiWindowModeChanged();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1909,11 +1904,9 @@ public class Activity extends ContextThemeWrapper
|
|||||||
*
|
*
|
||||||
* @param isInPictureInPictureMode True if the activity is in picture-in-picture mode.
|
* @param isInPictureInPictureMode True if the activity is in picture-in-picture mode.
|
||||||
*/
|
*/
|
||||||
@CallSuper
|
|
||||||
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode) {
|
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode) {
|
||||||
if (DEBUG_LIFECYCLE) Slog.v(TAG,
|
// Left deliberately empty. There should be no side effects if a direct
|
||||||
"onPictureInPictureModeChanged " + this + ": " + isInPictureInPictureMode);
|
// subclass of Activity does not call super.
|
||||||
mFragments.dispatchPictureInPictureModeChanged(isInPictureInPictureMode);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -6875,6 +6868,23 @@ public class Activity extends ContextThemeWrapper
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final void dispatchMultiWindowModeChanged(boolean isInMultiWindowMode) {
|
||||||
|
if (DEBUG_LIFECYCLE) Slog.v(TAG,
|
||||||
|
"dispatchMultiWindowModeChanged " + this + ": " + isInMultiWindowMode);
|
||||||
|
mFragments.dispatchMultiWindowModeChanged(isInMultiWindowMode);
|
||||||
|
if (mWindow != null) {
|
||||||
|
mWindow.onMultiWindowModeChanged();
|
||||||
|
}
|
||||||
|
onMultiWindowModeChanged(isInMultiWindowMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
final void dispatchPictureInPictureModeChanged(boolean isInPictureInPictureMode) {
|
||||||
|
if (DEBUG_LIFECYCLE) Slog.v(TAG,
|
||||||
|
"dispatchPictureInPictureModeChanged " + this + ": " + isInPictureInPictureMode);
|
||||||
|
mFragments.dispatchPictureInPictureModeChanged(isInPictureInPictureMode);
|
||||||
|
onPictureInPictureModeChanged(isInPictureInPictureMode);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2906,14 +2906,14 @@ public final class ActivityThread {
|
|||||||
private void handleMultiWindowModeChanged(IBinder token, boolean isInMultiWindowMode) {
|
private void handleMultiWindowModeChanged(IBinder token, boolean isInMultiWindowMode) {
|
||||||
final ActivityClientRecord r = mActivities.get(token);
|
final ActivityClientRecord r = mActivities.get(token);
|
||||||
if (r != null) {
|
if (r != null) {
|
||||||
r.activity.onMultiWindowModeChanged(isInMultiWindowMode);
|
r.activity.dispatchMultiWindowModeChanged(isInMultiWindowMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handlePictureInPictureModeChanged(IBinder token, boolean isInPipMode) {
|
private void handlePictureInPictureModeChanged(IBinder token, boolean isInPipMode) {
|
||||||
final ActivityClientRecord r = mActivities.get(token);
|
final ActivityClientRecord r = mActivities.get(token);
|
||||||
if (r != null) {
|
if (r != null) {
|
||||||
r.activity.onPictureInPictureModeChanged(isInPipMode);
|
r.activity.dispatchPictureInPictureModeChanged(isInPipMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user