Merge "Fix missing function MapNotNull" into sc-dev am: 834d2f5cea
Original change: https://googleplex-android-review.googlesource.com/c/platform/development/+/13689865 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Icb3dd177da9dfb947c5865b304da83094944883a
This commit is contained in:
@@ -86,7 +86,8 @@ function newWindowManagerPolicy(proto): WindowManagerPolicy {
|
||||
|
||||
function newRootWindowContainer(proto): RootWindowContainer {
|
||||
const children = proto.windowContainer.children.reverse()
|
||||
.mapNotNull(it => WindowContainer.childrenFromProto(it, /* isActivityInTree */ false))
|
||||
.filter(it => it != null)
|
||||
.map(it => WindowContainer.childrenFromProto(it, /* isActivityInTree */ false))
|
||||
const windowContainer = WindowContainer.fromProto(
|
||||
{proto: proto.windowContainer, children: children})
|
||||
if (windowContainer == null) {
|
||||
|
||||
@@ -24,7 +24,8 @@ Activity.fromProto = function (proto): Activity {
|
||||
return null
|
||||
} else {
|
||||
const children = proto.windowToken.windowContainer.children.reverse()
|
||||
.mapNotNull(it => WindowContainer.childrenFromProto(it, /* isActivityInTree */ true))
|
||||
.filter(it => it != null)
|
||||
.map(it => WindowContainer.childrenFromProto(it, /* isActivityInTree */ true))
|
||||
const windowContainer = WindowContainer.fromProto({proto: proto.windowToken.windowContainer,
|
||||
children: children, identifierOverride: proto.identifier})
|
||||
if (windowContainer == null) {
|
||||
|
||||
@@ -24,7 +24,8 @@ ActivityTask.fromProto = function (proto, isActivityInTree: Boolean): ActivityTa
|
||||
return null
|
||||
} else {
|
||||
const children = proto.windowContainer.children.reverse()
|
||||
.mapNotNull(it => WindowContainer.childrenFromProto(it, isActivityInTree))
|
||||
.filter(it => it != null)
|
||||
.map(it => WindowContainer.childrenFromProto(it, isActivityInTree))
|
||||
const windowContainer = WindowContainer.fromProto({proto: proto.windowContainer,
|
||||
children: children})
|
||||
if (windowContainer == null) {
|
||||
|
||||
@@ -24,7 +24,8 @@ DisplayArea.fromProto = function (proto, isActivityInTree: Boolean): DisplayArea
|
||||
return null
|
||||
} else {
|
||||
const children = proto.windowContainer.children.reverse()
|
||||
.mapNotNull(it => WindowContainer.childrenFromProto(it, isActivityInTree))
|
||||
.filter(it => it != null)
|
||||
.map(it => WindowContainer.childrenFromProto(it, isActivityInTree))
|
||||
const windowContainer = WindowContainer.fromProto({proto: proto.windowContainer,
|
||||
children: children, nameOverride: proto.name})
|
||||
if (windowContainer == null) {
|
||||
|
||||
@@ -24,7 +24,8 @@ DisplayContent.fromProto = function (proto, isActivityInTree: Boolean): DisplayC
|
||||
return null
|
||||
} else {
|
||||
const children = proto.rootDisplayArea.windowContainer.children.reverse()
|
||||
.mapNotNull(it => WindowContainer.childrenFromProto(it, isActivityInTree))
|
||||
.filter(it => it != null)
|
||||
.map(it => WindowContainer.childrenFromProto(it, isActivityInTree))
|
||||
const windowContainer = WindowContainer.fromProto({proto: proto.rootDisplayArea.windowContainer,
|
||||
children: children, nameOverride: proto.displayInfo?.name ?? null})
|
||||
if (windowContainer == null) {
|
||||
|
||||
@@ -43,7 +43,8 @@ import WindowContainer from "./WindowContainer"
|
||||
}
|
||||
|
||||
const children = proto.windowContainer.children.reverse()
|
||||
.mapNotNull(it => WindowContainer.childrenFromProto(it, isActivityInTree))
|
||||
.filter(it => it != null)
|
||||
.map(it => WindowContainer.childrenFromProto(it, isActivityInTree))
|
||||
|
||||
const windowContainer = WindowContainer.fromProto({
|
||||
proto: proto.windowContainer,
|
||||
|
||||
@@ -25,7 +25,8 @@ WindowToken.fromProto = function (proto, isActivityInTree: Boolean): WindowToken
|
||||
}
|
||||
|
||||
const children = proto.windowContainer.children.reverse()
|
||||
.mapNotNull(it => WindowContainer.childrenFromProto(it, isActivityInTree))
|
||||
.filter(it => it != null)
|
||||
.map(it => WindowContainer.childrenFromProto(it, isActivityInTree))
|
||||
const windowContainer = WindowContainer.fromProto({proto: proto.windowContainer,
|
||||
children: children, tokenOverride: proto.hashCode})
|
||||
if (windowContainer == null) {
|
||||
|
||||
Reference in New Issue
Block a user