"filters": [],
"versionCode": 1,
"versionName": "1.0",
- "outputFile": "ICLoopPageLauncher_V19_202107091744_release.apk"
+ "outputFile": "ICLoopPageLauncher_V21_202107161442_release.apk"
}
]
}
\ No newline at end of file
observerContent(context);
updateTemperature();
updateOxygen();
- updateBlood();
+ updateEnvTemp();
updateHeartRate();
}
updateHeartRate();
}
});
- context.getContentResolver().registerContentObserver(Uri.parse(SETTINGS + ".blood_high"),
+ context.getContentResolver().registerContentObserver(Uri.parse(SETTINGS + ".env_temperature"),
true, new ContentObserver(null) {
@Override
public void onChange(boolean selfChange) {
//更新血压
- updateBlood();
+ updateEnvTemp();
}
});
}
getValueByKey(KEY_OXYGEN);
}
- private void updateBlood() {
+ private void updateEnvTemp() {
getValueByKey(KEY_ENV_TEMP);
}
import androidx.lifecycle.MutableLiveData;
import com.ic.iclooger.ICLogger;
+import com.ic.launcher.utils.Constants;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
checkHasMissCall();
getShakeState();
getPlaneMode();
+ checkAlarmState();
observerContentChange();
}
private void observerContentChange() {
+ //监听闹钟状态
+ contentResolver.registerContentObserver(Uri.parse(Constants.ALARMS), true,
+ new ContentObserver(null) {
+ @Override
+ public void onChange(boolean selfChange) {
+ //闹钟变化
+ //查询是不是有闹钟是开启的
+ checkAlarmState();
+ }
+ });
//观察飞行模式
contentResolver.registerContentObserver(Uri.parse(SETTINGS + ".is_air_mode_enable"), true,
new ContentObserver(null) {
});
}
+ private void checkAlarmState() {
+ executorService.execute(() -> {
+ Cursor query = contentResolver.query(Uri.parse(Constants.ALARMS),
+ new String[]{"status"}, null, null, null);
+ if (query != null) {
+ Boolean hasOpe = Boolean.FALSE;
+ while (query.moveToNext()) {
+ String status = query.getString(0);
+ ICLogger.d("status =...= > " + status);
+ if ("ON".equals(status)) {
+ hasOpe = Boolean.TRUE;
+ break;
+ }
+ }
+ alarmState.postValue(hasOpe);
+ query.close();
+ }
+ });
+ }
+
private void getPlaneMode() {
String isPlaneMode = getContent("is_air_mode_enable");
if ("1".equals(isPlaneMode)) {
public static final String SETTINGS = "content://" + AUTHORITY + "/" + PATH;
public static final String LAUNCHER_APP_LIST_STYLE = "launcher_app_list_style";
public static final String BRIGHTNESS_VALUE = "brightness_value";
+
+
+ public static final String PATH_ALARM = "alarm";
+ public static final String AUTHORITY_ALARM = "com.ic.provider.alarm";
+ public static final String ALARMS = "content://" + AUTHORITY_ALARM + "/" + PATH_ALARM;
+
}
//测量孩子
int childCount = getChildCount();
int totalWidth = 0;
+ int heightSize = MeasureSpec.getSize(heightMeasureSpec);
for (int i = 0; i < childCount; i++) {
View item = getChildAt(i);
if (item.getVisibility() == GONE) {
continue;
}
- int widthSpec = MeasureSpec.makeMeasureSpec(MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.AT_MOST);
+ int widthSpec = MeasureSpec.makeMeasureSpec(MeasureSpec.getSize(widthMeasureSpec),
+ MeasureSpec.AT_MOST);
item.measure(widthSpec, heightMeasureSpec);
//ICLogger.d("item.getMeasuredWidth() == > " + item.getMeasuredWidth());
//设置孩子的位置,从0开始
+ int measuredHeight = item.getMeasuredHeight();
+ int top = heightSize / 2 - measuredHeight / 2;
+ ICLogger.d("measuredHeight == > " + measuredHeight);
item.setTag(new Position(totalWidth,
- 0,
+ top,
totalWidth + item.getMeasuredWidth(),
item.getMeasuredHeight()));
totalWidth += item.getMeasuredWidth() + margin * 2;
}
- int parentWidth = MeasureSpec.makeMeasureSpec(totalWidth, MeasureSpec.EXACTLY);
- setMeasuredDimension(parentWidth, heightMeasureSpec);
+ //int parentWidth = MeasureSpec.makeMeasureSpec(totalWidth, MeasureSpec.EXACTLY);
+ setMeasuredDimension(totalWidth, heightSize);
//测量完以后,判断宽度是否够用
if (defaultWidth == 0) {
defaultWidth = MeasureSpec.getSize(widthMeasureSpec);
statusBarPresenter.networkTypeValue.observe(lifecycleOwner, type -> {
signalView.updateNetworkType(type);
});
- statusBarPresenter.signalLev.observe(lifecycleOwner, lev -> {
- ICLogger.d("lev == > " + lev);
- //信号强度
- if (lev == null) {
- signalView.updateLev(0);
- } else {
- signalView.updateLev(lev);
- }
- });
statusBarPresenter.hasSimCardValue.observe(lifecycleOwner, hasSimCard -> {
ICLogger.d("hasSimCard == > " + hasSimCard);
signalView.updateSimCardState(hasSimCard);
android:id="@+id/top_icon_wear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:paddingTop="10dp"
android:src="@mipmap/top_icon_wear"
android:visibility="gone" />
<string name="app_package_name_sport" translatable="false">com.ic.sport</string>
<string name="app_package_name_weather" translatable="false">com.ic.weather</string>
<string name="app_package_name_phone" translatable="false">com.ic.dial</string>
- <string name="app_package_name_ic_talk" translatable="false">com.ic.icwetalk</string>
- <string name="app_package_name_contact" translatable="false">com.ic.iccontact</string>
+ <string name="app_package_name_ic_talk" translatable="false">com.ic.wetalk</string>
+ <string name="app_package_name_contact" translatable="false">com.ic.contact</string>
<string name="app_package_name_camera" translatable="false">com.ic.camera</string>
<string name="app_package_name_photo" translatable="false">com.eqc.gallery</string>
- <string name="app_package_name_sms" translatable="false">com.ic.icmms</string>
+ <string name="app_package_name_sms" translatable="false">com.ic.mms</string>
<string name="app_package_name_record" translatable="false">com.ic.record</string>
<string name="app_package_name_sign" translatable="false">com.ic.signin</string>
<string name="app_package_name_settings" translatable="false">com.ic.setting</string>
-#Fri Jul 09 17:44:12 CST 2021
-VERSION_CODE=19
+#Fri Jul 16 14:42:45 CST 2021
+VERSION_CODE=21