diff --git a/quickstep/res/values-as/strings.xml b/quickstep/res/values-as/strings.xml index 0f8126beb4..0a5241b731 100644 --- a/quickstep/res/values-as/strings.xml +++ b/quickstep/res/values-as/strings.xml @@ -146,10 +146,8 @@ "ডেস্কটপ" "%1$s আৰু %2$s" "%1$s, %3$dটাৰ ভিতৰত %2$dতম বস্তু" - - - - + "বাওঁফাললৈ স্ক্ৰ’ল কৰক" + "সোঁফাললৈ স্ক্ৰ’ল কৰক" "বাবল" "অ’ভাৰফ্ল’" "%2$sৰ পৰা %1$s" diff --git a/quickstep/res/values-b+sr+Latn/strings.xml b/quickstep/res/values-b+sr+Latn/strings.xml index 8b60c14da3..12ae5e792a 100644 --- a/quickstep/res/values-b+sr+Latn/strings.xml +++ b/quickstep/res/values-b+sr+Latn/strings.xml @@ -146,10 +146,8 @@ "Računar" "%1$s i %2$s" "%1$s, stavka %2$d od %3$d" - - - - + "Skrolujte ulevo" + "Skrolujte udesno" "Oblačić" "Preklopni" "%1$s – %2$s" diff --git a/quickstep/res/values-be/strings.xml b/quickstep/res/values-be/strings.xml index f0d4ee4a0d..c1e9b29836 100644 --- a/quickstep/res/values-be/strings.xml +++ b/quickstep/res/values-be/strings.xml @@ -146,10 +146,8 @@ "Працоўны стол" "%1$s і %2$s" "%1$s, элемент %2$d з %3$d" - - - - + "Прагартаць улева" + "Прагартаць управа" "Бурбалкі" "Меню з пашырэннем" "%1$s, крыніца: %2$s" diff --git a/quickstep/res/values-es-rUS/strings.xml b/quickstep/res/values-es-rUS/strings.xml index 703c434b77..903a04dbc6 100644 --- a/quickstep/res/values-es-rUS/strings.xml +++ b/quickstep/res/values-es-rUS/strings.xml @@ -146,10 +146,8 @@ "Escritorio" "%1$s y %2$s" "%1$s, elemento %2$d de %3$d" - - - - + "Desplazarse hacia la izquierda" + "Desplazarse hacia la derecha" "Burbuja" "Ampliada" "%1$s de %2$s" diff --git a/quickstep/res/values-hu/strings.xml b/quickstep/res/values-hu/strings.xml index 6584eafa75..b38dddda29 100644 --- a/quickstep/res/values-hu/strings.xml +++ b/quickstep/res/values-hu/strings.xml @@ -146,10 +146,8 @@ "Asztali" "%1$s és %2$s" "%1$s, %2$d. elem, összesen ennyiből: %3$d" - - - - + "Görgetés balra" + "Görgetés jobbra" "Buborék" "Túlcsordulás" "%1$s, forrás: %2$s" diff --git a/quickstep/res/values-it/strings.xml b/quickstep/res/values-it/strings.xml index 00529b744a..8a08dcfbd8 100644 --- a/quickstep/res/values-it/strings.xml +++ b/quickstep/res/values-it/strings.xml @@ -146,10 +146,8 @@ "Desktop" "%1$s e %2$s" "%1$s, elemento %2$d di %3$d" - - - - + "Scorri verso sinistra" + "Scorri verso destra" "Fumetto" "Extra" "%1$s da %2$s" diff --git a/quickstep/res/values-ja/strings.xml b/quickstep/res/values-ja/strings.xml index 596e104363..8f44ee75b9 100644 --- a/quickstep/res/values-ja/strings.xml +++ b/quickstep/res/values-ja/strings.xml @@ -146,10 +146,8 @@ "デスクトップ" "%1$s と %2$s" "%1$s、アイテム %2$d/%3$d" - - - - + "左へスクロール" + "右へスクロール" "ふきだし" "オーバーフロー" "%1$s(%2$s)" diff --git a/quickstep/res/values-ka/strings.xml b/quickstep/res/values-ka/strings.xml index ac46836c49..6294cbdac7 100644 --- a/quickstep/res/values-ka/strings.xml +++ b/quickstep/res/values-ka/strings.xml @@ -146,10 +146,8 @@ "დესკტოპი" "%1$s და %2$s" "%1$s, %2$d-ე ერთეული %3$d-დან" - - - - + "მარცხნივ გადაადგილება" + "მარჯვნივ გადაადგილება" "ბუშტი" "გადავსება" "%1$s: %2$s-იდან" diff --git a/quickstep/res/values-km/strings.xml b/quickstep/res/values-km/strings.xml index 799bcda688..f1772afe46 100644 --- a/quickstep/res/values-km/strings.xml +++ b/quickstep/res/values-km/strings.xml @@ -146,10 +146,8 @@ "អេក្រង់ដើម" "%1$s និង %2$s" "%1$s ធាតុទី %2$d នៃ %3$d" - - - - + "រំកិលទៅឆ្វេង" + "រំកិលទៅស្ដាំ" "ផ្ទាំងសារ" "ម៉ឺនុយបន្ថែម" "%1$s ពី %2$s" diff --git a/quickstep/res/values-kn/strings.xml b/quickstep/res/values-kn/strings.xml index c88aed2e19..5f6734b58d 100644 --- a/quickstep/res/values-kn/strings.xml +++ b/quickstep/res/values-kn/strings.xml @@ -146,10 +146,8 @@ "ಡೆಸ್ಕ್‌ಟಾಪ್" "%1$s ಮತ್ತು %2$s" "%1$s, %3$d ರಲ್ಲಿ %2$d ಐಟಂ" - - - - + "ಎಡಕ್ಕೆ ಸ್ಕ್ರಾಲ್ ಮಾಡಿ" + "ಬಲಕ್ಕೆ ಸ್ಕ್ರಾಲ್ ಮಾಡಿ" "ಬಬಲ್" "ಓವರ್‌ಫ್ಲೋ" "%2$s ನಿಂದ %1$s" diff --git a/quickstep/res/values-ky/strings.xml b/quickstep/res/values-ky/strings.xml index 049da10fae..1d740b00c7 100644 --- a/quickstep/res/values-ky/strings.xml +++ b/quickstep/res/values-ky/strings.xml @@ -164,5 +164,5 @@ "Колдонмонун аталышы" "Жабуу баскычы" "Тапшырмалар панелине кадоо" - "Тапшырмалар панелинен алып коюу" + "Тапшырмалар панелинен алуу" diff --git a/quickstep/res/values-lo/strings.xml b/quickstep/res/values-lo/strings.xml index 9eb169adf7..0539e1ff52 100644 --- a/quickstep/res/values-lo/strings.xml +++ b/quickstep/res/values-lo/strings.xml @@ -146,10 +146,8 @@ "ເດັສທັອບ" "%1$s ແລະ %2$s" "%1$s, ລາຍການທີ %2$d ຈາກທັງໝົດ %3$d" - - - - + "ເລື່ອນໄປທາງຊ້າຍ" + "ເລື່ອນໄປທາງຂວາ" "ຟອງ" "ລາຍການເພີ່ມເຕີມ" "%1$s ຈາກ %2$s" diff --git a/quickstep/res/values-lt/strings.xml b/quickstep/res/values-lt/strings.xml index 2cbdc8e4f4..dbc5649e29 100644 --- a/quickstep/res/values-lt/strings.xml +++ b/quickstep/res/values-lt/strings.xml @@ -146,10 +146,8 @@ "Stalinis kompiuteris" "„%1$s“ ir „%2$s“" "%1$s, %2$d element. iš %3$d" - - - - + "Slinkti kairėn" + "Slinkti dešinėn" "Burbulas" "Perpildymas" "„%1$s“ iš „%2$s“" diff --git a/quickstep/res/values-ml/strings.xml b/quickstep/res/values-ml/strings.xml index 099e0003e6..73c795b420 100644 --- a/quickstep/res/values-ml/strings.xml +++ b/quickstep/res/values-ml/strings.xml @@ -146,10 +146,8 @@ "ഡെസ്‌ക്ടോപ്പ്" "%1$s, %2$s" "%1$s, %3$d-ൽ %2$d-ാമത്തെ ഇനം" - - - - + "ഇടത്തേക്ക് സ്‌ക്രോൾ ചെയ്യുക" + "വലത്തേക്ക് സ്‌ക്രോൾ ചെയ്യുക" "ബബിൾ" "ഓവർഫ്ലോ" "%2$s എന്നതിൽ നിന്നുള്ള %1$s" diff --git a/quickstep/res/values-mr/strings.xml b/quickstep/res/values-mr/strings.xml index 5aa9dfcba7..ef44bb2b12 100644 --- a/quickstep/res/values-mr/strings.xml +++ b/quickstep/res/values-mr/strings.xml @@ -146,10 +146,8 @@ "डेस्कटॉप" "%1$s आणि %2$s" "%1$s, %3$d पैकी %2$d आयटम" - - - - + "डावीकडे स्क्रोल करा" + "उजवीकडे स्क्रोल करा" "बबल" "ओव्हरफ्लो" "%2$s वरील %1$s" diff --git a/quickstep/res/values-ms/strings.xml b/quickstep/res/values-ms/strings.xml index a633bf4a60..1007b55c78 100644 --- a/quickstep/res/values-ms/strings.xml +++ b/quickstep/res/values-ms/strings.xml @@ -146,10 +146,8 @@ "Desktop" "%1$s dan %2$s" "%1$s, %2$d item daripada %3$d" - - - - + "Tatal ke kiri" + "Tatal ke kanan" "Gelembung" "Limpahan" "%1$s daripada %2$s" diff --git a/quickstep/res/values-ne/strings.xml b/quickstep/res/values-ne/strings.xml index 91c6bba275..fece2a8875 100644 --- a/quickstep/res/values-ne/strings.xml +++ b/quickstep/res/values-ne/strings.xml @@ -146,10 +146,8 @@ "डेस्कटप" "%1$s र %2$s" "%1$s, %3$d मध्ये %2$d औँ वस्तु" - - - - + "बायाँतिर स्क्रोल गर्नुहोस्" + "दायाँतिर स्क्रोल गर्नुहोस्" "बबल" "ओभरफ्लो" "%2$s मा देखाइएका %1$s" diff --git a/quickstep/res/values-nl/strings.xml b/quickstep/res/values-nl/strings.xml index 9e49f13252..a8dbb871a8 100644 --- a/quickstep/res/values-nl/strings.xml +++ b/quickstep/res/values-nl/strings.xml @@ -146,10 +146,8 @@ "Desktop" "%1$s en %2$s" "%1$s, item %2$d van %3$d" - - - - + "Naar links scrollen" + "Naar rechts scrollen" "Bubbel" "Overloop" "%1$s van %2$s" diff --git a/quickstep/res/values-pt/strings.xml b/quickstep/res/values-pt/strings.xml index 92fed63ed5..e4c3cf1996 100644 --- a/quickstep/res/values-pt/strings.xml +++ b/quickstep/res/values-pt/strings.xml @@ -146,10 +146,8 @@ "Computador" "%1$s e %2$s" "%1$s, item %2$d de %3$d" - - - - + "Rolar para a esquerda" + "Rolar para a direita" "Balão" "Balão flutuante" "%1$s do app %2$s" diff --git a/quickstep/res/values-si/strings.xml b/quickstep/res/values-si/strings.xml index d413b0dd70..2030252b29 100644 --- a/quickstep/res/values-si/strings.xml +++ b/quickstep/res/values-si/strings.xml @@ -146,10 +146,8 @@ "ඩෙස්ක්ටොපය" "%1$s සහ %2$s" "%1$s, අයිතම %3$dන් %2$d" - - - - + "වමට අනුචලනය කරන්න" + "දකුණට අනුචලනය කරන්න" "බුබුළු" "පිටාර යාම" "%2$s සිට %1$s" diff --git a/quickstep/res/values-sl/strings.xml b/quickstep/res/values-sl/strings.xml index 1f87e650ad..fd7dc69d44 100644 --- a/quickstep/res/values-sl/strings.xml +++ b/quickstep/res/values-sl/strings.xml @@ -146,10 +146,8 @@ "Namizni računalnik" "%1$s in %2$s" "%1$s, element %2$d od %3$d" - - - - + "Pomik levo" + "Pomik desno" "Oblaček" "Oblaček z dodatnimi elementi" "%1$s iz aplikacije %2$s" diff --git a/quickstep/res/values-sr/strings.xml b/quickstep/res/values-sr/strings.xml index 4e32155e4c..345fc27b1e 100644 --- a/quickstep/res/values-sr/strings.xml +++ b/quickstep/res/values-sr/strings.xml @@ -146,10 +146,8 @@ "Рачунар" "%1$s и %2$s" "%1$s, ставка %2$d од %3$d" - - - - + "Скролујте улево" + "Скролујте удесно" "Облачић" "Преклопни" "%1$s – %2$s" diff --git a/quickstep/res/values-te/strings.xml b/quickstep/res/values-te/strings.xml index 5ab198e81d..7bd92dd640 100644 --- a/quickstep/res/values-te/strings.xml +++ b/quickstep/res/values-te/strings.xml @@ -146,10 +146,8 @@ "డెస్క్‌టాప్" "%1$s, %2$s" "%1$s, %3$d‌లో %2$d‌వ ఐటెమ్" - - - - + "ఎడమవైపునకు స్క్రోల్ చేయండి" + "కుడివైపునకు స్క్రోల్ చేయండి" "బబుల్" "ఓవర్‌ఫ్లో" "%2$s నుండి %1$s" diff --git a/quickstep/res/values-th/strings.xml b/quickstep/res/values-th/strings.xml index 98380033c2..a18a89f26d 100644 --- a/quickstep/res/values-th/strings.xml +++ b/quickstep/res/values-th/strings.xml @@ -146,10 +146,8 @@ "เดสก์ท็อป" "%1$s และ %2$s" "%1$s, รายการที่ %2$d จาก %3$d" - - - - + "เลื่อนไปทางซ้าย" + "เลื่อนไปทางขวา" "บับเบิล" "การดำเนินการเพิ่มเติม" "%1$s จาก %2$s" diff --git a/quickstep/res/values-tl/strings.xml b/quickstep/res/values-tl/strings.xml index 52619b9880..35515789cb 100644 --- a/quickstep/res/values-tl/strings.xml +++ b/quickstep/res/values-tl/strings.xml @@ -146,10 +146,8 @@ "Desktop" "%1$s at %2$s" "%1$s, item %2$d ng %3$d" - - - - + "Mag-scroll pakaliwa" + "Mag-scroll pakanan" "Bubble" "Overflow" "%1$s mula sa %2$s" diff --git a/quickstep/res/values-ur/strings.xml b/quickstep/res/values-ur/strings.xml index a5508d47c5..8c44ef71a4 100644 --- a/quickstep/res/values-ur/strings.xml +++ b/quickstep/res/values-ur/strings.xml @@ -146,10 +146,8 @@ "ڈیسک ٹاپ" "%1$s اور %2$s" "‫%1$s، آئٹم %2$d از %3$d" - - - - + "بائیں طرف اسکرول کریں" + "دائیں طرف اسکرول کریں" "ببل" "اوورفلو" "%2$s سے %1$s" diff --git a/quickstep/src/com/android/launcher3/dagger/Modules.kt b/quickstep/src/com/android/launcher3/dagger/Modules.kt index 7671a82869..9723b42c62 100644 --- a/quickstep/src/com/android/launcher3/dagger/Modules.kt +++ b/quickstep/src/com/android/launcher3/dagger/Modules.kt @@ -21,8 +21,10 @@ import com.android.launcher3.uioverrides.SystemApiWrapper import com.android.launcher3.uioverrides.plugins.PluginManagerWrapperImpl import com.android.launcher3.util.ApiWrapper import com.android.launcher3.util.PluginManagerWrapper +import com.android.launcher3.util.window.RefreshRateTracker import com.android.launcher3.util.window.WindowManagerProxy import com.android.launcher3.widget.LauncherWidgetHolder.WidgetHolderFactory +import com.android.quickstep.util.ChoreographerFrameRateTracker import com.android.quickstep.util.GestureExclusionManager import com.android.quickstep.util.SystemWindowManagerProxy import dagger.Binds @@ -60,4 +62,8 @@ object StaticObjectModule { @Provides @JvmStatic fun provideGestureExclusionManager(): GestureExclusionManager = GestureExclusionManager.INSTANCE + + @Provides + @JvmStatic + fun provideRefreshRateTracker(): RefreshRateTracker = ChoreographerFrameRateTracker } diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java index 605fd312d0..69966cc596 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java @@ -86,7 +86,6 @@ import android.os.Trace; import android.os.UserHandle; import android.text.TextUtils; import android.util.AttributeSet; -import android.util.Log; import android.view.Display; import android.view.HapticFeedbackConstants; import android.view.KeyEvent; @@ -225,7 +224,6 @@ import java.util.stream.Stream; public class QuickstepLauncher extends Launcher implements RecentsViewContainer, SystemShortcut.BubbleActivityStarter { - private static final String TAG = "QuickstepLauncher"; private static final boolean TRACE_LAYOUTS = SystemProperties.getBoolean("persist.debug.trace_layouts", false); private static final String TRACE_RELAYOUT_CLASS = @@ -562,35 +560,20 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer, @Override public void onDestroy() { - // wrap non-trivial clean up blocks in try-catch to avoid stopping clean up of rest of - // objects - if (mAppTransitionManager != null) { - try { - mAppTransitionManager.onActivityDestroyed(); - } catch (Exception e) { - Log.e(TAG, "Failed to destroy mAppTransitionManager", e); - } + mAppTransitionManager.onActivityDestroyed(); } mAppTransitionManager = null; mIsPredictiveBackToHomeInProgress = false; if (mUnfoldTransitionProgressProvider != null) { - try { - SystemUiProxy.INSTANCE.get(this).setUnfoldAnimationListener(null); - mUnfoldTransitionProgressProvider.destroy(); - } catch (Exception e) { - Log.e(TAG, "Failed to destroy mUnfoldTransitionProgressProvider", e); - } + SystemUiProxy.INSTANCE.get(this).setUnfoldAnimationListener(null); + mUnfoldTransitionProgressProvider.destroy(); } OverviewComponentObserver.INSTANCE.get(this) .removeOverviewChangeListener(mOverviewChangeListener); - try { - mTISBindHelper.onDestroy(); - } catch (Exception e) { - Log.e(TAG, "Failed to destroy mTISBindHelper", e); - } + mTISBindHelper.onDestroy(); if (mLauncherUnfoldAnimationController != null) { mLauncherUnfoldAnimationController.onDestroy(); @@ -600,22 +583,15 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer, mSplitSelectStateController.onDestroy(); } - try { - RecentsView recentsView = getOverviewPanel(); - if (recentsView != null) { - recentsView.destroy(); - } - } catch (Exception e) { - Log.e(TAG, "Failed to destroy RecentsView", e); + RecentsView recentsView = getOverviewPanel(); + if (recentsView != null) { + recentsView.destroy(); } - try { - super.onDestroy(); - } finally { // trivial close operations in finally. - mHotseatPredictionController.destroy(); - if (mViewCapture != null) mViewCapture.close(); - removeBackAnimationCallback(mSplitSelectStateController.getSplitBackHandler()); - } + super.onDestroy(); + mHotseatPredictionController.destroy(); + if (mViewCapture != null) mViewCapture.close(); + removeBackAnimationCallback(mSplitSelectStateController.getSplitBackHandler()); } @Override diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java b/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java index 3170df9571..c774143328 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java +++ b/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java @@ -22,7 +22,6 @@ import static com.android.launcher3.Flags.enableScalingRevealHomeAnimation; import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_OVERVIEW; import android.content.Context; -import android.graphics.Color; import android.graphics.Rect; import android.os.SystemProperties; @@ -162,7 +161,7 @@ public class OverviewState extends LauncherState { @Override public int getWorkspaceScrimColor(Launcher launcher) { return enableOverviewBackgroundWallpaperBlur() && BlurUtils.supportsBlursOnWindows() - ? Color.TRANSPARENT + ? Themes.getAttrColor(launcher, R.attr.overviewScrimColorOverBlur) : Themes.getAttrColor(launcher, R.attr.overviewScrimColor); } diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewDismissTouchController.kt b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewDismissTouchController.kt index eac5235dda..06e6734a37 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewDismissTouchController.kt +++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewDismissTouchController.kt @@ -25,6 +25,7 @@ import com.android.launcher3.AbstractFloatingView import com.android.launcher3.R import com.android.launcher3.Utilities.EDGE_NAV_BAR import com.android.launcher3.Utilities.boundToRange +import com.android.launcher3.Utilities.debugLog import com.android.launcher3.Utilities.isRtl import com.android.launcher3.Utilities.mapToRange import com.android.launcher3.touch.SingleAxisSwipeDetector @@ -70,6 +71,7 @@ CONTAINER : RecentsViewContainer { // Don't intercept swipes on the nav bar, as user might be trying to go home during a // task dismiss animation. (ev.edgeFlags and EDGE_NAV_BAR) != 0 -> { + debugLog(TAG, "Not intercepting edge swipe on nav bar.") false } @@ -77,14 +79,23 @@ CONTAINER : RecentsViewContainer { AbstractFloatingView.getTopOpenViewWithType( container, AbstractFloatingView.TYPE_TOUCH_CONTROLLER_NO_INTERCEPT, - ) != null -> false - - // Disable swiping if the task overlay is modal. - taskViewRecentsTouchContext.isRecentsModal -> { + ) != null -> { + debugLog(TAG, "Not intercepting, open floating view blocking touch.") false } - else -> taskViewRecentsTouchContext.isRecentsInteractive + // Disable swiping if the task overlay is modal. + taskViewRecentsTouchContext.isRecentsModal -> { + debugLog(TAG, "Not intercepting touch in modal overlay.") + false + } + + else -> + taskViewRecentsTouchContext.isRecentsInteractive.also { isRecentsInteractive -> + if (!isRecentsInteractive) { + debugLog(TAG, "Not intercepting touch, recents not interactive.") + } + } } override fun onControllerInterceptTouchEvent(ev: MotionEvent): Boolean { @@ -140,6 +151,7 @@ CONTAINER : RecentsViewContainer { override fun onDragStart(start: Boolean, startDisplacement: Float) { if (isBlockedDuringDismissal) return val taskBeingDragged = taskBeingDragged ?: return + debugLog(TAG, "Handling touch event.") initialDisplacement = taskBeingDragged.secondaryDismissTranslationProperty.get(taskBeingDragged) @@ -289,6 +301,8 @@ CONTAINER : RecentsViewContainer { } companion object { + private const val TAG = "TaskViewDismissTouchController" + private const val DISMISS_THRESHOLD_FRACTION = 0.5f private const val DISMISS_THRESHOLD_HAPTIC_RANGE = 10f diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewLaunchTouchController.kt b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewLaunchTouchController.kt index 8ee552d046..fe9cae55f9 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewLaunchTouchController.kt +++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewLaunchTouchController.kt @@ -24,6 +24,7 @@ import com.android.launcher3.AbstractFloatingView import com.android.launcher3.LauncherAnimUtils import com.android.launcher3.Utilities.EDGE_NAV_BAR import com.android.launcher3.Utilities.boundToRange +import com.android.launcher3.Utilities.debugLog import com.android.launcher3.Utilities.isRtl import com.android.launcher3.anim.AnimatorPlaybackController import com.android.launcher3.touch.BaseSwipeDetector @@ -72,6 +73,7 @@ CONTAINER : RecentsViewContainer { // Don't intercept swipes on the nav bar, as user might be trying to go home during a // task dismiss animation. (ev.edgeFlags and EDGE_NAV_BAR) != 0 -> { + debugLog(TAG, "Not intercepting edge swipe on nav bar.") false } @@ -80,15 +82,22 @@ CONTAINER : RecentsViewContainer { container, AbstractFloatingView.TYPE_TOUCH_CONTROLLER_NO_INTERCEPT, ) != null -> { + debugLog(TAG, "Not intercepting, open floating view blocking touch.") false } // Disable swiping if the task overlay is modal. taskViewRecentsTouchContext.isRecentsModal -> { + debugLog(TAG, "Not intercepting touch in modal overlay.") false } - else -> taskViewRecentsTouchContext.isRecentsInteractive + else -> + taskViewRecentsTouchContext.isRecentsInteractive.also { isRecentsInteractive -> + if (!isRecentsInteractive) { + debugLog(TAG, "Not intercepting touch, recents not interactive.") + } + } } override fun onControllerInterceptTouchEvent(ev: MotionEvent): Boolean { @@ -128,6 +137,7 @@ CONTAINER : RecentsViewContainer { recentsView.pagedOrientationHandler.getTaskDragDisplacementFactor(isRtl) } if (!canTaskLaunchTaskView(taskBeingDragged)) { + debugLog(TAG, "Not intercepting touch, task cannot be launched.") return false } detector.setDetectableScrollConditions(downDirection, /* ignoreSlop= */ false) @@ -136,6 +146,7 @@ CONTAINER : RecentsViewContainer { override fun onDragStart(start: Boolean, startDisplacement: Float) { val taskBeingDragged = taskBeingDragged ?: return + debugLog(TAG, "Handling touch event.") val secondaryLayerDimension: Int = recentsView.pagedOrientationHandler.getSecondaryDimension(container.getDragLayer()) @@ -202,6 +213,7 @@ CONTAINER : RecentsViewContainer { } companion object { + private const val TAG = "TaskViewLaunchTouchController" private const val LAUNCH_THRESHOLD_FRACTION: Float = 0.5f } } diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchControllerDeprecated.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchControllerDeprecated.java index f26bd13586..57ffd9538d 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchControllerDeprecated.java +++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchControllerDeprecated.java @@ -17,6 +17,7 @@ package com.android.launcher3.uioverrides.touchcontrollers; import static com.android.launcher3.AbstractFloatingView.TYPE_TOUCH_CONTROLLER_NO_INTERCEPT; import static com.android.launcher3.LauncherAnimUtils.SUCCESS_TRANSITION_PROGRESS; +import static com.android.launcher3.Utilities.debugLog; import static com.android.launcher3.touch.SingleAxisSwipeDetector.DIRECTION_BOTH; import android.animation.Animator; @@ -56,6 +57,7 @@ import com.android.quickstep.views.TaskView; public class TaskViewTouchControllerDeprecated< CONTAINER extends Context & RecentsViewContainer> extends AnimatorListenerAdapter implements TouchController, SingleAxisSwipeDetector.Listener { + private static final String TAG = "TaskViewTouchControllerDeprecated"; private static final float ANIMATION_PROGRESS_FRACTION_MIDPOINT = 0.5f; private static final long MIN_TASK_DISMISS_ANIMATION_DURATION = 300; @@ -110,6 +112,7 @@ public class TaskViewTouchControllerDeprecated< if (mCurrentAnimation != null) { mCurrentAnimation.getAnimationPlayer().end(); } + debugLog(TAG, "Not intercepting edge swipe on nav bar."); return false; } if (mCurrentAnimation != null) { @@ -121,6 +124,7 @@ public class TaskViewTouchControllerDeprecated< } if (AbstractFloatingView.getTopOpenViewWithType( mContainer, TYPE_TOUCH_CONTROLLER_NO_INTERCEPT) != null) { + debugLog(TAG, "Not intercepting, open floating view blocking touch."); return false; } return mTaskViewRecentsTouchContext.isRecentsInteractive(); @@ -142,6 +146,7 @@ public class TaskViewTouchControllerDeprecated< if (ev.getAction() == MotionEvent.ACTION_DOWN) { mNoIntercept = !canInterceptTouch(ev); if (mNoIntercept) { + debugLog(TAG, "Not intercepting touch."); return false; } @@ -186,6 +191,7 @@ public class TaskViewTouchControllerDeprecated< } if (mTaskBeingDragged == null) { mNoIntercept = true; + debugLog(TAG, "Not intercepting touch, no task to drag."); return false; } } @@ -195,6 +201,7 @@ public class TaskViewTouchControllerDeprecated< } if (mNoIntercept) { + debugLog(TAG, "Not intercepting touch."); return false; } @@ -266,6 +273,7 @@ public class TaskViewTouchControllerDeprecated< @Override public void onDragStart(boolean start, float startDisplacement) { if (!mDraggingEnabled) return; + debugLog(TAG, "Handling touch."); RecentsPagedOrientationHandler orientationHandler = mRecentsView.getPagedOrientationHandler(); diff --git a/quickstep/src/com/android/quickstep/AspectRatioSystemShortcut.kt b/quickstep/src/com/android/quickstep/AspectRatioSystemShortcut.kt new file mode 100644 index 0000000000..68860ac91b --- /dev/null +++ b/quickstep/src/com/android/quickstep/AspectRatioSystemShortcut.kt @@ -0,0 +1,100 @@ +/* + * Copyright (C) 2025 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.quickstep + +import android.content.Intent +import android.provider.Settings +import android.view.View +import androidx.core.net.toUri +import com.android.launcher3.AbstractFloatingViewHelper +import com.android.launcher3.R +import com.android.launcher3.logging.StatsLogManager.LauncherEvent +import com.android.launcher3.popup.SystemShortcut +import com.android.quickstep.views.RecentsViewContainer +import com.android.quickstep.views.TaskContainer +import com.android.window.flags.Flags.universalResizableByDefault + +/** + * System shortcut to change the application's aspect ratio compatibility mode. + * + * This shows up only on screens that are not compact, ie. shortest-width greater than {@link + * com.android.launcher3.util.window.WindowManagerProxy#MIN_TABLET_WIDTH}. + */ +class AspectRatioSystemShortcut( + viewContainer: RecentsViewContainer, + taskContainer: TaskContainer, + abstractFloatingViewHelper: AbstractFloatingViewHelper, +) : + SystemShortcut( + R.drawable.ic_aspect_ratio, + R.string.recent_task_option_aspect_ratio, + viewContainer, + taskContainer.itemInfo, + taskContainer.taskView, + abstractFloatingViewHelper, + ) { + override fun onClick(view: View) { + dismissTaskMenuView() + + val intent = + Intent(Settings.ACTION_MANAGE_USER_ASPECT_RATIO_SETTINGS) + .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK) + if (mItemInfo.targetPackage != null) { + intent.setData(("package:" + mItemInfo.targetPackage).toUri()) + } + + mTarget.startActivitySafely(view, intent, mItemInfo) + mTarget + .statsLogManager + .logger() + .withItemInfo(mItemInfo) + .log(LauncherEvent.LAUNCHER_ASPECT_RATIO_SETTINGS_SYSTEM_SHORTCUT_TAP) + } + + companion object { + /** Optionally create a factory for the aspect ratio system shortcut. */ + @JvmOverloads + fun createFactory( + abstractFloatingViewHelper: AbstractFloatingViewHelper = AbstractFloatingViewHelper() + ): TaskShortcutFactory { + return object : TaskShortcutFactory { + override fun getShortcuts( + viewContainer: RecentsViewContainer, + taskContainer: TaskContainer, + ): List? { + return when { + // Only available when the feature flag is on. + !universalResizableByDefault() -> null + + // The option is only shown on sw600dp+ screens (checked by isTablet) + !viewContainer.deviceProfile.isTablet -> null + + else -> { + listOf( + AspectRatioSystemShortcut( + viewContainer, + taskContainer, + abstractFloatingViewHelper, + ) + ) + } + } + } + } + } + } +} diff --git a/quickstep/src/com/android/quickstep/LauncherBackAnimationController.java b/quickstep/src/com/android/quickstep/LauncherBackAnimationController.java index 783ec2c7da..c6785629b0 100644 --- a/quickstep/src/com/android/quickstep/LauncherBackAnimationController.java +++ b/quickstep/src/com/android/quickstep/LauncherBackAnimationController.java @@ -26,6 +26,7 @@ import static com.android.launcher3.BaseActivity.INVISIBLE_ALL; import static com.android.launcher3.BaseActivity.INVISIBLE_BY_PENDING_FLAGS; import static com.android.launcher3.BaseActivity.PENDING_INVISIBLE_BY_WALLPAPER_ANIMATION; import static com.android.window.flags.Flags.predictiveBackThreeButtonNav; +import static com.android.window.flags.Flags.removeDepartTargetFromMotion; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; @@ -121,6 +122,7 @@ public class LauncherBackAnimationController { private final SurfaceControl.Transaction mTransaction = new SurfaceControl.Transaction(); private float mBackProgress = 0; private boolean mBackInProgress = false; + private boolean mWaitStartTransition = false; private OnBackInvokedCallbackStub mBackCallback; private IRemoteAnimationFinishedCallback mAnimationFinishedCallback; private final BackProgressAnimator mProgressAnimator = new BackProgressAnimator(); @@ -158,7 +160,8 @@ public class LauncherBackAnimationController { mBackCallback = new OnBackInvokedCallbackStub(handler, mProgressAnimator, mProgressInterpolator, this); SystemUiProxy.INSTANCE.get(mLauncher).setBackToLauncherCallback(mBackCallback, - new RemoteAnimationRunnerStub(this)); + new RemoteAnimationRunnerStub(this, + removeDepartTargetFromMotion() ? handler : null)); } private static class OnBackInvokedCallbackStub extends IOnBackInvokedCallback.Stub { @@ -195,7 +198,14 @@ public class LauncherBackAnimationController { mHandler.post(() -> { LauncherBackAnimationController controller = mControllerRef.get(); if (controller != null) { - controller.startTransition(); + if (!removeDepartTargetFromMotion()) { + controller.startTransition(); + } else { + controller.mWaitStartTransition = true; + if (controller.mBackTarget != null && controller.mBackInProgress) { + controller.startTransition(); + } + } } mProgressAnimator.reset(); }); @@ -220,7 +230,8 @@ public class LauncherBackAnimationController { mHandler.post(() -> { LauncherBackAnimationController controller = mControllerRef.get(); if (controller != null) { - controller.startBack(backEvent); + controller.initBackMotion(backEvent); + controller.tryStartBackAnimation(); mProgressAnimator.onBackStarted(backEvent, event -> { float backProgress = event.getProgress(); controller.mBackProgress = @@ -248,9 +259,12 @@ public class LauncherBackAnimationController { // LauncherBackAnimationController has strong reference to Launcher activity, the binder // callback should not hold strong reference to it to avoid memory leak. private WeakReference mControllerRef; + private final Handler mHandler; - private RemoteAnimationRunnerStub(LauncherBackAnimationController controller) { + private RemoteAnimationRunnerStub(LauncherBackAnimationController controller, + Handler handler) { mControllerRef = new WeakReference<>(controller); + mHandler = handler; } @Override @@ -261,15 +275,29 @@ public class LauncherBackAnimationController { if (controller == null) { return; } - for (final RemoteAnimationTarget target : apps) { - if (MODE_CLOSING == target.mode) { - controller.mBackTarget = target; + final Runnable r = () -> { + for (final RemoteAnimationTarget target : apps) { + if (MODE_CLOSING == target.mode) { + controller.mBackTarget = target; + } + if (MODE_OPENING == target.mode) { + controller.mLauncherTarget = target; + } } - if (MODE_OPENING == target.mode) { - controller.mLauncherTarget = target; + controller.mAnimationFinishedCallback = finishedCallback; + if (!removeDepartTargetFromMotion()) { + return; } + controller.tryStartBackAnimation(); + if (controller.mWaitStartTransition) { + controller.startTransition(); + } + }; + if (mHandler != null) { + mHandler.post(r); + } else { + r.run(); } - controller.mAnimationFinishedCallback = finishedCallback; } @Override @@ -294,34 +322,39 @@ public class LauncherBackAnimationController { mBackCallback = null; } - private void startBack(BackMotionEvent backEvent) { + private void initBackMotion(BackMotionEvent backEvent) { // in case we're still animating an onBackCancelled event, let's remove the finish- // callback from the progress animator to prevent calling finishAnimation() before // restarting a new animation - // Side note: startBack is never called during the post-commit phase if the back gesture - // was committed (not cancelled). BackAnimationController prevents that. Therefore we - // don't have to handle that case. + // Side note: initBackMotion is never called during the post-commit phase if the back + // gesture was committed (not cancelled). BackAnimationController prevents that. Therefore + // we don't have to handle that case. mProgressAnimator.removeOnBackCancelledFinishCallback(); + if (!removeDepartTargetFromMotion()) { + RemoteAnimationTarget appTarget = backEvent.getDepartingAnimationTarget(); + if (appTarget == null || appTarget.leash == null || !appTarget.leash.isValid()) { + return; + } + mBackTarget = appTarget; + } mBackInProgress = true; - RemoteAnimationTarget appTarget = backEvent.getDepartingAnimationTarget(); - - if (appTarget == null || appTarget.leash == null || !appTarget.leash.isValid()) { + mInitialTouchPos.set(backEvent.getTouchX(), backEvent.getTouchY()); + } + private void tryStartBackAnimation() { + if (mBackTarget == null || (removeDepartTargetFromMotion() && !mBackInProgress)) { return; } mTransaction - .show(appTarget.leash) + .show(mBackTarget.leash) .setAnimationTransaction(); - mBackTarget = appTarget; - mInitialTouchPos.set(backEvent.getTouchX(), backEvent.getTouchY()); - - mStartRect.set(appTarget.windowConfiguration.getMaxBounds()); + mStartRect.set(mBackTarget.windowConfiguration.getMaxBounds()); // inset bottom in case of taskbar being present if (!predictiveBackThreeButtonNav() || mLauncher.getDeviceProfile().isTaskbarPresent || DisplayController.getNavigationMode(mLauncher) == NavigationMode.NO_BUTTON) { - mStartRect.inset(0, 0, 0, appTarget.contentInsets.bottom); + mStartRect.inset(0, 0, 0, mBackTarget.contentInsets.bottom); } mLauncherTargetView = mQuickstepTransitionManager.findLauncherView( @@ -466,10 +499,14 @@ public class LauncherBackAnimationController { } private void startTransition() { - if (mBackTarget == null) { - // Trigger transition system instead of custom transition animation. - finishAnimation(); - return; + if (!removeDepartTargetFromMotion()) { + if (mBackTarget == null) { + // Trigger transition system instead of custom transition animation. + finishAnimation(); + return; + } + } else { + mWaitStartTransition = false; } if (mLauncher.isDestroyed()) { return; diff --git a/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java b/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java index 6710096688..9bf63a0ce7 100644 --- a/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java +++ b/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java @@ -18,6 +18,7 @@ package com.android.quickstep; import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED; import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED; import static android.view.Display.DEFAULT_DISPLAY; +import static android.app.ActivityTaskManager.INVALID_TASK_ID; import static com.android.launcher3.MotionEventsUtils.isTrackpadScroll; import static com.android.launcher3.util.DisplayController.CHANGE_ALL; @@ -342,6 +343,9 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener, E * @return whether the given running task info matches the gesture-blocked task. */ public boolean isGestureBlockedTask(CachedTaskInfo taskInfo) { + if (mGestureBlockingTaskId == INVALID_TASK_ID) { + return false; + } if (com.android.wm.shell.Flags.enableShellTopTaskTracking()) { return taskInfo != null && taskInfo.topGroupedTaskContainsTask(mGestureBlockingTaskId); } else { diff --git a/quickstep/src/com/android/quickstep/TaskOverlayFactory.java b/quickstep/src/com/android/quickstep/TaskOverlayFactory.java index ae6bfbc517..5bf4451fad 100644 --- a/quickstep/src/com/android/quickstep/TaskOverlayFactory.java +++ b/quickstep/src/com/android/quickstep/TaskOverlayFactory.java @@ -118,6 +118,7 @@ public class TaskOverlayFactory implements ResourceBasedOverride { TaskShortcutFactory.FREE_FORM, DesktopSystemShortcut.Companion.createFactory(), ExternalDisplaySystemShortcut.Companion.createFactory(), + AspectRatioSystemShortcut.Companion.createFactory(), TaskShortcutFactory.WELLBEING, TaskShortcutFactory.SAVE_APP_PAIR, TaskShortcutFactory.SCREENSHOT, diff --git a/quickstep/src/com/android/quickstep/TopTaskTracker.java b/quickstep/src/com/android/quickstep/TopTaskTracker.java index 43e8ff9902..2b83311052 100644 --- a/quickstep/src/com/android/quickstep/TopTaskTracker.java +++ b/quickstep/src/com/android/quickstep/TopTaskTracker.java @@ -21,6 +21,7 @@ import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS; import static android.content.Intent.ACTION_CHOOSER; import static android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS; import static android.view.Display.DEFAULT_DISPLAY; +import static android.view.Display.INVALID_DISPLAY; import static com.android.launcher3.Flags.enableOverviewOnConnectedDisplays; import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_TOP_OR_LEFT; @@ -332,7 +333,7 @@ public class TopTaskTracker extends ISplitScreenListener.Stub implements TaskSta // TODO(346588978): Currently ignore filterOnlyVisibleRecents, but perhaps make this an // explicit filter For things to ignore (ie. PIP/Bubbles/Assistant/etc/so that this is // explicit) - return new CachedTaskInfo(mVisibleTasks.get(displayId), mCanEnterDesktopMode); + return new CachedTaskInfo(mVisibleTasks.get(displayId)); } else { if (filterOnlyVisibleRecents) { // Since we only know about the top most task, any filtering may not be applied on @@ -343,9 +344,10 @@ public class TopTaskTracker extends ISplitScreenListener.Stub implements TaskSta if (enableOverviewOnConnectedDisplays()) { return new CachedTaskInfo(Arrays.stream(tasks).filter( info -> ExternalDisplaysKt.getSafeDisplayId(info) - == displayId).toList(), mCanEnterDesktopMode); + == displayId).toList(), mCanEnterDesktopMode, displayId); } else { - return new CachedTaskInfo(Arrays.asList(tasks), mCanEnterDesktopMode); + return new CachedTaskInfo(Arrays.asList(tasks), mCanEnterDesktopMode, + displayId); } } @@ -363,9 +365,9 @@ public class TopTaskTracker extends ISplitScreenListener.Stub implements TaskSta if (enableOverviewOnConnectedDisplays()) { return new CachedTaskInfo(tasks.stream().filter( info -> ExternalDisplaysKt.getSafeDisplayId(info) == displayId).toList(), - mCanEnterDesktopMode); + mCanEnterDesktopMode, displayId); } else { - return new CachedTaskInfo(tasks, mCanEnterDesktopMode); + return new CachedTaskInfo(tasks, mCanEnterDesktopMode, displayId); } } } @@ -385,8 +387,8 @@ public class TopTaskTracker extends ISplitScreenListener.Stub implements TaskSta * during the lifecycle of the task. */ public static class CachedTaskInfo { - // TODO: b/402362465 - Provide a valid value while tracking top task per display. - private final int mDisplayId = DEFAULT_DISPLAY; + // Only used when enableShellTopTaskTracking() is disabled. + private int mDisplayId = INVALID_DISPLAY; // Only used when enableShellTopTaskTracking() is disabled @Nullable private final TaskInfo mTopTask; @@ -397,22 +399,23 @@ public class TopTaskTracker extends ISplitScreenListener.Stub implements TaskSta @Nullable private final GroupedTaskInfo mVisibleTasks; - private final boolean mCanEnterDesktopMode; + private boolean mCanEnterDesktopMode = false; // Only used when enableShellTopTaskTracking() is enabled - CachedTaskInfo(@Nullable GroupedTaskInfo visibleTasks, boolean canEnterDesktopMode) { + CachedTaskInfo(@Nullable GroupedTaskInfo visibleTasks) { mAllCachedTasks = null; mTopTask = null; mVisibleTasks = visibleTasks; - mCanEnterDesktopMode = canEnterDesktopMode; } // Only used when enableShellTopTaskTracking() is disabled - CachedTaskInfo(@NonNull List allCachedTasks, boolean canEnterDesktopMode) { + CachedTaskInfo(@NonNull List allCachedTasks, boolean canEnterDesktopMode, + int displayId) { mVisibleTasks = null; mAllCachedTasks = allCachedTasks; mTopTask = allCachedTasks.isEmpty() ? null : allCachedTasks.get(0); mCanEnterDesktopMode = canEnterDesktopMode; + mDisplayId = displayId; } /** @@ -522,7 +525,7 @@ public class TopTaskTracker extends ISplitScreenListener.Stub implements TaskSta && t.getActivityType() != ACTIVITY_TYPE_RECENTS) .toList(); return visibleNonExcludedTasks.isEmpty() ? null - : new CachedTaskInfo(visibleNonExcludedTasks, mCanEnterDesktopMode); + : new CachedTaskInfo(visibleNonExcludedTasks, mCanEnterDesktopMode, mDisplayId); } /** @@ -555,7 +558,6 @@ public class TopTaskTracker extends ISplitScreenListener.Stub implements TaskSta // TODO(346588978): Update this to return more than a single task once the callers // are refactored. - /** * Returns a {@link GroupedTaskInfo} which can be used as a placeholder until the true * object is loaded by the model. diff --git a/quickstep/src/com/android/quickstep/util/ChoreographerFrameRateTracker.kt b/quickstep/src/com/android/quickstep/util/ChoreographerFrameRateTracker.kt new file mode 100644 index 0000000000..1b61a6af6b --- /dev/null +++ b/quickstep/src/com/android/quickstep/util/ChoreographerFrameRateTracker.kt @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2025 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.quickstep.util + +import android.util.TimeUtils +import android.view.Choreographer +import com.android.launcher3.util.window.RefreshRateTracker + +/** [RefreshRateTracker] using main thread [Choreographer] */ +object ChoreographerFrameRateTracker : RefreshRateTracker { + + override val singleFrameMs: Int + get() = + Choreographer.getMainThreadInstance()?.let { + (it.frameIntervalNanos / TimeUtils.NANOS_PER_MS).toInt().coerceAtLeast(1) + } ?: 1 +} diff --git a/quickstep/src/com/android/quickstep/util/SplitAnimationController.kt b/quickstep/src/com/android/quickstep/util/SplitAnimationController.kt index 96a5733a46..8601350b8f 100644 --- a/quickstep/src/com/android/quickstep/util/SplitAnimationController.kt +++ b/quickstep/src/com/android/quickstep/util/SplitAnimationController.kt @@ -65,7 +65,6 @@ import com.android.launcher3.util.MultiPropertyFactory.MULTI_PROPERTY_VALUE import com.android.launcher3.util.SplitConfigurationOptions.SplitSelectSource import com.android.launcher3.views.BaseDragLayer import com.android.quickstep.TaskViewUtils -import com.android.quickstep.util.SplitScreenUtils.Companion.extractTopParentAndChildren import com.android.quickstep.views.FloatingAppPairView import com.android.quickstep.views.FloatingTaskView import com.android.quickstep.views.GroupedTaskView @@ -982,14 +981,35 @@ class SplitAnimationController(val splitSelectStateController: SplitSelectStateC progressUpdater.setDuration(QuickstepTransitionManager.APP_LAUNCH_DURATION) progressUpdater.interpolator = Interpolators.EMPHASIZED - val splitTree: Pair>? = extractTopParentAndChildren(transitionInfo) - check(splitTree != null) { "Could not find a split root candidate" } - val rootCandidate = splitTree.first - val stageRootTaskIds: Set = splitTree.second.map { it.taskInfo!!.taskId }.toSet() - val leafTasks: List = - transitionInfo.changes - .filter { it.taskInfo != null && it.taskInfo!!.parentTaskId in stageRootTaskIds } - .toList() + var rootCandidate: Change? = null + + for (change in transitionInfo.changes) { + val taskInfo: RunningTaskInfo = change.taskInfo ?: continue + + // TODO (b/316490565): Replace this logic when SplitBounds is available to + // startAnimation() and we can know the precise taskIds of launching tasks. + if ( + taskInfo.windowingMode == windowingMode && + (change.mode == TRANSIT_OPEN || change.mode == TRANSIT_TO_FRONT) + ) { + // Found one! + rootCandidate = change + break + } + } + + // If we could not find a proper root candidate, something went wrong. + check(rootCandidate != null) { "Could not find a split root candidate" } + + // Recurse up the tree until parent is null, then we've found our root. + var parentToken: WindowContainerToken? = rootCandidate.parent + while (parentToken != null) { + rootCandidate = transitionInfo.getChange(parentToken) ?: break + parentToken = rootCandidate.parent + } + + // Make sure nothing weird happened, like getChange() returning null. + check(rootCandidate != null) { "Failed to find a root leash" } // Starting position is a 34% size tile centered in the middle of the screen. // Ending position is the full device screen. @@ -1023,42 +1043,6 @@ class SplitAnimationController(val splitSelectStateController: SplitSelectStateC override fun onAnimationEnd(animation: Animator) { finishCallback.run() } - - override fun onAnimationStart(animation: Animator) { - // Reset leaf and stage root tasks, animation can begin from freeform windows - for (leaf in leafTasks) { - val endAbsBounds = leaf.endAbsBounds - - t.setAlpha(leaf.leash, 1f) - t.setCrop( - leaf.leash, - 0f, - 0f, - endAbsBounds.width().toFloat(), - endAbsBounds.height().toFloat(), - ) - t.setPosition(leaf.leash, 0f, 0f) - } - - for (stageRoot in splitTree.second) { - val endAbsBounds = stageRoot.endAbsBounds - - t.setAlpha(stageRoot.leash, 1f) - t.setCrop( - stageRoot.leash, - 0f, - 0f, - endAbsBounds.width().toFloat(), - endAbsBounds.height().toFloat(), - ) - t.setPosition( - stageRoot.leash, - endAbsBounds.left.toFloat(), - endAbsBounds.top.toFloat(), - ) - } - t.apply() - } } ) diff --git a/quickstep/src/com/android/quickstep/util/SplitScreenUtils.kt b/quickstep/src/com/android/quickstep/util/SplitScreenUtils.kt index 7787e30b42..4005c5a813 100644 --- a/quickstep/src/com/android/quickstep/util/SplitScreenUtils.kt +++ b/quickstep/src/com/android/quickstep/util/SplitScreenUtils.kt @@ -46,8 +46,8 @@ class SplitScreenUtils { * Given a TransitionInfo, generates the tree structure for those changes and extracts out * the top most root and it's two immediate children. Changes can be provided in any order. * - * @return null if no root is found, otherwise a [Pair] where first -> top most split root, - * second -> [List] of 2, leftTop/bottomRight stage roots + * @return a [Pair] where first -> top most split root, second -> [List] of 2, + * leftTop/bottomRight stage roots */ fun extractTopParentAndChildren( transitionInfo: TransitionInfo diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index ea95206811..3e4b953b5b 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -7016,6 +7016,8 @@ public abstract class RecentsView< return; } + TaskView currentTaskView = getTaskViewAt(mCurrentPage); + // We assume that a newly added desk is always empty and gets added to the left of the // `AddNewDesktopButton`. DesktopTaskView desktopTaskView = @@ -7029,9 +7031,12 @@ public abstract class RecentsView< updateTaskSize(); mUtils.updateChildTaskOrientations(); + updateScrollSynchronously(); - // TODO: b/401002178 - Recalculate the new current page such that the addition of the new - // desk does not result in a change in the current scroll page. + // Set Current Page based on the stored TaskView. + if (currentTaskView != null) { + setCurrentPage(indexOfChild(currentTaskView)); + } } @Override diff --git a/quickstep/tests/multivalentTests/src/com/android/quickstep/AbsSwipeUpHandlerTestCase.java b/quickstep/tests/multivalentTests/src/com/android/quickstep/AbsSwipeUpHandlerTestCase.java index 568da2d889..6adb7b4052 100644 --- a/quickstep/tests/multivalentTests/src/com/android/quickstep/AbsSwipeUpHandlerTestCase.java +++ b/quickstep/tests/multivalentTests/src/com/android/quickstep/AbsSwipeUpHandlerTestCase.java @@ -16,6 +16,8 @@ package com.android.quickstep; +import static android.view.Display.DEFAULT_DISPLAY; + import static com.android.quickstep.AbsSwipeUpHandler.STATE_HANDLER_INVALIDATED; import static com.android.wm.shell.shared.ShellSharedConstants.KEY_EXTRA_SHELL_CAN_HAND_OFF_ANIMATION; import static com.android.wm.shell.shared.split.SplitBounds.KEY_EXTRA_SPLIT_BOUNDS; @@ -102,7 +104,8 @@ public abstract class AbsSwipeUpHandlerTestCase< new ActivityManager.RunningTaskInfo(); protected final TopTaskTracker.CachedTaskInfo mCachedTaskInfo = new TopTaskTracker.CachedTaskInfo( - Collections.singletonList(mRunningTaskInfo), /* canEnterDesktopMode = */ false); + Collections.singletonList(mRunningTaskInfo), /* canEnterDesktop = */ false, + DEFAULT_DISPLAY); protected final RemoteAnimationTarget mRemoteAnimationTarget = new RemoteAnimationTarget( /* taskId= */ 0, /* mode= */ RemoteAnimationTarget.MODE_CLOSING, @@ -191,7 +194,7 @@ public abstract class AbsSwipeUpHandlerTestCase< @Before public void setUpRecentsContainer() { mTaskAnimationManager = new TaskAnimationManager(mContext, - RecentsAnimationDeviceState.INSTANCE.get(mContext), Display.DEFAULT_DISPLAY); + RecentsAnimationDeviceState.INSTANCE.get(mContext), DEFAULT_DISPLAY); RecentsViewContainer recentsContainer = getRecentsContainer(); RECENTS_VIEW recentsView = getRecentsView(); diff --git a/quickstep/tests/src/com/android/quickstep/AspectRatioSystemShortcutTests.kt b/quickstep/tests/src/com/android/quickstep/AspectRatioSystemShortcutTests.kt new file mode 100644 index 0000000000..10e85e6a1b --- /dev/null +++ b/quickstep/tests/src/com/android/quickstep/AspectRatioSystemShortcutTests.kt @@ -0,0 +1,285 @@ +/* + * Copyright (C) 2025 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.quickstep + +import android.content.ComponentName +import android.content.Context +import android.content.ContextWrapper +import android.content.Intent +import android.platform.test.annotations.DisableFlags +import android.platform.test.annotations.EnableFlags +import android.platform.test.flag.junit.SetFlagsRule +import android.provider.Settings +import android.view.Display.DEFAULT_DISPLAY +import android.view.LayoutInflater +import android.view.Surface +import android.view.View +import android.view.ViewGroup +import android.view.ViewGroup.LayoutParams.MATCH_PARENT +import androidx.test.platform.app.InstrumentationRegistry +import com.android.launcher3.AbstractFloatingView +import com.android.launcher3.AbstractFloatingViewHelper +import com.android.launcher3.Flags.enableRefactorTaskThumbnail +import com.android.launcher3.InvariantDeviceProfile +import com.android.launcher3.R +import com.android.launcher3.logging.StatsLogManager +import com.android.launcher3.logging.StatsLogManager.LauncherEvent +import com.android.launcher3.logging.StatsLogManager.StatsLogger +import com.android.launcher3.model.data.ItemInfo +import com.android.launcher3.model.data.TaskViewItemInfo +import com.android.launcher3.util.RunnableList +import com.android.launcher3.util.SplitConfigurationOptions +import com.android.launcher3.util.TransformingTouchDelegate +import com.android.launcher3.util.WindowBounds +import com.android.quickstep.orientation.LandscapePagedViewHandler +import com.android.quickstep.recents.data.RecentsDeviceProfileRepository +import com.android.quickstep.recents.data.RecentsRotationStateRepository +import com.android.quickstep.recents.di.RecentsDependencies +import com.android.quickstep.task.thumbnail.TaskThumbnailView +import com.android.quickstep.util.RecentsOrientedState +import com.android.quickstep.views.LauncherRecentsView +import com.android.quickstep.views.RecentsViewContainer +import com.android.quickstep.views.TaskContainer +import com.android.quickstep.views.TaskThumbnailViewDeprecated +import com.android.quickstep.views.TaskView +import com.android.quickstep.views.TaskViewIcon +import com.android.systemui.shared.recents.model.Task +import com.android.systemui.shared.recents.model.Task.TaskKey +import com.android.window.flags.Flags +import com.google.common.truth.Truth.assertThat +import org.junit.After +import org.junit.Before +import org.junit.Rule +import org.junit.Test +import org.mockito.Mockito +import org.mockito.Mockito.eq +import org.mockito.Mockito.isNull +import org.mockito.kotlin.any +import org.mockito.kotlin.argumentCaptor +import org.mockito.kotlin.doReturn +import org.mockito.kotlin.mock +import org.mockito.kotlin.spy +import org.mockito.kotlin.verify +import org.mockito.kotlin.whenever + +/** Test for [AspectRatioSystemShortcut] */ +class AspectRatioSystemShortcutTests { + + @get:Rule val setFlagsRule = SetFlagsRule(SetFlagsRule.DefaultInitValueType.DEVICE_DEFAULT) + + /** Spy on a concrete Context so we can reference real View, Layout, and Display properties. */ + private val context: Context = spy(InstrumentationRegistry.getInstrumentation().targetContext) + + /** + * RecentsViewContainer and its super-interface ActivityContext contain methods to convert + * themselves to a Context at runtime, and static methods to convert a Context back to + * themselves by traversing ContextWrapper layers. + * + * Thus there is an undocumented assumption that a RecentsViewContainer always extends Context. + * We need to mock all of the RecentsViewContainer methods but leave the Context-under-test + * intact. + * + * The simplest way is to extend ContextWrapper and delegate the RecentsViewContainer interface + * to a mock. + */ + class RecentsViewContainerContextWrapper(base: Context) : + ContextWrapper(base), RecentsViewContainer by mock() { + + private val statsLogManager: StatsLogManager = mock() + + override fun getStatsLogManager(): StatsLogManager = statsLogManager + + override fun startActivitySafely(v: View, intent: Intent, item: ItemInfo?): RunnableList? = + null + } + + /** + * This is implicitly required in many parts of Launcher that + * require a Context. See RecentsViewContainerContextWrapper. + */ + private val launcher: RecentsViewContainerContextWrapper = + spy(RecentsViewContainerContextWrapper(context)) + + private val recentsView: LauncherRecentsView = mock() + private val abstractFloatingViewHelper: AbstractFloatingViewHelper = mock() + private val taskOverlayFactory: TaskOverlayFactory = + mock(defaultAnswer = Mockito.RETURNS_DEEP_STUBS) + private val factory: TaskShortcutFactory = + AspectRatioSystemShortcut.createFactory(abstractFloatingViewHelper) + private val statsLogger = mock() + private val orientedState: RecentsOrientedState = + mock(defaultAnswer = Mockito.RETURNS_DEEP_STUBS) + private val taskView: TaskView = + LayoutInflater.from(context).cloneInContext(launcher).inflate(R.layout.task, null) as + TaskView + + @Before + fun setUp() { + whenever(launcher.getOverviewPanel()).thenReturn(recentsView) + + val statsLogManager = launcher.getStatsLogManager() + whenever(statsLogManager.logger()).thenReturn(statsLogger) + whenever(statsLogger.withItemInfo(any())).thenReturn(statsLogger) + + whenever(orientedState.orientationHandler).thenReturn(LandscapePagedViewHandler()) + taskView.setLayoutParams(ViewGroup.LayoutParams(MATCH_PARENT, MATCH_PARENT)) + + if (enableRefactorTaskThumbnail()) { + val recentsDependencies = RecentsDependencies.maybeInitialize(launcher) + val scopeId = recentsDependencies.createRecentsViewScope(launcher) + recentsDependencies.provide( + RecentsRotationStateRepository::class.java, + scopeId, + { mock() } + ) + recentsDependencies.provide( + RecentsDeviceProfileRepository::class.java, + scopeId, + { mock() } + ) + } + } + + @After + fun tearDown() { + if (enableRefactorTaskThumbnail()) { + RecentsDependencies.destroy(launcher) + } + } + + /** + * When the corresponding feature flag is off, there will not be an option to open aspect ratio + * settings. + */ + @DisableFlags(com.android.window.flags.Flags.FLAG_UNIVERSAL_RESIZABLE_BY_DEFAULT) + @Test + fun createShortcut_flaggedOff_notCreated() { + val task = createTask() + val taskContainer = createTaskContainer(task) + + setScreenSizeDp(widthDp = 1200, heightDp = 800) + taskView.bind(task, orientedState, taskOverlayFactory) + + assertThat(factory.getShortcuts(launcher, taskContainer)).isNull() + } + + /** + * When the screen doesn't meet or exceed sw600dp (eg. phone, watch), there will not be an + * option to open aspect ratio settings. + */ + @EnableFlags(com.android.window.flags.Flags.FLAG_UNIVERSAL_RESIZABLE_BY_DEFAULT) + @Test + fun createShortcut_sw599dp_notCreated() { + val task = createTask() + val taskContainer = createTaskContainer(task) + + setScreenSizeDp(widthDp = 599, heightDp = 599) + taskView.bind(task, orientedState, taskOverlayFactory) + + assertThat(factory.getShortcuts(launcher, taskContainer)).isNull() + } + + /** + * When the screen does meet or exceed sw600dp (eg. tablet, inner foldable screen, home cinema) + * there will be an option to open aspect ratio settings. + */ + @EnableFlags(com.android.window.flags.Flags.FLAG_UNIVERSAL_RESIZABLE_BY_DEFAULT) + @Test + fun createShortcut_sw800dp_created_andOpensSettings() { + val task = createTask() + val taskContainer = spy(createTaskContainer(task)) + val taskViewItemInfo = mock() + doReturn(taskViewItemInfo).whenever(taskContainer).itemInfo + + setScreenSizeDp(widthDp = 1200, heightDp = 800) + taskView.bind(task, orientedState, taskOverlayFactory) + + val shortcuts = factory.getShortcuts(launcher, taskContainer) + assertThat(shortcuts).hasSize(1) + + // On clicking the shortcut: + val shortcut = shortcuts!!.first() as AspectRatioSystemShortcut + shortcut.onClick(taskView) + + // 1) Panel should be closed + val allTypesExceptRebindSafe = + AbstractFloatingView.TYPE_ALL and AbstractFloatingView.TYPE_REBIND_SAFE.inv() + verify(abstractFloatingViewHelper).closeOpenViews(launcher, true, allTypesExceptRebindSafe) + + // 2) Compat mode settings activity should be launched + val intentCaptor = argumentCaptor() + verify(launcher) + .startActivitySafely(any(), intentCaptor.capture(), eq(taskViewItemInfo)) + val intent = intentCaptor.firstValue!! + assertThat(intent.action).isEqualTo(Settings.ACTION_MANAGE_USER_ASPECT_RATIO_SETTINGS) + + // 3) Shortcut tap event should be reported + verify(statsLogger).withItemInfo(taskViewItemInfo) + verify(statsLogger).log(LauncherEvent.LAUNCHER_ASPECT_RATIO_SETTINGS_SYSTEM_SHORTCUT_TAP) + } + + /** + * Overrides the screen size reported in the DeviceProfile, keeping the same pixel density as + * the underlying device and adjusting the pixel width/height to match what is required. + */ + private fun setScreenSizeDp(widthDp: Int, heightDp: Int) { + val density = context.resources.configuration.densityDpi + val widthPx = widthDp * density / 160 + val heightPx = heightDp * density / 160 + + val screenBounds = WindowBounds(widthPx, heightPx, widthPx, heightPx, Surface.ROTATION_0) + val deviceProfile = + InvariantDeviceProfile.INSTANCE[context].getDeviceProfile(context) + .toBuilder(context) + .setWindowBounds(screenBounds) + .build() + whenever(launcher.getDeviceProfile()).thenReturn(deviceProfile) + } + + /** Create a (very) fake task for testing. */ + private fun createTask() = + Task( + TaskKey( + /* id */ 1, + /* windowingMode */ 0, + Intent(), + ComponentName("", ""), + /* userId */ 0, + /* lastActiveTime */ 2000, + DEFAULT_DISPLAY, + ComponentName("", ""), + /* numActivities */ 1, + /* isTopActivityNoDisplay */ false, + /* isActivityStackTransparent */ false, + ) + ) + + /** Create TaskContainer out of a given Task and fill in the rest with mocks. */ + private fun createTaskContainer(task: Task) = + TaskContainer( + taskView, + task, + if (enableRefactorTaskThumbnail()) mock() + else mock(), + mock(), + mock(), + SplitConfigurationOptions.STAGE_POSITION_UNDEFINED, + digitalWellBeingToast = null, + showWindowsView = null, + taskOverlayFactory, + ) +} diff --git a/quickstep/tests/src/com/android/quickstep/DesktopSystemShortcutTest.kt b/quickstep/tests/src/com/android/quickstep/DesktopSystemShortcutTest.kt index 5f61ba2e07..8a2393d539 100644 --- a/quickstep/tests/src/com/android/quickstep/DesktopSystemShortcutTest.kt +++ b/quickstep/tests/src/com/android/quickstep/DesktopSystemShortcutTest.kt @@ -16,9 +16,11 @@ package com.android.quickstep +import android.Manifest.permission.SYSTEM_ALERT_WINDOW import android.content.ComponentName import android.content.Context import android.content.Intent +import android.content.pm.PackageInfo import android.content.pm.PackageManager import android.platform.test.annotations.DisableFlags import android.platform.test.annotations.EnableFlags @@ -44,6 +46,7 @@ import com.android.quickstep.views.TaskContainer import com.android.quickstep.views.TaskThumbnailViewDeprecated import com.android.quickstep.views.TaskView import com.android.quickstep.views.TaskViewIcon +import com.android.quickstep.views.TaskViewType import com.android.systemui.shared.recents.model.Task import com.android.systemui.shared.recents.model.Task.TaskKey import com.android.window.flags.Flags @@ -54,6 +57,8 @@ import org.junit.After import org.junit.Before import org.junit.Rule import org.junit.Test +import org.mockito.ArgumentMatchers.anyInt +import org.mockito.ArgumentMatchers.anyString import org.mockito.Mockito.`when` import org.mockito.kotlin.any import org.mockito.kotlin.doReturn @@ -74,12 +79,12 @@ class DesktopSystemShortcutTest { private val statsLogManager: StatsLogManager = mock() private val statsLogger: StatsLogManager.StatsLogger = mock() private val recentsView: LauncherRecentsView = mock() - private val taskView: TaskView = mock() private val abstractFloatingViewHelper: AbstractFloatingViewHelper = mock() private val overlayFactory: TaskOverlayFactory = mock() private val factory: TaskShortcutFactory = DesktopSystemShortcut.createFactory(abstractFloatingViewHelper) private val context: Context = spy(InstrumentationRegistry.getInstrumentation().targetContext) + private val taskView: TaskView = createTaskViewMock() private lateinit var mockitoSession: StaticMockitoSession @@ -134,6 +139,64 @@ class DesktopSystemShortcutTest { assertThat(shortcuts).isNull() } + @Test + @EnableFlags( + Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODALS_POLICY, + Flags.FLAG_ENABLE_MODALS_FULLSCREEN_WITH_PERMISSION, + ) + fun createDesktopTaskShortcutFactoryPermissionEnabledAllowed_transparentTask() { + val packageManager: PackageManager = mock() + setUpTransparentPermission(packageManager, isAllowed = true) + val baseComponent = ComponentName("", /* class */ "") + val taskKey = + TaskKey( + /* id */ 1, + /* windowingMode */ 0, + Intent(), + baseComponent, + /* userId */ 0, + /* lastActiveTime */ 2000, + DEFAULT_DISPLAY, + baseComponent, + /* numActivities */ 1, + /* isTopActivityNoDisplay */ false, + /* isActivityStackTransparent */ true, + ) + val taskContainer = createTaskContainer(Task(taskKey)) + val shortcuts = factory.getShortcuts(launcher, taskContainer) + assertThat(shortcuts).isNull() + } + + @Test + @EnableFlags( + Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODALS_POLICY, + Flags.FLAG_ENABLE_MODALS_FULLSCREEN_WITH_PERMISSION, + ) + fun createDesktopTaskShortcutFactoryPermissionEnabledNotAllowed_transparentTask() { + val packageManager: PackageManager = mock() + setUpTransparentPermission(packageManager, isAllowed = false) + val baseComponent = ComponentName("", /* class */ "") + val homeActivities = ComponentName("defaultHomePackage", /* class */ "") + whenever(packageManager.getHomeActivities(any())).thenReturn(homeActivities) + val taskKey = + TaskKey( + /* id */ 1, + /* windowingMode */ 0, + Intent(), + baseComponent, + /* userId */ 0, + /* lastActiveTime */ 2000, + DEFAULT_DISPLAY, + baseComponent, + /* numActivities */ 1, + /* isTopActivityNoDisplay */ false, + /* isActivityStackTransparent */ true, + ) + val taskContainer = createTaskContainer(Task(taskKey).apply { isDockable = true }) + val shortcuts = factory.getShortcuts(launcher, taskContainer) + assertThat(shortcuts).isNotEmpty() + } + @Test @EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODALS_POLICY) fun createDesktopTaskShortcutFactory_systemUiTask() { @@ -162,8 +225,8 @@ class DesktopSystemShortcutTest { @EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODALS_POLICY) fun createDesktopTaskShortcutFactory_defaultHomeTask() { val packageManager: PackageManager = mock() - val homeActivities = ComponentName("defaultHomePackage", /* class */ "") whenever(context.packageManager).thenReturn(packageManager) + val homeActivities = ComponentName("defaultHomePackage", /* class */ "") whenever(packageManager.getHomeActivities(any())).thenReturn(homeActivities) val taskKey = TaskKey( @@ -262,4 +325,27 @@ class DesktopSystemShortcutTest { showWindowsView = null, overlayFactory, ) + + private fun setUpTransparentPermission(packageManager: PackageManager, isAllowed: Boolean) { + val packageInfo: PackageInfo = mock() + if (isAllowed) { + packageInfo.requestedPermissions = arrayOf(SYSTEM_ALERT_WINDOW) + } + whenever(context.packageManager).thenReturn(packageManager) + whenever( + packageManager.getPackageInfoAsUser( + anyString(), + eq(PackageManager.GET_PERMISSIONS), + anyInt(), + ) + ) + .thenReturn(packageInfo) + } + + private fun createTaskViewMock(): TaskView { + val taskView: TaskView = mock() + whenever(taskView.type).thenReturn(TaskViewType.SINGLE) + whenever(taskView.context).thenReturn(context) + return taskView + } } diff --git a/quickstep/tests/src/com/android/quickstep/InputConsumerUtilsTest.java b/quickstep/tests/src/com/android/quickstep/InputConsumerUtilsTest.java index 1464ca8432..655560c0a6 100644 --- a/quickstep/tests/src/com/android/quickstep/InputConsumerUtilsTest.java +++ b/quickstep/tests/src/com/android/quickstep/InputConsumerUtilsTest.java @@ -22,9 +22,11 @@ import static com.android.quickstep.InputConsumerUtils.newConsumer; import static com.google.common.truth.Truth.assertThat; import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; +import static org.mockito.kotlin.StubberKt.doCallRealMethod; import android.annotation.NonNull; import android.os.Looper; @@ -305,6 +307,16 @@ public class InputConsumerUtilsTest { assertEqualsDefaultInputConsumer(this::createBaseInputConsumer); } + @Test + public void testNewBaseConsumer_noGestureBlockedTask_returnsOtherActivityInputConsumer() { + doCallRealMethod().when(mDeviceState).setGestureBlockingTaskId(anyInt()); + mDeviceState.setGestureBlockingTaskId(-1); + when(mDeviceState.isGestureBlockedTask(any())).thenCallRealMethod(); + + assertCorrectInputConsumer(this::createBaseInputConsumer, OtherActivityInputConsumer.class, + InputConsumer.TYPE_OTHER_ACTIVITY); + } + @Test public void testNewBaseConsumer_containsOtherActivityInputConsumer() { assertCorrectInputConsumer( diff --git a/res/drawable/ic_aspect_ratio.xml b/res/drawable/ic_aspect_ratio.xml new file mode 100644 index 0000000000..aafaac4618 --- /dev/null +++ b/res/drawable/ic_aspect_ratio.xml @@ -0,0 +1,26 @@ + + + + + diff --git a/res/layout/widgets_list_row_header.xml b/res/layout/widgets_list_row_header.xml index 98f9dac57b..2a7d22cff3 100644 --- a/res/layout/widgets_list_row_header.xml +++ b/res/layout/widgets_list_row_header.xml @@ -45,25 +45,19 @@ android:id="@+id/app_title" android:layout_width="wrap_content" android:layout_height="wrap_content" + style="@style/WidgetListHeader.Title" android:layout_gravity="start|center_vertical" android:ellipsize="end" android:maxLines="1" - android:textColor="?attr/widgetPickerHeaderAppTitleColor" - android:textSize="@dimen/widget_picker_header_app_title_font_size" - android:textFontWeight="@integer/widget_picker_header_app_title_font_weight" - android:lineHeight="@dimen/widget_picker_header_app_title_line_height" tools:text="App name" /> diff --git a/res/layout/widgets_list_row_header_two_pane.xml b/res/layout/widgets_list_row_header_two_pane.xml index d4baf0aed3..4827ed4e69 100644 --- a/res/layout/widgets_list_row_header_two_pane.xml +++ b/res/layout/widgets_list_row_header_two_pane.xml @@ -47,13 +47,10 @@ android:id="@+id/app_title" android:layout_width="wrap_content" android:layout_height="wrap_content" + style="@style/WidgetListHeader.Title" android:layout_gravity="start|center_vertical" android:ellipsize="end" android:maxLines="1" - android:textColor="?attr/widgetPickerHeaderAppTitleColor" - android:textSize="@dimen/widget_picker_header_app_title_font_size" - android:textFontWeight="@integer/widget_picker_header_app_title_font_weight" - android:lineHeight="@dimen/widget_picker_header_app_title_line_height" android:duplicateParentState="true" tools:text="App name" /> @@ -61,12 +58,9 @@ android:id="@+id/app_subtitle" android:layout_width="wrap_content" android:layout_height="wrap_content" + style="@style/WidgetListHeader.SubTitle" android:ellipsize="end" android:maxLines="1" - android:textColor="?attr/widgetPickerHeaderAppSubtitleColor" - android:textSize="@dimen/widget_picker_header_app_subtitle_font_size" - android:textFontWeight="@integer/widget_picker_header_app_subtitle_font_weight" - android:lineHeight="@dimen/widget_picker_header_app_subtitle_line_height" android:duplicateParentState="true" tools:text="m widgets, n shortcuts" /> diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml index 962a018232..1b206ac892 100644 --- a/res/values-af/strings.xml +++ b/res/values-af/strings.xml @@ -217,6 +217,5 @@ "Privaat Ruimte-oorgang" "Installeer" "Installeer apps in privaat ruimte" - - + "Voeg lêers en meer by privaat ruimte" diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml index 1fbff54b09..204c9af9a4 100644 --- a/res/values-am/strings.xml +++ b/res/values-am/strings.xml @@ -217,6 +217,5 @@ "የግል ቦታ ሽግግር" "ይጫኑ" "መተግበሪያዎችን ወደ የግል ቦታ ይጫኑ" - - + "ወደ የግል ቦታ ፋይሎች እና ሌሎችንም ያክሉ" diff --git a/res/values-as/strings.xml b/res/values-as/strings.xml index 87301ff237..703b08abc5 100644 --- a/res/values-as/strings.xml +++ b/res/values-as/strings.xml @@ -217,6 +217,5 @@ "ব্যক্তিগত স্পে’চৰ স্থানান্তৰণ" "ইনষ্টল কৰক" "এপ্‌সমূহ প্ৰাইভেট স্পেচত ইনষ্টল কৰক" - - + "প্ৰাইভেট স্পে’চত ফাইল আৰু অধিক যোগ দিয়ক" diff --git a/res/values-bn/strings.xml b/res/values-bn/strings.xml index f7c68d5c64..07822f698b 100644 --- a/res/values-bn/strings.xml +++ b/res/values-bn/strings.xml @@ -217,6 +217,5 @@ "ব্যক্তিগত স্পেস ট্রানজিট করা" "ইনস্টল করুন" "প্রাইভেট স্পেসে অ্যাপ ইনস্টল করুন" - - + "প্রাইভেট স্পেসে ফাইল ও আরও অনেক কিছু যোগ করুন" diff --git a/res/values-bs/strings.xml b/res/values-bs/strings.xml index 96d567ca49..80f50ea5b4 100644 --- a/res/values-bs/strings.xml +++ b/res/values-bs/strings.xml @@ -217,6 +217,5 @@ "Prelazak u privatan prostor" "Instalirajte" "Instaliranje aplikacija u privatni prostor" - - + "Dodavanje fajlova i drugih stavki u privatni prostor" diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml index 839c6813dd..f93a19ede6 100644 --- a/res/values-ca/strings.xml +++ b/res/values-ca/strings.xml @@ -217,6 +217,5 @@ "Canvia a Espai privat" "Instal·la" "Instal·la les aplicacions a Espai privat" - - + "Afegeix fitxers i més a Espai privat" diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml index e297418b11..f8cab17515 100644 --- a/res/values-cs/strings.xml +++ b/res/values-cs/strings.xml @@ -217,6 +217,5 @@ "Převádění soukromého prostoru" "Nainstalovat" "Instalovat aplikace do soukromého prostoru" - - + "Přidejte do soukromého prostoru soubory a další položky" diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml index 9691fb0d98..4d7cd67eb7 100644 --- a/res/values-da/strings.xml +++ b/res/values-da/strings.xml @@ -217,6 +217,5 @@ "Ændringer af tilstanden for det private område" "Installer" "Installer apps i privat område" - - + "Føj filer m.m. til dit private område" diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index fc390f6487..36bb55f45d 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -217,6 +217,5 @@ "Sperrzustand des vertraulichen Profils wird gerade geändert" "Installieren" "Apps im vertraulichen Profil installieren" - - + "Dateien und mehr zum vertraulichen Profil hinzufügen" diff --git a/res/values-en-rAU/strings.xml b/res/values-en-rAU/strings.xml index 46a9a357c0..d53ec232f4 100644 --- a/res/values-en-rAU/strings.xml +++ b/res/values-en-rAU/strings.xml @@ -217,6 +217,5 @@ "Private Space transitioning" "Install" "Install apps to private space" - - + "Add files and more to private space" diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml index 46a9a357c0..d53ec232f4 100644 --- a/res/values-en-rGB/strings.xml +++ b/res/values-en-rGB/strings.xml @@ -217,6 +217,5 @@ "Private Space transitioning" "Install" "Install apps to private space" - - + "Add files and more to private space" diff --git a/res/values-en-rIN/strings.xml b/res/values-en-rIN/strings.xml index 46a9a357c0..d53ec232f4 100644 --- a/res/values-en-rIN/strings.xml +++ b/res/values-en-rIN/strings.xml @@ -217,6 +217,5 @@ "Private Space transitioning" "Install" "Install apps to private space" - - + "Add files and more to private space" diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml index d5476caed5..b1ce80ea17 100644 --- a/res/values-es-rUS/strings.xml +++ b/res/values-es-rUS/strings.xml @@ -217,6 +217,5 @@ "Pasar a Espacio privado" "Instalar" "Instala las apps en el espacio privado" - - + "Agrega archivos y mucho más al Espacio privado" diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index 7e8ff04f5d..f01900e5c3 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -217,6 +217,5 @@ "Cambiar a espacio privado" "Instalar" "Descargar aplicaciones en el espacio privado" - - + "Añade archivos y más al espacio privado" diff --git a/res/values-et/strings.xml b/res/values-et/strings.xml index 3a4b3e20f2..de6c23104e 100644 --- a/res/values-et/strings.xml +++ b/res/values-et/strings.xml @@ -217,6 +217,5 @@ "Privaatse ruumi üleviimine" "Installi" "Rakenduste installimine privaatses ruumis" - - + "Privaatsesse ruumi failide ja muu sisu lisamine" diff --git a/res/values-eu/strings.xml b/res/values-eu/strings.xml index 8a84353190..af54389a7a 100644 --- a/res/values-eu/strings.xml +++ b/res/values-eu/strings.xml @@ -217,6 +217,5 @@ "Eremu pribaturako trantsizioa" "Instalatu" "Instalatu aplikazioak eremu pribatuan" - - + "Gehitu fitxategiak eta gauza gehiago eremu pribatuan" diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml index ff27a1b3fe..143b3c2ed6 100644 --- a/res/values-fi/strings.xml +++ b/res/values-fi/strings.xml @@ -217,6 +217,5 @@ "Yksityisen tilan siirtäminen" "Asenna" "Asenna sovelluksia yksityiseen tilaan" - - + "Lisää tiedostoja ja muuta yksityiseen tilaan" diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index 0c62a9d217..acbeac06e4 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -217,6 +217,5 @@ "Transition vers Espace privé" "Installer" "Installer des applis dans l\'espace privé" - - + "Ajoutez des fichiers et bien plus à votre espace privé" diff --git a/res/values-gl/strings.xml b/res/values-gl/strings.xml index 21e16cc8aa..46fc492876 100644 --- a/res/values-gl/strings.xml +++ b/res/values-gl/strings.xml @@ -217,6 +217,5 @@ "Transición ao espazo privado" "Instalar" "Instalar as aplicacións no espazo privado" - - + "Engade ficheiros e máis elementos ao espazo privado" diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml index 3aad85f2aa..c86b210d5a 100644 --- a/res/values-hi/strings.xml +++ b/res/values-hi/strings.xml @@ -217,6 +217,5 @@ "प्राइवेट स्पेस की सेटिंग में बदलाव किया जा रहा है" "इंस्टॉल करें" "प्राइवेट स्पेस में ऐप्लिकेशन इंस्टॉल करें" - - + "प्राइवेट स्पेस में फ़ाइलें और अन्य चीज़ें जोड़ें" diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml index bdb088bfc9..1b018df651 100644 --- a/res/values-hr/strings.xml +++ b/res/values-hr/strings.xml @@ -217,6 +217,5 @@ "Prelazak na privatni prostor" "Instalirajte" "Instaliranje aplikacija u privatni prostor" - - + "Dodajte datoteke i druge sadržaje u privatni prostor" diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml index 8abfaac0c1..b3ae8f2e54 100644 --- a/res/values-hu/strings.xml +++ b/res/values-hu/strings.xml @@ -217,6 +217,5 @@ "Átállás privát területre…" "Telepítés" "Alkalmazások telepítése privát területre" - - + "Fájlok és egyebek hozzáadása a privát területhez" diff --git a/res/values-hy/strings.xml b/res/values-hy/strings.xml index 9c6fc183ec..29ef36c40a 100644 --- a/res/values-hy/strings.xml +++ b/res/values-hy/strings.xml @@ -217,6 +217,5 @@ "Անցում մասնավոր տարածք" "Տեղադրել" "Հավելվածների տեղադրում անձնական տարածքում" - - + "Ձեր մասնավոր տարածքում ավելացրեք ֆայլեր և ավելին" diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml index 986f36cecb..abe9f30a53 100644 --- a/res/values-in/strings.xml +++ b/res/values-in/strings.xml @@ -217,6 +217,5 @@ "Ruang Pribadi Bertransisi" "Instal" "Instal aplikasi ke Ruang Pribadi" - - + "Tambahkan file dan lainnya ke Ruang Privasi" diff --git a/res/values-is/strings.xml b/res/values-is/strings.xml index 1c240063e0..b5368f4748 100644 --- a/res/values-is/strings.xml +++ b/res/values-is/strings.xml @@ -217,6 +217,5 @@ "Leynirými að breytast" "Setja upp" "Setja upp forrit í leynirými" - - + "Bættu skrám og fleiru við leynirými" diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml index 1d3eef12ee..0f791e934d 100644 --- a/res/values-iw/strings.xml +++ b/res/values-iw/strings.xml @@ -131,8 +131,7 @@ "טפט וסגנון" "עריכה של מסך הבית" "הגדרות של מסך הבית" - - + "אפליקציות" "הושבת על ידי מנהל המערכת שלך" "סיבוב מסך הבית" "כאשר מסובבים את הטלפון" @@ -186,10 +185,8 @@ "הקטנת גובה" "גודל הווידג\'ט שונה - רוחב %1$s גובה %2$s" "תפריט קיצורי הדרך" - - - - + "מסגרת שינוי גודל הווידג\'ט של %1$s" + "סגירה" "סגירה" "סגירה" "אישי" @@ -220,6 +217,5 @@ "מעבר למרחב הפרטי" "התקנה" "התקנת אפליקציות במרחב הפרטי" - - + "הוספת קבצים ופריטים נוספים למרחב הפרטי" diff --git a/res/values-kk/strings.xml b/res/values-kk/strings.xml index c789a8f94c..4360f55ccd 100644 --- a/res/values-kk/strings.xml +++ b/res/values-kk/strings.xml @@ -131,8 +131,7 @@ "Тұсқағаз және стиль" "Негізгі экранды өзгерту" "Негізгі экран параметрлері" - - + "Қолданбалар" "Әкімші өшірді" "Негізгі экранды бұруға рұқсат ету" "Телефон бұрылғанда" @@ -186,10 +185,8 @@ "Биіктігін азайту" "Виджет өлшемінің ені %1$s, биіктігі %2$s болып өзгертілді" "Жылдам пәрмен мәзірі" - - - - + "%1$s үшін виджет өлшемін өзгерту" + "Жабу" "Бас тарту" "Жабу" "Жеке" @@ -220,6 +217,5 @@ "Жеке бөлмеге өту" "Орнату" "Қолданбаларды \"Құпия кеңістікке\" орнатыңыз." - - + "Құпия кеңістікке файлдар мен басқа да элементтерді қосыңыз" diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml index ec54bd62ca..f1f050f4d3 100644 --- a/res/values-ko/strings.xml +++ b/res/values-ko/strings.xml @@ -217,6 +217,5 @@ "비공개 스페이스 전환" "설치" "비공개 스페이스에 앱 설치" - - + "비공개 스페이스에 파일 등 추가" diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml index d1cbf9a33e..141c6432f7 100644 --- a/res/values-lt/strings.xml +++ b/res/values-lt/strings.xml @@ -217,6 +217,5 @@ "Privačios erdvės perkėlimas" "Įdiegti" "Įdiegti programas privačioje erdvėje" - - + "Pridėkite failų ir kt. prie privačios erdvės" diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml index fa4dd27090..723a742025 100644 --- a/res/values-lv/strings.xml +++ b/res/values-lv/strings.xml @@ -131,8 +131,7 @@ "Fona tapete un stils" "Rediģēt sākuma ekrānu" "Sākumlapas iestatījumi" - - + "Lietotnes" "Atspējojis administrators" "Atļaut sākuma ekrāna pagriešanu" "Pagriežot tālruni" @@ -186,10 +185,8 @@ "Samazināt augstumu" "Logrīka lielums mainīts — platums: %1$s, augstums: %2$s." "Saīsnes izvēlne" - - - - + "Logrīka lieluma maiņas rāmis lietotnei %1$s" + "Aizvērt" "Nerādīt" "Aizvērt" "Personīgās lietotnes" @@ -220,6 +217,5 @@ "Pāriet uz privāto mapi" "Instalēt" "Instalējiet lietotnes privātajā telpā." - - + "Pievienojiet failus un citu saturu privātajai telpai" diff --git a/res/values-mn/strings.xml b/res/values-mn/strings.xml index 631e310e2e..f017ad732b 100644 --- a/res/values-mn/strings.xml +++ b/res/values-mn/strings.xml @@ -217,6 +217,5 @@ "Private Space-н шилжилт" "Суулгах" "Хувийн орон зайд аппууд суулгана уу" - - + "Хаалттай орон зайд файл болон бусад зүйлийг нэмэх" diff --git a/res/values-my/strings.xml b/res/values-my/strings.xml index c467055871..258b821886 100644 --- a/res/values-my/strings.xml +++ b/res/values-my/strings.xml @@ -217,6 +217,5 @@ "သီးသန့်ချတ်ခန်း အပြောင်းအလဲ" "ထည့်သွင်းရန်" "‘သီးသန့်နေရာ’ တွင် အက်ပ်များ ထည့်သွင်းနိုင်သည်" - - + "‘သီးသန့်နေရာ’ တွင် ဖိုင်နှင့် အခြားအရာများ ထည့်နိုင်သည်" diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml index f4e10fc51d..200765ca5b 100644 --- a/res/values-nb/strings.xml +++ b/res/values-nb/strings.xml @@ -217,6 +217,5 @@ "Private Space-overgang" "Installer" "Installer apper i privat område" - - + "Legg til filer og annet i det private området" diff --git a/res/values-ne/strings.xml b/res/values-ne/strings.xml index 00cbba0d6f..a368ad29ba 100644 --- a/res/values-ne/strings.xml +++ b/res/values-ne/strings.xml @@ -217,6 +217,5 @@ "निजी स्पेस ट्रान्जिसन गरिँदै छ" "इन्स्टल गर्नुहोस्" "निजी स्पेसमा एपहरू इन्स्टल गर्नुहोस्" - - + "निजी स्पेसमा फाइल र अन्य कुरा हाल्नुहोस्" diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml index 5fa50c6715..9558cbfc9e 100644 --- a/res/values-nl/strings.xml +++ b/res/values-nl/strings.xml @@ -217,6 +217,5 @@ "Overschakelen naar privéruimte" "Installeren" "Apps installeren in privégedeelte" - - + "Bestanden en meer toevoegen aan privégedeelte" diff --git a/res/values-or/strings.xml b/res/values-or/strings.xml index d2b1906528..8351ecbc10 100644 --- a/res/values-or/strings.xml +++ b/res/values-or/strings.xml @@ -217,6 +217,5 @@ "ପ୍ରାଇଭେଟ ସ୍ପେସ ଟ୍ରାଞ୍ଜିସନିଂ" "ଇନଷ୍ଟଲ କରନ୍ତୁ" "ଆପ୍ସକୁ ପ୍ରାଇଭେଟ ସ୍ପେସରେ ଇନଷ୍ଟଲ କରନ୍ତୁ" - - + "ପ୍ରାଇଭେଟ ସ୍ପେସରେ ଫାଇଲ ଏବଂ ଅଧିକ ଯୋଗ କରନ୍ତୁ" diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml index 327c5ea3af..d1960a4685 100644 --- a/res/values-pl/strings.xml +++ b/res/values-pl/strings.xml @@ -217,6 +217,5 @@ "Przenoszenie obszaru prywatnego" "Zainstaluj" "Zainstaluj aplikacje w przestrzeni prywatnej" - - + "Dodawanie plików i innych elementów do przestrzeni prywatnej" diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml index 9c7261b809..de018c4fae 100644 --- a/res/values-pt/strings.xml +++ b/res/values-pt/strings.xml @@ -131,8 +131,7 @@ "Plano de fundo e estilo" "Editar tela inicial" "Configurações da tela inicial" - - + "Apps" "Desativado pelo administrador" "Permitir a rotação da tela inicial" "Quando o smartphone for girado" @@ -186,10 +185,8 @@ "Diminuir altura" "Widget redimensionado para a largura %1$s, altura %2$s" "Menu de atalhos" - - - - + "Frame de redimensionamento do widget para %1$s" + "Fechar" "Dispensar" "Fechar" "Pessoais" @@ -220,6 +217,5 @@ "Espaço particular em transição" "Instalar" "Instalar apps no espaço privado" - - + "Adicione arquivos e muito mais ao espaço privado" diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml index 9a61bb4d94..9683705657 100644 --- a/res/values-ro/strings.xml +++ b/res/values-ro/strings.xml @@ -217,6 +217,5 @@ "Tranziție pentru spațiul privat" "Instalează" "Instalează aplicații în Spațiul privat" - - + "Adaugă fișiere și altele în Spațiul privat" diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml index 504ca56dff..2fe2840cdf 100644 --- a/res/values-sk/strings.xml +++ b/res/values-sk/strings.xml @@ -217,6 +217,5 @@ "Prechod súkromného priestoru" "Inštalovať" "Inštalácia aplikácií v súkromnom priestore" - - + "Pridajte do súkromného priestoru súbory a ďalšie položky" diff --git a/res/values-sq/strings.xml b/res/values-sq/strings.xml index 2906849bf4..1279640159 100644 --- a/res/values-sq/strings.xml +++ b/res/values-sq/strings.xml @@ -217,6 +217,5 @@ "Kalimi te \"Hapësira private\"" "Instalo" "Instalo aplikacionet në hapësirën private" - - + "Shto skedarë dhe më shumë te \"Hapësira private\"" diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml index 898873a4f9..b326a6f1f3 100644 --- a/res/values-sv/strings.xml +++ b/res/values-sv/strings.xml @@ -217,6 +217,5 @@ "Överföring av privat rum" "Installera" "Installera appar i privat rum" - - + "Lägg till filer och annat i det privata utrymmet" diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml index c6ee27b9fc..576e247919 100644 --- a/res/values-sw/strings.xml +++ b/res/values-sw/strings.xml @@ -217,6 +217,5 @@ "Mabadiliko ya Nafasi ya Faragha" "Weka" "Sakinisha programu kwenye Sehemu ya Faragha" - - + "Weka faili na mengineyo kwenye Sehemu ya Faragha" diff --git a/res/values-ta/strings.xml b/res/values-ta/strings.xml index 73782da00d..e252bf7512 100644 --- a/res/values-ta/strings.xml +++ b/res/values-ta/strings.xml @@ -217,6 +217,5 @@ "தனிப்பட்ட சேமிப்பிடத்திற்கு மாற்றுகிறது" "நிறுவுக" "தனிப்பட்ட சேமிப்பிடத்தில் ஆப்ஸை நிறுவும்" - - + "ரகசிய இடத்தில் ஃபைல்கள் மற்றும் பலவற்றைச் சேர்க்கலாம்" diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml index c5504fe67e..4daeb8a82f 100644 --- a/res/values-tr/strings.xml +++ b/res/values-tr/strings.xml @@ -217,6 +217,5 @@ "Gizli Alana Geçiş" "Yükle" "Uygulamaları özel alana yükleyin" - - + "Özel alana dosya ve başka öğeler ekleyin" diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml index 318944f5b7..961e6e7057 100644 --- a/res/values-uk/strings.xml +++ b/res/values-uk/strings.xml @@ -131,8 +131,7 @@ "Оформлення й стиль" "Редагувати головний екран" "Налаштування головного екрана" - - + "Додатки" "Вимкнув адміністратор" "Дозволити обертання головного екрана" "Коли телефон обертається" @@ -186,10 +185,8 @@ "Зменшити висоту" "Розміри віджета змінено на %1$s завширшки та %2$s заввишки" "Меню швидкого доступу" - - - - + "Рамка для зміни розміру віджета \"%1$s\"" + "Закрити" "Закрити" "Закрити" "Особисті додатки" @@ -220,6 +217,5 @@ "Перехід у приватний простір" "Установити" "Установити додатки в особистому просторі" - - + "Додавайте файли й інші об’єкти в приватний простір" diff --git a/res/values-ur/strings.xml b/res/values-ur/strings.xml index 36000c0c90..ec0bb05feb 100644 --- a/res/values-ur/strings.xml +++ b/res/values-ur/strings.xml @@ -217,6 +217,5 @@ "نجی اسپیس کی منتقلی" "انسٹال کریں" "پرائیویٹ اسپیس میں ایپس انسٹال کریں" - - + "پرائیویٹ اسپیس میں فائلز وغیرہ شامل کریں" diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml index a3ecb4e874..c40fbe9683 100644 --- a/res/values-vi/strings.xml +++ b/res/values-vi/strings.xml @@ -217,6 +217,5 @@ "Chuyển đổi sang không gian riêng tư" "Cài đặt" "Cài đặt ứng dụng vào Không gian riêng tư" - - + "Thêm tệp và nội dung khác vào Không gian riêng tư" diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml index 0b610dc968..672a911867 100644 --- a/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml @@ -217,6 +217,5 @@ "私密空间转换" "安装" "将应用安装到私密空间" - - + "将文件等内容添加到私密空间" diff --git a/res/values-zh-rHK/strings.xml b/res/values-zh-rHK/strings.xml index 6262df5d99..dc51d9bb4d 100644 --- a/res/values-zh-rHK/strings.xml +++ b/res/values-zh-rHK/strings.xml @@ -217,6 +217,5 @@ "轉為「私人空間」" "安裝" "將應用程式安裝在「私人空間」中" - - + "新增檔案和其他內容到「私人空間」" diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml index 9bb1056a2b..531742bf13 100644 --- a/res/values-zh-rTW/strings.xml +++ b/res/values-zh-rTW/strings.xml @@ -217,6 +217,5 @@ "轉換私人空間狀態" "安裝" "將應用程式安裝在私人空間中" - - + "將檔案和其他內容新增至私人空間" diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml index 82fafc69a0..d4338d4102 100644 --- a/res/values-zu/strings.xml +++ b/res/values-zu/strings.xml @@ -217,6 +217,5 @@ "Ukuguqulwa Kwendawo Yangasese" "Faka" "Faka ama-app Endaweni Engasese" - - + "Faka amafayela nokunye Endaweni engasese" diff --git a/res/values/attrs.xml b/res/values/attrs.xml index 1ecac338a4..b0e9cd07c4 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -40,6 +40,7 @@ + diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 4d0379d462..3f9c535ee6 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -226,9 +226,11 @@ 0dp 16sp 500 + 600 24sp 14sp 400 + 600 20sp 8dp diff --git a/res/values/strings.xml b/res/values/strings.xml index a626097ea3..f0578cd16e 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -42,6 +42,7 @@ Split screen + Change aspect ratio App info for %1$s Usage settings for %1$s diff --git a/res/values/styles.xml b/res/values/styles.xml index cf6c56097a..7d5b57587b 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -77,6 +77,7 @@ @color/drop_target_hover_text_color_light @color/drop_target_hover_button_color_light @color/overview_scrim + #33000000 @color/preload_icon_accent_color_light @color/preload_icon_background_color_light false @@ -141,6 +142,7 @@ #B3FFFFFF #DD000000 @color/overview_scrim_dark + #52000000 @color/preload_icon_accent_color_dark @color/preload_icon_background_color_dark @@ -291,6 +293,36 @@ @color/widget_cell_subtitle_color_dark + + + + + + + +