Skip to content

Commit

Permalink
feat: default to use UnClipAdaptive
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardLuo0 committed Feb 15, 2025
1 parent 5b1c9a7 commit cb032df
Showing 1 changed file with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.richardluo.globalIconPack.utils

import android.app.AndroidAppHelper
import android.content.Intent
import android.content.pm.PackageManager
import android.content.res.Resources
import android.graphics.Bitmap
import android.graphics.Canvas
Expand Down Expand Up @@ -217,21 +215,10 @@ object IconHelper {
private val useUnClipAdaptive: Boolean by lazy {
if (!isInMod) false
else
when (val packageName = AndroidAppHelper.currentPackageName()) {
when (AndroidAppHelper.currentPackageName()) {
"com.android.settings" -> false
"com.android.systemui" -> false
"com.android.intentresolver" -> true
else -> {
val intent =
Intent().apply {
setPackage(packageName)
setAction(Intent.ACTION_MAIN)
addCategory(Intent.CATEGORY_HOME)
}
AndroidAppHelper.currentApplication()
.packageManager
.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY)
.let { it?.activityInfo != null }
}
else -> true
}
}

0 comments on commit cb032df

Please sign in to comment.