opt
This commit is contained in:
@@ -12,6 +12,7 @@ import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.elegant.analytics.Analytics;
|
||||
import com.elegant.analytics.AnalyticsConfig;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.device.Devices;
|
||||
import com.mogo.commons.network.AllAllowedHostnameVerifier;
|
||||
import com.mogo.commons.network.Constants;
|
||||
import com.mogo.commons.network.ParamsUtil;
|
||||
@@ -106,6 +107,8 @@ public class AbsMogoApplication extends Application {
|
||||
// 2 - 本地缓存,聚合上报,积累30条埋点上报,或者积累60秒上报一次。
|
||||
AnalyticsConfig.getInstance( sApp ).setMode( DebugConfig.isDebug() ? 2 : 2 );
|
||||
AnalyticsConfig.getInstance( sApp ).shouldLog( DebugConfig.isDebug() );
|
||||
|
||||
Devices.checkBindState();
|
||||
} );
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@ class Devices {
|
||||
|
||||
public static final Uri CONTENT_URI_BIND = Uri.parse( "content://com.zhidao.guide.lock.product.bindstatus/status" );
|
||||
|
||||
private static boolean sIsBind = false;
|
||||
|
||||
/**
|
||||
* 检测车机激活状态
|
||||
*
|
||||
@@ -33,11 +35,15 @@ class Devices {
|
||||
return false;
|
||||
}
|
||||
int status = cursor.getInt( cursor.getColumnIndex( "lock_status" ) );
|
||||
return ( status == 1 );
|
||||
return sIsBind = ( status == 1 );
|
||||
}
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isBind() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user