@@ -253,6 +253,11 @@ class NavBarOverlay(private val service: NavBarAccessibilityService) {
253253 override fun shouldIgnoreTouch (toolType : Int ): Boolean {
254254 return settings.ignoreStylus && toolType == MotionEvent .TOOL_TYPE_STYLUS
255255 }
256+
257+ override fun isSplitDragAllowed (): Boolean {
258+ val launchContext = service.getSplitLaunchContext()
259+ return ! launchContext.isOnHomeScreen && settings.splitScreenTaskbarEnabled
260+ }
256261 }
257262
258263 private val navbarAppsPanelListener = object : NavbarAppsPanel .PanelActionListener {
@@ -503,6 +508,7 @@ class NavBarOverlay(private val service: NavBarAccessibilityService) {
503508 recentAppsManager = RecentAppsManager (context, recentAppsListener)
504509 recentAppsTaskbar = RecentAppsTaskbar (context, taskbarListener).apply {
505510 splitScreenEnabled = settings.splitScreenTaskbarEnabled
511+ iconShape = settings.recentAppsTaskbarIconShape
506512 }
507513 }
508514
@@ -691,8 +697,7 @@ class NavBarOverlay(private val service: NavBarAccessibilityService) {
691697 bar.addView(centerView, centerParams)
692698 centerGroupView = centerView
693699
694- // 홈화면이면 숨김
695- if (isOnHomeScreen || isRecentsVisible) {
700+ if (! shouldShowTaskbar()) {
696701 centerView.visibility = View .GONE
697702 }
698703 }
@@ -1236,8 +1241,12 @@ class NavBarOverlay(private val service: NavBarAccessibilityService) {
12361241 clearHomeExitSuppression()
12371242 Log .d(TAG , " Home screen state: true" )
12381243
1239- // 홈화면에서는 최근 앱 작업 표시줄 숨김 (애니메이션 적용)
1240- animateTaskbarExit()
1244+ if (settings.recentAppsTaskbarShowOnHome) {
1245+ syncTaskbarVisibility(animate = true )
1246+ } else {
1247+ // 홈화면에서는 최근 앱 작업 표시줄 숨김 (애니메이션 적용)
1248+ animateTaskbarExit()
1249+ }
12411250
12421251 // 언락 페이드 중에는 배경 전환하지 않음 (언락 완료 후 자동 업데이트)
12431252 if (isUnlockPending || isUnlockFadeRunning || isUnlockFadeSuppressed) {
@@ -1283,7 +1292,11 @@ class NavBarOverlay(private val service: NavBarAccessibilityService) {
12831292
12841293 // 홈 -> 앱 전환 시 진입 애니메이션이 항상 보이도록
12851294 // 한 프레임 리셋 후 재생
1286- playTaskbarEntryFromHomeIfNeeded()
1295+ if (settings.recentAppsTaskbarShowOnHome) {
1296+ syncTaskbarVisibility(animate = true )
1297+ } else {
1298+ playTaskbarEntryFromHomeIfNeeded()
1299+ }
12871300
12881301 updateNavBarBackground()
12891302 }
@@ -1679,7 +1692,7 @@ class NavBarOverlay(private val service: NavBarAccessibilityService) {
16791692 isRecentsVisible = false
16801693 updateNavBarBackground()
16811694 if (isOnHomeScreen) {
1682- hideTaskbarImmediate( )
1695+ syncTaskbarVisibility(animate = true )
16831696 } else {
16841697 val task = Runnable {
16851698 pendingRecentsClose = null
@@ -1717,7 +1730,8 @@ class NavBarOverlay(private val service: NavBarAccessibilityService) {
17171730
17181731 private fun shouldShowTaskbar (): Boolean {
17191732 if (! settings.recentAppsTaskbarEnabled) return false
1720- if (isOnHomeScreen || isRecentsVisible || isHomeExitPending) return false
1733+ if (isRecentsVisible || isHomeExitPending) return false
1734+ if (isOnHomeScreen) return settings.recentAppsTaskbarShowOnHome
17211735 if (currentPackage.isEmpty()) return false
17221736 if (cachedLauncherPackages.contains(currentPackage)) return false
17231737 return true
@@ -2228,19 +2242,13 @@ class NavBarOverlay(private val service: NavBarAccessibilityService) {
22282242 val iconSize = iconView.width
22292243 if (iconSize <= 0 ) return
22302244
2231- // 아이콘 drawable 복사 + 원형 클리핑 적용
2245+ // 아이콘 drawable 복사 + 모양 클리핑 적용
22322246 val drawable = iconView.drawable?.constantState?.newDrawable()?.mutate() ? : return
22332247
22342248 val icon = ImageView (context).apply {
22352249 setImageDrawable(drawable)
22362250 scaleType = ImageView .ScaleType .CENTER_CROP
2237- // 원형 클리핑 (원본 아이콘과 동일)
2238- outlineProvider = object : android.view.ViewOutlineProvider () {
2239- override fun getOutline (view : View , outline : android.graphics.Outline ) {
2240- outline.setOval(0 , 0 , view.width, view.height)
2241- }
2242- }
2243- clipToOutline = true
2251+ applyDragIconShape(this , settings.recentAppsTaskbarIconShape)
22442252 }
22452253 dragIconView = icon
22462254
@@ -2287,6 +2295,37 @@ class NavBarOverlay(private val service: NavBarAccessibilityService) {
22872295 }
22882296 }
22892297
2298+ private fun applyDragIconShape (
2299+ icon : ImageView ,
2300+ shapeMode : SettingsManager .RecentAppsTaskbarIconShape
2301+ ) {
2302+ icon.outlineProvider = object : android.view.ViewOutlineProvider () {
2303+ override fun getOutline (view : View , outline : android.graphics.Outline ) {
2304+ val width = view.width
2305+ val height = view.height
2306+ if (width <= 0 || height <= 0 ) return
2307+
2308+ when (shapeMode) {
2309+ SettingsManager .RecentAppsTaskbarIconShape .CIRCLE -> {
2310+ outline.setOval(0 , 0 , width, height)
2311+ }
2312+ SettingsManager .RecentAppsTaskbarIconShape .SQUARE -> {
2313+ outline.setRect(0 , 0 , width, height)
2314+ }
2315+ SettingsManager .RecentAppsTaskbarIconShape .SQUIRCLE -> {
2316+ val radius = minOf(width, height) * 0.38f
2317+ outline.setRoundRect(0 , 0 , width, height, radius)
2318+ }
2319+ SettingsManager .RecentAppsTaskbarIconShape .ROUNDED_RECT -> {
2320+ val radius = minOf(width, height) * 0.22f
2321+ outline.setRoundRect(0 , 0 , width, height, radius)
2322+ }
2323+ }
2324+ }
2325+ }
2326+ icon.clipToOutline = true
2327+ }
2328+
22902329 /* *
22912330 * 드래그 중 아이콘 위치/스케일 업데이트
22922331 * dragFreeMove=true: X/Y 모두 손가락 추적 (앱 즐겨찾기)
@@ -2371,12 +2410,14 @@ class NavBarOverlay(private val service: NavBarAccessibilityService) {
23712410 recentAppsManager = RecentAppsManager (context, recentAppsListener)
23722411 recentAppsTaskbar = RecentAppsTaskbar (context, taskbarListener).apply {
23732412 splitScreenEnabled = settings.splitScreenTaskbarEnabled
2413+ iconShape = settings.recentAppsTaskbarIconShape
23742414 }
23752415 recentAppsManager?.setLauncherPackages(cachedLauncherPackages)
23762416 recentAppsManager?.loadInitialRecentApps()
23772417 } else {
23782418 // 설정 변경 시 분할화면 플래그 업데이트
23792419 recentAppsTaskbar?.splitScreenEnabled = settings.splitScreenTaskbarEnabled
2420+ recentAppsTaskbar?.iconShape = settings.recentAppsTaskbarIconShape
23802421 }
23812422 } else {
23822423 recentAppsManager?.clear()
@@ -2410,6 +2451,7 @@ class NavBarOverlay(private val service: NavBarAccessibilityService) {
24102451 }
24112452
24122453 updateNavBarBackground()
2454+ syncTaskbarVisibility(animate = false )
24132455 buttonManager.updatePanelButtonState(isPanelOpen())
24142456 }
24152457
0 commit comments