|
|
@@ -1,6 +1,7 @@
|
|
|
package kr.co.icontrols.wallpadmain.popup;
|
|
|
|
|
|
import com.artncore.WallPadDataMgr.WallpadStatusData;
|
|
|
+import com.artncore.commons.define;
|
|
|
import com.artncore.wallpadapi.WallPadAPI;
|
|
|
|
|
|
import android.content.Context;
|
|
|
@@ -87,7 +88,9 @@ public class CollectiveLightCTRL extends WpadScreen {
|
|
|
ViewRegistration(layout, TXT_TITLE, getPosition(ID.POPUPS.COLLECTIVELIGHTCTRL.ELEMENTS.TEXTS.TITLE).X, getPosition(ID.POPUPS.COLLECTIVELIGHTCTRL.ELEMENTS.TEXTS.TITLE).Y);
|
|
|
TXT_TITLE.setText(strTitle);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ registorBR_AllLightCtrl(true, 0);
|
|
|
+
|
|
|
displayCollectiveLightStatus();
|
|
|
}
|
|
|
|
|
|
@@ -95,6 +98,7 @@ public class CollectiveLightCTRL extends WpadScreen {
|
|
|
protected void onClose() {
|
|
|
super.onClose();
|
|
|
Log.d(TAG, "[END - Screen] ********************************************");
|
|
|
+ registorBR_AllLightCtrl(false, 0);
|
|
|
}
|
|
|
|
|
|
private void displayCollectiveLightStatus() {
|
|
|
@@ -169,13 +173,41 @@ public class CollectiveLightCTRL extends WpadScreen {
|
|
|
return super.addBrActionFilter(action);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 디바이스에 알림 BR 을 등록한다. (멀티스위치)
|
|
|
+ * @return (int) - >=0 : 성공, <0 : 실패
|
|
|
+ */
|
|
|
+ private int registorBR_AllLightCtrl(boolean OnOff, int nDevKind) {
|
|
|
+ if (OnOff) {
|
|
|
+ super.addBrActionFilter(define.NOTIFY_ACNAME);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ super.removeBrActionFilter(define.NOTIFY_ACNAME);
|
|
|
+ }
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
protected void onBrReceive(Intent intent) {
|
|
|
- // TODO Auto-generated method stub
|
|
|
- super.onBrReceive(intent);
|
|
|
- Common.DebugLog("--------------------onBrReceive ---> intent.getAction(): " + intent.getAction());
|
|
|
-
|
|
|
- }
|
|
|
+ // TODO Auto-generated method stub
|
|
|
+ super.onBrReceive(intent);
|
|
|
+ String ActionName = intent.getAction();
|
|
|
+ if (ActionName.equals(define.NOTIFY_ACNAME)) {
|
|
|
+ int kind = intent.getIntExtra(define.NOTIBR_KIND, 0);
|
|
|
+ Log.i(TAG, "[onBrReceive] ActionName [" + ActionName + "], kind [" + kind + "]");
|
|
|
+ switch (kind) {
|
|
|
+ case define.NOTIFY_ALL_LIGHT_OFF:
|
|
|
+ // 일괄소등 설정 (조명 OFF)
|
|
|
+ syncBTNAllLightOff(true);
|
|
|
+ break;
|
|
|
+
|
|
|
+ case define.NOTIFY_ALL_LIGHT_ON:
|
|
|
+ // 일괄소등 해제 (조명 ON)
|
|
|
+ syncBTNAllLightOff(false);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
private void Exit() {
|
|
|
((PopupActivity)(super.getContext())).finish();
|