mirror of
https://github.com/fankes/ColorOSNotifyIcon.git
synced 2025-09-04 09:45:34 +08:00
Modify change isAppDebuggable function name to isDebugApp in FunctionFactory
This commit is contained in:
@@ -232,7 +232,7 @@ fun Context.appIconOf(packageName: String = getPackageName()) = getPackageInfoCo
|
|||||||
* @param packageName APP 包名
|
* @param packageName APP 包名
|
||||||
* @return [Boolean]
|
* @return [Boolean]
|
||||||
*/
|
*/
|
||||||
fun Context.isAppDebuggable(packageName: String) =
|
fun Context.isDebugApp(packageName: String) =
|
||||||
safeOfFalse { (getPackageInfoCompat(packageName)?.applicationInfo?.flags?.and(ApplicationInfo.FLAG_DEBUGGABLE) ?: 0) != 0 }
|
safeOfFalse { (getPackageInfoCompat(packageName)?.applicationInfo?.flags?.and(ApplicationInfo.FLAG_DEBUGGABLE) ?: 0) != 0 }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -119,7 +119,7 @@ object IconAdaptationTool {
|
|||||||
* @param packageName 安装的 APP 包名
|
* @param packageName 安装的 APP 包名
|
||||||
*/
|
*/
|
||||||
fun pushNewAppSupportNotify(context: Context, packageName: String) {
|
fun pushNewAppSupportNotify(context: Context, packageName: String) {
|
||||||
if (context.isAppDebuggable(packageName)) return
|
if (context.isDebugApp(packageName)) return
|
||||||
context.getSystemService(NotificationManager::class.java)?.apply {
|
context.getSystemService(NotificationManager::class.java)?.apply {
|
||||||
createNotificationChannel(
|
createNotificationChannel(
|
||||||
NotificationChannel(
|
NotificationChannel(
|
||||||
|
Reference in New Issue
Block a user