Merge branch 'feature/v1.0.3' of http://gitlab.zhidaoauto.com/ecos/yycp-service/Launcher into feature/v1.0.3
This commit is contained in:
@@ -20,9 +20,11 @@ import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
/**
|
||||
@@ -82,13 +84,21 @@ public class AppsPresenter extends Presenter<AppsView> {
|
||||
}
|
||||
|
||||
private Map<Integer, List<AppInfo>> addGuideAppEntrance(Map<Integer, List<AppInfo>> appInfoMap) {
|
||||
Map<Integer, List<AppInfo>> result;
|
||||
if (appInfoMap == null) {
|
||||
result = new HashMap<>();
|
||||
} else {
|
||||
result = new HashMap<>();
|
||||
result.putAll(appInfoMap);
|
||||
Map<Integer, List<AppInfo>> result = new HashMap<>();
|
||||
|
||||
if ( appInfoMap != null && !appInfoMap.isEmpty() ) {
|
||||
// val deep copy
|
||||
Set<Integer> keys = appInfoMap.keySet();
|
||||
for ( Integer key : keys ) {
|
||||
List<AppInfo> val = appInfoMap.get( key );
|
||||
try {
|
||||
result.put( key, new ArrayList<>( val ) );
|
||||
} catch ( Exception e ) {
|
||||
result.put( key, new ArrayList<>() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (result.isEmpty()) {
|
||||
result.put(0, new ArrayList<>());
|
||||
} else if (result.get(result.size() - 1) == null) {
|
||||
|
||||
Reference in New Issue
Block a user