Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I find a bug,and resolved #65

Open
leiyuanhua opened this issue Jan 7, 2011 · 0 comments
Open

I find a bug,and resolved #65

leiyuanhua opened this issue Jan 7, 2011 · 0 comments

Comments

@leiyuanhua
Copy link

bug:when change language,the application's label not follow change it's lable display in Launcher
resolve:change ApplicationsAdapter's add methode to:
@OverRide
public void add(ApplicationInfo info) {
//check allItems before added. It is a fix for all of the multi-icon issue, but will
//lose performance. Anyway, we do not expected to have many applications.
synchronized (allItems) {
/if (!allItems.contains(info)) {
changed = true;
allItems.add(info);
Collections.sort(allItems,new ApplicationInfoComparator());
}
/
int count=allItems.size();
boolean found=false;
for(int i=0;i<count;i++){
ApplicationInfo athis=allItems.get(i);
if(info.intent.getComponent()!=null){
if(athis.intent.getComponent().flattenToString().equals(
info.intent.getComponent().flattenToString())){
found=true;
if(!athis.title.equals(info.title)){
viewCache.remove(athis);
allItems.remove(i);
Collections.sort(allItems,new ApplicationInfoComparator());
updateDataSet();
found=false;
}
break;
}
}
}
if(!found){
allItems.add(info);
Collections.sort(allItems,new ApplicationInfoComparator());
updateDataSet();
}
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant