AnderWeb / android_packages_apps_Launcher

Android Launcher (almostNexus mod)
http://forum.xda-developers.com/showthread.php?t=645550
Other
321 stars 151 forks source link

I find a bug,and resolved #65

Open leiyuanhua opened 13 years ago

leiyuanhua commented 13 years ago

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(); } } }