|
@@ -461,26 +461,44 @@ public class MAIN extends WpadScreen {
|
|
|
MainActivity.MainScreenShortcutList = ShortcutTable.GetWidgetData();
|
|
|
mWallpadStatusData.closeDB();
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- ArrayList<WallpadStatusData.WidgetItem> listDelShortIcon = null;
|
|
|
-
|
|
|
+
|
|
|
MainActivity.nShortcutCnt = MainActivity.MainScreenShortcutList.size();
|
|
|
-
|
|
|
- ArrayList<Integer> OverlapShortIcon = new ArrayList<Integer>();
|
|
|
+ ArrayList<Integer> WidgetList = new ArrayList<Integer>();
|
|
|
+ ArrayList<Integer> DelIdx = new ArrayList<Integer>();
|
|
|
for (int i = 0; i < MainActivity.nShortcutCnt && i < MainActivity.nShortcutMax; i++) {
|
|
|
- if(OverlapShortIcon.contains(MainActivity.MainScreenShortcutList.get(i).widgetID))
|
|
|
+ Log.d(TAG, "[registerShortcutIcon] Check MainScreenShortcutList.get(" + i + ").idx() : " + MainActivity.MainScreenShortcutList.get(i).idx + ", MainScreenShortcutList.get(" + i + ").widgetID() : " + MainActivity.MainScreenShortcutList.get(i).widgetID);
|
|
|
+
|
|
|
+ if(WidgetList.contains(MainActivity.MainScreenShortcutList.get(i).widgetID))
|
|
|
{
|
|
|
-
|
|
|
-
|
|
|
- if(listDelShortIcon == null)
|
|
|
- listDelShortIcon = new ArrayList<WallpadStatusData.WidgetItem>();
|
|
|
- listDelShortIcon.add(MainActivity.MainScreenShortcutList.get(i));
|
|
|
+ Log.d(TAG, "[registerShortcutIcon] Overlap MainScreenShortcutList.get(" + i + ").idx() : " + MainActivity.MainScreenShortcutList.get(i).idx + ", MainScreenShortcutList.get(" + i + ").widgetID() : " + MainActivity.MainScreenShortcutList.get(i).widgetID);
|
|
|
+ DelIdx.add(MainActivity.MainScreenShortcutList.get(i).idx);
|
|
|
}
|
|
|
- OverlapShortIcon.add(MainActivity.MainScreenShortcutList.get(i).widgetID);
|
|
|
+ else
|
|
|
+ WidgetList.add(MainActivity.MainScreenShortcutList.get(i).widgetID);
|
|
|
}
|
|
|
|
|
|
+ for(int i = 0 ; i< DelIdx.size();i++)
|
|
|
+ {
|
|
|
+ Log.d(TAG, "[registerShortcutIcon] Del Overlap MainScreenShortcutList.get(" + i + ").idx() : " + MainActivity.MainScreenShortcutList.get(i).idx + ", MainScreenShortcutList.get(" + i + ").widgetID() : " + MainActivity.MainScreenShortcutList.get(i).widgetID);
|
|
|
+ deleteShortcutDB(DelIdx.get(i));
|
|
|
+ }
|
|
|
+
|
|
|
+ WidgetList.clear();
|
|
|
+ WidgetList = null;
|
|
|
+
|
|
|
+ DelIdx.clear();
|
|
|
+ DelIdx = null;
|
|
|
+
|
|
|
+
|
|
|
+ mWallpadStatusData = new WallpadStatusData(mContext);
|
|
|
+ ShortcutTable = mWallpadStatusData.GetWidgetTableController();
|
|
|
+ MainActivity.MainScreenShortcutList = ShortcutTable.GetWidgetData();
|
|
|
+ mWallpadStatusData.closeDB();
|
|
|
+
|
|
|
+
|
|
|
+ ArrayList<WallpadStatusData.WidgetItem> listDelShortIcon = null;
|
|
|
+
|
|
|
+ MainActivity.nShortcutCnt = MainActivity.MainScreenShortcutList.size();
|
|
|
for (int i = 0; i < MainActivity.nShortcutCnt && i < MainActivity.nShortcutMax; i++) {
|
|
|
Log.d(TAG, "[registerShortcutIcon] MainScreenShortcutList.get(" + i + ").idx() : " + MainActivity.MainScreenShortcutList.get(i).idx + ", MainScreenShortcutList.get(" + i + ").widgetID() : " + MainActivity.MainScreenShortcutList.get(i).widgetID);
|
|
|
|
|
@@ -554,11 +572,6 @@ public class MAIN extends WpadScreen {
|
|
|
if(listDelShortIcon!=null)
|
|
|
listDelShortIcon.clear();
|
|
|
|
|
|
- if(OverlapShortIcon!=null)
|
|
|
- OverlapShortIcon.clear();
|
|
|
-
|
|
|
- OverlapShortIcon = null;
|
|
|
-
|
|
|
listDelShortIcon = null;
|
|
|
|
|
|
} catch (RuntimeException re) {
|