mirror of
https://github.com/LittleTurtle2333/SimplicityTools.git
synced 2026-07-12 11:21:18 +08:00
修复下拉天气版本识别问题
This commit is contained in:
@@ -100,8 +100,20 @@ class ControlCenterWeather : IXposedHookLoadPackage {
|
|||||||
val viewGroup = it.thisObject as ViewGroup
|
val viewGroup = it.thisObject as ViewGroup
|
||||||
val context = viewGroup.context
|
val context = viewGroup.context
|
||||||
|
|
||||||
// MIUI编译时间大于 2022-03-12 00:00:00
|
// MIUI编译时间大于 2022-03-12 00:00:00 且为内测版
|
||||||
if (SystemProperties.get(context, "ro.build.date.utc")!!.toInt() >= 1647014400) {
|
if (SystemProperties.get(context, "ro.build.date.utc")!!
|
||||||
|
.toInt() >= 1647014400 &&
|
||||||
|
|
||||||
|
!SystemProperties.get(
|
||||||
|
context,
|
||||||
|
"ro.build.version.incremental"
|
||||||
|
)!!.endsWith("DEV") &&
|
||||||
|
|
||||||
|
!SystemProperties.get(
|
||||||
|
context,
|
||||||
|
"ro.build.version.incremental"
|
||||||
|
)!!.endsWith("XM")
|
||||||
|
) {
|
||||||
//获取原组件
|
//获取原组件
|
||||||
val big_time_ID =
|
val big_time_ID =
|
||||||
context.resources.getIdentifier("big_time", "id", context.packageName)
|
context.resources.getIdentifier("big_time", "id", context.packageName)
|
||||||
@@ -251,8 +263,20 @@ class ControlCenterWeather : IXposedHookLoadPackage {
|
|||||||
val viewGroup = it.thisObject as ViewGroup
|
val viewGroup = it.thisObject as ViewGroup
|
||||||
val context = viewGroup.context
|
val context = viewGroup.context
|
||||||
val mOrientation = viewGroup.getObjectField("mOrientation") as Int
|
val mOrientation = viewGroup.getObjectField("mOrientation") as Int
|
||||||
// MIUI编译时间大于 2022-03-12 00:00:00
|
// MIUI编译时间大于 2022-03-12 00:00:00 且为内测版
|
||||||
if (SystemProperties.get(context, "ro.build.date.utc")!!.toInt() >= 1647014400) {
|
if (SystemProperties.get(context, "ro.build.date.utc")!!
|
||||||
|
.toInt() >= 1647014400 &&
|
||||||
|
|
||||||
|
!SystemProperties.get(
|
||||||
|
context,
|
||||||
|
"ro.build.version.incremental"
|
||||||
|
)!!.endsWith("DEV") &&
|
||||||
|
|
||||||
|
!SystemProperties.get(
|
||||||
|
context,
|
||||||
|
"ro.build.version.incremental"
|
||||||
|
)!!.endsWith("XM")
|
||||||
|
) {
|
||||||
if (mOrientation == 1) {
|
if (mOrientation == 1) {
|
||||||
mConstraintLayout!!.visibility = View.VISIBLE
|
mConstraintLayout!!.visibility = View.VISIBLE
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -30,8 +30,20 @@ class NotificationWeather : IXposedHookLoadPackage {
|
|||||||
val viewGroup = it.thisObject as ViewGroup
|
val viewGroup = it.thisObject as ViewGroup
|
||||||
val context = viewGroup.context
|
val context = viewGroup.context
|
||||||
|
|
||||||
// MIUI编译时间大于 2022-03-12 00:00:00
|
// MIUI编译时间大于 2022-03-12 00:00:00 且为内测版
|
||||||
if (SystemProperties.get(context, "ro.build.date.utc")!!.toInt() >= 1647014400) {
|
if (SystemProperties.get(context, "ro.build.date.utc")!!
|
||||||
|
.toInt() >= 1647014400 &&
|
||||||
|
|
||||||
|
!SystemProperties.get(
|
||||||
|
context,
|
||||||
|
"ro.build.version.incremental"
|
||||||
|
)!!.endsWith("DEV") &&
|
||||||
|
|
||||||
|
!SystemProperties.get(
|
||||||
|
context,
|
||||||
|
"ro.build.version.incremental"
|
||||||
|
)!!.endsWith("XM")
|
||||||
|
) {
|
||||||
//获取原组件
|
//获取原组件
|
||||||
val big_time_ID =
|
val big_time_ID =
|
||||||
context.resources.getIdentifier("big_time", "id", context.packageName)
|
context.resources.getIdentifier("big_time", "id", context.packageName)
|
||||||
@@ -181,8 +193,20 @@ class NotificationWeather : IXposedHookLoadPackage {
|
|||||||
val viewGroup = it.thisObject as ViewGroup
|
val viewGroup = it.thisObject as ViewGroup
|
||||||
val context = viewGroup.context
|
val context = viewGroup.context
|
||||||
val mOrientation = viewGroup.getObjectField("mOrientation") as Int
|
val mOrientation = viewGroup.getObjectField("mOrientation") as Int
|
||||||
// MIUI编译时间大于 2022-03-12 00:00:00
|
// MIUI编译时间大于 2022-03-12 00:00:00 且为内测版
|
||||||
if (SystemProperties.get(context, "ro.build.date.utc")!!.toInt() >= 1647014400) {
|
if (SystemProperties.get(context, "ro.build.date.utc")!!
|
||||||
|
.toInt() >= 1647014400 &&
|
||||||
|
|
||||||
|
!SystemProperties.get(
|
||||||
|
context,
|
||||||
|
"ro.build.version.incremental"
|
||||||
|
)!!.endsWith("DEV") &&
|
||||||
|
|
||||||
|
!SystemProperties.get(
|
||||||
|
context,
|
||||||
|
"ro.build.version.incremental"
|
||||||
|
)!!.endsWith("XM")
|
||||||
|
) {
|
||||||
if (mOrientation == 1) {
|
if (mOrientation == 1) {
|
||||||
mConstraintLayout!!.visibility = View.VISIBLE
|
mConstraintLayout!!.visibility = View.VISIBLE
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user