Format files with the upcoming version of ktfmt am: be82bc661c am: 652ec4997a

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21565649

Change-Id: I06342a9bb4b91dd00196b76dec1dd2daaf4ee2e4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jordan Demeulenaere authored and Automerger Merge Worker committed 2023-03-01 15:55:10 +00:00
commit 51132f7f86
11 files changed
+153 -90

No files matched your search

@@ -32,8 +32,8 @@ import com.android.launcher3.util.SplitConfigurationOptions.SplitSelectSource
import com.android.launcher3.views.ActivityContext
/**
* Shortcut to allow starting split. Default interaction for [onClick] is to launch
* split selection mode
* Shortcut to allow starting split. Default interaction for [onClick] is to launch split selection
* mode
*/
abstract class SplitShortcut<T>(
iconResId: Int,
@@ -79,6 +79,7 @@ class TaskbarBackgroundRenderer(context: TaskbarActivityContext) {
/**
* Sets the roundness of the round corner above Taskbar. No effect on transient Taskkbar.
*
* @param cornerRoundness 0 has no round corner, 1 has complete round corner.
*/
fun setCornerRoundness(cornerRoundness: Float) {
@@ -51,8 +51,11 @@ class TaskbarInsetsController(val context: TaskbarActivityContext) : LoggableTas
onTaskbarWindowHeightOrInsetsChanged()
}
private val gestureNavSettingsObserver =
GestureNavigationSettingsObserver(context.mainThreadHandler, context,
this::onTaskbarWindowHeightOrInsetsChanged)
GestureNavigationSettingsObserver(
context.mainThreadHandler,
context,
this::onTaskbarWindowHeightOrInsetsChanged
)
// Initialized in init.
private lateinit var controllers: TaskbarControllers
@@ -71,13 +74,7 @@ class TaskbarInsetsController(val context: TaskbarActivityContext) : LoggableTas
ITYPE_LEFT_GESTURES,
ITYPE_RIGHT_GESTURES,
),
intArrayOf(
SOURCE_FRAME,
SOURCE_FRAME,
SOURCE_FRAME,
SOURCE_DISPLAY,
SOURCE_DISPLAY
)
intArrayOf(SOURCE_FRAME, SOURCE_FRAME, SOURCE_FRAME, SOURCE_DISPLAY, SOURCE_DISPLAY)
)
onTaskbarWindowHeightOrInsetsChanged()
@@ -102,7 +99,7 @@ class TaskbarInsetsController(val context: TaskbarActivityContext) : LoggableTas
)
val contentHeight = controllers.taskbarStashController.contentHeightToReportToApps
val tappableHeight = controllers.taskbarStashController.tappableHeightToReportToApps
val res = context.resources;
val res = context.resources
for (provider in windowLayoutParams.providedInsets) {
if (
provider.type == ITYPE_EXTRA_NAVIGATION_BAR ||
@@ -157,6 +154,7 @@ class TaskbarInsetsController(val context: TaskbarActivityContext) : LoggableTas
/**
* @return [Insets] where the [bottomInset] is either used as a bottom inset or
*
* ```
* right/left inset if using 3 button nav
* ```
@@ -174,20 +172,25 @@ class TaskbarInsetsController(val context: TaskbarActivityContext) : LoggableTas
/**
* Sets {@param providesInsetsTypes} as the inset types provided by {@param params}.
*
* @param params The window layout params.
* @param providesInsetsTypes The inset types we would like this layout params to provide.
*/
fun setProvidesInsetsTypes(params: WindowManager.LayoutParams, providesInsetsTypes: IntArray,
providesInsetsSources: IntArray) {
fun setProvidesInsetsTypes(
params: WindowManager.LayoutParams,
providesInsetsTypes: IntArray,
providesInsetsSources: IntArray
) {
params.providedInsets = arrayOfNulls<InsetsFrameProvider>(providesInsetsTypes.size)
for (i in providesInsetsTypes.indices) {
params.providedInsets[i] = InsetsFrameProvider(providesInsetsTypes[i],
providesInsetsSources[i], null, null)
params.providedInsets[i] =
InsetsFrameProvider(providesInsetsTypes[i], providesInsetsSources[i], null, null)
}
}
/**
* Called to update the touchable insets.
*
* @see InternalInsetsInfo.setTouchableInsets
*/
fun updateInsetsTouchability(insetsInfo: ViewTreeObserver.InternalInsetsInfo) {
@@ -35,7 +35,7 @@ private const val TEMP_BACKGROUND_WINDOW_TITLE = "VoiceInteractionTaskbarBackgro
* Controls Taskbar behavior while Voice Interaction Window (assistant) is showing. Specifically:
* - We always hide the taskbar icons or stashed handle, whichever is currently showing.
* - For persistent taskbar, we also move the taskbar background to a new window/layer
* (TYPE_APPLICATION_OVERLAY) which is behind the assistant.
* (TYPE_APPLICATION_OVERLAY) which is behind the assistant.
* - For transient taskbar, we hide the real taskbar background (if it's showing).
*/
class VoiceInteractionWindowController(val context: TaskbarActivityContext) :
@@ -31,7 +31,7 @@ import com.android.launcher3.taskbar.navbutton.NavButtonLayoutFactory.NavButtonL
*
* @property navButtonContainer ViewGroup that holds the 3 navigation buttons.
* @property endContextualContainer ViewGroup that holds the end contextual button (ex, IME
* dismiss).
* dismiss).
* @property startContextualContainer ViewGroup that holds the start contextual button (ex, A11y).
*/
abstract class AbstractNavButtonLayoutter(
@@ -22,7 +22,7 @@ import com.android.launcher3.logging.InstanceId
object LogUtils {
/**
* @return a [Pair] of two InstanceIds but with different types, one that can be used by
* framework (if needing to pass through an intent or such) and one used in Launcher
* framework (if needing to pass through an intent or such) and one used in Launcher
*/
@JvmStatic
fun getShellShareableInstanceId(): Pair<com.android.internal.logging.InstanceId, InstanceId> {