version:1.0.0
update:更换网页,修改主页 bugfixes:修复推送和地图
This commit is contained in:
@@ -62,6 +62,7 @@ import com.xxpatx.os.utils.ApkUtils;
|
||||
import com.xxpatx.os.utils.AppUsedTimeUtils;
|
||||
import com.xxpatx.os.utils.DayUtils;
|
||||
import com.xxpatx.os.view.ScaleCircleNavigator;
|
||||
import com.zackratos.ultimatebarx.ultimatebarx.java.UltimateBarX;
|
||||
|
||||
import net.lucode.hackware.magicindicator.ViewPagerHelper;
|
||||
|
||||
@@ -114,11 +115,6 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, PhoneActivityM
|
||||
setDefaultDesktop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setNightMode() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.phone_activity_main;
|
||||
@@ -436,7 +432,9 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, PhoneActivityM
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
Log.e(TAG, "onResume: ");
|
||||
|
||||
if (!RemoteManager.isServiceConnected()) {
|
||||
RemoteManager.getInstance().bindInfoService();
|
||||
}
|
||||
getPermission();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,18 +29,21 @@ public abstract class BaseTransparentActivity extends BaseRxActivity {
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
// StatusBarUtil.init(this);
|
||||
UltimateBarX.statusBar(this)
|
||||
.transparent()
|
||||
.colorRes(R.color.colorPrimaryDark)
|
||||
.light(setNightMode())
|
||||
.fitWindow(setfitWindow())
|
||||
.apply();
|
||||
UltimateBarX.navigationBar(this)
|
||||
.transparent()
|
||||
.colorRes(R.color.colorPrimaryDark)
|
||||
.light(setNightMode())
|
||||
.fitWindow(setfitWindow())
|
||||
.apply();
|
||||
|
||||
if (autoSetBar()) {
|
||||
UltimateBarX.statusBar(this)
|
||||
.transparent()
|
||||
.colorRes(R.color.colorPrimaryDark)
|
||||
.light(setNightMode())
|
||||
.fitWindow(setfitWindow())
|
||||
.apply();
|
||||
UltimateBarX.navigationBar(this)
|
||||
.transparent()
|
||||
.colorRes(R.color.colorPrimaryDark)
|
||||
.light(setNightMode())
|
||||
.fitWindow(setfitWindow())
|
||||
.apply();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -64,6 +67,11 @@ public abstract class BaseTransparentActivity extends BaseRxActivity {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean autoSetBar() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
switch (keyCode) {
|
||||
@@ -79,7 +87,7 @@ public abstract class BaseTransparentActivity extends BaseRxActivity {
|
||||
public boolean getVolumeKeyStatus() {
|
||||
boolean disableKey = mmkv.decodeBool(CommonConfig.DISABLE_VOLUME_KEY, false);
|
||||
Log.e(TAG, "getVolumeKeyStatus: disableKey = " + disableKey);
|
||||
if (disableKey){
|
||||
if (disableKey) {
|
||||
Toaster.showLong("音量键已被禁用");
|
||||
}
|
||||
return disableKey;
|
||||
|
||||
@@ -71,7 +71,7 @@ public class HomeFragment extends BaseMvvmFragment<HomeViewModel, FragmentHomeBi
|
||||
|
||||
|
||||
private FragmentActivity mContext;
|
||||
private HomeAppAdapter mHomeAppAdapter;
|
||||
// private HomeAppAdapter mHomeAppAdapter;
|
||||
// private NotificationAdapter notificationAdapter;
|
||||
|
||||
private CameraManager cameraManager;
|
||||
@@ -173,7 +173,7 @@ public class HomeFragment extends BaseMvvmFragment<HomeViewModel, FragmentHomeBi
|
||||
} else {
|
||||
// mViewDataBinding.ivNodata.setVisibility(View.GONE);
|
||||
// mViewDataBinding.rvApp.setVisibility(View.VISIBLE);
|
||||
mHomeAppAdapter.setDesktopIcons(desktopIcons);
|
||||
// mHomeAppAdapter.setDesktopIcons(desktopIcons);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -191,7 +191,7 @@ public class HomeFragment extends BaseMvvmFragment<HomeViewModel, FragmentHomeBi
|
||||
Date date = sdf.parse(alarmClockData.getTime());
|
||||
SimpleDateFormat hours = new SimpleDateFormat("HH:mm");
|
||||
String time = hours.format(date);
|
||||
mViewDataBinding.tvClock.setText(time);
|
||||
// mViewDataBinding.tvClock.setText(time);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -199,14 +199,14 @@ public class HomeFragment extends BaseMvvmFragment<HomeViewModel, FragmentHomeBi
|
||||
case AlarmUtils.LOOP:
|
||||
case AlarmUtils.WORKING_DAY:
|
||||
case AlarmUtils.OFF_DAY:
|
||||
mViewDataBinding.tvClock.setText(alarmClockData.getTime());
|
||||
// mViewDataBinding.tvClock.setText(alarmClockData.getTime());
|
||||
break;
|
||||
default:
|
||||
}
|
||||
// mViewDataBinding.rvNoti.setVisibility(View.VISIBLE);
|
||||
// mViewDataBinding.ivNoteNodata.setVisibility(View.GONE);
|
||||
} else {
|
||||
mViewDataBinding.tvClock.setText("未设置");
|
||||
// mViewDataBinding.tvClock.setText("未设置");
|
||||
// mViewDataBinding.rvNoti.setVisibility(View.GONE);
|
||||
// mViewDataBinding.ivNoteNodata.setVisibility(View.VISIBLE);
|
||||
}
|
||||
@@ -304,19 +304,19 @@ public class HomeFragment extends BaseMvvmFragment<HomeViewModel, FragmentHomeBi
|
||||
setTime();
|
||||
refreshMemory();
|
||||
|
||||
mViewDataBinding.rvApp.setLayoutManager(new GridLayoutManager(mContext, 3));
|
||||
HashMap<String, Integer> stringIntegerHashMap = new HashMap<>();
|
||||
WindowManager wm = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
|
||||
DisplayMetrics dm = new DisplayMetrics();
|
||||
wm.getDefaultDisplay().getRealMetrics(dm);
|
||||
float density = dm.density; // 屏幕密度(0.75 / 1.0 / 1.5)
|
||||
stringIntegerHashMap.put(RecyclerViewSpacesItemDecoration.TOP_DECORATION, (int) (density * 4));//top间距
|
||||
stringIntegerHashMap.put(RecyclerViewSpacesItemDecoration.BOTTOM_DECORATION, (int) (density * 40));//底部间距
|
||||
stringIntegerHashMap.put(RecyclerViewSpacesItemDecoration.LEFT_DECORATION, (int) (density * 4));//左间距
|
||||
stringIntegerHashMap.put(RecyclerViewSpacesItemDecoration.RIGHT_DECORATION, (int) (density * 4));//右间距
|
||||
mViewDataBinding.rvApp.addItemDecoration(new RecyclerViewSpacesItemDecoration(stringIntegerHashMap));
|
||||
mHomeAppAdapter = new HomeAppAdapter();
|
||||
mViewDataBinding.rvApp.setAdapter(mHomeAppAdapter);
|
||||
// mViewDataBinding.rvApp.setLayoutManager(new GridLayoutManager(mContext, 3));
|
||||
// HashMap<String, Integer> stringIntegerHashMap = new HashMap<>();
|
||||
// WindowManager wm = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
|
||||
// DisplayMetrics dm = new DisplayMetrics();
|
||||
// wm.getDefaultDisplay().getRealMetrics(dm);
|
||||
// float density = dm.density; // 屏幕密度(0.75 / 1.0 / 1.5)
|
||||
// stringIntegerHashMap.put(RecyclerViewSpacesItemDecoration.TOP_DECORATION, (int) (density * 4));//top间距
|
||||
// stringIntegerHashMap.put(RecyclerViewSpacesItemDecoration.BOTTOM_DECORATION, (int) (density * 40));//底部间距
|
||||
// stringIntegerHashMap.put(RecyclerViewSpacesItemDecoration.LEFT_DECORATION, (int) (density * 4));//左间距
|
||||
// stringIntegerHashMap.put(RecyclerViewSpacesItemDecoration.RIGHT_DECORATION, (int) (density * 4));//右间距
|
||||
// mViewDataBinding.rvApp.addItemDecoration(new RecyclerViewSpacesItemDecoration(stringIntegerHashMap));
|
||||
// mHomeAppAdapter = new HomeAppAdapter();
|
||||
// mViewDataBinding.rvApp.setAdapter(mHomeAppAdapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -443,16 +443,16 @@ public class HomeFragment extends BaseMvvmFragment<HomeViewModel, FragmentHomeBi
|
||||
}
|
||||
|
||||
private void refreshMemory() {
|
||||
long avail = AppUtil.getAvailMemory(mContext);
|
||||
long total = AppUtil.getTotalMemory(mContext);
|
||||
int x = (int) (((total - avail) / (double) total) * 100);
|
||||
if (x > 80) {
|
||||
mViewDataBinding.cpv.setProgressColor(mShaderColorsRed);
|
||||
} else {
|
||||
mViewDataBinding.cpv.setProgressColor(mShaderColors);
|
||||
}
|
||||
mViewDataBinding.cpv.showAnimation(0, x, 1000);
|
||||
float x2 = (((total - avail) / (float) total));
|
||||
// long avail = AppUtil.getAvailMemory(mContext);
|
||||
// long total = AppUtil.getTotalMemory(mContext);
|
||||
// int x = (int) (((total - avail) / (double) total) * 100);
|
||||
// if (x > 80) {
|
||||
// mViewDataBinding.cpv.setProgressColor(mShaderColorsRed);
|
||||
// } else {
|
||||
// mViewDataBinding.cpv.setProgressColor(mShaderColors);
|
||||
// }
|
||||
// mViewDataBinding.cpv.showAnimation(0, x, 1000);
|
||||
// float x2 = (((total - avail) / (float) total));
|
||||
}
|
||||
|
||||
private void setTime() {
|
||||
|
||||
@@ -21,7 +21,7 @@ import com.qweather.sdk.bean.weather.WeatherNowBean;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
import com.xxpatx.os.BuildConfig;
|
||||
import com.xxpatx.os.R;
|
||||
import com.xxpatx.os.activity.contact.AddContactActivity;
|
||||
import com.xxpatx.os.activity.contact.AddWechatContactActivity;
|
||||
import com.xxpatx.os.activity.weather.WeatherActivity;
|
||||
import com.xxpatx.os.base.mvvm.fragment.BaseMvvmFragment;
|
||||
import com.xxpatx.os.bean.MapBean;
|
||||
@@ -261,7 +261,7 @@ public class SettingsFragment extends BaseMvvmFragment<SettingsViewModel, Fragme
|
||||
}
|
||||
|
||||
public void addContact(View view) {
|
||||
startActivity(new Intent(mContext, AddContactActivity.class));
|
||||
startActivity(new Intent(mContext, AddWechatContactActivity.class));
|
||||
}
|
||||
|
||||
public void openWifi(View view) {
|
||||
|
||||
@@ -18,7 +18,8 @@ import java.util.Set;
|
||||
import java.util.concurrent.CopyOnWriteArraySet;
|
||||
|
||||
public class RemoteManager {
|
||||
private static final String TAG = RemoteManager.class.getSimpleName();
|
||||
private static final String TAG = "RemoteManager";
|
||||
|
||||
private static final String SN_KEY = "sn_serial_key";
|
||||
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||
|
||||
@@ -102,7 +103,7 @@ public class RemoteManager {
|
||||
mListeners.remove(listener);
|
||||
}
|
||||
|
||||
private void bindInfoService() {
|
||||
public void bindInfoService() {
|
||||
if (mIGetInfoInterface == null) {
|
||||
//这是连接aidl服务的代码
|
||||
Intent intent = new Intent();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.xxpatx.os.network;
|
||||
|
||||
public class UrlAddress {
|
||||
public static final String ROOT_URL = "https://ghapi.mdmsaas.cn/";
|
||||
public static final String ROOT_URL = "https://ghapi.mdmsaas.cn/android/";
|
||||
/*百度地图*/
|
||||
@Deprecated
|
||||
public static final String AMAP_ROOT_URL = "https://api.map.baidu.com/";
|
||||
|
||||
@@ -59,5 +59,4 @@ public class PushManager {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public class WeAccessibilityService extends AccessibilityService {
|
||||
private static final String DIALER_TEXT = "音视频通话";
|
||||
private static final String CONTACT_TEXT = "通讯录";
|
||||
private static final String TAG_TEXT = "标签";
|
||||
private static final String TAG_NAME = "爱来伴";
|
||||
private static final String TAG_NAME = "孝心通";
|
||||
private static final String MORE_NAME = "更多功能按钮,已折叠";
|
||||
private static final String PARENT_VIDEO_TEXT = "视频通话";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user