|
|
@@ -36,10 +36,12 @@ import android.support.v4.widget.SwipeRefreshLayout;
|
|
|
import android.support.v7.widget.Toolbar;
|
|
|
import android.view.LayoutInflater;
|
|
|
import android.view.View;
|
|
|
+import android.widget.TextView;
|
|
|
import android.widget.Toast;
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
+import butterknife.BindView;
|
|
|
import butterknife.ButterKnife;
|
|
|
|
|
|
import static com.ntels.onecable.common.Constants.EXTRA_ERROR_CODE;
|
|
|
@@ -78,6 +80,7 @@ public class Setting extends CustomActivity implements View.OnClickListener,
|
|
|
private int alarmType = 0;
|
|
|
private SwipeRefreshLayout mSwipeRefreshLayout;
|
|
|
private boolean loading = false;
|
|
|
+ @BindView(R.id.tvQuiz) TextView mQuiz;
|
|
|
|
|
|
@Override
|
|
|
public void onCreate(Bundle savedInstanceState) {
|
|
|
@@ -164,6 +167,7 @@ public class Setting extends CustomActivity implements View.OnClickListener,
|
|
|
}
|
|
|
mUtil.getTextView(mActivity, R.id.tvCellphone).setText(mUtil.insertHyphenPhone(mAppConfig.getPhone()));
|
|
|
mUtil.getTextView(mActivity, R.id.tvAppVersion).setText(mUtil.getVersionName(mActivity));
|
|
|
+ mQuiz.setText(mAppConfig.getQuiz());
|
|
|
|
|
|
mIsAutoLogin = mAppConfig.getIsAutoLogin();
|
|
|
mIsSaveId = mAppConfig.getSaveId();
|
|
|
@@ -236,18 +240,18 @@ public class Setting extends CustomActivity implements View.OnClickListener,
|
|
|
pushTypeModeChgYn = "Y";
|
|
|
alarmType = ALRAM_MODE_ON;
|
|
|
}
|
|
|
- mComHandler.sendMessageDelayed(mComHandler.obtainMessage(MSG_COM_P_MEMBER_PUSH_NOTI), 10);
|
|
|
+ mComHandler.sendMessageDelayed(mComHandler.obtainMessage(MSG_COM_P_MEMBER_PUSH_NOTI), Constants.HANDLER_DELAY_MILLIS);
|
|
|
break;
|
|
|
case R.id.llGotoService:
|
|
|
mIntent = new Intent(Intent.ACTION_VIEW);
|
|
|
mIntent.addCategory(Intent.CATEGORY_DEFAULT);
|
|
|
- mIntent.setData(Uri.parse("http://home-api.allofthings.com/guide/20001/service"));
|
|
|
+ mIntent.setData(Uri.parse(Constants.URL_TERMS_OF_SERVICE));
|
|
|
startActivity(mIntent);
|
|
|
break;
|
|
|
case R.id.llGotoPolicy:
|
|
|
mIntent = new Intent(Intent.ACTION_VIEW);
|
|
|
mIntent.addCategory(Intent.CATEGORY_DEFAULT);
|
|
|
- mIntent.setData(Uri.parse("http://home-api.allofthings.com/guide/20001/policy"));
|
|
|
+ mIntent.setData(Uri.parse(Constants.URL_TERMS_OF_POLICY));
|
|
|
startActivity(mIntent);
|
|
|
break;
|
|
|
case R.id.btnWithdrawal:
|
|
|
@@ -337,7 +341,7 @@ public class Setting extends CustomActivity implements View.OnClickListener,
|
|
|
});
|
|
|
|
|
|
//공통 변수 입력
|
|
|
- httpSend.P_member_push_noti(pushTypeModeChgYn, pushTypeRuleExcYn);
|
|
|
+ httpSend.putMemberPushNoti(pushTypeModeChgYn);
|
|
|
} catch (Exception ex) {
|
|
|
ex.printStackTrace();
|
|
|
}
|
|
|
@@ -356,18 +360,14 @@ public class Setting extends CustomActivity implements View.OnClickListener,
|
|
|
// Dlog.v(alarmType);
|
|
|
if (alarmType == ALRAM_MODE_ON) {
|
|
|
mAppConfig.setPush_Type_Mode_Chg_Yn("Y");
|
|
|
- tempMsgNum = R.string.MSG815;
|
|
|
+// tempMsgNum = R.string.MSG815;
|
|
|
} else if (alarmType == ALRAM_MODE_OFF) {
|
|
|
mAppConfig.setPush_Type_Mode_Chg_Yn("N");
|
|
|
- tempMsgNum = R.string.MSG816;
|
|
|
- } else if (alarmType == ALRAM_RULE_ON) {
|
|
|
- mAppConfig.setPush_Type_Prsnc_Chg_Yn("Y");
|
|
|
- tempMsgNum = R.string.MSG815;
|
|
|
- } else if (alarmType == ALRAM_RULE_OFF) {
|
|
|
- mAppConfig.setPush_Type_Prsnc_Chg_Yn("N");
|
|
|
- tempMsgNum = R.string.MSG816;
|
|
|
- }
|
|
|
- mUtil.setShowToast(mActivity, mUtil.getString(mActivity, tempMsgNum), Toast.LENGTH_SHORT);
|
|
|
+// tempMsgNum = R.string.MSG816;
|
|
|
+ } else {
|
|
|
+
|
|
|
+ }
|
|
|
+// mUtil.setShowToast(mActivity, mUtil.getString(mActivity, tempMsgNum), Toast.LENGTH_SHORT);
|
|
|
setDisp();
|
|
|
} else {
|
|
|
JSONObject joResult = new JSONObject(response.getContent());
|
|
|
@@ -382,10 +382,12 @@ public class Setting extends CustomActivity implements View.OnClickListener,
|
|
|
} else {
|
|
|
mCustomDialog.msgAlert(mActivity, Constants.MSG000, errorMsg);
|
|
|
}
|
|
|
+ mUtil.getView(mActivity, R.id.llAlramHomeMode).setEnabled(true);
|
|
|
}
|
|
|
} catch (Exception ex) {
|
|
|
ex.printStackTrace();
|
|
|
mCustomDialog.msgAlert(mActivity, Constants.MSG807);
|
|
|
+ mUtil.getView(mActivity, R.id.llAlramHomeMode).setEnabled(true);
|
|
|
}
|
|
|
}
|
|
|
|