version: cude 5.9 mtk 3.4
fix:优化百度地图位置乱码 update:增加手动爱华解锁判断
This commit is contained in:
@@ -80,16 +80,16 @@ android {
|
|||||||
//酷比魔方
|
//酷比魔方
|
||||||
cube {
|
cube {
|
||||||
flavorDimensions "default"
|
flavorDimensions "default"
|
||||||
versionCode 47
|
versionCode 50
|
||||||
versionName "5.6"
|
versionName "5.9"
|
||||||
buildConfigField "String", "platform", '"ZhanRuiCube"'
|
buildConfigField "String", "platform", '"ZhanRuiCube"'
|
||||||
}
|
}
|
||||||
|
|
||||||
//MTK
|
//MTK
|
||||||
MTKnewly {
|
MTKnewly {
|
||||||
flavorDimensions "default"
|
flavorDimensions "default"
|
||||||
versionCode 23
|
versionCode 25
|
||||||
versionName "3.2"
|
versionName "3.4"
|
||||||
buildConfigField "String", "platform", '"MTK"'
|
buildConfigField "String", "platform", '"MTK"'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,4 +15,6 @@ interface SystemInfoInterface {
|
|||||||
List<String> getHideIcon();
|
List<String> getHideIcon();
|
||||||
List<String> getDisableIcon();
|
List<String> getDisableIcon();
|
||||||
String getTopAppPackage();
|
String getTopAppPackage();
|
||||||
|
boolean SystemPutInt(String name , int value);
|
||||||
|
void setDefaultDesktop(String pkg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -320,7 +320,6 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
|||||||
String head_img = studesInfo.getHead_img();
|
String head_img = studesInfo.getHead_img();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
settradeType(trade_type);
|
settradeType(trade_type);
|
||||||
if (TextUtils.isEmpty(sno)) {
|
if (TextUtils.isEmpty(sno)) {
|
||||||
setNumberText("", View.GONE);
|
setNumberText("", View.GONE);
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public class RepeatRequestInterceptor implements Interceptor {
|
|||||||
if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
Log.e("REPEAT-REQUEST", action + requestKey + " Method @" + request.method() + " --- " + " URL = " + request.url().encodedPath() + "\t" + bodyToString(request));
|
Log.e("REPEAT-REQUEST", action + requestKey + " Method @" + request.method() + " --- " + " URL = " + request.url().encodedPath() + "\t" + bodyToString(request));
|
||||||
} else {
|
} else {
|
||||||
Log.e("REPEAT-REQUEST", action + requestKey + " Method @" + request.method());
|
Log.e("REPEAT-REQUEST", action + requestKey + " Method @" + request.method() + " --- " + " URL = " + request.url().encodedPath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,14 @@ public class RemoteService extends Service {
|
|||||||
return pkg;
|
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);
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,6 +81,12 @@ public class MainSPresenter implements MainSContact.Presenter {
|
|||||||
@Override
|
@Override
|
||||||
public void getLockedState(String key) {
|
public void getLockedState(String key) {
|
||||||
Log.e(TAG, "getLockedState: " + 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;
|
requesting = true;
|
||||||
responseTime = System.currentTimeMillis();
|
responseTime = System.currentTimeMillis();
|
||||||
NetInterfaceManager.getInstance()
|
NetInterfaceManager.getInstance()
|
||||||
@@ -95,6 +101,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setPushTags() {
|
public void setPushTags() {
|
||||||
NetInterfaceManager.getInstance().setPushTags(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
NetInterfaceManager.getInstance().setPushTags(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||||
|
|||||||
@@ -621,18 +621,36 @@ public class MessageReceiver extends XGPushBaseReceiver {
|
|||||||
locationClient.start();
|
locationClient.start();
|
||||||
locationClient.registerLocationListener(new BDAbstractLocationListener() {
|
locationClient.registerLocationListener(new BDAbstractLocationListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onReceiveLocation(BDLocation bdLocation) {
|
public void onReceiveLocation(BDLocation location) {
|
||||||
Log.e(TAG, "onReceiveLocation: ");
|
if (null != location) {
|
||||||
if (null != bdLocation && bdLocation.getLocType() != BDLocation.TypeServerError) {
|
switch (location.getLocType()) {
|
||||||
|
case BDLocation.TypeGpsLocation:// GPS定位结果
|
||||||
|
case BDLocation.TypeNetWorkLocation:// 网络定位结果
|
||||||
|
case BDLocation.TypeOffLineLocation:// 离线定位结果
|
||||||
Log.e(TAG, "onLocationChanged: " + "定位成功");
|
Log.e(TAG, "onLocationChanged: " + "定位成功");
|
||||||
Log.e(TAG, "onLocationChanged: " + bdLocation.getAddress());
|
Log.e(TAG, "onLocationChanged: " + location.getAddrStr() + location.getLocationDescribe());
|
||||||
SPUtils.put(mContext, "MapAddress", bdLocation.getAddress());
|
SPUtils.put(mContext, "MapAddress", location.getAddrStr() + location.getLocationDescribe());
|
||||||
SPUtils.put(mContext, "longitude", bdLocation.getLongitude());
|
SPUtils.put(mContext, "longitude", location.getLongitude());
|
||||||
SPUtils.put(mContext, "latitude", bdLocation.getLatitude());
|
SPUtils.put(mContext, "latitude", location.getLatitude());
|
||||||
SPUtils.put(mContext, "MapError", "");
|
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
|
@Override
|
||||||
|
|||||||
@@ -1328,7 +1328,7 @@ public class JGYUtils {
|
|||||||
if (locked == 1) {
|
if (locked == 1) {
|
||||||
return;
|
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) {
|
if (aihuaUnlock == 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2300,6 +2300,10 @@ public class JGYUtils {
|
|||||||
return Build.HARDWARE;
|
return Build.HARDWARE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isAihuaFramwwork() {
|
||||||
|
return (Utils.getProperty("ro.build.display.id", "获取失败").contains("_aihua"));
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean isAihuaDevice() {
|
public static boolean isAihuaDevice() {
|
||||||
return getHardware().startsWith(MTK_HARDWARE) && Build.BRAND.startsWith(AIHUA_BRAND);
|
return getHardware().startsWith(MTK_HARDWARE) && Build.BRAND.startsWith(AIHUA_BRAND);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user