|
@@ -29,7 +29,8 @@ public class QRActivity extends BaseBroadcastActivity {
|
|
|
private ImageView mLoadingImage = null;
|
|
|
private Animation mLoadingAnimation = null;
|
|
|
private Timer mTimer = null;
|
|
|
- private int mType = 1; // 0:imei 1:ticket 2:tcl
|
|
|
+
|
|
|
+ private final int mType = 2; // 0:imei 1:ticket 2:tcl
|
|
|
private String mContent = "";
|
|
|
private String mContentDisplay = "";
|
|
|
|
|
@@ -75,21 +76,29 @@ public class QRActivity extends BaseBroadcastActivity {
|
|
|
mContentDisplay = host + "?" + "t=" + mContent;
|
|
|
}
|
|
|
break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
private void refreshView() {
|
|
|
- if (mType == 2) {
|
|
|
- initSikeyBroadcast();
|
|
|
- actionLoadingAnimation(true);
|
|
|
- mLoadingLayout.setVisibility(View.VISIBLE);
|
|
|
- } else {
|
|
|
- mContentDisplay = getString(R.string.qrcode_error);
|
|
|
- initData();
|
|
|
- refreshQrcodeView();
|
|
|
- if (mContent.length() <= 0) {
|
|
|
- startTimer();
|
|
|
- }
|
|
|
+ switch (mType) {
|
|
|
+ case 0:
|
|
|
+ case 1:
|
|
|
+ mContentDisplay = getString(R.string.qrcode_error);
|
|
|
+ initData();
|
|
|
+ refreshQrcodeView();
|
|
|
+ if (mContent.length() <= 0) {
|
|
|
+ startTimer();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ initSikeyBroadcast();
|
|
|
+ actionLoadingAnimation(true);
|
|
|
+ mLoadingLayout.setVisibility(View.VISIBLE);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
|