Skip to content

Commit

Permalink
fix appsearch crash bug in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
handsomezhou committed Oct 11, 2015
1 parent 84a3037 commit 6bb407b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ public void refreshView() {
}

public void updateSearch(){
if(null==mSearchBox){
return;
}

updateSearch(mSearchBox.getSearchEtInput());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ public void refreshView() {
}

public void updateSearch(){
if(null==mT9TelephoneDialpadView){
return;
}

updateSearch(mT9TelephoneDialpadView.getT9Input());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ public List<AppInfo> loadAppInfo(Context context){
boolean canLaunchTheMainActivity=AppUtil.appCanLaunchTheMainActivity(mContext, pi.packageName);
if(true==canLaunchTheMainActivity){
AppInfo appInfo=getAppInfo(pm, pi);
if(TextUtils.isEmpty(appInfo.getLabel())){
continue;
}

PinyinUtil.chineseStringToPinyinUnit(appInfo.getLabel(), appInfo.getLabelPinyinUnits());
String sortKey=PinyinUtil.getSortKey(appInfo.getLabelPinyinUnits()).toUpperCase();
Expand Down

0 comments on commit 6bb407b

Please sign in to comment.