mirror of
				https://github.com/fankes/MIUINativeNotifyIcon.git
				synced 2025-10-26 15:39:21 +08:00 
			
		
		
		
	Update Gradle & Kotlin & PlatformSDK
- Update Kotlin version to 1.7.0 - Update Gradle dependencies - Merge legacy code
This commit is contained in:
		| @@ -27,7 +27,7 @@ package com.fankes.miui.notify.ui.activity.base | ||||
| import android.os.Bundle | ||||
| import androidx.appcompat.app.AppCompatActivity | ||||
| import androidx.core.content.res.ResourcesCompat | ||||
| import androidx.core.view.ViewCompat | ||||
| import androidx.core.view.WindowCompat | ||||
| import androidx.viewbinding.ViewBinding | ||||
| import com.fankes.miui.notify.R | ||||
| import com.fankes.miui.notify.utils.factory.isNotSystemInDarkMode | ||||
| @@ -61,7 +61,7 @@ abstract class BaseActivity<VB : ViewBinding> : AppCompatActivity() { | ||||
|         /** 隐藏系统的标题栏 */ | ||||
|         supportActionBar?.hide() | ||||
|         /** 初始化沉浸状态栏 */ | ||||
|         ViewCompat.getWindowInsetsController(window.decorView)?.apply { | ||||
|         WindowCompat.getInsetsController(window, window.decorView).apply { | ||||
|             isAppearanceLightStatusBars = isNotSystemInDarkMode | ||||
|             isAppearanceLightNavigationBars = isNotSystemInDarkMode | ||||
|         } | ||||
|   | ||||
| @@ -20,7 +20,7 @@ | ||||
|  * | ||||
|  * This file is Created by fankes on 2022/1/8. | ||||
|  */ | ||||
| @file:Suppress("DEPRECATION", "CanvasSize") | ||||
| @file:Suppress("DEPRECATION", "CanvasSize", "OVERRIDE_DEPRECATION") | ||||
|  | ||||
| package com.fankes.miui.notify.utils.drawable.drawabletoolbox | ||||
|  | ||||
|   | ||||
| @@ -61,7 +61,7 @@ object GithubReleaseTool { | ||||
|             override fun onFailure(call: Call, e: IOException) {} | ||||
|  | ||||
|             override fun onResponse(call: Call, response: Response) = runInSafe { | ||||
|                 JSONObject(response.body?.string() ?: "").apply { | ||||
|                 JSONObject(response.body.string()).apply { | ||||
|                     GithubReleaseBean( | ||||
|                         name = getString("name"), | ||||
|                         htmlUrl = getString("html_url"), | ||||
|   | ||||
| @@ -343,7 +343,7 @@ object IconRuleManagerTool { | ||||
|             } | ||||
|  | ||||
|             override fun onResponse(call: Call, response: Response) { | ||||
|                 val bodyString = response.body?.string() ?: "" | ||||
|                 val bodyString = response.body.string() | ||||
|                 (context as? Activity?)?.runOnUiThread { result(true, bodyString) } ?: result(true, bodyString) | ||||
|             } | ||||
|         }) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user