Skip to content

Commit 7715258

Browse files
committed
upgrade deps
1 parent 6efd37c commit 7715258

File tree

13 files changed

+24
-24
lines changed

13 files changed

+24
-24
lines changed

app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ android {
1212
// compileSdkPreview = "UpsideDownCake"
1313
namespace = "com.lt2333.simplicitytools"
1414
compileSdk = 33
15-
buildToolsVersion = "33.0.2"
15+
buildToolsVersion = "34.0.0 rc3"
1616

1717
buildFeatures {
1818
prefab = true

app/src/main/java/com/lt2333/simplicitytools/hooks/rules/all/mishare/NoAutoTurnOffForAll.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package com.lt2333.simplicitytools.hooks.rules.all.mishare
22

33
import com.github.kyuubiran.ezxhelper.init.InitFields
4+
import com.github.kyuubiran.ezxhelper.utils.Log
5+
import com.github.kyuubiran.ezxhelper.utils.findMethod
46
import com.github.kyuubiran.ezxhelper.utils.hookBefore
57
import com.lt2333.simplicitytools.utils.hasEnable
68
import com.lt2333.simplicitytools.utils.xposed.base.HookRegister
@@ -30,7 +32,6 @@ object NoAutoTurnOffForAll : HookRegister() {
3032
it.result = null
3133
}
3234
}
33-
closeDexKit()
3435

3536
// try {
3637
// // 2.15.0

app/src/main/java/com/lt2333/simplicitytools/hooks/rules/all/settings/SettingsDontThroughTheList.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
package com.lt2333.simplicitytools.hooks.rules.all.settings;
22

33
import android.annotation.SuppressLint;
4-
import android.app.AlertDialog;
54
import android.content.Context;
65
import android.content.Intent;
76
import android.os.Bundle;
8-
import android.util.Log;
97

108
import java.lang.reflect.Method;
119

app/src/main/java/com/lt2333/simplicitytools/tiles/AllowScreenshots.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class AllowScreenshots : TileService() {
2020
}
2121
prefEditor.commit()
2222
qsTile.updateTile()
23-
} catch (e: SecurityException) {
23+
} catch (_: SecurityException) {
2424
}
2525
}
2626

@@ -34,7 +34,7 @@ class AllowScreenshots : TileService() {
3434
qsTile.state = Tile.STATE_INACTIVE
3535
}
3636
qsTile.updateTile()
37-
} catch (e: SecurityException) {
37+
} catch (_: SecurityException) {
3838
}
3939
}
4040
}

app/src/main/java/com/lt2333/simplicitytools/tiles/LockMaxFpsTile.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class LockMaxFpsTile : TileService() {
2121
}
2222
prefEditor.commit()
2323
qsTile.updateTile()
24-
} catch (e: SecurityException) {
24+
} catch (_: SecurityException) {
2525
}
2626
}
2727

@@ -35,7 +35,7 @@ class LockMaxFpsTile : TileService() {
3535
qsTile.state = Tile.STATE_INACTIVE
3636
}
3737
qsTile.updateTile()
38-
} catch (e: SecurityException) {
38+
} catch (_: SecurityException) {
3939
}
4040
}
4141
}

app/src/main/java/com/lt2333/simplicitytools/utils/Yife/Terminal.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ object Terminal {
2626
val buffer = CharArray(4096)
2727
val output = StringBuilder()
2828
while (reader.read(buffer).also { read = it } > 0) {
29-
output.append(buffer, 0, read)
29+
output.appendRange(buffer, 0, read)
3030
}
3131
process.waitFor()
3232
output.toString()

app/src/main/java/com/lt2333/simplicitytools/utils/wini/ColorUtils.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,33 @@ object ColorUtils {
1818
val green = (originalColor.green() * 255).toInt()
1919
val blue = (originalColor.blue() * 255).toInt()
2020
val alphaHex = if (alpha <= 15) {
21-
'0' + alpha.toString()
21+
"0$alpha"
2222
} else {
2323
alpha.toString(16)
2424
}
2525
val redHex = if (red <= 15) {
26-
'0' + red.toString()
26+
"0$red"
2727
} else {
2828
red.toString(16)
2929
}
3030
val greenHex = if (green <= 15) {
31-
'0' + green.toString()
31+
"0$green"
3232
} else {
3333
green.toString(16)
3434
}
3535
val blueHex = if (blue <= 15) {
36-
'0' + blue.toString()
36+
"0$blue"
3737
} else {
3838
blue.toString(16)
3939
}
4040
return "#$alphaHex$redHex$greenHex$blueHex".uppercase()
4141
}
4242

4343
fun hexToColor(hexString: String): Int {
44-
try {
45-
return Color.parseColor(hexString)
44+
return try {
45+
Color.parseColor(hexString)
4646
} catch (e: Throwable) {
47-
return defaultReturnColor
47+
defaultReturnColor
4848
}
4949
}
5050

app/src/main/java/com/lt2333/simplicitytools/utils/wini/HookUtils.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import de.robv.android.xposed.XposedHelpers
99

1010
object HookUtils {
1111
fun log(content: Any?) {
12-
XposedBridge.log("[WINI]" + content)
12+
XposedBridge.log("[WINI]$content")
1313
}
1414

1515
fun dip2px(context: Context, dpValue: Float): Float {
@@ -23,7 +23,7 @@ object HookUtils {
2323
classLoader
2424
)
2525
if (result == null) {
26-
log("'" + className + "' is NOT found.")
26+
log("'$className' is NOT found.")
2727
}
2828
return result
2929
}
@@ -92,7 +92,7 @@ object HookUtils {
9292
}
9393
return blurDrawable
9494
} catch (e: Throwable) {
95-
log("Create BlurDrawable Error:" + e)
95+
log("Create BlurDrawable Error:$e")
9696
return null
9797
}
9898
}

app/src/main/java/com/lt2333/simplicitytools/utils/xposed/base/AppRegister.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ abstract class AppRegister: IXposedHookLoadPackage, IXposedHookInitPackageResour
3030

3131
protected fun autoInitResourcesHooks(resparam: XC_InitPackageResources.InitPackageResourcesParam, vararg hook: ResourcesHookRegister) {
3232
hook.also {
33+
Log.ix("WooBox: Try to Hook [$packageName]")
3334
}.forEach {
3435
runCatching {
3536
if (it.isInit) return@forEach

app/src/main/java/com/lt2333/simplicitytools/views/WeatherData.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class WeatherData(val context: Context?, private val showCity: Boolean) {
6161
}
6262
query.close()
6363
}
64-
} catch (e: Exception) {
64+
} catch (_: Exception) {
6565

6666
}
6767
val obtainMessage2 = mHandler.obtainMessage()

0 commit comments

Comments
 (0)