@@ -10,7 +10,6 @@ import android.content.Intent
|
||||
import android.widget.RemoteViews
|
||||
import androidx.core.content.edit
|
||||
import com.android.launcher3.LauncherPrefs
|
||||
import com.android.launcher3.Utilities
|
||||
import com.android.launcher3.dagger.ApplicationContext
|
||||
import com.android.launcher3.dagger.LauncherAppComponent
|
||||
import com.android.launcher3.dagger.LauncherAppSingleton
|
||||
|
||||
@@ -36,7 +36,7 @@ class LawnchairAlphabeticalAppsList<T>(
|
||||
private val prefs = PreferenceManager.getInstance(context)
|
||||
|
||||
// Lawnchair-TODO-Featureset: observeFolder vM
|
||||
//private val viewModel: FolderViewModel by (context as ComponentActivity).viewModels()
|
||||
// private val viewModel: FolderViewModel by (context as ComponentActivity).viewModels()
|
||||
private var folderList = mutableListOf<FolderInfo>()
|
||||
private val filteredList = mutableListOf<AppInfo>()
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.android.launcher3.allapps.LauncherAllAppsContainerView
|
||||
class SearchContainerView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
defStyleAttr: Int = 0,
|
||||
) : LauncherAllAppsContainerView(context, attrs, defStyleAttr) {
|
||||
|
||||
override fun createSearchUiDelegate() = LawnchairSearchUiDelegate(this)
|
||||
|
||||
@@ -96,13 +96,14 @@ class IconPackProvider @Inject constructor(
|
||||
val resId = res.getIdentifier(iconEntry.name, "drawable", iconEntry.packPackageName)
|
||||
val td = IconProvider.ThemeData(res, resId)
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU
|
||||
&& drawable is AdaptiveIconDrawable
|
||||
&& drawable.monochrome == null) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU &&
|
||||
drawable is AdaptiveIconDrawable &&
|
||||
drawable.monochrome == null
|
||||
) {
|
||||
return AdaptiveIconDrawable(
|
||||
drawable.background,
|
||||
drawable.foreground,
|
||||
td.loadPaddedDrawable()
|
||||
td.loadPaddedDrawable(),
|
||||
)
|
||||
}
|
||||
return drawable
|
||||
|
||||
@@ -122,7 +122,7 @@ class LawnchairIconProvider @JvmOverloads constructor(
|
||||
return iconPack.getIcon(componentName)
|
||||
}
|
||||
|
||||
fun isThemeEnabled(): Boolean {
|
||||
fun isThemeEnabled(): Boolean {
|
||||
return mThemedIconMap != DISABLED_MAP
|
||||
}
|
||||
|
||||
@@ -140,11 +140,14 @@ class LawnchairIconProvider @JvmOverloads constructor(
|
||||
res.getXml(R.xml.grayscale_icon_map).use { parser ->
|
||||
val depth = parser.getDepth()
|
||||
var type: Int
|
||||
while ((parser.next().also { type = it }) != XmlPullParser.START_TAG
|
||||
&& type != XmlPullParser.END_DOCUMENT
|
||||
);
|
||||
while (((parser.next().also { type = it }) != XmlPullParser.END_TAG
|
||||
|| parser.getDepth() > depth) && type != XmlPullParser.END_DOCUMENT
|
||||
while ((parser.next().also { type = it }) != XmlPullParser.START_TAG &&
|
||||
type != XmlPullParser.END_DOCUMENT
|
||||
);
|
||||
while ((
|
||||
(parser.next().also { type = it }) != XmlPullParser.END_TAG ||
|
||||
parser.getDepth() > depth
|
||||
) &&
|
||||
type != XmlPullParser.END_DOCUMENT
|
||||
) {
|
||||
if (type != XmlPullParser.START_TAG) {
|
||||
continue
|
||||
@@ -368,7 +371,7 @@ class LawnchairIconProvider @JvmOverloads constructor(
|
||||
packageName = themeMapName,
|
||||
)
|
||||
if (isOlderLawniconsInstalled) {
|
||||
//updateMapWithDynamicIcons(context, map)
|
||||
// updateMapWithDynamicIcons(context, map)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ import androidx.core.content.edit
|
||||
import app.lawnchair.font.FontCache
|
||||
import com.android.launcher3.InvariantDeviceProfile
|
||||
import com.android.launcher3.LauncherPrefs
|
||||
import com.android.launcher3.Utilities
|
||||
import java.util.concurrent.CopyOnWriteArraySet
|
||||
import org.json.JSONObject
|
||||
|
||||
|
||||
@@ -36,8 +36,7 @@ import javax.inject.Inject
|
||||
@LauncherAppSingleton
|
||||
class PreferenceManager @Inject constructor(
|
||||
@ApplicationContext private val context: Context,
|
||||
) :
|
||||
BasePreferenceManager(context),
|
||||
) : BasePreferenceManager(context),
|
||||
SafeCloseable {
|
||||
private val idp get() = InvariantDeviceProfile.INSTANCE.get(context)
|
||||
private val reloadIcons = { idp.onPreferencesChanged(context) }
|
||||
@@ -137,7 +136,6 @@ class PreferenceManager @Inject constructor(
|
||||
val recentsTranslucentBackground = BoolPref("pref_recentsTranslucentBackground", false, recreate)
|
||||
val recentsTranslucentBackgroundAlpha = FloatPref("pref_recentTranslucentBackgroundAlpha", .8f, recreate)
|
||||
|
||||
|
||||
val hideVersionInfo = BoolPref("pref_hideVersionInfo", false)
|
||||
val pseudonymVersion = StringPref("pref_pseudonymVersion", "Bubble Tea")
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ open class DoubleShadowTextView @JvmOverloads constructor(
|
||||
attrs: AttributeSet? = null,
|
||||
) : CustomTextView(context, attrs) {
|
||||
|
||||
private val shadowInfo = fromContext(context, attrs, 0);
|
||||
private val shadowInfo = fromContext(context, attrs, 0)
|
||||
|
||||
init {
|
||||
setShadowLayer(shadowInfo.ambientShadowBlur, 0f, 0f, shadowInfo.ambientShadowColor)
|
||||
|
||||
@@ -32,11 +32,9 @@ import com.android.launcher3.model.data.ItemInfo
|
||||
import com.android.launcher3.popup.SystemShortcut
|
||||
import com.android.launcher3.util.ApplicationInfoWrapper
|
||||
import com.android.launcher3.util.ComponentKey
|
||||
import com.android.launcher3.util.PackageManagerHelper
|
||||
import com.android.launcher3.views.ActivityContext
|
||||
import java.net.URISyntaxException
|
||||
|
||||
import com.patrykmichalik.opto.core.firstBlocking
|
||||
import java.net.URISyntaxException
|
||||
|
||||
class LawnchairShortcut {
|
||||
|
||||
@@ -66,8 +64,9 @@ class LawnchairShortcut {
|
||||
if (ApplicationInfoWrapper(
|
||||
activity.asContext(),
|
||||
itemInfo.targetComponent!!.packageName,
|
||||
itemInfo.user).isSystem()
|
||||
) {
|
||||
itemInfo.user,
|
||||
).isSystem()
|
||||
) {
|
||||
return@Factory null
|
||||
}
|
||||
UnInstall(activity, itemInfo, view)
|
||||
@@ -80,8 +79,11 @@ class LawnchairShortcut {
|
||||
if (ApplicationInfoWrapper(
|
||||
activity.asContext(),
|
||||
packageName,
|
||||
itemInfo.user
|
||||
).isSuspended()) return@Factory null
|
||||
itemInfo.user,
|
||||
).isSuspended()
|
||||
) {
|
||||
return@Factory null
|
||||
}
|
||||
|
||||
PauseApps(activity, itemInfo, originalView)
|
||||
}
|
||||
@@ -99,7 +101,7 @@ class LawnchairShortcut {
|
||||
var icon = Utilities.loadFullDrawableWithoutTheme(launcher, appInfo, 0, 0, outObj)
|
||||
if (mItemInfo.screenId != NO_ID && icon is BitmapInfo.Extender) {
|
||||
// Lawnchair-TODO-BubbleTea: Fix getThemedDrawable
|
||||
//icon = icon.getThemedDrawable(launcher)
|
||||
// icon = icon.getThemedDrawable(launcher)
|
||||
}
|
||||
val launcherActivityInfo = outObj[0] as LauncherActivityInfo
|
||||
val defaultTitle = launcherActivityInfo.label.toString()
|
||||
@@ -135,7 +137,8 @@ class LawnchairShortcut {
|
||||
val appLabel = ApplicationInfoWrapper(
|
||||
context,
|
||||
mItemInfo.targetComponent?.packageName ?: "",
|
||||
mItemInfo.user).toString()
|
||||
mItemInfo.user,
|
||||
).toString()
|
||||
AlertDialog.Builder(context)
|
||||
.setIcon(R.drawable.ic_hourglass_top)
|
||||
.setTitle(context.getString(R.string.pause_apps_dialog_title, appLabel))
|
||||
|
||||
@@ -39,7 +39,6 @@ import com.android.launcher3.R
|
||||
import com.android.launcher3.Utilities
|
||||
import com.android.launcher3.util.Executors
|
||||
import com.android.launcher3.util.MultiPropertyFactory
|
||||
import com.android.launcher3.util.window.RefreshRateTracker
|
||||
import com.android.launcher3.util.window.RefreshRateTracker.Companion.getSingleFrameMs
|
||||
import com.android.launcher3.views.FloatingIconView.getLocationBoundsForView
|
||||
import com.android.launcher3.views.FloatingIconViewCompanion.setPropertiesVisible
|
||||
|
||||
Reference in New Issue
Block a user