diff options
| author | 2023-07-18 10:52:21 -0700 | |
|---|---|---|
| committer | 2023-07-18 15:02:50 -0700 | |
| commit | 6954ea754a915026d2c456a68cf9dc5438c7da7a (patch) | |
| tree | 59723a70fa89e883461a987cc1e5c152dbd3a51c | |
| parent | f06c3ce319ea9732e13bc4f77146b2037a83595b (diff) | |
Use -Xjvm-default=all instead of -Xjvm-default=enable or @JvmDefault
The @JvmDefault annotation and -Xjvm-default=enable argument are both
removed from kotlinc 1.9.0 in favor of -Xjvm-default=all.
Bug: 291335478
Test: builds
Change-Id: I473e578b92482fbd6c8812c4d32acc1a4c27a84a
27 files changed, 30 insertions, 78 deletions
diff --git a/libs/WindowManager/Shell/Android.bp b/libs/WindowManager/Shell/Android.bp index a605e2bdd3d6..8bd500eac67b 100644 --- a/libs/WindowManager/Shell/Android.bp +++ b/libs/WindowManager/Shell/Android.bp @@ -166,7 +166,7 @@ android_library { // *.kt sources are inside a filegroup. "kotlin-annotations", ], - kotlincflags: ["-Xjvm-default=enable"], + kotlincflags: ["-Xjvm-default=all"], manifest: "AndroidManifest.xml", plugins: ["dagger2-compiler"], } diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/FloatingContentCoordinator.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/common/FloatingContentCoordinator.kt index d5d072a8d449..122dcbb3c2ce 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/FloatingContentCoordinator.kt +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/FloatingContentCoordinator.kt @@ -94,7 +94,6 @@ class FloatingContentCoordinator constructor() { * non-overlapping. * @return The new bounds for this content. */ - @JvmDefault fun calculateNewBoundsOnOverlap( overlappingContentBounds: Rect, otherContentBounds: List<Rect> diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepository.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepository.kt index 711df0d89936..c05af73e6765 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepository.kt +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepository.kt @@ -368,7 +368,6 @@ class DesktopModeTaskRepository { /** * Called when the active tasks change in desktop mode. */ - @JvmDefault fun onActiveTasksChanged(displayId: Int) {} } @@ -379,17 +378,15 @@ class DesktopModeTaskRepository { /** * Called when the desktop starts or stops showing freeform tasks. */ - @JvmDefault fun onVisibilityChanged(displayId: Int, hasVisibleFreeformTasks: Boolean) {} /** * Called when the desktop stashed status changes. */ - @JvmDefault fun onStashedChanged(displayId: Int, stashed: Boolean) {} } } private fun <T> Iterable<T>.toDumpString(): String { return joinToString(separator = ", ", prefix = "[", postfix = "]") -}
\ No newline at end of file +} diff --git a/libs/WindowManager/Shell/tests/unittest/Android.bp b/libs/WindowManager/Shell/tests/unittest/Android.bp index ad4d97f6fe40..38e9f390835c 100644 --- a/libs/WindowManager/Shell/tests/unittest/Android.bp +++ b/libs/WindowManager/Shell/tests/unittest/Android.bp @@ -61,7 +61,7 @@ android_test { "libstaticjvmtiagent", ], - kotlincflags: ["-Xjvm-default=enable"], + kotlincflags: ["-Xjvm-default=all"], plugins: ["dagger2-compiler"], diff --git a/packages/CredentialManager/Android.bp b/packages/CredentialManager/Android.bp index 28b9bc04a249..fe26dc3d7feb 100644 --- a/packages/CredentialManager/Android.bp +++ b/packages/CredentialManager/Android.bp @@ -44,7 +44,7 @@ android_app { platform_apis: true, privileged: true, - kotlincflags: ["-Xjvm-default=enable"], + kotlincflags: ["-Xjvm-default=all"], optimize: { proguard_compatibility: false, diff --git a/packages/EasterEgg/Android.bp b/packages/EasterEgg/Android.bp index 8699f59e4fba..0caf505c2177 100644 --- a/packages/EasterEgg/Android.bp +++ b/packages/EasterEgg/Android.bp @@ -70,5 +70,5 @@ android_app { manifest: "AndroidManifest.xml", - kotlincflags: ["-Xjvm-default=enable"], + kotlincflags: ["-Xjvm-default=all"], } diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp index 7be60431b91b..0f16d930dcf7 100644 --- a/packages/SystemUI/Android.bp +++ b/packages/SystemUI/Android.bp @@ -203,7 +203,7 @@ android_library { manifest: "AndroidManifest.xml", javacflags: ["-Adagger.fastInit=enabled"], - kotlincflags: ["-Xjvm-default=enable"], + kotlincflags: ["-Xjvm-default=all"], plugins: ["dagger2-compiler"], @@ -394,7 +394,7 @@ android_library { "android.test.base", "android.test.mock", ], - kotlincflags: ["-Xjvm-default=enable"], + kotlincflags: ["-Xjvm-default=all"], aaptflags: [ "--extra-packages", "com.android.systemui", @@ -516,7 +516,7 @@ android_app { certificate: "platform", privileged: true, - kotlincflags: ["-Xjvm-default=enable"], + kotlincflags: ["-Xjvm-default=all"], dxflags: ["--multi-dex"], optimize: { diff --git a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt index 764a8556a54d..8306620b3de6 100644 --- a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt +++ b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt @@ -302,10 +302,9 @@ class ActivityLaunchAnimator( interface Callback { /** Whether we are currently on the keyguard or not. */ - @JvmDefault fun isOnKeyguard(): Boolean = false + fun isOnKeyguard(): Boolean = false /** Hide the keyguard and animate using [runner]. */ - @JvmDefault fun hideKeyguardWithAnimation(runner: IRemoteAnimationRunner) { throw UnsupportedOperationException() } @@ -316,16 +315,16 @@ class ActivityLaunchAnimator( interface Listener { /** Called when an activity launch animation started. */ - @JvmDefault fun onLaunchAnimationStart() {} + fun onLaunchAnimationStart() {} /** * Called when an activity launch animation is finished. This will be called if and only if * [onLaunchAnimationStart] was called earlier. */ - @JvmDefault fun onLaunchAnimationEnd() {} + fun onLaunchAnimationEnd() {} /** Called when an activity launch animation made progress. */ - @JvmDefault fun onLaunchAnimationProgress(linearProgress: Float) {} + fun onLaunchAnimationProgress(linearProgress: Float) {} } /** diff --git a/packages/SystemUI/compose/core/tests/Android.bp b/packages/SystemUI/compose/core/tests/Android.bp index 6119e96e5bac..06d94ac5400e 100644 --- a/packages/SystemUI/compose/core/tests/Android.bp +++ b/packages/SystemUI/compose/core/tests/Android.bp @@ -44,5 +44,5 @@ android_test { "androidx.compose.ui_ui-test-manifest", ], - kotlincflags: ["-Xjvm-default=enable"], + kotlincflags: ["-Xjvm-default=all"], } diff --git a/packages/SystemUI/compose/features/tests/Android.bp b/packages/SystemUI/compose/features/tests/Android.bp index ff534bd01fd3..c7c9140b53ed 100644 --- a/packages/SystemUI/compose/features/tests/Android.bp +++ b/packages/SystemUI/compose/features/tests/Android.bp @@ -44,5 +44,5 @@ android_test { "androidx.compose.ui_ui-test-manifest", ], - kotlincflags: ["-Xjvm-default=enable"], + kotlincflags: ["-Xjvm-default=all"], } diff --git a/packages/SystemUI/customization/Android.bp b/packages/SystemUI/customization/Android.bp index dc450bb71dfe..fc37b355494f 100644 --- a/packages/SystemUI/customization/Android.bp +++ b/packages/SystemUI/customization/Android.bp @@ -48,5 +48,5 @@ android_library { ], min_sdk_version: "current", plugins: ["dagger2-compiler"], - kotlincflags: ["-Xjvm-default=enable"], + kotlincflags: ["-Xjvm-default=all"], } diff --git a/packages/SystemUI/shared/Android.bp b/packages/SystemUI/shared/Android.bp index 28e786b71874..ca30e159a0ff 100644 --- a/packages/SystemUI/shared/Android.bp +++ b/packages/SystemUI/shared/Android.bp @@ -65,7 +65,7 @@ android_library { ], min_sdk_version: "current", plugins: ["dagger2-compiler"], - kotlincflags: ["-Xjvm-default=enable"], + kotlincflags: ["-Xjvm-default=all"], } java_library { diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt index 364614421567..489d2ab4d342 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt @@ -171,7 +171,6 @@ class KeyguardUnlockAnimationController @Inject constructor( * for the canned animation (if applicable) so interested parties can sync with it. If no * canned animation is playing, these are both 0. */ - @JvmDefault fun onUnlockAnimationStarted( playingCannedAnimation: Boolean, isWakeAndUnlockNotFromDream: Boolean, @@ -184,7 +183,6 @@ class KeyguardUnlockAnimationController @Inject constructor( * The keyguard is no longer visible in this state and the app/launcher behind the keyguard * is now completely visible. */ - @JvmDefault fun onUnlockAnimationFinished() {} } diff --git a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyConfig.kt b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyConfig.kt index d652889f0082..d949a2a0afe5 100644 --- a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyConfig.kt +++ b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyConfig.kt @@ -145,13 +145,10 @@ class PrivacyConfig @Inject constructor( } interface Callback { - @JvmDefault fun onFlagMicCameraChanged(flag: Boolean) {} - @JvmDefault fun onFlagLocationChanged(flag: Boolean) {} - @JvmDefault fun onFlagMediaProjectionChanged(flag: Boolean) {} } }
\ No newline at end of file diff --git a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt index a676150f44a2..eb8ef9bf3e50 100644 --- a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt +++ b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt @@ -216,7 +216,6 @@ class PrivacyItemController @Inject constructor( interface Callback : PrivacyConfig.Callback { fun onPrivacyItemsChanged(privacyItems: List<PrivacyItem>) - @JvmDefault fun onFlagAllChanged(flag: Boolean) {} } diff --git a/packages/SystemUI/src/com/android/systemui/settings/DisplayTracker.kt b/packages/SystemUI/src/com/android/systemui/settings/DisplayTracker.kt index bb7f721ad61f..468a75d8276e 100644 --- a/packages/SystemUI/src/com/android/systemui/settings/DisplayTracker.kt +++ b/packages/SystemUI/src/com/android/systemui/settings/DisplayTracker.kt @@ -52,12 +52,12 @@ interface DisplayTracker { interface Callback { /** Notifies that a display has been added. */ - @JvmDefault fun onDisplayAdded(displayId: Int) {} + fun onDisplayAdded(displayId: Int) {} /** Notifies that a display has been removed. */ - @JvmDefault fun onDisplayRemoved(displayId: Int) {} + fun onDisplayRemoved(displayId: Int) {} /** Notifies a display has been changed */ - @JvmDefault fun onDisplayChanged(displayId: Int) {} + fun onDisplayChanged(displayId: Int) {} } } diff --git a/packages/SystemUI/src/com/android/systemui/settings/UserTracker.kt b/packages/SystemUI/src/com/android/systemui/settings/UserTracker.kt index 33a3125d1c68..93a3e905f0e0 100644 --- a/packages/SystemUI/src/com/android/systemui/settings/UserTracker.kt +++ b/packages/SystemUI/src/com/android/systemui/settings/UserTracker.kt @@ -71,7 +71,6 @@ interface UserTracker : UserContentResolverProvider, UserContextProvider { * Same as {@link onUserChanging(Int, Context, CountDownLatch)} but the latch will be * auto-decremented after the completion of this method. */ - @JvmDefault fun onUserChanging(newUser: Int, userContext: Context) {} /** @@ -82,7 +81,6 @@ interface UserTracker : UserContentResolverProvider, UserContextProvider { * user switch duration. When overriding this method, countDown() MUST be called on the * latch once execution is complete. */ - @JvmDefault fun onUserChanging(newUser: Int, userContext: Context, latch: CountDownLatch) { onUserChanging(newUser, userContext) latch.countDown() @@ -93,13 +91,11 @@ interface UserTracker : UserContentResolverProvider, UserContextProvider { * Override this method to run things after the screen is unfrozen for the user switch. * Please see {@link #onUserChanging} if you need to hide jank. */ - @JvmDefault fun onUserChanged(newUser: Int, userContext: Context) {} /** * Notifies that the current user's profiles have changed. */ - @JvmDefault fun onProfilesChanged(profiles: List<@JvmSuppressWildcards UserInfo>) {} } } diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeStateEvents.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeStateEvents.kt index 56bb1a6020cf..5804040a8676 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/ShadeStateEvents.kt +++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeStateEvents.kt @@ -29,12 +29,12 @@ interface ShadeStateEvents { interface ShadeStateEventsListener { /** Invoked when the notification panel starts or stops collapsing. */ - @JvmDefault fun onPanelCollapsingChanged(isCollapsing: Boolean) {} + fun onPanelCollapsingChanged(isCollapsing: Boolean) {} /** * Invoked when the notification panel starts or stops launching an [android.app.Activity]. */ - @JvmDefault fun onLaunchingActivityChanged(isLaunchingActivity: Boolean) {} + fun onLaunchingActivityChanged(isLaunchingActivity: Boolean) {} /** * Invoked when the "expand immediate" attribute changes. @@ -45,6 +45,6 @@ interface ShadeStateEvents { * Another example is when full QS is showing, and we swipe up from the bottom. Instead of * going to QQS, the panel fully collapses. */ - @JvmDefault fun onExpandImmediateChanged(isExpandImmediateEnabled: Boolean) {} + fun onExpandImmediateChanged(isExpandImmediateEnabled: Boolean) {} } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt index 0e20df6ecfba..b624115dc5e7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt @@ -553,7 +553,6 @@ class NotificationShadeDepthController @Inject constructor( */ fun onWallpaperZoomOutChanged(zoomOut: Float) - @JvmDefault fun onBlurRadiusChanged(blurRadius: Int) {} } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/SignalCallback.kt b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/SignalCallback.kt index 599beecb0e00..6be407af581d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/SignalCallback.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/SignalCallback.kt @@ -29,7 +29,6 @@ interface SignalCallback { * * @param wifiIndicators a box type containing enough information to properly draw a Wi-Fi icon */ - @JvmDefault fun setWifiIndicators(wifiIndicators: WifiIndicators) {} /** @@ -42,7 +41,6 @@ interface SignalCallback { * NOTE: phones can have multiple subscriptions, so this [mobileDataIndicators] object should be * indexed based on its [subId][MobileDataIndicators.subId] */ - @JvmDefault fun setMobileDataIndicators(mobileDataIndicators: MobileDataIndicators) {} /** @@ -51,7 +49,6 @@ interface SignalCallback { * * @param subs a [SubscriptionInfo] for each subscription that we know about */ - @JvmDefault fun setSubs(subs: List<@JvmSuppressWildcards SubscriptionInfo>) {} /** @@ -63,7 +60,6 @@ interface SignalCallback { * @param show whether or not to show a "no sim" view * @param simDetected whether any SIM is detected or not */ - @JvmDefault fun setNoSims(show: Boolean, simDetected: Boolean) {} /** @@ -72,7 +68,6 @@ interface SignalCallback { * * @param icon an [IconState] for the current ethernet status */ - @JvmDefault fun setEthernetIndicators(icon: IconState) {} /** @@ -80,7 +75,6 @@ interface SignalCallback { * * @param icon an [IconState] for the current airplane mode status */ - @JvmDefault fun setIsAirplaneMode(icon: IconState) {} /** @@ -88,7 +82,6 @@ interface SignalCallback { * * @param enabled the current mobile data feature ennabled state */ - @JvmDefault fun setMobileDataEnabled(enabled: Boolean) {} /** @@ -97,7 +90,6 @@ interface SignalCallback { * @param noValidatedNetwork whether there is any validated network. * @param noNetworksAvailable whether there is any WiFi networks available. */ - @JvmDefault fun setConnectivityStatus( noDefaultNetwork: Boolean, noValidatedNetwork: Boolean, @@ -109,7 +101,6 @@ interface SignalCallback { * @param statusIcon the icon for the call indicator * @param subId subscription ID for which to update the UI */ - @JvmDefault fun setCallIndicator(statusIcon: IconState, subId: Int) {} } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemStatusAnimationScheduler.kt b/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemStatusAnimationScheduler.kt index 2a18f1f51ace..ef9089099a86 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemStatusAnimationScheduler.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemStatusAnimationScheduler.kt @@ -49,11 +49,10 @@ interface SystemStatusAnimationCallback { fun onSystemEventAnimationFinish(hasPersistentDot: Boolean): Animator? { return null } // Best method name, change my mind - @JvmDefault fun onSystemStatusAnimationTransitionToPersistentDot(contentDescription: String?): Animator? { return null } - @JvmDefault fun onHidePersistentDot(): Animator? { return null } + fun onHidePersistentDot(): Animator? { return null } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt index 9ba219903272..8d1e8d0ab524 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt @@ -613,20 +613,20 @@ constructor( interface WakeUpListener { /** Called whenever the notifications are fully hidden or shown */ - @JvmDefault fun onFullyHiddenChanged(isFullyHidden: Boolean) {} + fun onFullyHiddenChanged(isFullyHidden: Boolean) {} /** * Called whenever the pulseExpansion changes * * @param expandingChanged if the user has started or stopped expanding */ - @JvmDefault fun onPulseExpansionChanged(expandingChanged: Boolean) {} + fun onPulseExpansionChanged(expandingChanged: Boolean) {} /** * Called when the animator started by [scheduleDelayedDozeAmountAnimation] begins running * after the start delay, or after it ends/is cancelled. */ - @JvmDefault fun onDelayedDozeAmountAnimationRunning(running: Boolean) {} + fun onDelayedDozeAmountAnimationRunning(running: Boolean) {} } companion object { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/Roundable.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/Roundable.kt index 1cf9c1e1f299..c6ea0b983804 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/Roundable.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/Roundable.kt @@ -27,37 +27,31 @@ interface Roundable { /** Current top roundness */ @get:FloatRange(from = 0.0, to = 1.0) - @JvmDefault val topRoundness: Float get() = roundableState.topRoundness /** Current bottom roundness */ @get:FloatRange(from = 0.0, to = 1.0) - @JvmDefault val bottomRoundness: Float get() = roundableState.bottomRoundness /** Max radius in pixel */ - @JvmDefault val maxRadius: Float get() = roundableState.maxRadius /** Current top corner in pixel, based on [topRoundness] and [maxRadius] */ - @JvmDefault val topCornerRadius: Float get() = if (roundableState.newHeadsUpAnimFlagEnabled) roundableState.topCornerRadius else topRoundness * maxRadius /** Current bottom corner in pixel, based on [bottomRoundness] and [maxRadius] */ - @JvmDefault val bottomCornerRadius: Float get() = if (roundableState.newHeadsUpAnimFlagEnabled) roundableState.bottomCornerRadius else bottomRoundness * maxRadius /** Get and update the current radii */ - @JvmDefault val updatedRadii: FloatArray get() = roundableState.radiiBuffer.also { radii -> @@ -80,7 +74,6 @@ interface Roundable { * @param sourceType the source from which the request for roundness comes. * @return Whether the roundness was changed. */ - @JvmDefault fun requestTopRoundness( @FloatRange(from = 0.0, to = 1.0) value: Float, sourceType: SourceType, @@ -125,7 +118,6 @@ interface Roundable { * @param sourceType the source from which the request for roundness comes. * @return Whether the roundness was changed. */ - @JvmDefault fun requestTopRoundness( @FloatRange(from = 0.0, to = 1.0) value: Float, sourceType: SourceType, @@ -149,7 +141,6 @@ interface Roundable { * @param sourceType the source from which the request for roundness comes. * @return Whether the roundness was changed. */ - @JvmDefault fun requestBottomRoundness( @FloatRange(from = 0.0, to = 1.0) value: Float, sourceType: SourceType, @@ -194,7 +185,6 @@ interface Roundable { * @param sourceType the source from which the request for roundness comes. * @return Whether the roundness was changed. */ - @JvmDefault fun requestBottomRoundness( @FloatRange(from = 0.0, to = 1.0) value: Float, sourceType: SourceType, @@ -219,7 +209,6 @@ interface Roundable { * @param animate true if it should animate to that value. * @return Whether the roundness was changed. */ - @JvmDefault fun requestRoundness( @FloatRange(from = 0.0, to = 1.0) top: Float, @FloatRange(from = 0.0, to = 1.0) bottom: Float, @@ -246,7 +235,6 @@ interface Roundable { * @param sourceType the source from which the request for roundness comes. * @return Whether the roundness was changed. */ - @JvmDefault fun requestRoundness( @FloatRange(from = 0.0, to = 1.0) top: Float, @FloatRange(from = 0.0, to = 1.0) bottom: Float, @@ -270,7 +258,6 @@ interface Roundable { * @param sourceType the source from which the request for roundness comes. * @param animate true if it should animate to that value. */ - @JvmDefault fun requestRoundnessReset(sourceType: SourceType, animate: Boolean) { requestRoundness(top = 0f, bottom = 0f, sourceType = sourceType, animate = animate) } @@ -284,19 +271,16 @@ interface Roundable { * * @param sourceType the source from which the request for roundness comes. */ - @JvmDefault fun requestRoundnessReset(sourceType: SourceType) { requestRoundnessReset(sourceType = sourceType, animate = roundableState.targetView.isShown) } /** Apply the roundness changes, usually means invalidate the [RoundableState.targetView]. */ - @JvmDefault fun applyRoundnessAndInvalidate() { roundableState.targetView.invalidate() } /** @return true if top or bottom roundness is not zero. */ - @JvmDefault fun hasRoundedCorner(): Boolean { return topRoundness != 0f || bottomRoundness != 0f } @@ -307,7 +291,6 @@ interface Roundable { * * This method reuses the previous [radii] for performance reasons. */ - @JvmDefault fun updateRadii( topCornerRadius: Float, bottomCornerRadius: Float, diff --git a/packages/SystemUI/src/com/android/systemui/util/UserAwareController.kt b/packages/SystemUI/src/com/android/systemui/util/UserAwareController.kt index 693c2708b0f7..5582ced1bad6 100644 --- a/packages/SystemUI/src/com/android/systemui/util/UserAwareController.kt +++ b/packages/SystemUI/src/com/android/systemui/util/UserAwareController.kt @@ -23,7 +23,6 @@ import android.os.UserHandle * changes. */ interface UserAwareController { - @JvmDefault fun changeUser(newUser: UserHandle) {} val currentUserId: Int diff --git a/packages/SystemUI/unfold/Android.bp b/packages/SystemUI/unfold/Android.bp index 2e0a9462ffbe..1f0181f2e5bd 100644 --- a/packages/SystemUI/unfold/Android.bp +++ b/packages/SystemUI/unfold/Android.bp @@ -33,7 +33,7 @@ android_library { "dagger2", "jsr330", ], - kotlincflags: ["-Xjvm-default=enable"], + kotlincflags: ["-Xjvm-default=all"], java_version: "1.8", sdk_version: "current", min_sdk_version: "current", diff --git a/packages/SystemUI/unfold/src/com/android/systemui/unfold/UnfoldTransitionProgressProvider.kt b/packages/SystemUI/unfold/src/com/android/systemui/unfold/UnfoldTransitionProgressProvider.kt index fee485d97afa..896444d4df5a 100644 --- a/packages/SystemUI/unfold/src/com/android/systemui/unfold/UnfoldTransitionProgressProvider.kt +++ b/packages/SystemUI/unfold/src/com/android/systemui/unfold/UnfoldTransitionProgressProvider.kt @@ -35,14 +35,12 @@ interface UnfoldTransitionProgressProvider : CallbackController<TransitionProgre interface TransitionProgressListener { /** Called when transition is started */ - @JvmDefault fun onTransitionStarted() {} /** * Called whenever transition progress is updated, [progress] is a value of the animation * where 0 is fully folded, 1 is fully unfolded */ - @JvmDefault fun onTransitionProgress(@FloatRange(from = 0.0, to = 1.0) progress: Float) {} /** @@ -51,11 +49,9 @@ interface UnfoldTransitionProgressProvider : CallbackController<TransitionProgre * For example, in [PhysicsBasedUnfoldTransitionProgressProvider] this could happen when the * animation is not tied to the hinge angle anymore and it is about to run fixed animation. */ - @JvmDefault fun onTransitionFinishing() {} /** Called when transition is completely finished */ - @JvmDefault fun onTransitionFinished() {} } } diff --git a/packages/SystemUI/unfold/src/com/android/systemui/unfold/updates/FoldStateProvider.kt b/packages/SystemUI/unfold/src/com/android/systemui/unfold/updates/FoldStateProvider.kt index 0af372f9da24..bce7e8849903 100644 --- a/packages/SystemUI/unfold/src/com/android/systemui/unfold/updates/FoldStateProvider.kt +++ b/packages/SystemUI/unfold/src/com/android/systemui/unfold/updates/FoldStateProvider.kt @@ -31,9 +31,9 @@ interface FoldStateProvider : CallbackController<FoldUpdatesListener> { val isFinishedOpening: Boolean interface FoldUpdatesListener { - @JvmDefault fun onHingeAngleUpdate(@FloatRange(from = 0.0, to = 180.0) angle: Float) {} - @JvmDefault fun onFoldUpdate(@FoldUpdate update: Int) {} - @JvmDefault fun onUnfoldedScreenAvailable() {} + fun onHingeAngleUpdate(@FloatRange(from = 0.0, to = 180.0) angle: Float) {} + fun onFoldUpdate(@FoldUpdate update: Int) {} + fun onUnfoldedScreenAvailable() {} } @IntDef( |