Move multi-instance suppport checking to ApiWrapper
- It's only used for App Pairs & Taskbar (both limited to quickstep
launcher, and we need to use hidden api to query the multi-instance
support per-activity. This is necessary as there can be apps
installed for a profile, but not the primary user.
Bug: 391611065
Flag: EXEMPT bugfix
Test: atest WMShellUnitTests
Test: Install a multi-instance app only for the non-primary user,
ensure that we can see the multi-instance UI for these apps
Change-Id: I9d38f32aa38b27b2bffaa744c3f578423f7c7d86
This commit is contained in:
1 parent
c36a10604c
commit
4443ff10f6
4 files changed
+33
-44
No files matched your search
@@ -144,6 +144,14 @@ open class SystemApiWrapper @Inject constructor(@ApplicationContext context: Con
|
||||
override fun isNonResizeableActivity(lai: LauncherActivityInfo) =
|
||||
lai.activityInfo.resizeMode == ActivityInfo.RESIZE_MODE_UNRESIZEABLE
|
||||
|
||||
override fun supportsMultiInstance(lai: LauncherActivityInfo) : Boolean {
|
||||
return try {
|
||||
super.supportsMultiInstance(lai) || lai.supportsMultiInstance()
|
||||
} catch (e: Exception) {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts an Activity which can be used to set this Launcher as the HOME app, via a consent
|
||||
* screen. In case the consent screen cannot be shown, or the user does not set current Launcher
|
||||
|
||||
Reference in new issue
Block a user