From 5cbfdac0db45075c39b7ffecd840d700f803c24e Mon Sep 17 00:00:00 2001 From: sollyu Date: Wed, 13 Dec 2017 14:40:26 +0800 Subject: [PATCH 1/2] add phone database. --- app/src/main/assets/app.env.phone.json | 413 +++++++++++++++++ .../appenv/activitys/ActivityDetail.kt | 12 +- .../appenv/activitys/ActivitySettings.kt | 2 +- .../appenv/activitys/ActivitySplash.kt | 2 - .../android/appenv/commons/Application.kt | 7 + .../sollyu/android/appenv/commons/Random.kt | 11 - app/src/main/res/values-zh/strings.xml | 2 +- online/app.env.phone.json | 419 +++++++++++++++++- 8 files changed, 832 insertions(+), 36 deletions(-) create mode 100644 app/src/main/assets/app.env.phone.json diff --git a/app/src/main/assets/app.env.phone.json b/app/src/main/assets/app.env.phone.json new file mode 100644 index 0000000..a5543a7 --- /dev/null +++ b/app/src/main/assets/app.env.phone.json @@ -0,0 +1,413 @@ +{ + "VersionCode": 3, + "VersionName": "1.0.2", + "VersionCont": "增加了N多的手机机型", + "PhoneList": { + "华为": [ + { + "phoneName": "荣耀7i", + "buildManufacturer": "HUAWEI", + "buildModel": "ATH-AL00" + }, + { + "phoneName": "荣耀6至尊版", + "buildManufacturer": "HUAWEI", + "buildModel": "H60-L21" + }, + { + "phoneName": "荣耀6 Plus", + "buildManufacturer": "HUAWEI", + "buildModel": "PE-TL10" + }, + { + "phoneName": "P10", + "buildManufacturer": "HUAWEI", + "buildModel": "VTR-AL00" + }, + { + "phoneName": "P10 Plus", + "buildManufacturer": "HUAWEI", + "buildModel": "VKY-AL00" + } + ], + "联想": [ + { + "phoneName": "联想K3", + "buildManufacturer": "Lenovo", + "buildModel": "Lenovo K30-T" + } + ], + "乐视": [ + { + "phoneName": "乐视2", + "buildManufacturer": "LeMobile", + "buildModel": "Le X620" + }, + { + "phoneName": "乐视2 Pro", + "buildManufacturer": "LeMobile", + "buildModel": "Le X525" + }, + { + "phoneName": "乐视1", + "buildManufacturer": "Letv", + "buildModel": "X600" + }, + { + "phoneName": "乐视1 Pro", + "buildManufacturer": "Letv", + "buildModel": "X800+" + }, + { + "phoneName": "乐视1 S", + "buildManufacturer": "Letv", + "buildModel": "Letv X500" + }, + { + "phoneName": "乐视1 S 太子妃版", + "buildManufacturer": "Letv", + "buildModel": "Letv X501" + } + ], + "HTC": [ + { + "phoneName": "HTC One M9", + "buildManufacturer": "HTC", + "buildModel": "HTC M9e" + }, + { + "phoneName": "HTC One A9", + "buildManufacturer": "HTC", + "buildModel": "HTC One A9" + } + ], + "OPPO": [ + { + "phoneName": "OPPO R9", + "buildManufacturer": "OPPO", + "buildModel": "OPPO R9m" + }, + { + "phoneName": "OPPO Find7", + "buildManufacturer": "OPPO", + "buildModel": "x9007" + }, + { + "phoneName": "OPPO Find5", + "buildManufacturer": "OPPO", + "buildModel": "x909t" + }, + { + "phoneName": "OPPO R7", + "buildManufacturer": "OPPO", + "buildModel": "OPPO R7" + }, + { + "phoneName": "OPPO R7S", + "buildManufacturer": "OPPO", + "buildModel": "OPPO R7S" + } + ], + "锤子": [ + { + "phoneName": "锤子 T1", + "buildManufacturer": "Smartisan", + "buildModel": "SM705" + }, + { + "phoneName": "锤子 T2", + "buildManufacturer": "Smartisan", + "buildModel": "SM801" + }, + { + "phoneName": "坚果", + "buildManufacturer": "Smartisan", + "buildModel": "YQ601" + }, + { + "phoneName": "锤子 T3", + "buildManufacturer": "Smartisan", + "buildModel": "SM901" + } + ], + "小米": [ + { + "phoneName": "小米2S", + "buildManufacturer": "Xiaomi", + "buildModel": "MI 2S" + }, + { + "phoneName": "小米3", + "buildManufacturer": "Xiaomi", + "buildModel": "MI 3" + }, + { + "phoneName": "小米4", + "buildManufacturer": "Xiaomi", + "buildModel": "MI 4LTE" + }, + { + "phoneName": "小米4C", + "buildManufacturer": "Xiaomi", + "buildModel": "MI-4C" + }, + { + "phoneName": "小米4S", + "buildManufacturer": "Xiaomi", + "buildModel": "MI 4S" + }, + { + "phoneName": "小米5", + "buildManufacturer": "Xiaomi", + "buildModel": "MI 5" + }, + { + "phoneName": "小米NOTE", + "buildManufacturer": "Xiaomi", + "buildModel": "MI NOTE LTE" + }, + { + "phoneName": "小米MAX", + "buildManufacturer": "Xiaomi", + "buildModel": "MI MAX" + }, + { + "phoneName": "小米NOTE 2", + "buildManufacturer": "Xiaomi", + "buildModel": "MI NOTE 2" + }, + { + "phoneName": "小米NOTE 顶配版", + "buildManufacturer": "Xiaomi", + "buildModel": "MI NOTE PRO" + }, + { + "phoneName": "红米Note3", + "buildManufacturer": "Xiaomi", + "buildModel": "Redmi Note 3" + }, + { + "phoneName": "小米平板2", + "buildManufacturer": "Xiaomi", + "buildModel": "MI Pad 2" + }, + { + "phoneName": "小米5S", + "buildManufacturer": "Xiaomi", + "buildModel": "2016080 " + }, + { + "phoneName": "小米 Note 4", + "buildManufacturer": "Xiaomi", + "buildModel": "2016060" + }, + { + "phoneName": "小米MIX", + "buildManufacturer": "Xiaomi", + "buildModel": "MIX" + } + ], + "一加": [ + { + "phoneName": "一加手机1", + "buildManufacturer": "OnePlus", + "buildModel": "A1001" + }, + { + "phoneName": "一加手机2", + "buildManufacturer": "OnePlus", + "buildModel": "ONE A2001" + }, + { + "phoneName": "一加手机3", + "buildManufacturer": "OnePlus", + "buildModel": "OnePlus A3000" + } + ], + "中兴": [ + { + "phoneName": "中兴 AXON 天机 MAX", + "buildManufacturer": "ZTE", + "buildModel": "ZTE C2016" + }, + { + "phoneName": "中兴 AXON 天机 MINI", + "buildManufacturer": "ZTE", + "buildModel": "ZTE B2015" + }, + { + "phoneName": "中兴 AXON 天机", + "buildManufacturer": "ZTE", + "buildModel": "ZTE A2015" + }, + { + "phoneName": "中兴 星星2号", + "buildManufacturer": "ZTE", + "buildModel": "ZTE G720C" + }, + { + "phoneName": "努比亚Z11 mini全网通", + "buildManufacturer": "ZTE", + "buildModel": "NX529J" + }, + { + "phoneName": "努比亚大牛 Z9 Max", + "buildManufacturer": "ZTE", + "buildModel": "NX512J" + }, + { + "phoneName": "努比亚小牛4 Z9 Mini", + "buildManufacturer": "ZTE", + "buildModel": "NX511J" + }, + { + "phoneName": "ZTE国民指纹机BladeA1", + "buildManufacturer": "ZTE", + "buildModel": "ZTE C880U" + } + ], + "格力": [ + { + "phoneName": "格力手机1", + "buildManufacturer": "GREE", + "buildModel": "G0111" + }, + { + "phoneName": "格力手机1s", + "buildManufacturer": "GREE", + "buildModel": "G0121" + }, + { + "phoneName": "格力手机2", + "buildManufacturer": "GREE", + "buildModel": "G0128" + } + ], + "魅族": [ + { + "phoneName": "MX2", + "buildManufacturer": "Meizu", + "buildModel": "MX2" + }, + { + "phoneName": "MX3", + "buildManufacturer": "Meizu", + "buildModel": "M355" + }, + { + "phoneName": "MX4", + "buildManufacturer": "Meizu", + "buildModel": "MX4" + }, + { + "phoneName": "MX4 Pro", + "buildManufacturer": "Meizu", + "buildModel": "MX4 Pro" + }, + { + "phoneName": "MX5", + "buildManufacturer": "Meizu", + "buildModel": "M575M" + }, + { + "phoneName": "PRO 6", + "buildManufacturer": "Meizu", + "buildModel": "PRO 6" + }, + { + "phoneName": "魅蓝3", + "buildManufacturer": "Meizu", + "buildModel": "魅蓝3" + }, + { + "phoneName": "魅蓝 note", + "buildManufacturer": "Meizu", + "buildModel": "m1 note" + }, + { + "phoneName": "魅蓝3 note", + "buildManufacturer": "Meizu", + "buildModel": "m3 note" + }, + { + "phoneName": "魅蓝metal", + "buildManufacturer": "Meizu", + "buildModel": "m1 metal" + } + ], + "三星": [ + { + "phoneName": "Galaxy S6 Edge+", + "buildManufacturer": "samsung", + "buildModel": "SM-G9280" + }, + { + "phoneName": "Galaxy Note7", + "buildManufacturer": "samsung", + "buildModel": "SM-N9300" + }, + { + "phoneName": "Galaxy S7 edge", + "buildManufacturer": "samsung", + "buildModel": "SM-G9350" + }, + { + "phoneName": "Galaxy S7", + "buildManufacturer": "samsung", + "buildModel": "SM-G9300" + }, + { + "phoneName": "Galaxy S8", + "buildManufacturer": "samsung", + "buildModel": "SM-G9500" + }, + { + "phoneName": "Galaxy S8+", + "buildManufacturer": "samsung", + "buildModel": "SM-G9550" + }, + { + "phoneName": "Galaxy C7", + "buildManufacturer": "samsung", + "buildModel": "SM-W2017 " + }, + { + "phoneName": "Galaxy ON5", + "buildManufacturer": "samsung", + "buildModel": "SM-G5520" + }, + { + "phoneName": "Galaxy ON5", + "buildManufacturer": "samsung", + "buildModel": "SM-G5520" + }, + { + "phoneName": "Galaxy C9 Pro", + "buildManufacturer": "samsung", + "buildModel": "SM-C9000" + } + ], + "索尼": [ + { + "phoneName": "Xperia Z3", + "buildManufacturer": "Sony", + "buildModel": "L55t" + }, + { + "phoneName": "Xperia Z5 Premium", + "buildManufacturer": "Sony", + "buildModel": "E6883" + }, + { + "phoneName": "Xperia Z5", + "buildManufacturer": "Sony", + "buildModel": "E6683" + }, + { + "phoneName": "Xperia Z3+", + "buildManufacturer": "Sony", + "buildModel": "E6533" + } + ] + } +} \ No newline at end of file diff --git a/app/src/main/java/com/sollyu/android/appenv/activitys/ActivityDetail.kt b/app/src/main/java/com/sollyu/android/appenv/activitys/ActivityDetail.kt index 3e0f136..626062d 100644 --- a/app/src/main/java/com/sollyu/android/appenv/activitys/ActivityDetail.kt +++ b/app/src/main/java/com/sollyu/android/appenv/activitys/ActivityDetail.kt @@ -9,7 +9,6 @@ package com.sollyu.android.appenv.activitys import android.app.Activity -import android.app.ProgressDialog.show import android.content.Intent import android.content.pm.ApplicationInfo import android.net.Uri @@ -37,10 +36,6 @@ import org.greenrobot.eventbus.EventBus import org.xutils.view.annotation.Event import org.xutils.x import java.util.* -import android.support.v4.content.ContextCompat.startActivity -import android.os.Build -import android.provider.Settings -import com.sollyu.android.appenv.R.id.fab @Suppress("unused") @@ -142,6 +137,7 @@ class ActivityDetail : ActivityBase() { R.id.menuSolutionSave -> { this.onItemClickSolutionSave() } R.id.menuSolutionLoad -> { this.onItemClickSolutionLoad() } R.id.menuSolutionDele -> { this.onItemClickSolutionDelete()} + R.id.menuRemoteRandom -> { this.onItemClickRemoteRandom() } } return super.onOptionsItemSelected(item) } @@ -198,7 +194,7 @@ class ActivityDetail : ActivityBase() { } - fun uiToJsonObject(): JSONObject { + private fun uiToJsonObject(): JSONObject { val jsonObject = JSONObject() jsonObject.put("android.os.Build.ro.product.manufacturer", oieBuildManufacturer.rightEditText.toString(), true) jsonObject.put("android.os.Build.ro.product.model" , oieBuildModel.rightEditText.toString() , true) @@ -474,6 +470,10 @@ class ActivityDetail : ActivityBase() { .show() } + private fun onItemClickRemoteRandom() { + Snackbar.make(fab, "后台维护中……", Snackbar.LENGTH_LONG).show() + } + private fun JSONObject.put(key: String, value: String, boolean: Boolean) { if (value.isEmpty() && boolean) this.remove(key) diff --git a/app/src/main/java/com/sollyu/android/appenv/activitys/ActivitySettings.kt b/app/src/main/java/com/sollyu/android/appenv/activitys/ActivitySettings.kt index 8d990e4..ab5448f 100644 --- a/app/src/main/java/com/sollyu/android/appenv/activitys/ActivitySettings.kt +++ b/app/src/main/java/com/sollyu/android/appenv/activitys/ActivitySettings.kt @@ -195,7 +195,7 @@ class ActivitySettings : ActivityBase() { .onPositive { _, _ -> FileUtils.writeStringToFile(Phones.Instance.phoneFile, JSON.toJSONString(contentJson, true), "UTF-8") Phones.Reload() - oivUpdatePhoneList.setRightText(Phones.Instance.versionCode) + oivUpdatePhoneList.setRightText(Phones.Instance.versionCode.toString()) Snackbar.make(oivLicence, R.string.settings_update_phone_success, Snackbar.LENGTH_LONG).show() } .show() diff --git a/app/src/main/java/com/sollyu/android/appenv/activitys/ActivitySplash.kt b/app/src/main/java/com/sollyu/android/appenv/activitys/ActivitySplash.kt index 4c5ba6d..10a88cb 100644 --- a/app/src/main/java/com/sollyu/android/appenv/activitys/ActivitySplash.kt +++ b/app/src/main/java/com/sollyu/android/appenv/activitys/ActivitySplash.kt @@ -32,9 +32,7 @@ class ActivitySplash : ActivityBase(), Runnable { .title(R.string.splash_xposed_not_work_title) .content(R.string.splash_xposed_not_work_content) .positiveText(android.R.string.ok) - .onPositive { _, _ -> activity.finish() } .show() - return } diff --git a/app/src/main/java/com/sollyu/android/appenv/commons/Application.kt b/app/src/main/java/com/sollyu/android/appenv/commons/Application.kt index a801460..16f34cd 100644 --- a/app/src/main/java/com/sollyu/android/appenv/commons/Application.kt +++ b/app/src/main/java/com/sollyu/android/appenv/commons/Application.kt @@ -22,6 +22,8 @@ import com.sollyu.android.appenv.BuildConfig import com.sollyu.android.not.proguard.NotProguard import com.umeng.analytics.MobclickAgent import com.umeng.commonsdk.UMConfigure +import org.apache.commons.io.FileUtils +import org.apache.commons.io.IOUtils import org.apache.commons.text.CharacterPredicates import org.apache.commons.text.RandomStringGenerator @@ -60,6 +62,11 @@ class Application : android.app.Application(), Thread.UncaughtExceptionHandler { // 友盟统计 UMConfigure.init(Instance, "558a1cb667e58e7649000228", BuildConfig.FLAVOR, MobclickAgent.EScenarioType.E_UM_NORMAL.toValue(), "") + + // 初始化机型 + if (!Phones.Instance.phoneFile.exists()) { + FileUtils.writeStringToFile(Phones.Instance.phoneFile, IOUtils.toString(Instance.assets.open("app.env.phone.json"), "UTF-8"), "UTF-8") + } } override fun uncaughtException(t: Thread?, throwable: Throwable?) { diff --git a/app/src/main/java/com/sollyu/android/appenv/commons/Random.kt b/app/src/main/java/com/sollyu/android/appenv/commons/Random.kt index 701a5b8..124ec33 100644 --- a/app/src/main/java/com/sollyu/android/appenv/commons/Random.kt +++ b/app/src/main/java/com/sollyu/android/appenv/commons/Random.kt @@ -31,17 +31,6 @@ class Random { fun New(): Random { return Random() } - - /** - * @param min 最小 - * @param max 最大 - * @return 随机数 - * @author sollyu - */ - fun Int(min: Int, max:Int): Int { - return java.util.Random().nextInt(max + 1 - min) + min - } - } enum class ANDROID_VERSION(val versionName: String, val versionCode: Int) { diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index b0bb34c..ac7ee3e 100644 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -22,7 +22,7 @@ 云端 设置 刷新 - Xposed貌似并没有工作\n请检查您的Xposed的状态 + Xposed貌似没有工作\n您所做的一切都将无效 退出 提示 设置 diff --git a/online/app.env.phone.json b/online/app.env.phone.json index 0c5d497..a5543a7 100644 --- a/online/app.env.phone.json +++ b/online/app.env.phone.json @@ -1,24 +1,413 @@ { - "PhoneList":{ - "xiaomi":[ + "VersionCode": 3, + "VersionName": "1.0.2", + "VersionCont": "增加了N多的手机机型", + "PhoneList": { + "华为": [ { - "buildManufacturer":"Xiaomi", - "buildModel":"mi 3", - "phoneName":"小米3" + "phoneName": "荣耀7i", + "buildManufacturer": "HUAWEI", + "buildModel": "ATH-AL00" }, { - "buildManufacturer":"Xiaomi", - "buildModel":"mi 2", - "phoneName":"小米2" + "phoneName": "荣耀6至尊版", + "buildManufacturer": "HUAWEI", + "buildModel": "H60-L21" }, { - "buildManufacturer":"Xiaomi", - "buildModel":"mi 1", - "phoneName":"小米1" + "phoneName": "荣耀6 Plus", + "buildManufacturer": "HUAWEI", + "buildModel": "PE-TL10" + }, + { + "phoneName": "P10", + "buildManufacturer": "HUAWEI", + "buildModel": "VTR-AL00" + }, + { + "phoneName": "P10 Plus", + "buildManufacturer": "HUAWEI", + "buildModel": "VKY-AL00" + } + ], + "联想": [ + { + "phoneName": "联想K3", + "buildManufacturer": "Lenovo", + "buildModel": "Lenovo K30-T" + } + ], + "乐视": [ + { + "phoneName": "乐视2", + "buildManufacturer": "LeMobile", + "buildModel": "Le X620" + }, + { + "phoneName": "乐视2 Pro", + "buildManufacturer": "LeMobile", + "buildModel": "Le X525" + }, + { + "phoneName": "乐视1", + "buildManufacturer": "Letv", + "buildModel": "X600" + }, + { + "phoneName": "乐视1 Pro", + "buildManufacturer": "Letv", + "buildModel": "X800+" + }, + { + "phoneName": "乐视1 S", + "buildManufacturer": "Letv", + "buildModel": "Letv X500" + }, + { + "phoneName": "乐视1 S 太子妃版", + "buildManufacturer": "Letv", + "buildModel": "Letv X501" + } + ], + "HTC": [ + { + "phoneName": "HTC One M9", + "buildManufacturer": "HTC", + "buildModel": "HTC M9e" + }, + { + "phoneName": "HTC One A9", + "buildManufacturer": "HTC", + "buildModel": "HTC One A9" + } + ], + "OPPO": [ + { + "phoneName": "OPPO R9", + "buildManufacturer": "OPPO", + "buildModel": "OPPO R9m" + }, + { + "phoneName": "OPPO Find7", + "buildManufacturer": "OPPO", + "buildModel": "x9007" + }, + { + "phoneName": "OPPO Find5", + "buildManufacturer": "OPPO", + "buildModel": "x909t" + }, + { + "phoneName": "OPPO R7", + "buildManufacturer": "OPPO", + "buildModel": "OPPO R7" + }, + { + "phoneName": "OPPO R7S", + "buildManufacturer": "OPPO", + "buildModel": "OPPO R7S" + } + ], + "锤子": [ + { + "phoneName": "锤子 T1", + "buildManufacturer": "Smartisan", + "buildModel": "SM705" + }, + { + "phoneName": "锤子 T2", + "buildManufacturer": "Smartisan", + "buildModel": "SM801" + }, + { + "phoneName": "坚果", + "buildManufacturer": "Smartisan", + "buildModel": "YQ601" + }, + { + "phoneName": "锤子 T3", + "buildManufacturer": "Smartisan", + "buildModel": "SM901" + } + ], + "小米": [ + { + "phoneName": "小米2S", + "buildManufacturer": "Xiaomi", + "buildModel": "MI 2S" + }, + { + "phoneName": "小米3", + "buildManufacturer": "Xiaomi", + "buildModel": "MI 3" + }, + { + "phoneName": "小米4", + "buildManufacturer": "Xiaomi", + "buildModel": "MI 4LTE" + }, + { + "phoneName": "小米4C", + "buildManufacturer": "Xiaomi", + "buildModel": "MI-4C" + }, + { + "phoneName": "小米4S", + "buildManufacturer": "Xiaomi", + "buildModel": "MI 4S" + }, + { + "phoneName": "小米5", + "buildManufacturer": "Xiaomi", + "buildModel": "MI 5" + }, + { + "phoneName": "小米NOTE", + "buildManufacturer": "Xiaomi", + "buildModel": "MI NOTE LTE" + }, + { + "phoneName": "小米MAX", + "buildManufacturer": "Xiaomi", + "buildModel": "MI MAX" + }, + { + "phoneName": "小米NOTE 2", + "buildManufacturer": "Xiaomi", + "buildModel": "MI NOTE 2" + }, + { + "phoneName": "小米NOTE 顶配版", + "buildManufacturer": "Xiaomi", + "buildModel": "MI NOTE PRO" + }, + { + "phoneName": "红米Note3", + "buildManufacturer": "Xiaomi", + "buildModel": "Redmi Note 3" + }, + { + "phoneName": "小米平板2", + "buildManufacturer": "Xiaomi", + "buildModel": "MI Pad 2" + }, + { + "phoneName": "小米5S", + "buildManufacturer": "Xiaomi", + "buildModel": "2016080 " + }, + { + "phoneName": "小米 Note 4", + "buildManufacturer": "Xiaomi", + "buildModel": "2016060" + }, + { + "phoneName": "小米MIX", + "buildManufacturer": "Xiaomi", + "buildModel": "MIX" + } + ], + "一加": [ + { + "phoneName": "一加手机1", + "buildManufacturer": "OnePlus", + "buildModel": "A1001" + }, + { + "phoneName": "一加手机2", + "buildManufacturer": "OnePlus", + "buildModel": "ONE A2001" + }, + { + "phoneName": "一加手机3", + "buildManufacturer": "OnePlus", + "buildModel": "OnePlus A3000" + } + ], + "中兴": [ + { + "phoneName": "中兴 AXON 天机 MAX", + "buildManufacturer": "ZTE", + "buildModel": "ZTE C2016" + }, + { + "phoneName": "中兴 AXON 天机 MINI", + "buildManufacturer": "ZTE", + "buildModel": "ZTE B2015" + }, + { + "phoneName": "中兴 AXON 天机", + "buildManufacturer": "ZTE", + "buildModel": "ZTE A2015" + }, + { + "phoneName": "中兴 星星2号", + "buildManufacturer": "ZTE", + "buildModel": "ZTE G720C" + }, + { + "phoneName": "努比亚Z11 mini全网通", + "buildManufacturer": "ZTE", + "buildModel": "NX529J" + }, + { + "phoneName": "努比亚大牛 Z9 Max", + "buildManufacturer": "ZTE", + "buildModel": "NX512J" + }, + { + "phoneName": "努比亚小牛4 Z9 Mini", + "buildManufacturer": "ZTE", + "buildModel": "NX511J" + }, + { + "phoneName": "ZTE国民指纹机BladeA1", + "buildManufacturer": "ZTE", + "buildModel": "ZTE C880U" + } + ], + "格力": [ + { + "phoneName": "格力手机1", + "buildManufacturer": "GREE", + "buildModel": "G0111" + }, + { + "phoneName": "格力手机1s", + "buildManufacturer": "GREE", + "buildModel": "G0121" + }, + { + "phoneName": "格力手机2", + "buildManufacturer": "GREE", + "buildModel": "G0128" + } + ], + "魅族": [ + { + "phoneName": "MX2", + "buildManufacturer": "Meizu", + "buildModel": "MX2" + }, + { + "phoneName": "MX3", + "buildManufacturer": "Meizu", + "buildModel": "M355" + }, + { + "phoneName": "MX4", + "buildManufacturer": "Meizu", + "buildModel": "MX4" + }, + { + "phoneName": "MX4 Pro", + "buildManufacturer": "Meizu", + "buildModel": "MX4 Pro" + }, + { + "phoneName": "MX5", + "buildManufacturer": "Meizu", + "buildModel": "M575M" + }, + { + "phoneName": "PRO 6", + "buildManufacturer": "Meizu", + "buildModel": "PRO 6" + }, + { + "phoneName": "魅蓝3", + "buildManufacturer": "Meizu", + "buildModel": "魅蓝3" + }, + { + "phoneName": "魅蓝 note", + "buildManufacturer": "Meizu", + "buildModel": "m1 note" + }, + { + "phoneName": "魅蓝3 note", + "buildManufacturer": "Meizu", + "buildModel": "m3 note" + }, + { + "phoneName": "魅蓝metal", + "buildManufacturer": "Meizu", + "buildModel": "m1 metal" + } + ], + "三星": [ + { + "phoneName": "Galaxy S6 Edge+", + "buildManufacturer": "samsung", + "buildModel": "SM-G9280" + }, + { + "phoneName": "Galaxy Note7", + "buildManufacturer": "samsung", + "buildModel": "SM-N9300" + }, + { + "phoneName": "Galaxy S7 edge", + "buildManufacturer": "samsung", + "buildModel": "SM-G9350" + }, + { + "phoneName": "Galaxy S7", + "buildManufacturer": "samsung", + "buildModel": "SM-G9300" + }, + { + "phoneName": "Galaxy S8", + "buildManufacturer": "samsung", + "buildModel": "SM-G9500" + }, + { + "phoneName": "Galaxy S8+", + "buildManufacturer": "samsung", + "buildModel": "SM-G9550" + }, + { + "phoneName": "Galaxy C7", + "buildManufacturer": "samsung", + "buildModel": "SM-W2017 " + }, + { + "phoneName": "Galaxy ON5", + "buildManufacturer": "samsung", + "buildModel": "SM-G5520" + }, + { + "phoneName": "Galaxy ON5", + "buildManufacturer": "samsung", + "buildModel": "SM-G5520" + }, + { + "phoneName": "Galaxy C9 Pro", + "buildManufacturer": "samsung", + "buildModel": "SM-C9000" + } + ], + "索尼": [ + { + "phoneName": "Xperia Z3", + "buildManufacturer": "Sony", + "buildModel": "L55t" + }, + { + "phoneName": "Xperia Z5 Premium", + "buildManufacturer": "Sony", + "buildModel": "E6883" + }, + { + "phoneName": "Xperia Z5", + "buildManufacturer": "Sony", + "buildModel": "E6683" + }, + { + "phoneName": "Xperia Z3+", + "buildManufacturer": "Sony", + "buildModel": "E6533" } ] - }, - "VersionCode":2, - "VersionName":"1.0.1", - "VersionCont":"更新内容" + } } \ No newline at end of file From ef28387743cdd42e44dc2f561a6beeafb4a405e7 Mon Sep 17 00:00:00 2001 From: sollyu Date: Wed, 13 Dec 2017 15:08:55 +0800 Subject: [PATCH 2/2] fix bugs. --- app/build.gradle | 4 ++-- .../android/appenv/activitys/ActivitySettings.kt | 9 +++++++++ .../sollyu/android/appenv/activitys/ActivitySplash.kt | 3 ++- .../com/sollyu/android/appenv/commons/Application.kt | 1 + app/src/main/res/layout/activity_settings.xml | 10 +++++++++- app/src/main/res/values-zh/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + online/app.env.soft.json | 2 +- 8 files changed, 26 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index adc05d5..aa45fa8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -22,8 +22,8 @@ android { applicationId "com.sollyu.xposed.hook.model" minSdkVersion 15 targetSdkVersion 26 - versionCode 582 - versionName "3.2.1" + getGitVersion() + versionCode 583 + versionName "3.2.2" + getGitVersion() } buildTypes { release { diff --git a/app/src/main/java/com/sollyu/android/appenv/activitys/ActivitySettings.kt b/app/src/main/java/com/sollyu/android/appenv/activitys/ActivitySettings.kt index ab5448f..f198c56 100644 --- a/app/src/main/java/com/sollyu/android/appenv/activitys/ActivitySettings.kt +++ b/app/src/main/java/com/sollyu/android/appenv/activitys/ActivitySettings.kt @@ -173,6 +173,15 @@ class ActivitySettings : ActivityBase() { }) } + @Event(R.id.oivThinks) + private fun onBtnClickThinks(view: View) { + MaterialDialog.Builder(activity) + .title(R.string.settings_thinks). + items(arrayListOf("jfa2008@gmail.com")) + .positiveText(android.R.string.ok) + .show() + } + @Event(R.id.oivUpdatePhoneList) private fun onBtnClickUpdatePhoneList(@Suppress("UNUSED_PARAMETER") view: View) { val materialDialog = MaterialDialog.Builder(activity).title(R.string.tip).content(R.string.settings_update_progress).progress(true, 0).cancelable(false).show() diff --git a/app/src/main/java/com/sollyu/android/appenv/activitys/ActivitySplash.kt b/app/src/main/java/com/sollyu/android/appenv/activitys/ActivitySplash.kt index 10a88cb..0495ed0 100644 --- a/app/src/main/java/com/sollyu/android/appenv/activitys/ActivitySplash.kt +++ b/app/src/main/java/com/sollyu/android/appenv/activitys/ActivitySplash.kt @@ -26,12 +26,13 @@ class ActivitySplash : ActivityBase(), Runnable { override fun run() { /* Xposed 没有成功的状态 */ - if (!BuildConfig.DEBUG && !Application.Instance.isXposedWork()) { + if (!Application.Instance.isXposedWork()) { MaterialDialog .Builder(activity) .title(R.string.splash_xposed_not_work_title) .content(R.string.splash_xposed_not_work_content) .positiveText(android.R.string.ok) + .onPositive { _, _ -> ActivityMain.launch(activity) } .show() return } diff --git a/app/src/main/java/com/sollyu/android/appenv/commons/Application.kt b/app/src/main/java/com/sollyu/android/appenv/commons/Application.kt index 16f34cd..f1e8be2 100644 --- a/app/src/main/java/com/sollyu/android/appenv/commons/Application.kt +++ b/app/src/main/java/com/sollyu/android/appenv/commons/Application.kt @@ -67,6 +67,7 @@ class Application : android.app.Application(), Thread.UncaughtExceptionHandler { if (!Phones.Instance.phoneFile.exists()) { FileUtils.writeStringToFile(Phones.Instance.phoneFile, IOUtils.toString(Instance.assets.open("app.env.phone.json"), "UTF-8"), "UTF-8") } + Phones.Reload() } override fun uncaughtException(t: Thread?, throwable: Throwable?) { diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 4a04807..6e60ceb 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -22,7 +22,8 @@ + android:orientation="vertical" + android:paddingBottom="128dp"> @@ -95,6 +96,13 @@ app:leftText="@string/settings_issues" app:rightText="" /> + + + 如需定制,可以联系作者 显示桌面图标 您可以从XPOSED的模块设置中打开应用 + 特别鸣谢 \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ebd5c1d..0377356 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -110,4 +110,5 @@ i\'m english so bad. :( Show Desktop Icon You can open app in Xposed model. + Thinks diff --git a/online/app.env.soft.json b/online/app.env.soft.json index 201bbae..5678ac2 100644 --- a/online/app.env.soft.json +++ b/online/app.env.soft.json @@ -1,6 +1,6 @@ { "last-version-code": 583, - "last-version-name": "3.2.0a7ee59e", + "last-version-name": "3.2.2", "last-version-message": "1. Kotlin复写\n2. 支持Android 7.1+", "last-version-url": "https://github.com/kingsollyu/AppEnv-Kotlin/releases" } \ No newline at end of file