version: cude 5.9 mtk 3.4

fix:优化百度地图位置乱码
update:增加手动爱华解锁判断
This commit is contained in:
2022-07-05 20:24:57 +08:00
parent 6ab5e00948
commit 5b49f1370f
8 changed files with 57 additions and 20 deletions

View File

@@ -80,16 +80,16 @@ android {
//酷比魔方
cube {
flavorDimensions "default"
versionCode 47
versionName "5.6"
versionCode 50
versionName "5.9"
buildConfigField "String", "platform", '"ZhanRuiCube"'
}
//MTK
MTKnewly {
flavorDimensions "default"
versionCode 23
versionName "3.2"
versionCode 25
versionName "3.4"
buildConfigField "String", "platform", '"MTK"'
}
}

View File

@@ -15,4 +15,6 @@ interface SystemInfoInterface {
List<String> getHideIcon();
List<String> getDisableIcon();
String getTopAppPackage();
boolean SystemPutInt(String name , int value);
void setDefaultDesktop(String pkg);
}

View File

@@ -320,7 +320,6 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
String head_img = studesInfo.getHead_img();
settradeType(trade_type);
if (TextUtils.isEmpty(sno)) {
setNumberText("", View.GONE);

View File

@@ -59,7 +59,7 @@ public class RepeatRequestInterceptor implements Interceptor {
if (BuildConfig.DEBUG) {
Log.e("REPEAT-REQUEST", action + requestKey + " Method @" + request.method() + " --- " + " URL = " + request.url().encodedPath() + "\t" + bodyToString(request));
} else {
Log.e("REPEAT-REQUEST", action + requestKey + " Method @" + request.method());
Log.e("REPEAT-REQUEST", action + requestKey + " Method @" + request.method() + " --- " + " URL = " + request.url().encodedPath());
}
}

View File

@@ -61,7 +61,14 @@ public class RemoteService extends Service {
return pkg;
}
@Override
public boolean SystemPutInt(String name, int value) throws RemoteException {
return Settings.System.putInt(getContentResolver(), name, value);
}
@Override
public void setDefaultDesktop(String pkg) throws RemoteException {
JGYUtils.getInstance().setDefaultDesktop(pkg);
}
};
}

View File

@@ -81,6 +81,12 @@ public class MainSPresenter implements MainSContact.Presenter {
@Override
public void getLockedState(String key) {
Log.e(TAG, "getLockedState: " + key);
if (JGYUtils.getInstance().isAihuaFramwwork()) {
int aihuaUnlock = Settings.System.getInt(mContext.getContentResolver(), CommonConfig.AIHUA_UNLOCK, 0);
if (aihuaUnlock == 1) {
return;
}
}
requesting = true;
responseTime = System.currentTimeMillis();
NetInterfaceManager.getInstance()
@@ -95,6 +101,7 @@ public class MainSPresenter implements MainSContact.Presenter {
});
}
@Override
public void setPushTags() {
NetInterfaceManager.getInstance().setPushTags(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {

View File

@@ -621,18 +621,36 @@ public class MessageReceiver extends XGPushBaseReceiver {
locationClient.start();
locationClient.registerLocationListener(new BDAbstractLocationListener() {
@Override
public void onReceiveLocation(BDLocation bdLocation) {
Log.e(TAG, "onReceiveLocation: ");
if (null != bdLocation && bdLocation.getLocType() != BDLocation.TypeServerError) {
Log.e(TAG, "onLocationChanged: " + "定位成功");
Log.e(TAG, "onLocationChanged: " + bdLocation.getAddress());
SPUtils.put(mContext, "MapAddress", bdLocation.getAddress());
SPUtils.put(mContext, "longitude", bdLocation.getLongitude());
SPUtils.put(mContext, "latitude", bdLocation.getLatitude());
SPUtils.put(mContext, "MapError", "");
public void onReceiveLocation(BDLocation location) {
if (null != location) {
switch (location.getLocType()) {
case BDLocation.TypeGpsLocation:// GPS定位结果
case BDLocation.TypeNetWorkLocation:// 网络定位结果
case BDLocation.TypeOffLineLocation:// 离线定位结果
Log.e(TAG, "onLocationChanged: " + "定位成功");
Log.e(TAG, "onLocationChanged: " + location.getAddrStr() + location.getLocationDescribe());
SPUtils.put(mContext, "MapAddress", location.getAddrStr() + location.getLocationDescribe());
SPUtils.put(mContext, "longitude", location.getLongitude());
SPUtils.put(mContext, "latitude", location.getLatitude());
SPUtils.put(mContext, "MapError", "-");
break;
case BDLocation.TypeServerError:
Log.e(TAG, "onReceiveLocation: " + "服务端网络定位失败");
SPUtils.put(mContext, "MapError", "服务端网络定位失败可以反馈IMEI号和大体定位时间到loc-bugs@baidu.com会有人追查原因");
break;
case BDLocation.TypeNetWorkException:
Log.e(TAG, "onReceiveLocation: " + "网络不同导致定位失败,请检查网络是否通畅");
SPUtils.put(mContext, "MapError", "网络不同导致定位失败,请检查网络是否通畅");
break;
case BDLocation.TypeCriteriaException:
Log.e(TAG, "onReceiveLocation: " + "无法获取有效定位依据导致定位失败");
SPUtils.put(mContext, "MapError", "无法获取有效定位依据导致定位失败,一般是由于手机的原因,处于飞行模式下一般会造成这种结果,可以试着重启手机");
break;
default:
}
}
Log.e(TAG, (String) SPUtils.get(mContext, "MapAddress", "-"));
Log.e(TAG, (String) SPUtils.get(mContext, "MapError", "-"));
Log.e(TAG, "MapAddress: " + SPUtils.get(mContext, "MapAddress", "-"));
Log.e(TAG, "MapError: " + SPUtils.get(mContext, "MapError", "-"));
}
@Override

View File

@@ -1328,7 +1328,7 @@ public class JGYUtils {
if (locked == 1) {
return;
}
int aihuaUnlock = Settings.Global.getInt(mContext.getContentResolver(), CommonConfig.AIHUA_UNLOCK, 0);
int aihuaUnlock = Settings.System.getInt(mContext.getContentResolver(), CommonConfig.AIHUA_UNLOCK, 0);
if (aihuaUnlock == 1) {
return;
}
@@ -2300,6 +2300,10 @@ public class JGYUtils {
return Build.HARDWARE;
}
public boolean isAihuaFramwwork() {
return (Utils.getProperty("ro.build.display.id", "获取失败").contains("_aihua"));
}
public static boolean isAihuaDevice() {
return getHardware().startsWith(MTK_HARDWARE) && Build.BRAND.startsWith(AIHUA_BRAND);
}