diff --git a/lawnchair/src/app/lawnchair/DefaultAppFilter.kt b/lawnchair/src/app/lawnchair/DefaultAppFilter.kt index aef1852df4..0c255de040 100644 --- a/lawnchair/src/app/lawnchair/DefaultAppFilter.kt +++ b/lawnchair/src/app/lawnchair/DefaultAppFilter.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2021, Lawnchair + * + * 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 app.lawnchair import android.content.ComponentName diff --git a/lawnchair/src/app/lawnchair/LawnchairAppFilter.kt b/lawnchair/src/app/lawnchair/LawnchairAppFilter.kt index 139c7d2b18..3594820fa1 100644 --- a/lawnchair/src/app/lawnchair/LawnchairAppFilter.kt +++ b/lawnchair/src/app/lawnchair/LawnchairAppFilter.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2021, Lawnchair + * + * 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 app.lawnchair import android.content.ComponentName @@ -12,14 +28,10 @@ class LawnchairAppFilter(context: Context) : DefaultAppFilter() { private val prefs = PreferenceManager.getInstance(context) private val customHideList get() = prefs.hiddenAppSet.get() - override fun shouldShowApp(app: ComponentName, user: UserHandle?): Boolean { - if (!super.shouldShowApp(app, user)) { - return false + override fun shouldShowApp(app: ComponentName, user: UserHandle?) = + when { + !super.shouldShowApp(app, user) -> false + customHideList.contains(ComponentKey(app, user).toString()) -> false + else -> true } - val key = ComponentKey(app, user) - if (customHideList.contains(key.toString())) { - return false - } - return true - } } diff --git a/lawnchair/src/app/lawnchair/ui/preferences/GeneralPreferences.kt b/lawnchair/src/app/lawnchair/ui/preferences/GeneralPreferences.kt index 0025851987..818b9c7fe9 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/GeneralPreferences.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/GeneralPreferences.kt @@ -21,15 +21,12 @@ import androidx.compose.animation.* import androidx.compose.runtime.Composable import androidx.compose.ui.res.stringResource import androidx.navigation.NavGraphBuilder -import app.lawnchair.ui.preferences.components.NavigationActionPreference -import app.lawnchair.ui.preferences.components.NotificationDotsPreference -import app.lawnchair.ui.preferences.components.PreferenceGroup -import app.lawnchair.ui.preferences.components.PreferenceLayout -import app.lawnchair.ui.preferences.components.SliderPreference -import app.lawnchair.ui.preferences.components.SwitchPreference +import app.lawnchair.ui.preferences.components.* import app.lawnchair.util.Meta import app.lawnchair.util.pageMeta -import app.lawnchair.util.preferences.* +import app.lawnchair.util.preferences.getAdapter +import app.lawnchair.util.preferences.observeAsState +import app.lawnchair.util.preferences.preferenceManager import com.android.launcher3.R object GeneralRoutes { diff --git a/lawnchair/src/app/lawnchair/ui/preferences/HiddenAppsPreferences.kt b/lawnchair/src/app/lawnchair/ui/preferences/HiddenAppsPreferences.kt index eb9a9f4958..7885e7800a 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/HiddenAppsPreferences.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/HiddenAppsPreferences.kt @@ -1,10 +1,25 @@ +/* + * Copyright 2021, Lawnchair + * + * 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 app.lawnchair.ui.preferences import androidx.compose.animation.ExperimentalAnimationApi import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.remember -import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource import androidx.navigation.NavGraphBuilder import app.lawnchair.DefaultAppFilter @@ -29,7 +44,7 @@ fun NavGraphBuilder.hiddenAppsGraph(route: String) { @Composable fun HiddenAppsPreferences() { val pageTitle = - with (hiddenAppsCount()) { + with(hiddenAppsCount()) { if (this == 0) { stringResource(id = R.string.hidden_apps_label) } else { diff --git a/lawnchair/src/app/lawnchair/ui/preferences/IconPackPreferences.kt b/lawnchair/src/app/lawnchair/ui/preferences/IconPackPreferences.kt index 03e8eb3f3f..6ad4498bac 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/IconPackPreferences.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/IconPackPreferences.kt @@ -23,7 +23,10 @@ import androidx.compose.runtime.remember import androidx.compose.ui.res.stringResource import androidx.core.graphics.drawable.toBitmap import androidx.navigation.NavGraphBuilder -import app.lawnchair.ui.preferences.components.* +import app.lawnchair.ui.preferences.components.AnimatedCheck +import app.lawnchair.ui.preferences.components.AppItem +import app.lawnchair.ui.preferences.components.PreferenceLayoutLazyColumn +import app.lawnchair.ui.preferences.components.preferenceGroupItems import app.lawnchair.util.Meta import app.lawnchair.util.pageMeta import app.lawnchair.util.preferences.getAdapter diff --git a/lawnchair/src/app/lawnchair/ui/preferences/components/AppItem.kt b/lawnchair/src/app/lawnchair/ui/preferences/components/AppItem.kt index eaaf9fbcd5..0abd5c0727 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/components/AppItem.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/components/AppItem.kt @@ -1,7 +1,26 @@ +/* + * Copyright 2021, Lawnchair + * + * 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 app.lawnchair.ui.preferences.components import android.graphics.Bitmap -import androidx.compose.animation.* +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.ExperimentalAnimationApi +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut import androidx.compose.foundation.Image import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.* diff --git a/lawnchair/src/app/lawnchair/ui/preferences/components/LazyColumnPreferenceGroup.kt b/lawnchair/src/app/lawnchair/ui/preferences/components/LazyColumnPreferenceGroup.kt index 55bf62a36a..d814576d29 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/components/LazyColumnPreferenceGroup.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/components/LazyColumnPreferenceGroup.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2021, Lawnchair + * + * 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 app.lawnchair.ui.preferences.components import androidx.compose.foundation.layout.Column diff --git a/lawnchair/src/app/lawnchair/ui/preferences/components/LoadingScreen.kt b/lawnchair/src/app/lawnchair/ui/preferences/components/LoadingScreen.kt index cf52e08ab2..53bc09a5fa 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/components/LoadingScreen.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/components/LoadingScreen.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2021, Lawnchair + * + * 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 app.lawnchair.ui.preferences.components import androidx.compose.animation.Crossfade diff --git a/lawnchair/src/app/lawnchair/ui/preferences/components/NavigationActionPreference.kt b/lawnchair/src/app/lawnchair/ui/preferences/components/NavigationActionPreference.kt index 417baae64a..19cbd53652 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/components/NavigationActionPreference.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/components/NavigationActionPreference.kt @@ -23,7 +23,6 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import androidx.navigation.NavController import androidx.navigation.compose.navigate import app.lawnchair.ui.preferences.LocalNavController diff --git a/lawnchair/src/app/lawnchair/ui/preferences/components/NestedScrollSpring.kt b/lawnchair/src/app/lawnchair/ui/preferences/components/NestedScrollSpring.kt index 575fbc261a..31a4e84f41 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/components/NestedScrollSpring.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/components/NestedScrollSpring.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2021, Lawnchair + * + * 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 app.lawnchair.ui.preferences.components import androidx.compose.runtime.* diff --git a/lawnchair/src/app/lawnchair/ui/preferences/components/PreferenceCategoryListItem.kt b/lawnchair/src/app/lawnchair/ui/preferences/components/PreferenceCategoryListItem.kt index 3c66096598..27e37b4e8e 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/components/PreferenceCategoryListItem.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/components/PreferenceCategoryListItem.kt @@ -29,7 +29,12 @@ import androidx.compose.ui.res.painterResource import androidx.compose.ui.unit.dp @Composable -fun PreferenceCategoryListItem(label: String, description: String, @DrawableRes iconResource: Int, onClick: () -> Unit) { +fun PreferenceCategoryListItem( + label: String, + description: String, + @DrawableRes iconResource: Int, + onClick: () -> Unit +) { Row( modifier = Modifier .clickable(onClick = onClick) diff --git a/lawnchair/src/app/lawnchair/ui/preferences/components/PreferenceLayout.kt b/lawnchair/src/app/lawnchair/ui/preferences/components/PreferenceLayout.kt index e1349fb726..50a317fe66 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/components/PreferenceLayout.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/components/PreferenceLayout.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2021, Lawnchair + * + * 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 app.lawnchair.ui.preferences.components import androidx.compose.foundation.layout.Arrangement diff --git a/lawnchair/src/app/lawnchair/ui/preferences/components/SliderPreference.kt b/lawnchair/src/app/lawnchair/ui/preferences/components/SliderPreference.kt index 065c53e26d..14f9cd59cd 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/components/SliderPreference.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/components/SliderPreference.kt @@ -46,7 +46,11 @@ fun SliderPreference( horizontalArrangement = Arrangement.SpaceBetween, verticalAlignment = Alignment.CenterVertically ) { - Text(text = label, style = MaterialTheme.typography.subtitle1, color = MaterialTheme.colors.onBackground) + Text( + text = label, + style = MaterialTheme.typography.subtitle1, + color = MaterialTheme.colors.onBackground + ) CompositionLocalProvider( LocalContentAlpha provides ContentAlpha.medium, LocalContentColor provides MaterialTheme.colors.onBackground diff --git a/lawnchair/src/app/lawnchair/ui/preferences/preferenceGraph.kt b/lawnchair/src/app/lawnchair/ui/preferences/preferenceGraph.kt index 7e46287641..97274cec3b 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/preferenceGraph.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/preferenceGraph.kt @@ -10,7 +10,7 @@ import androidx.navigation.compose.navigation inline fun NavGraphBuilder.preferenceGraph( route: String, crossinline root: @Composable () -> Unit, - crossinline block: NavGraphBuilder.(subRoute: (String) -> String) -> Unit = { } + crossinline block: NavGraphBuilder.(subRoute: (String) -> String) -> Unit = { } ) { val subRoute: (String) -> String = { name -> "$route/$name" } val rootRoute = subRoute("root") diff --git a/lawnchair/src/app/lawnchair/util/LawnchairUtils.kt b/lawnchair/src/app/lawnchair/util/LawnchairUtils.kt index ed6fc4011f..e4957e6352 100644 --- a/lawnchair/src/app/lawnchair/util/LawnchairUtils.kt +++ b/lawnchair/src/app/lawnchair/util/LawnchairUtils.kt @@ -30,7 +30,7 @@ import java.util.concurrent.ExecutionException import kotlin.system.exitProcess -fun ensureOnMainThread(creator: (A) -> T): (A) -> T { +fun ensureOnMainThread(creator: (A) -> T): (A) -> T { return { it -> if (Looper.myLooper() == Looper.getMainLooper()) { creator(it) @@ -47,7 +47,7 @@ fun ensureOnMainThread(creator: (A) -> T): (A) -> T { } } -fun useApplicationContext(creator: (Context) -> T): (Context) -> T { +fun useApplicationContext(creator: (Context) -> T): (Context) -> T { return { it -> creator(it.applicationContext) } } diff --git a/lawnchair/src/app/lawnchair/util/SmartBorder.kt b/lawnchair/src/app/lawnchair/util/SmartBorder.kt index 95276ba76e..3cf483b9d1 100644 --- a/lawnchair/src/app/lawnchair/util/SmartBorder.kt +++ b/lawnchair/src/app/lawnchair/util/SmartBorder.kt @@ -202,14 +202,21 @@ fun Modifier.smartBorder( fun cutOutline(outline: Outline, height: Float, cutTop: Boolean, cutBottom: Boolean): Outline { if (!cutTop && !cutBottom) return outline return when (outline) { - is Outline.Rectangle -> Outline.Rounded(RoundRect(cutRect(outline.rect, height, cutTop, cutBottom), CornerRadius.Zero)) - is Outline.Rounded -> Outline.Rounded(RoundRect( - cutRect(outline.roundRect.boundingRect, height, cutTop, cutBottom), - outline.roundRect.topLeftCornerRadius, - outline.roundRect.topRightCornerRadius, - outline.roundRect.bottomLeftCornerRadius, - outline.roundRect.bottomRightCornerRadius, - )) + is Outline.Rectangle -> Outline.Rounded( + RoundRect( + cutRect(outline.rect, height, cutTop, cutBottom), + CornerRadius.Zero + ) + ) + is Outline.Rounded -> Outline.Rounded( + RoundRect( + cutRect(outline.roundRect.boundingRect, height, cutTop, cutBottom), + outline.roundRect.topLeftCornerRadius, + outline.roundRect.topRightCornerRadius, + outline.roundRect.bottomLeftCornerRadius, + outline.roundRect.bottomRightCornerRadius, + ) + ) else -> outline } } diff --git a/lawnchair/src/app/lawnchair/util/appsList.kt b/lawnchair/src/app/lawnchair/util/appsList.kt index 4292424cc9..55a1ce5d60 100644 --- a/lawnchair/src/app/lawnchair/util/appsList.kt +++ b/lawnchair/src/app/lawnchair/util/appsList.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2021, Lawnchair + * + * 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 app.lawnchair.util import android.content.Context @@ -9,7 +25,6 @@ import android.graphics.drawable.Drawable import android.os.Handler import androidx.compose.runtime.* import androidx.compose.ui.platform.LocalContext -import app.lawnchair.DefaultAppFilter import com.android.launcher3.AppFilter import com.android.launcher3.LauncherAppState import com.android.launcher3.Utilities @@ -23,7 +38,10 @@ import java.util.Comparator.comparing private val appFilter = AppFilter() @Composable -fun appsList(filter: AppFilter = appFilter, comparator: Comparator = defaultComparator): State>> { +fun appsList( + filter: AppFilter = appFilter, + comparator: Comparator = defaultComparator +): State>> { val context = LocalContext.current val appsState = remember { mutableStateOf(Optional.empty>()) } DisposableEffect(Unit) { diff --git a/lawnchair/src/app/lawnchair/util/createSideEffect.kt b/lawnchair/src/app/lawnchair/util/createSideEffect.kt index 4854f97151..02cc08c95e 100644 --- a/lawnchair/src/app/lawnchair/util/createSideEffect.kt +++ b/lawnchair/src/app/lawnchair/util/createSideEffect.kt @@ -1,12 +1,16 @@ package app.lawnchair.util -import androidx.compose.runtime.* +import androidx.compose.runtime.Composable +import androidx.compose.runtime.DisposableEffect +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember class PropsContainer

(var props: P) class SideEffect( val consume: @Composable (@Composable (S) -> Unit) -> Unit, - val provide: @Composable (P) -> Unit) + val provide: @Composable (P) -> Unit +) inline fun createSideEffect(crossinline reducePropsToState: (List

) -> S): SideEffect { val mountedInstances = mutableListOf>() diff --git a/lawnchair/src/app/lawnchair/util/pageMeta.kt b/lawnchair/src/app/lawnchair/util/pageMeta.kt index 4e60ad9a48..9c062f23fc 100644 --- a/lawnchair/src/app/lawnchair/util/pageMeta.kt +++ b/lawnchair/src/app/lawnchair/util/pageMeta.kt @@ -1,14 +1,29 @@ +/* + * Copyright 2021, Lawnchair + * + * 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 app.lawnchair.util class MetaState(val title: String, val topBarFloating: Boolean) class Meta(val title: String? = null, val topBarFloating: Boolean? = null) -private fun getFromPropsList(propsList: List, defaultValue: T, extractor: (meta: Meta) -> T?): T { - return propsList +private fun getFromPropsList(propsList: List, defaultValue: T, extractor: (meta: Meta) -> T?): T = + propsList .asSequence() .map(extractor) .lastOrNull { it != null } ?: defaultValue -} val pageMeta = createSideEffect { propsList -> MetaState( diff --git a/lawnchair/src/app/lawnchair/util/preferences/BasePreferenceManager.kt b/lawnchair/src/app/lawnchair/util/preferences/BasePreferenceManager.kt index 7bf18b7140..a16decc987 100644 --- a/lawnchair/src/app/lawnchair/util/preferences/BasePreferenceManager.kt +++ b/lawnchair/src/app/lawnchair/util/preferences/BasePreferenceManager.kt @@ -1,10 +1,25 @@ +/* + * Copyright 2021, Lawnchair + * + * 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 app.lawnchair.util.preferences import android.content.Context import android.content.SharedPreferences import com.android.launcher3.InvariantDeviceProfile import com.android.launcher3.Utilities -import java.lang.ClassCastException import java.util.* import kotlin.collections.HashMap diff --git a/lawnchair/src/app/lawnchair/util/preferences/PreferenceAdapter.kt b/lawnchair/src/app/lawnchair/util/preferences/PreferenceAdapter.kt index cfb2d41bcc..7e629af3f2 100644 --- a/lawnchair/src/app/lawnchair/util/preferences/PreferenceAdapter.kt +++ b/lawnchair/src/app/lawnchair/util/preferences/PreferenceAdapter.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2021, Lawnchair + * + * 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 app.lawnchair.util.preferences import androidx.compose.runtime.* diff --git a/lawnchair/src/app/lawnchair/util/preferences/PreferenceManager.kt b/lawnchair/src/app/lawnchair/util/preferences/PreferenceManager.kt index 7c9757034b..aa0a026497 100644 --- a/lawnchair/src/app/lawnchair/util/preferences/PreferenceManager.kt +++ b/lawnchair/src/app/lawnchair/util/preferences/PreferenceManager.kt @@ -17,14 +17,12 @@ package app.lawnchair.util.preferences import android.content.Context -import android.content.SharedPreferences import androidx.compose.runtime.Composable import androidx.compose.ui.platform.LocalContext import app.lawnchair.LawnchairLauncher import app.lawnchair.LawnchairLauncherQuickstep import com.android.launcher3.BuildConfig import com.android.launcher3.LauncherAppState -import com.android.launcher3.Utilities import com.android.launcher3.pm.UserCache import com.android.launcher3.util.MainThreadInitializedObject diff --git a/src/com/android/launcher3/model/AllAppsList.java b/src/com/android/launcher3/model/AllAppsList.java index 3293a51847..3d2b7d192f 100644 --- a/src/com/android/launcher3/model/AllAppsList.java +++ b/src/com/android/launcher3/model/AllAppsList.java @@ -12,6 +12,8 @@ * 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. + * + * Modifications copyright 2021, Lawnchair */ package com.android.launcher3.model;