apply plugin: 'com.android.application'
static def getL02ApkBaseName() {
- return "ICH88Launcher"
+ return "ICL02Launcher"
}
android {
def currentVersionCode = getVersionCode()
def currentVersionName = releaseTime()
- def buildVersionType = 2
+ def buildVersionType = 0
compileSdkVersion 29
buildToolsVersion "29.0.2"
android.applicationVariants.all { variant ->
variant.outputs.all {
if (variant.buildType.name == "release") {
- outputFileName = "${getL02ApkBaseName()}_V${buildVersionType}_${currentVersionCode}_${currentVersionName}_release.apk"
+ outputFileName = "${getL02ApkBaseName()}_V${currentVersionCode}_${currentVersionName}_release.apk"
} else {
- outputFileName = "${getL02ApkBaseName()}_V${buildVersionType}_${currentVersionCode}_${currentVersionName}_debug.apk"
+ outputFileName = "${getL02ApkBaseName()}_V${currentVersionCode}_${currentVersionName}_debug.apk"
}
}
}
import android.os.PowerManager;
import android.os.RemoteException;
import android.text.TextUtils;
+import android.util.Log;
import android.view.KeyEvent;
import android.view.MotionEvent;
+import android.view.View;
+import android.view.WindowManager;
import android.widget.TextView;
import com.ic.aidl.temp.ITempAidlInterface;
import com.ic.aidl.temp.ITempRemoteService;
import com.ic.launcher.databinding.ActivityAnimalHeatBinding;
import com.ic.launcher.listener.MainClockGestureDetectorImpl;
+import com.ic.launcher.util.IcLog;
import com.ic.launcher.util.ServiceUtil;
+import com.ic.launcher.util.SystemUtils;
import java.lang.ref.WeakReference;
import java.text.DecimalFormat;
private ITempRemoteService mService;
private HeatHandler mHandler;
- private PowerManager.WakeLock mWakeLock = null;
+// private PowerManager.WakeLock mWakeLock = null;
private ActivityAnimalHeatBinding heatBinding;
gesture = new GestureDetectorCompat(this, new MainClockGestureDetectorImpl(this));
registerBroadcast();
bindWorkService(this);
- initWakeLock(this);
+// initWakeLock(this);
+ getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
heatBinding.setBodyTemp("--");
heatBinding.setWristTemp("--");
+ boolean disablewristtemp=SystemUtils.getSystemPropertiesBoolean("persyst.sys.disableWristTemp",false);
+ heatBinding.setDisableWristTemp(disablewristtemp);
+
}
+ @Override
+ protected void onPause() {
+ super.onPause();
+// IcLog.i("Temperature","Temperature Activity onPause");
+// try {
+// mService.onStopQueryTemp();
+// } catch (Exception e) {
+// IcLog.i("Temperature", e.getMessage());
+// }
+ }
+
@Override
protected void onDestroy() {
super.onDestroy();
+ IcLog.i("Temperature","Temperature Activity onDestroy");
try {
mService.onStopQueryTemp();
} catch (Exception e) {
+ IcLog.i("Temperature", e.getMessage());
}
- releaseWakeLock();
+// releaseWakeLock();
unbindWorkService(this);
unregisterReceiver(mIntentReceiver);
}
DecimalFormat df = new DecimalFormat("#.0");
switch (type){
case 0:
- heatBinding.setBodyTemp(df.format(animal));
- heatBinding.setWristTemp(df.format(temp));
+ if (heatBinding.getDisableWristTemp()){
+ heatBinding.setBodyTemp(df.format(temp));
+ }else {
+ heatBinding.setBodyTemp(df.format(animal));
+ heatBinding.setWristTemp(df.format(temp));
+ }
break;
case 1:
heatBinding.setShowLoading(false);
}
}
- @SuppressLint("InvalidWakeLockTag")
- private void initWakeLock(Context context) {
- PowerManager powerManager = (PowerManager) context.getSystemService(POWER_SERVICE);
- if (powerManager != null) {
- mWakeLock = powerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK, "TmepWakeLock");
- mWakeLock.acquire();
- }
- }
-
- private void releaseWakeLock() {
- if (mWakeLock != null) {
- mWakeLock.release();
- }
- mWakeLock = null;
- }
+// @SuppressLint("InvalidWakeLockTag")
+// private void initWakeLock(Context context) {
+// PowerManager powerManager = (PowerManager) context.getSystemService(POWER_SERVICE);
+// if (powerManager != null) {
+// mWakeLock = powerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK, "TmepWakeLock");
+// mWakeLock.acquire();
+// }
+// }
+//
+// private void releaseWakeLock() {
+// if (mWakeLock != null) {
+// mWakeLock.release();
+// }
+// mWakeLock = null;
+// }
}
\ No newline at end of file
package com.ic.launcher.configure.l02;
+import android.content.Context;
import android.graphics.Color;
import com.ic.launcher.BuildConfig;
import com.ic.launcher.R;
import com.ic.launcher.entity.AppInfoEntity;
import com.ic.launcher.fragment.LowPowerModeFragment;
+import com.ic.launcher.util.SystemUtils;
import java.util.ArrayList;
import java.util.List;
+import java.util.Locale;
public class L02AppInfo {
private static final int BACK_COLOUR = Color.parseColor("#000000");
- public static List<AppInfoEntity> getAppList(){
- switch (BuildConfig.V_TYPE){
- case 0:
+ public static List<AppInfoEntity> getAppList(Context context){
+ Locale locale = context.getResources().getConfiguration().locale;
+ String language = locale.getLanguage();
+ if (SystemUtils.isH88()) {
+ return mH88AppList;
+ }else{
+ if (language.contains("zh")) {
return mL02DefaultAppList;
- case 1:
+ } else {
return mL02EnAppList;
- case 2:
- return mH88AppList;
- default:
- return mL02DefaultAppList;
+ }
}
}
//微聊
add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_talk_l02, R.string.app_Chat,
"com.enqualcomm.imessage", "com.enqualcomm.imessage.ui.MicroChatActivity"));
- //天气
- add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_weather_l02, R.string.app_Weather,
- "com.ic.weather", "com.ic.weather.WeatherActivity"));
+// //天气
+// add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_weather_l02, R.string.app_Weather,
+// "com.ic.weather", "com.ic.weather.WeatherActivity"));
//心率
add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_heartrate_l02, R.string.app_name_heart,
"com.ic.blood", "com.ic.blood.BloodActivity"));
+
+ add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_temperature_h88, R.string.app_h88_temperature,
+ "com.ic.launcher", "com.ic.launcher.AnimalHeatActivity"));
//支付包
add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_alipay_l02, R.string.app_AliPay,
"com.eg.android.AlipayGphone", "com.alipay.watch.ui.MainActivity"));
//短信
add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_sms_l02, R.string.app_Sms,
"com.zmapp.sms", "com.zmapp.sms.MainActivity"));
+
+ add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_language_h88, R.string.app_h88_language,
+ "com.eqc.eqcguide", "com.eqc.eqcguide.MainActivity"));
//设置
add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_settings_l02, R.string.main_manu_settings,
"com.eqc.settings", "com.eqc.settings.MainActivity"));
//心率
add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_heartrate_l02, R.string.app_name_heart,
"com.ic.blood", "com.ic.blood.BloodActivity"));
+
+ add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_temperature_h88, R.string.app_h88_temperature,
+ "com.ic.launcher", "com.ic.launcher.AnimalHeatActivity"));
//相机
add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_camera_l02, R.string.app_Camera,
"com.eqc.camera", "com.eqc.camera.TakePictureActivity"));
//短信
add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_sms_l02, R.string.app_Sms,
"com.zmapp.sms", "com.zmapp.sms.MainActivity"));
+
+ add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_language_h88, R.string.app_h88_language,
+ "com.eqc.eqcguide", "com.eqc.eqcguide.MainActivity"));
//设置
add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_settings_l02, R.string.main_manu_settings,
"com.eqc.settings", "com.eqc.settings.MainActivity"));
add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_sms_l02, R.string.app_Sms,
"com.zmapp.sms", "com.zmapp.sms.MainActivity"));
+ add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_camera_l02,R.string.app_Camera,
+ "com.ic.camera", "com.ic.camera.MainActivity"));
+
+ add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_albumn_l02,R.string.app_Album,
+ "com.ic.album", "com.ic.album.MainActivity"));
+
add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_language_h88, R.string.app_h88_language,
"com.eqc.eqcguide", "com.eqc.eqcguide.MainActivity"));
//设置
add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_settings_l02, R.string.main_manu_settings,
- "com.eqc.settings", "com.eqc.settings.MainActivity"));
+ "com.ic.setting", "com.ic.setting.MainActivity"));
+
+
}
};
}
import com.ic.launcher.entity.AppInfoEntity;
import com.ic.launcher.listener.ILowPowerCallPhoneListener;
import com.ic.launcher.util.IcLog;
+import com.ic.launcher.util.SystemUtils;
/**
* A simple {@link Fragment} subclass.
}
private ILowPowerCallPhoneListener callListener = () -> {
- int value=1;
- if(BuildConfig.V_TYPE == 2){
- value = 4;
+ int value=1; //l02 通讯录index
+ if(SystemUtils.isH88()){
+ value = 4; //h88 通讯录index
}
- AppInfoEntity entity = L02AppInfo.getAppList().get(value);
+ AppInfoEntity entity = L02AppInfo.getAppList(mContext).get(value);
if (entity != null) {
try {
Intent intent = new Intent(Intent.ACTION_MAIN);
}
public void updateLanguageSystemApp(){
- mObsAppInfoList.setValue(L02AppInfo.getAppList());
+ mObsAppInfoList.setValue(L02AppInfo.getAppList(context));
}
public void updateSystemApp() {
- mObsAppInfoList.setValue(L02AppInfo.getAppList());
- boolean[] state = new boolean[L02AppInfo.getAppList().size()];
+ mObsAppInfoList.setValue(L02AppInfo.getAppList(context));
+ boolean[] state = new boolean[L02AppInfo.getAppList(context).size()];
for (int i = 0; i < state.length; i++) {
state[i] = false;
}
}
public void startAppActivity(int index) {
- if (index < 0 || index > L02AppInfo.getAppList().size()) {
+ if (index < 0 || index > L02AppInfo.getAppList(context).size()) {
mObsActivityError.setValue(mErrorInfo);
return;
}
- AppInfoEntity entity = L02AppInfo.getAppList().get(index);
+ AppInfoEntity entity = L02AppInfo.getAppList(context).get(index);
String pck = entity.getPackageName();
String activity = entity.getActivityName();
return cid;
}
+ public static boolean isL02()
+ {
+ String launcher=getLauncherName();
+ if (launcher.equals("l02")){
+ return true;
+ }
+ return false;
+ }
+ public static boolean isH88()
+ {
+ String launcher=getLauncherName();
+ if (launcher.equals("h88")){
+ return true;
+ }
+ return false;
+ }
+
+ public static String getLauncherName(){
+ String launchername=getSystemPropertiesString("persist.sys.launcherName","l02");
+ return launchername;
+ }
+
+
+ public static String getSystemPropertiesString(String prop,String defaultvlaue){
+ String ret=defaultvlaue;
+ String temp=getSystemProperties(prop);
+ if (!temp.trim().isEmpty()){
+ ret = temp;
+ }
+ return ret;
+ }
+ public static boolean getSystemPropertiesBoolean(String prop,boolean defaultvlaue){
+
+ boolean ret=defaultvlaue;
+ String temp=getSystemProperties(prop);
+ if (!temp.trim().isEmpty()){
+ if( temp.trim().equals("true")) {
+ ret = true;
+ }else if (temp.trim().equals("false")) {
+ ret = false;
+ }
+ }
+
+ return ret;
+ }
public static String getSystemProperties(String prop) {
String str = "";
<variable
name="showLoading"
type="boolean" />
+
+ <variable
+ name="disableWristTemp"
+ type="boolean" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.2"
+ android:visibility="@{disableWristTemp ? View.GONE : View.VISIBLE}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.613" />
android:text="@string/activity_temp_wrist_str"
android:textColor="#00ACC1"
android:textSize="32sp"
+ android:visibility="@{disableWristTemp ? View.GONE : View.VISIBLE}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.18"
android:text="@{wristTemp}"
android:textColor="#FFFFFF"
android:textSize="62sp"
+ android:visibility="@{disableWristTemp ? View.GONE : View.VISIBLE}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.62"
android:text="@string/activity_temp_unit"
android:textColor="#FFFFFF"
android:textSize="32sp"
+ android:visibility="@{disableWristTemp ? View.GONE : View.VISIBLE}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.899"
-#Wed Jul 29 21:08:37 CST 2020
-VERSION_CODE=136
+#Tue Sep 08 11:37:47 CST 2020\r
+VERSION_CODE=146\r