Skip to content
This repository was archived by the owner on Dec 17, 2023. It is now read-only.

Commit

Permalink
filter out huawei widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
hundeva committed Jun 7, 2018
1 parent 6105e20 commit 397b292
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/com/android/launcher3/widget/WidgetsListAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import com.android.launcher3.util.LabelComparator;
import com.android.launcher3.util.MultiHashMap;
import com.android.launcher3.util.PackageUserKey;
import com.hdeva.launcher.LeanUtils;

import java.util.ArrayList;
import java.util.Collections;
Expand Down Expand Up @@ -109,6 +110,13 @@ public void setWidgets(MultiHashMap<PackageItemInfo, WidgetItem> widgets) {

WidgetItemComparator widgetComparator = new WidgetItemComparator();
for (Map.Entry<PackageItemInfo, ArrayList<WidgetItem>> entry : widgets.entrySet()) {
try {
if (entry.getKey().packageName.toLowerCase().contains("huawei")) {
continue;
}
} catch (Throwable t) {
LeanUtils.reportNonFatal(new Exception("Error inspecting widget for origin", t));
}
WidgetListRowEntry row = new WidgetListRowEntry(entry.getKey(), entry.getValue());
row.titleSectionName = mIndexer.computeSectionName(row.pkgItem.title);
Collections.sort(row.widgets, widgetComparator);
Expand Down

0 comments on commit 397b292

Please sign in to comment.