|
@@ -461,26 +461,44 @@ public class MAIN extends WpadScreen {
|
|
MainActivity.MainScreenShortcutList = ShortcutTable.GetWidgetData();
|
|
MainActivity.MainScreenShortcutList = ShortcutTable.GetWidgetData();
|
|
mWallpadStatusData.closeDB();
|
|
mWallpadStatusData.closeDB();
|
|
|
|
|
|
-// mIconInfoTable.printValue();
|
|
|
|
-
|
|
|
|
- //jglee - 즐겨찾기 이슈 수정을 위해(실제 올라가있는 아이콘과 DB를 비교하기 위하여 생선된 변수
|
|
|
|
- ArrayList<WallpadStatusData.WidgetItem> listDelShortIcon = null;
|
|
|
|
-
|
|
|
|
|
|
+ //여기서 중복된 Widget에 대하여 삭제를 먼저 실행한다.
|
|
MainActivity.nShortcutCnt = MainActivity.MainScreenShortcutList.size();
|
|
MainActivity.nShortcutCnt = MainActivity.MainScreenShortcutList.size();
|
|
- //여기서 Widget자체에서 중복되는것을 확인해서 지운다.
|
|
|
|
- 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++) {
|
|
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);
|
|
|
|
+ //여기서 Widget이 중복된 경웅의 idx값을 찾는다.
|
|
|
|
+ if(WidgetList.contains(MainActivity.MainScreenShortcutList.get(i).widgetID))
|
|
{
|
|
{
|
|
- //여기서 중복된 widget이 존재한다.
|
|
|
|
- //해당되는 idx를 지우는 것에 추가한다.
|
|
|
|
- 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();
|
|
|
|
+
|
|
|
|
+ //jglee - 즐겨찾기 이슈 수정을 위해(실제 올라가있는 아이콘과 DB를 비교하기 위하여 생선된 변수
|
|
|
|
+ ArrayList<WallpadStatusData.WidgetItem> listDelShortIcon = null;
|
|
|
|
+
|
|
|
|
+ MainActivity.nShortcutCnt = MainActivity.MainScreenShortcutList.size();
|
|
for (int i = 0; i < MainActivity.nShortcutCnt && i < MainActivity.nShortcutMax; i++) {
|
|
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);
|
|
Log.d(TAG, "[registerShortcutIcon] MainScreenShortcutList.get(" + i + ").idx() : " + MainActivity.MainScreenShortcutList.get(i).idx + ", MainScreenShortcutList.get(" + i + ").widgetID() : " + MainActivity.MainScreenShortcutList.get(i).widgetID);
|
|
//스마트 분전반 대신 KNX 분전반 아이콘으로 대체
|
|
//스마트 분전반 대신 KNX 분전반 아이콘으로 대체
|
|
@@ -554,11 +572,6 @@ public class MAIN extends WpadScreen {
|
|
if(listDelShortIcon!=null)
|
|
if(listDelShortIcon!=null)
|
|
listDelShortIcon.clear();
|
|
listDelShortIcon.clear();
|
|
|
|
|
|
- if(OverlapShortIcon!=null)
|
|
|
|
- OverlapShortIcon.clear();
|
|
|
|
-
|
|
|
|
- OverlapShortIcon = null;
|
|
|
|
-
|
|
|
|
listDelShortIcon = null;
|
|
listDelShortIcon = null;
|
|
|
|
|
|
} catch (RuntimeException re) {
|
|
} catch (RuntimeException re) {
|