fixed conflict
This commit is contained in:
@@ -54,21 +54,13 @@ public class BindingcarProvider implements IMoGoBindingcarProvider {
|
||||
*/
|
||||
@Override
|
||||
public void getBindingcarInfo(String macAddress, String widevineIDWithMd5) {
|
||||
mAddress = macAddress;
|
||||
mWidevineIDWithMd5 = widevineIDWithMd5;
|
||||
long currentHour = System.currentTimeMillis() / (1000 * 60);
|
||||
long oldHour = SharedPrefsMgr.getInstance(mContext).getLong("type", 0);
|
||||
|
||||
Log.d("liyz", "getBindingcarInfo ------ mAddress = " + mAddress + "--mWidevineIDWithMd5 = " + mWidevineIDWithMd5 + "--getScreenType() = " + getScreenType());
|
||||
//如果5分钟内频繁调,需要拦截,业务导致的会多次请求工控机信息 TODO
|
||||
//司机屏
|
||||
if (HmiBuildConfig.isShowSnBindingView && getScreenType() == 1) {
|
||||
Log.d("liyz", "getBindingcarInfo -----间隔时间 = " + (currentHour - oldHour));
|
||||
if (currentHour - oldHour > 5) {
|
||||
SharedPrefsMgr.getInstance(mContext).putLong("type", System.currentTimeMillis() / (1000 * 60));
|
||||
BindingcarNetWorkManager.getInstance().getBindingcarInfo(mContext, macAddress, mWidevineIDWithMd5, getScreenType());
|
||||
}
|
||||
}
|
||||
// mAddress = macAddress;
|
||||
// mWidevineIDWithMd5 = widevineIDWithMd5;
|
||||
// if (getScreenType() == 1) { //司机屏
|
||||
// driverScreen(macAddress, widevineIDWithMd5);
|
||||
// } else if (getScreenType() == 2) { //乘客屏
|
||||
// passengerScreen(macAddress, widevineIDWithMd5);
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -76,6 +68,33 @@ public class BindingcarProvider implements IMoGoBindingcarProvider {
|
||||
BindingcarNetWorkManager.getInstance().modifyBindingcar(mAddress, mWidevineIDWithMd5, callBack, getScreenType());
|
||||
}
|
||||
|
||||
private void driverScreen(String macAddress, String widevineIDWithMd5) {
|
||||
long currentHour = System.currentTimeMillis() / (1000 * 60);
|
||||
long oldHour = SharedPrefsMgr.getInstance(mContext).getLong("typeDriver", 0);
|
||||
Log.d("liyz", "driverScreen ------ macAddress = " + macAddress + "--widevineIDWithMd5 = " + widevineIDWithMd5 + "--getScreenType() = " + getScreenType());
|
||||
//如果5分钟内频繁调,需要拦截,业务导致的会多次请求工控机信息 TODO
|
||||
if (HmiBuildConfig.isShowSnBindingView) {
|
||||
Log.d("liyz", "driverScreen -----间隔时间 = " + (currentHour - oldHour));
|
||||
if (currentHour - oldHour > 5) {
|
||||
SharedPrefsMgr.getInstance(mContext).putLong("typeDriver", System.currentTimeMillis() / (1000 * 60));
|
||||
BindingcarNetWorkManager.getInstance().getBindingcarInfo(mContext, macAddress, widevineIDWithMd5, getScreenType());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void passengerScreen(String macAddress, String widevineIDWithMd5) {
|
||||
long currentHour = System.currentTimeMillis() / (1000 * 60);
|
||||
long oldHour = SharedPrefsMgr.getInstance(mContext).getLong("typePassenger", 0);
|
||||
Log.d("liyz", "passengerScreen ------ mAddress = " + macAddress + "--mWidevineIDWithMd5 = " + widevineIDWithMd5 + "--getScreenType() = " + getScreenType());
|
||||
//如果5分钟内频繁调,需要拦截,业务导致的会多次请求工控机信息
|
||||
if (HmiBuildConfig.isShowSnBindingView) {
|
||||
Log.d("liyz", "passengerScreen -----间隔时间 = " + (currentHour - oldHour));
|
||||
if (currentHour - oldHour > 5) {
|
||||
SharedPrefsMgr.getInstance(mContext).putLong("typePassenger", System.currentTimeMillis() / (1000 * 60));
|
||||
BindingcarNetWorkManager.getInstance().getBindingcarInfo(mContext, macAddress, widevineIDWithMd5, getScreenType());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int getScreenType() {
|
||||
int screenType = -1;
|
||||
|
||||
Reference in New Issue
Block a user