Merge "Better null handling for OverviewComponentObserver.getContainerInterface" into main
This commit is contained in:
commit
61962ec222
24 files changed
+137
-111
No files matched your search
@@ -124,22 +124,15 @@ object PerDisplayRepositoriesModule {
|
||||
@Provides
|
||||
@LauncherAppSingleton
|
||||
fun provideFallbackWindowInterfaceRepo(
|
||||
repositoryFactory: PerDisplayInstanceRepositoryImpl.Factory<FallbackWindowInterface>,
|
||||
instanceFactory: FallbackWindowInterface.Factory,
|
||||
recentsWindowManagerRepository: PerDisplayRepository<RecentsWindowManager>,
|
||||
repositoryFactory: PerDisplayInstanceRepositoryImpl.Factory<FallbackWindowInterface>
|
||||
): PerDisplayRepository<FallbackWindowInterface> {
|
||||
return if (enableOverviewOnConnectedDisplays()) {
|
||||
repositoryFactory.create(
|
||||
"FallbackWindowInterfaceRepo",
|
||||
{ displayId ->
|
||||
recentsWindowManagerRepository[displayId]?.let { instanceFactory.create(it) }
|
||||
},
|
||||
{ _ -> FallbackWindowInterface() },
|
||||
)
|
||||
} else {
|
||||
SingleInstanceRepositoryImpl(
|
||||
"FallbackWindowInterfaceRepo",
|
||||
instanceFactory.create(recentsWindowManagerRepository[DEFAULT_DISPLAY]),
|
||||
)
|
||||
SingleInstanceRepositoryImpl("FallbackWindowInterfaceRepo", FallbackWindowInterface())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user