Merge "Merge "Pass displayId to onActivityRotation()" into rvc-dev am: 2983b70983 am: 7309578767 am: e0ddf1d34f" into rvc-qpr-dev-plus-aosp
This commit is contained in:
committed by
Android (Google) Code Review
commit
f709fd9fc3
@@ -224,6 +224,8 @@ oneway interface ITaskStackListener {
|
|||||||
* * forced rotation
|
* * forced rotation
|
||||||
* * rotation settings set through adb command line
|
* * rotation settings set through adb command line
|
||||||
* * rotation that occurs when rotation tile is toggled in quick settings
|
* * rotation that occurs when rotation tile is toggled in quick settings
|
||||||
|
*
|
||||||
|
* @param displayId id of the display where activity will rotate
|
||||||
*/
|
*/
|
||||||
void onActivityRotation();
|
void onActivityRotation(int displayId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -201,6 +201,6 @@ public abstract class TaskStackListener extends ITaskStackListener.Stub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onActivityRotation() {
|
public void onActivityRotation(int displayId) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,6 +115,6 @@ public abstract class TaskStackChangeListener {
|
|||||||
/** @see ITaskStackListener#onRecentTaskListFrozenChanged(boolean) */
|
/** @see ITaskStackListener#onRecentTaskListFrozenChanged(boolean) */
|
||||||
public void onRecentTaskListFrozenChanged(boolean frozen) { }
|
public void onRecentTaskListFrozenChanged(boolean frozen) { }
|
||||||
|
|
||||||
/** @see ITaskStackListener#onActivityRotation()*/
|
/** @see ITaskStackListener#onActivityRotation(int)*/
|
||||||
public void onActivityRotation() { }
|
public void onActivityRotation(int displayId) { }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -238,8 +238,9 @@ public class TaskStackChangeListeners extends TaskStackListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onActivityRotation() {
|
public void onActivityRotation(int displayId) {
|
||||||
mHandler.obtainMessage(H.ON_ACTIVITY_ROTATION).sendToTarget();
|
mHandler.obtainMessage(H.ON_ACTIVITY_ROTATION, displayId, 0 /* unused */)
|
||||||
|
.sendToTarget();
|
||||||
}
|
}
|
||||||
|
|
||||||
private final class H extends Handler {
|
private final class H extends Handler {
|
||||||
@@ -435,7 +436,7 @@ public class TaskStackChangeListeners extends TaskStackListener {
|
|||||||
}
|
}
|
||||||
case ON_ACTIVITY_ROTATION: {
|
case ON_ACTIVITY_ROTATION: {
|
||||||
for (int i = mTaskStackListeners.size() - 1; i >= 0; i--) {
|
for (int i = mTaskStackListeners.size() - 1; i >= 0; i--) {
|
||||||
mTaskStackListeners.get(i).onActivityRotation();
|
mTaskStackListeners.get(i).onActivityRotation(msg.arg1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ class TaskChangeNotificationController {
|
|||||||
};
|
};
|
||||||
|
|
||||||
private final TaskStackConsumer mNotifyOnActivityRotation = (l, m) -> {
|
private final TaskStackConsumer mNotifyOnActivityRotation = (l, m) -> {
|
||||||
l.onActivityRotation();
|
l.onActivityRotation(m.arg1);
|
||||||
};
|
};
|
||||||
|
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
@@ -583,9 +583,10 @@ class TaskChangeNotificationController {
|
|||||||
msg.sendToTarget();
|
msg.sendToTarget();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @see android.app.ITaskStackListener#onActivityRotation() */
|
/** @see android.app.ITaskStackListener#onActivityRotation(int) */
|
||||||
void notifyOnActivityRotation() {
|
void notifyOnActivityRotation(int displayId) {
|
||||||
final Message msg = mHandler.obtainMessage(NOTIFY_ACTIVITY_ROTATED_MSG);
|
final Message msg = mHandler.obtainMessage(NOTIFY_ACTIVITY_ROTATED_MSG,
|
||||||
|
displayId, 0 /* unused */);
|
||||||
forAllLocalListeners(mNotifyOnActivityRotation, msg);
|
forAllLocalListeners(mNotifyOnActivityRotation, msg);
|
||||||
msg.sendToTarget();
|
msg.sendToTarget();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3850,7 +3850,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
|
|
||||||
if (rotationChanged) {
|
if (rotationChanged) {
|
||||||
mAtmService.getTaskChangeNotificationController()
|
mAtmService.getTaskChangeNotificationController()
|
||||||
.notifyOnActivityRotation();
|
.notifyOnActivityRotation(displayContent.mDisplayId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!rotationChanged || forceRelayout) {
|
if (!rotationChanged || forceRelayout) {
|
||||||
|
|||||||
Reference in New Issue
Block a user