add apis
This commit is contained in:
@@ -110,6 +110,11 @@ public class MogoStatusManager implements IMogoStatusManager {
|
||||
return get_bool_val( StatusDescriptor.DISPLAY_OVERVIEW );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUploading() {
|
||||
return get_bool_val( StatusDescriptor.UPLOADING );
|
||||
}
|
||||
|
||||
private boolean get_bool_val( StatusDescriptor descriptor ) {
|
||||
Boolean val = mStatus.get( descriptor );
|
||||
return val == null ? false : val;
|
||||
@@ -117,37 +122,27 @@ public class MogoStatusManager implements IMogoStatusManager {
|
||||
|
||||
@Override
|
||||
public void setVoiceUIShow( String tag, boolean show ) {
|
||||
mStatus.put( StatusDescriptor.VOICE_UI, show );
|
||||
invokeStatusChangedListener( StatusDescriptor.VOICE_UI, show );
|
||||
recordStatusModifier( tag, StatusDescriptor.VOICE_UI );
|
||||
doSetStatus( tag, StatusDescriptor.VOICE_UI, show );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setADASUIShow( String tag, boolean show ) {
|
||||
mStatus.put( StatusDescriptor.ADAS_UI, show );
|
||||
invokeStatusChangedListener( StatusDescriptor.ADAS_UI, show );
|
||||
recordStatusModifier( tag, StatusDescriptor.ADAS_UI );
|
||||
doSetStatus( tag, StatusDescriptor.ADAS_UI, show );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setV2XUIShow( String tag, boolean show ) {
|
||||
mStatus.put( StatusDescriptor.V2X_UI, show );
|
||||
invokeStatusChangedListener( StatusDescriptor.V2X_UI, show );
|
||||
recordStatusModifier( tag, StatusDescriptor.V2X_UI );
|
||||
Logger.e( TAG, "do not implement" );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPushUIShow( String tag, boolean show ) {
|
||||
mStatus.put( StatusDescriptor.PUSH_UI, show );
|
||||
invokeStatusChangedListener( StatusDescriptor.PUSH_UI, show );
|
||||
recordStatusModifier( tag, StatusDescriptor.PUSH_UI );
|
||||
doSetStatus( tag, StatusDescriptor.PUSH_UI, show );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAccStatus( String tag, boolean isOn ) {
|
||||
mStatus.put( StatusDescriptor.ACC_STATUS, isOn );
|
||||
invokeStatusChangedListener( StatusDescriptor.ACC_STATUS, isOn );
|
||||
recordStatusModifier( tag, StatusDescriptor.ACC_STATUS );
|
||||
doSetStatus( tag, StatusDescriptor.ACC_STATUS, isOn );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -162,44 +157,43 @@ public class MogoStatusManager implements IMogoStatusManager {
|
||||
|
||||
@Override
|
||||
public void setSearchUIShow( String tag, boolean isShow ) {
|
||||
mStatus.put( StatusDescriptor.SEARCH_UI, isShow );
|
||||
invokeStatusChangedListener( StatusDescriptor.SEARCH_UI, isShow );
|
||||
recordStatusModifier( tag, StatusDescriptor.SEARCH_UI );
|
||||
doSetStatus( tag, StatusDescriptor.SEARCH_UI, isShow );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAppListUIShow( String tag, boolean isShow ) {
|
||||
mStatus.put( StatusDescriptor.APP_LIST_UI, isShow );
|
||||
invokeStatusChangedListener( StatusDescriptor.APP_LIST_UI, isShow );
|
||||
recordStatusModifier( tag, StatusDescriptor.APP_LIST_UI );
|
||||
doSetStatus( tag, StatusDescriptor.APP_LIST_UI, isShow );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMainPageResumeStatus( String tag, boolean resume ) {
|
||||
mStatus.put( StatusDescriptor.MAIN_PAGE_RESUME, resume );
|
||||
invokeStatusChangedListener( StatusDescriptor.MAIN_PAGE_RESUME, resume );
|
||||
recordStatusModifier( tag, StatusDescriptor.MAIN_PAGE_RESUME );
|
||||
doSetStatus( tag, StatusDescriptor.MAIN_PAGE_RESUME, resume );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAIAssistReady( String tag, boolean ready ) {
|
||||
mStatus.put( StatusDescriptor.AI_ASSIST_READY, ready );
|
||||
invokeStatusChangedListener( StatusDescriptor.AI_ASSIST_READY, ready );
|
||||
recordStatusModifier( tag, StatusDescriptor.AI_ASSIST_READY );
|
||||
doSetStatus( tag, StatusDescriptor.AI_ASSIST_READY, ready );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSeekHelping( String tag, boolean seekHelping ) {
|
||||
mStatus.put( StatusDescriptor.SEEK_HELPING, seekHelping );
|
||||
invokeStatusChangedListener( StatusDescriptor.SEEK_HELPING, seekHelping );
|
||||
recordStatusModifier( tag, StatusDescriptor.SEEK_HELPING );
|
||||
doSetStatus( tag, StatusDescriptor.SEEK_HELPING, seekHelping );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDisplayOverview( String tag, boolean display ) {
|
||||
mStatus.put( StatusDescriptor.DISPLAY_OVERVIEW, display );
|
||||
invokeStatusChangedListener( StatusDescriptor.DISPLAY_OVERVIEW, display );
|
||||
recordStatusModifier( tag, StatusDescriptor.DISPLAY_OVERVIEW );
|
||||
doSetStatus( tag, StatusDescriptor.DISPLAY_OVERVIEW, display );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setUploadingStatus( String tag, boolean uploading ) {
|
||||
doSetStatus( tag, StatusDescriptor.UPLOADING, uploading );
|
||||
}
|
||||
|
||||
private void doSetStatus(String tag, StatusDescriptor target, boolean value){
|
||||
mStatus.put( target, value );
|
||||
invokeStatusChangedListener( target, value );
|
||||
recordStatusModifier( tag, target );
|
||||
}
|
||||
|
||||
private void invokeStatusChangedListener( StatusDescriptor descriptor, boolean status ) {
|
||||
|
||||
Reference in New Issue
Block a user