Commit 85cd8f7b45011bf04beb16e985b04c339941da2a

Authored by Penley
1 parent 0726b686

code update,

Showing 782 changed files with 536 additions and 349 deletions
@@ -11,4 +11,6 @@ import-summary.txt @@ -11,4 +11,6 @@ import-summary.txt
11 /freeline 11 /freeline
12 freeline.py 12 freeline.py
13 *.hprof 13 *.hprof
14 -freeline_project_description.json  
  14 +freeline_project_description.json
  15 +switchcontrol.zip
  16 +tcpmodule/
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
@@ -3,6 +3,7 @@ package com.gimi.common.cinema.utils; @@ -3,6 +3,7 @@ package com.gimi.common.cinema.utils;
3 import android.content.Context; 3 import android.content.Context;
4 import android.content.SharedPreferences; 4 import android.content.SharedPreferences;
5 import android.util.Log; 5 import android.util.Log;
  6 +
6 import com.gimi.common.cinema.db.NewDBManager; 7 import com.gimi.common.cinema.db.NewDBManager;
7 import com.gimi.common.cinema.model.AsyncCallback; 8 import com.gimi.common.cinema.model.AsyncCallback;
8 import com.gimi.common.cinema.model.Constant; 9 import com.gimi.common.cinema.model.Constant;
@@ -11,7 +12,6 @@ import com.gimi.common.cinema.model.MovieMessage; @@ -11,7 +12,6 @@ import com.gimi.common.cinema.model.MovieMessage;
11 import com.gimi.common.cinema.model.Rating; 12 import com.gimi.common.cinema.model.Rating;
12 import com.gimi.common.cinema.model.SambaMsg; 13 import com.gimi.common.cinema.model.SambaMsg;
13 import com.gimi.common.cinema.model.WrongMsg; 14 import com.gimi.common.cinema.model.WrongMsg;
14 -import com.xgimi.gimicinema.BuildConfig;  
15 15
16 import java.io.File; 16 import java.io.File;
17 import java.util.ArrayList; 17 import java.util.ArrayList;
@@ -115,6 +115,12 @@ public class LeeImageLoader { @@ -115,6 +115,12 @@ public class LeeImageLoader {
115 } 115 }
116 } 116 }
117 117
  118 + public static void clearCache() {
  119 + if (!BuildConfig.USE_GLIDE) {
  120 + globalImageLoader.clearMemoryCache();
  121 + }
  122 + }
  123 +
118 private static void initUIL(Context context) { 124 private static void initUIL(Context context) {
119 globalOptions = new DisplayImageOptions.Builder() 125 globalOptions = new DisplayImageOptions.Builder()
120 // .showImageOnLoading(R.drawable.ic_movie_default) // 设置图片在下载期间显示的图片 126 // .showImageOnLoading(R.drawable.ic_movie_default) // 设置图片在下载期间显示的图片
@@ -7,6 +7,7 @@ import android.os.IBinder; @@ -7,6 +7,7 @@ import android.os.IBinder;
7 import android.text.TextUtils; 7 import android.text.TextUtils;
8 import android.util.Log; 8 import android.util.Log;
9 import android.widget.Toast; 9 import android.widget.Toast;
  10 +
10 import com.gimi.common.cinema.model.MessageEvent; 11 import com.gimi.common.cinema.model.MessageEvent;
11 import com.gimi.common.cinema.model.RoomInfo; 12 import com.gimi.common.cinema.model.RoomInfo;
12 import com.gimi.common.cinema.utils.SystemUtils; 13 import com.gimi.common.cinema.utils.SystemUtils;
@@ -17,6 +18,7 @@ import com.qnbar.smc.utils.LightOperationUtils; @@ -17,6 +18,7 @@ import com.qnbar.smc.utils.LightOperationUtils;
17 import com.xgimi.gimicinema.activity.QrCodeShowActivity; 18 import com.xgimi.gimicinema.activity.QrCodeShowActivity;
18 import com.xgimi.gimicinema.application.FangTangApplication; 19 import com.xgimi.gimicinema.application.FangTangApplication;
19 import com.xgimi.smartscreen.encrypt.AuthCode; 20 import com.xgimi.smartscreen.encrypt.AuthCode;
  21 +
20 import org.greenrobot.eventbus.EventBus; 22 import org.greenrobot.eventbus.EventBus;
21 23
22 import java.io.IOException; 24 import java.io.IOException;
@@ -302,6 +304,7 @@ public class SocketService extends Service { @@ -302,6 +304,7 @@ public class SocketService extends Service {
302 LightOperationUtils.setLightValue(Utils.getInt(context, "brightness", 50)); 304 LightOperationUtils.setLightValue(Utils.getInt(context, "brightness", 50));
303 } 305 }
304 if (socketResponse.getData().getFirst() == 1) { 306 if (socketResponse.getData().getFirst() == 1) {
  307 + sendMessage(QrCodeShowActivity.KILL_SELF, "finish the QR CODE activity when new user come in");
305 // LightOperationUtils.open(); 308 // LightOperationUtils.open();
306 // LightOperationUtils.setLightValue(Utils.getInt(context, "brightness", 50)); 309 // LightOperationUtils.setLightValue(Utils.getInt(context, "brightness", 50));
307 sendMessage(USER_OPEN_DOOR_AND_GET_MOVIE, "user first open the door"); 310 sendMessage(USER_OPEN_DOOR_AND_GET_MOVIE, "user first open the door");
1 package com.xgimi.gimicinema.activity; 1 package com.xgimi.gimicinema.activity;
2 2
3 import android.app.Activity; 3 import android.app.Activity;
4 -import android.content.Context;  
5 -import android.content.SharedPreferences; 4 +import android.graphics.Color;
6 import android.os.Bundle; 5 import android.os.Bundle;
7 -import android.view.View;  
8 -import android.widget.RadioButton;  
9 -import android.widget.RadioGroup; 6 +import android.text.TextUtils;
10 import android.widget.TextView; 7 import android.widget.TextView;
11 -import com.gimi.common.cinema.model.Constant;  
12 -import com.xgimi.gimicinema.R; 8 +
  9 +import com.gimi.common.cinema.model.RoomInfo;
  10 +import com.gimi.common.cinema.utils.Utils;
  11 +import com.google.gson.Gson;
  12 +import com.telink.bluetooth.light.model.Mesh;
  13 +import com.xgimi.gimicinema.application.FangTangApplication;
13 14
14 /** 15 /**
15 * Created by wugian on 2016/5/23 16 * Created by wugian on 2016/5/23
16 */ 17 */
17 public class ChoseSourceActivity extends Activity { 18 public class ChoseSourceActivity extends Activity {
18 19
19 - SharedPreferences sharedPreferences;  
20 - private TextView typeTv;  
21 - private RadioGroup orderGroup;  
22 - private RadioButton useAll;  
23 - private RadioButton useQn;  
24 - private RadioButton use1905;  
25 -  
26 - private void assignViews() {  
27 - typeTv = (TextView) findViewById(R.id.type_tv);  
28 - orderGroup = (RadioGroup) findViewById(R.id.orderGroup);  
29 - useAll = (RadioButton) findViewById(R.id.useAll);  
30 - useQn = (RadioButton) findViewById(R.id.useQn);  
31 - use1905 = (RadioButton) findViewById(R.id.use1905);  
32 -  
33 - int sourceTypeIndex = sharedPreferences.getInt("source_type_index", 0);  
34 - switch (sourceTypeIndex) {  
35 - case 0:  
36 - useAll.setChecked(true);  
37 - break;  
38 - case 1:  
39 - useQn.setChecked(true);  
40 - break;  
41 - case 2:  
42 - use1905.setChecked(true);  
43 - break;  
44 - }  
45 -  
46 - } 20 +// SharedPreferences sharedPreferences;
  21 +// private TextView typeTv;
  22 +// private RadioGroup orderGroup;
  23 +// private RadioButton useAll;
  24 +// private RadioButton useQn;
  25 +// private RadioButton use1905;
  26 +//
  27 +// private void assignViews() {
  28 +// typeTv = (TextView) findViewById(R.id.type_tv);
  29 +// orderGroup = (RadioGroup) findViewById(R.id.orderGroup);
  30 +// useAll = (RadioButton) findViewById(R.id.useAll);
  31 +// useQn = (RadioButton) findViewById(R.id.useQn);
  32 +// use1905 = (RadioButton) findViewById(R.id.use1905);
  33 +//
  34 +// int sourceTypeIndex = sharedPreferences.getInt("source_type_index", 0);
  35 +// switch (sourceTypeIndex) {
  36 +// case 0:
  37 +// useAll.setChecked(true);
  38 +// break;
  39 +// case 1:
  40 +// useQn.setChecked(true);
  41 +// break;
  42 +// case 2:
  43 +// use1905.setChecked(true);
  44 +// break;
  45 +// }
  46 +//
  47 +// }
47 48
48 49
49 @Override 50 @Override
50 public void onCreate(Bundle savedInstanceState) { 51 public void onCreate(Bundle savedInstanceState) {
51 super.onCreate(savedInstanceState); 52 super.onCreate(savedInstanceState);
52 - setContentView(R.layout.a_chose_source);  
53 - sharedPreferences = this.getSharedPreferences(Constant.XML_NAME, Context.MODE_PRIVATE);  
54 - assignViews();  
55 - } 53 + TextView textView = new TextView(this);
  54 + textView.setTextSize(24);
  55 + textView.setPadding(20, 20, 20, 20);
  56 +
  57 + textView.setBackgroundColor(Color.BLACK);
  58 + textView.setTextColor(Color.WHITE);
  59 + FangTangApplication mApplication = (FangTangApplication) this.getApplication();
56 60
57 - public void save(View view) {  
58 - SharedPreferences.Editor editor = sharedPreferences.edit();  
59 - editor.putInt("source_type_index", 0);  
60 - switch (orderGroup.getCheckedRadioButtonId()) {  
61 - case R.id.useAll:  
62 - editor.putInt("source_type_index", 0);  
63 - break;  
64 - case R.id.useQn:  
65 - editor.putInt("source_type_index", 1);  
66 - break;  
67 - case R.id.use1905:  
68 - editor.putInt("source_type_index", 2);  
69 - break; 61 + if (mApplication.isEmptyMesh())
  62 + return;
  63 + Mesh mesh = mApplication.getMesh();
  64 + StringBuilder sb = new StringBuilder();
  65 +// sb.append("mesh config:").append(mesh.name).append(",").append(mesh.password).append("\n\n");
  66 +
  67 + final String roomInfoStr = Utils.getString(mApplication, "room-info");
  68 + if (!TextUtils.isEmpty(roomInfoStr)) {
  69 + RoomInfo roomInfo1 = new Gson().fromJson(roomInfoStr, RoomInfo.class);
  70 + sb.append("Room Name: ").append(roomInfo1.getData().getRoom_name()).append("\n\n");
  71 + sb.append("Room Sn: ").append(roomInfo1.getData().getRoom_sn()).append("\n\n");
  72 + sb.append("Store Sn: ").append(roomInfo1.getData().getStore_sn()).append("\n\n");
  73 + sb.append("Qr code: ").append(roomInfo1.getData().getQr_code()).append("\n\n");
  74 + sb.append("lock config: ").append(roomInfo1.getData().getMac_address()).append("\n\n");
70 } 75 }
71 - editor.apply(); 76 + sb.append("mesh config: ").append(mesh.name).append(",").append(mesh.password).append("\n\n");
  77 + textView.setText(sb.toString());
  78 + setContentView(textView);
  79 +
  80 +// sharedPreferences = this.getSharedPreferences(Constant.XML_NAME, Context.MODE_PRIVATE);
  81 +// assignViews();
72 } 82 }
  83 +//
  84 +// public void save(View view) {
  85 +// SharedPreferences.Editor editor = sharedPreferences.edit();
  86 +// editor.putInt("source_type_index", 0);
  87 +// switch (orderGroup.getCheckedRadioButtonId()) {
  88 +// case R.id.useAll:
  89 +// editor.putInt("source_type_index", 0);
  90 +// break;
  91 +// case R.id.useQn:
  92 +// editor.putInt("source_type_index", 1);
  93 +// break;
  94 +// case R.id.use1905:
  95 +// editor.putInt("source_type_index", 2);
  96 +// break;
  97 +// }
  98 +// editor.apply();
  99 +// }
73 } 100 }
@@ -1061,9 +1061,14 @@ public class MainActivity extends BaseActivity implements IMainView, EventListen @@ -1061,9 +1061,14 @@ public class MainActivity extends BaseActivity implements IMainView, EventListen
1061 // if (info == null || info.getData() == null) { 1061 // if (info == null || info.getData() == null) {
1062 // break; 1062 // break;
1063 // } 1063 // }
1064 - if (System.currentTimeMillis() - lastRequest > 3000) {  
1065 - lastRequest = System.currentTimeMillis();  
1066 - presenter.getCleanQrCode(roomStatusInfo.getData().getOrder_sn(), roomInfo.getData().getRoom_sn()); 1064 + if (roomStatusInfo != null && roomStatusInfo.getData() != null & roomInfo != null && roomInfo.getData() != null) {
  1065 + if (System.currentTimeMillis() - lastRequest > 3000) {
  1066 + lastRequest = System.currentTimeMillis();
  1067 + presenter.getCleanQrCode(roomStatusInfo.getData().getOrder_sn(), roomInfo.getData().getRoom_sn());
  1068 + }
  1069 + } else {
  1070 + Log.d("room-info", "roomStatusInfo is Null:" + (roomStatusInfo == null) +
  1071 + ",roomInfo is Null:" + (roomInfo == null));
1067 } 1072 }
1068 // startActivity(new Intent(this, QrCodeShowActivity.class).putExtra("qr", "updateOrderInfo")); 1073 // startActivity(new Intent(this, QrCodeShowActivity.class).putExtra("qr", "updateOrderInfo"));
1069 break; 1074 break;
@@ -328,6 +328,7 @@ public class MovieDetailMsgActivity extends BaseActivity @@ -328,6 +328,7 @@ public class MovieDetailMsgActivity extends BaseActivity
328 if (getOtherMovie().size() > 1) { 328 if (getOtherMovie().size() > 1) {
329 OpenMMUtils.openMM(context, path, getOtherMovie(), null); 329 OpenMMUtils.openMM(context, path, getOtherMovie(), null);
330 } else { 330 } else {
  331 + LeeImageLoader.clearCache();
331 OpenMMUtils.openMM(context, path, null, null); 332 OpenMMUtils.openMM(context, path, null, null);
332 } 333 }
333 } 334 }
@@ -3,6 +3,7 @@ package com.xgimi.gimicinema.activity; @@ -3,6 +3,7 @@ package com.xgimi.gimicinema.activity;
3 import android.app.Activity; 3 import android.app.Activity;
4 import android.os.Bundle; 4 import android.os.Bundle;
5 import android.os.Handler; 5 import android.os.Handler;
  6 +import android.util.Log;
6 import android.widget.ImageView; 7 import android.widget.ImageView;
7 8
8 import com.gimi.common.cinema.model.MessageEvent; 9 import com.gimi.common.cinema.model.MessageEvent;
@@ -21,6 +22,17 @@ public class QrCodeShowActivity extends Activity { @@ -21,6 +22,17 @@ public class QrCodeShowActivity extends Activity {
21 public static final int KILL_SELF = 0x9983; 22 public static final int KILL_SELF = 0x9983;
22 private Handler handler = new Handler(); 23 private Handler handler = new Handler();
23 private QrCodeShowPresent present; 24 private QrCodeShowPresent present;
  25 + Runnable r = new Runnable() {
  26 + @Override
  27 + public void run() {
  28 + LightOperationUtils.close();
  29 + LightOperationUtils.setLightValue(5);
  30 + new SystemUtils().closeFtLed(QrCodeShowActivity.this.getApplicationContext());
  31 + present.reportSleepStatus(oderSn, roomSn);
  32 + QrCodeShowActivity.this.finish();
  33 + }
  34 + };
  35 + private String oderSn, roomSn;
24 36
25 @Override 37 @Override
26 protected void onCreate(Bundle savedInstanceState) { 38 protected void onCreate(Bundle savedInstanceState) {
@@ -31,38 +43,45 @@ public class QrCodeShowActivity extends Activity { @@ -31,38 +43,45 @@ public class QrCodeShowActivity extends Activity {
31 present = new QrCodeShowPresent(); 43 present = new QrCodeShowPresent();
32 44
33 final String qr = getIntent().getStringExtra("qr"); 45 final String qr = getIntent().getStringExtra("qr");
34 - final String oderSn = getIntent().getStringExtra("order_sn");  
35 - final String roomSn = getIntent().getStringExtra("room_sn"); 46 + oderSn = getIntent().getStringExtra("order_sn");
  47 + roomSn = getIntent().getStringExtra("room_sn");
36 ImageView iv = (ImageView) findViewById(R.id.qrCodeIv); 48 ImageView iv = (ImageView) findViewById(R.id.qrCodeIv);
37 try { 49 try {
38 iv.setImageBitmap(QRCodeUtils.createQRCode(qr, 400)); 50 iv.setImageBitmap(QRCodeUtils.createQRCode(qr, 400));
39 } catch (WriterException e) { 51 } catch (WriterException e) {
40 e.printStackTrace(); 52 e.printStackTrace();
41 } 53 }
42 - handler.postDelayed(new Runnable() {  
43 - @Override  
44 - public void run() {  
45 - LightOperationUtils.close();  
46 - LightOperationUtils.setLightValue(5);  
47 - new SystemUtils().closeFtLed(QrCodeShowActivity.this.getApplicationContext());  
48 - present.reportSleepStatus(oderSn, roomSn);  
49 - QrCodeShowActivity.this.finish();  
50 - }  
51 - }, 20 * 60 * 1000); 54 +
  55 + handler.postDelayed(r, 9 * 60 * 1000);
  56 + try {
  57 + new SystemUtils().stopMediaPlayer(QrCodeShowActivity.this.getApplicationContext());
  58 + } catch (Exception e) {
  59 + e.printStackTrace();
  60 + }
  61 +
52 } 62 }
53 63
54 @Override 64 @Override
55 protected void onDestroy() { 65 protected void onDestroy() {
56 super.onDestroy(); 66 super.onDestroy();
  67 + handler.removeCallbacks(r);
57 handler.removeCallbacks(null); 68 handler.removeCallbacks(null);
58 EventBus.getDefault().unregister(this); 69 EventBus.getDefault().unregister(this);
59 } 70 }
60 71
  72 + @Override
  73 + protected void onPause() {
  74 + super.onPause();
  75 + handler.removeCallbacks(r);
  76 + handler.removeCallbacks(null);
  77 + }
  78 +
61 @Subscribe(threadMode = ThreadMode.MAIN) 79 @Subscribe(threadMode = ThreadMode.MAIN)
62 public void onMoonEvent(MessageEvent messageEvent) { 80 public void onMoonEvent(MessageEvent messageEvent) {
63 switch (messageEvent.getEventId()) { 81 switch (messageEvent.getEventId()) {
64 case KILL_SELF: 82 case KILL_SELF:
65 QrCodeShowActivity.this.finish(); 83 QrCodeShowActivity.this.finish();
  84 + Log.d("room-info", messageEvent.getMessage());
66 break; 85 break;
67 } 86 }
68 } 87 }
@@ -165,7 +165,7 @@ public class RoomInfoModelImpl implements IRoomInfoModel { @@ -165,7 +165,7 @@ public class RoomInfoModelImpl implements IRoomInfoModel {
165 165
166 @Override 166 @Override
167 public void reportOpenDoorStatus(String orderSn, final OpenDoorStatusListener listener) { 167 public void reportOpenDoorStatus(String orderSn, final OpenDoorStatusListener listener) {
168 - Log.d("room-info", "request:reportOpenDoorStatus,url = " + ROOM_QRCODE_BY_ORDER_SN + orderSn); 168 + Log.d("room-info", "request:reportOpenDoorStatus,url = " + ROOM_REPORT_ROOM_STATUS + orderSn);
169 OkHttpClientManager.getAsyn(ROOM_REPORT_ROOM_STATUS + orderSn, 169 OkHttpClientManager.getAsyn(ROOM_REPORT_ROOM_STATUS + orderSn,
170 new OkHttpClientManager.ResultCallback<String>() { 170 new OkHttpClientManager.ResultCallback<String>() {
171 @Override 171 @Override
@@ -21,6 +21,7 @@ import android.graphics.Bitmap; @@ -21,6 +21,7 @@ import android.graphics.Bitmap;
21 import android.text.TextUtils; 21 import android.text.TextUtils;
22 import android.util.Log; 22 import android.util.Log;
23 import android.widget.Toast; 23 import android.widget.Toast;
  24 +
24 import com.gimi.common.cinema.model.ClassificationItem; 25 import com.gimi.common.cinema.model.ClassificationItem;
25 import com.gimi.common.cinema.model.LocalMovieMessage; 26 import com.gimi.common.cinema.model.LocalMovieMessage;
26 import com.gimi.common.cinema.model.RoomInfo; 27 import com.gimi.common.cinema.model.RoomInfo;
@@ -37,7 +38,9 @@ import com.squareup.okhttp.Callback; @@ -37,7 +38,9 @@ import com.squareup.okhttp.Callback;
37 import com.squareup.okhttp.OkHttpClient; 38 import com.squareup.okhttp.OkHttpClient;
38 import com.squareup.okhttp.Request; 39 import com.squareup.okhttp.Request;
39 import com.squareup.okhttp.Response; 40 import com.squareup.okhttp.Response;
  41 +import com.telink.bluetooth.light.model.Mesh;
40 import com.xgimi.gimicinema.BuildConfig; 42 import com.xgimi.gimicinema.BuildConfig;
  43 +import com.xgimi.gimicinema.application.FangTangApplication;
41 import com.xgimi.gimicinema.model.AdsModelImpl; 44 import com.xgimi.gimicinema.model.AdsModelImpl;
42 import com.xgimi.gimicinema.model.IAdsModel; 45 import com.xgimi.gimicinema.model.IAdsModel;
43 import com.xgimi.gimicinema.model.IMainModel; 46 import com.xgimi.gimicinema.model.IMainModel;
@@ -100,7 +103,7 @@ public class MainPresenter extends BasePresenter @@ -100,7 +103,7 @@ public class MainPresenter extends BasePresenter
100 // updateAgentInfo(context); 103 // updateAgentInfo(context);
101 updateAppVersion(context); 104 updateAppVersion(context);
102 // updateClazz(context); 105 // updateClazz(context);
103 - updateDb(context); 106 +// updateDb(context);
104 updateRoomInfo(context); 107 updateRoomInfo(context);
105 // mainView.showMsg("abc"); 108 // mainView.showMsg("abc");
106 } 109 }
@@ -207,18 +210,24 @@ public class MainPresenter extends BasePresenter @@ -207,18 +210,24 @@ public class MainPresenter extends BasePresenter
207 new LocalDataUtils(context).updateDb(); 210 new LocalDataUtils(context).updateDb();
208 } 211 }
209 212
210 - public void updateRoomInfo(Context context) { 213 + public void updateRoomInfo(final Context context) {
211 String imei = SystemUtils.getPid(context, BuildConfig.BUILD_TYPE); 214 String imei = SystemUtils.getPid(context, BuildConfig.BUILD_TYPE);
212 roomInfoModel.getRoomInfo(imei, true, new RoomInfoModelImpl.GetRoomInfoListener() { 215 roomInfoModel.getRoomInfo(imei, true, new RoomInfoModelImpl.GetRoomInfoListener() {
213 @Override 216 @Override
214 public void onGetRoomInfoSuccess(RoomInfo info) { 217 public void onGetRoomInfoSuccess(RoomInfo info) {
215 mainView.notifyGetRoomInfo(info); 218 mainView.notifyGetRoomInfo(info);
  219 + String mesh_name = /*"abc";*/info.getData().getMesh_name();
  220 + String pwd = /*"123";*/info.getData().getPassword();
  221 + saveMesh(mesh_name, pwd, context);
216 Log.d("room-info", "get success:" + info.toString()); 222 Log.d("room-info", "get success:" + info.toString());
217 } 223 }
218 224
219 @Override 225 @Override
220 public void onGetRoomInfoUpdate(RoomInfo info) { 226 public void onGetRoomInfoUpdate(RoomInfo info) {
221 Log.d("room-info", "update success:" + info.toString()); 227 Log.d("room-info", "update success:" + info.toString());
  228 + String mesh_name = /*"abc";*/info.getData().getMesh_name();
  229 + String pwd = /*"123";*/info.getData().getPassword();
  230 + saveMesh(mesh_name, pwd, context);
222 mainView.notifyUpdateRoomInfo(info); 231 mainView.notifyUpdateRoomInfo(info);
223 } 232 }
224 233
@@ -229,6 +238,29 @@ public class MainPresenter extends BasePresenter @@ -229,6 +238,29 @@ public class MainPresenter extends BasePresenter
229 }); 238 });
230 } 239 }
231 240
  241 + private void saveMesh(String mesh_name, String pwd, Context context) {
  242 + Log.d("room-info", "saveMesh:" + mesh_name + "," + pwd);
  243 + if (!TextUtils.isEmpty(mesh_name) && !TextUtils.isEmpty(pwd) && !"dadousmart".equals(mesh_name)) {
  244 + FangTangApplication applicationContext = (FangTangApplication) context.getApplicationContext();
  245 + Mesh mesh = applicationContext.getMesh();
  246 +
  247 + if (mesh == null)
  248 + mesh = new Mesh();
  249 + mesh.allocDeviceAddress = null;
  250 + mesh.devices.clear();
  251 + mesh.factoryName = mesh.name;
  252 + mesh.factoryPassword = mesh.password;
  253 + mesh.name = mesh_name;
  254 + mesh.password = pwd;
  255 + //mesh.otaDevice = otaText.getText().toString().trim();
  256 +
  257 + if (mesh.saveOrUpdate()) {
  258 + Log.d("room-info", "saveMesh success:" + mesh_name + "," + pwd);
  259 + applicationContext.setMesh(mesh);
  260 + }
  261 + }
  262 + }
  263 +
232 public void reportOpenDoorStatus(String orderSn) { 264 public void reportOpenDoorStatus(String orderSn) {
233 roomInfoModel.reportOpenDoorStatus(orderSn, new RoomInfoModelImpl.OpenDoorStatusListener() { 265 roomInfoModel.reportOpenDoorStatus(orderSn, new RoomInfoModelImpl.OpenDoorStatusListener() {
234 @Override 266 @Override
@@ -35,7 +35,6 @@ import com.google.gson.Gson; @@ -35,7 +35,6 @@ import com.google.gson.Gson;
35 import com.xgimi.gimicinema.BuildConfig; 35 import com.xgimi.gimicinema.BuildConfig;
36 import com.xgimi.gimicinema.R; 36 import com.xgimi.gimicinema.R;
37 import com.xgimi.gimicinema.activity.CinemaConfig; 37 import com.xgimi.gimicinema.activity.CinemaConfig;
38 -import com.xgimi.gimicinema.activity.MovieDetailMsgActivity;  
39 import com.xgimi.gimicinema.model.DBUpdateModelImpl; 38 import com.xgimi.gimicinema.model.DBUpdateModelImpl;
40 import com.xgimi.gimicinema.model.IDBUpdateModel; 39 import com.xgimi.gimicinema.model.IDBUpdateModel;
41 import com.xgimi.gimicinema.model.IMovieMsgModel; 40 import com.xgimi.gimicinema.model.IMovieMsgModel;
@@ -47,8 +46,6 @@ import com.xgimi.gimicinema.model.OtherModelImpl; @@ -47,8 +46,6 @@ import com.xgimi.gimicinema.model.OtherModelImpl;
47 import com.xgimi.gimicinema.model.PosterModelImpl; 46 import com.xgimi.gimicinema.model.PosterModelImpl;
48 import com.xgimi.gimicinema.mview.IMovieDetailView; 47 import com.xgimi.gimicinema.mview.IMovieDetailView;
49 48
50 -import org.w3c.dom.Text;  
51 -  
52 import java.util.ArrayList; 49 import java.util.ArrayList;
53 import java.util.List; 50 import java.util.List;
54 51
@@ -24,6 +24,7 @@ import android.os.IBinder; @@ -24,6 +24,7 @@ import android.os.IBinder;
24 import android.os.RemoteException; 24 import android.os.RemoteException;
25 import android.util.Log; 25 import android.util.Log;
26 import android.widget.Toast; 26 import android.widget.Toast;
  27 +
27 import com.gimi.common.cinema.model.Constant; 28 import com.gimi.common.cinema.model.Constant;
28 import com.gimi.common.cinema.model.MessageEvent; 29 import com.gimi.common.cinema.model.MessageEvent;
29 import com.gimi.common.cinema.utils.Utils; 30 import com.gimi.common.cinema.utils.Utils;
@@ -34,6 +35,7 @@ import com.telink.bluetooth.light.ConnectionStatus; @@ -34,6 +35,7 @@ import com.telink.bluetooth.light.ConnectionStatus;
34 import com.telink.bluetooth.light.DeviceInfo; 35 import com.telink.bluetooth.light.DeviceInfo;
35 import com.xgimi.gimicinema.ICinemaControl; 36 import com.xgimi.gimicinema.ICinemaControl;
36 import com.xgimi.gimicinema.application.FangTangApplication; 37 import com.xgimi.gimicinema.application.FangTangApplication;
  38 +
37 import org.greenrobot.eventbus.EventBus; 39 import org.greenrobot.eventbus.EventBus;
38 40
39 import java.util.ArrayList; 41 import java.util.ArrayList;
@@ -79,7 +81,9 @@ public class CinemaControlService extends Service { @@ -79,7 +81,9 @@ public class CinemaControlService extends Service {
79 //TODO 播放一段时间确保状态为关闭 81 //TODO 播放一段时间确保状态为关闭
80 saveBeat = SAVE_BEAT; 82 saveBeat = SAVE_BEAT;
81 try { 83 try {
82 - if (Lights.getInstance().getByMeshAddress(((FangTangApplication)getApplication()).getConnectDevice().meshAddress).status== ConnectionStatus.ON) { 84 + if (!fadeOuting && Lights.getInstance().getByMeshAddress(
  85 + ((FangTangApplication) getApplication()).getConnectDevice().meshAddress).status
  86 + == ConnectionStatus.ON) {
83 fadeOut(); 87 fadeOut();
84 } 88 }
85 } catch (Exception e) { 89 } catch (Exception e) {
@@ -176,6 +180,12 @@ public class CinemaControlService extends Service { @@ -176,6 +180,12 @@ public class CinemaControlService extends Service {
176 public CinemaControlService() { 180 public CinemaControlService() {
177 } 181 }
178 182
  183 + Runnable doClose = new Runnable() {
  184 + @Override
  185 + public void run() {
  186 + close();
  187 + }
  188 + };
179 private int value; 189 private int value;
180 private Handler handler = new Handler(); 190 private Handler handler = new Handler();
181 private Runnable closeRunnable = new Runnable() { 191 private Runnable closeRunnable = new Runnable() {
@@ -186,12 +196,8 @@ public class CinemaControlService extends Service { @@ -186,12 +196,8 @@ public class CinemaControlService extends Service {
186 handler.postDelayed(this, 4 * 1000); 196 handler.postDelayed(this, 4 * 1000);
187 } else { 197 } else {
188 if (value == 0) { 198 if (value == 0) {
189 - handler.postDelayed(new Runnable() {  
190 - @Override  
191 - public void run() {  
192 - close();  
193 - }  
194 - }, 3 * 1000); 199 + //how to remove
  200 + handler.postDelayed(doClose, 3 * 1000);
195 } else { 201 } else {
196 handler.postDelayed(this, 80); 202 handler.postDelayed(this, 80);
197 } 203 }
@@ -245,8 +251,10 @@ public class CinemaControlService extends Service { @@ -245,8 +251,10 @@ public class CinemaControlService extends Service {
245 if (TelinkLightService.Instance().sendCommandNoResponse(opcode, address, params)) { 251 if (TelinkLightService.Instance().sendCommandNoResponse(opcode, address, params)) {
246 Log.d("aidl", "open all success"); 252 Log.d("aidl", "open all success");
247 } 253 }
  254 + fadeOuting = false;
248 } 255 }
249 256
  257 + private boolean fadeOuting = false;
250 private int maxValue = 50; 258 private int maxValue = 50;
251 259
252 private void fadeIn() { 260 private void fadeIn() {
@@ -260,30 +268,43 @@ public class CinemaControlService extends Service { @@ -260,30 +268,43 @@ public class CinemaControlService extends Service {
260 Toast.makeText(context, "若智能灯光是出厂设置,请重新配置", Toast.LENGTH_SHORT).show(); 268 Toast.makeText(context, "若智能灯光是出厂设置,请重新配置", Toast.LENGTH_SHORT).show();
261 return; 269 return;
262 } 270 }
  271 + maxValue = Utils.getInt(context, "brightness", 50);
263 if (byMeshAddress.status == ConnectionStatus.ON) { 272 if (byMeshAddress.status == ConnectionStatus.ON) {
  273 + fadeOuting = false;
  274 + handler.removeCallbacks(doClose);
264 handler.removeCallbacks(closeRunnable); 275 handler.removeCallbacks(closeRunnable);
  276 + open();
  277 + setLightValue(maxValue);
265 return; 278 return;
266 } 279 }
267 - maxValue = Utils.getInt(context, "brightness", 50);  
268 // int status = mApplication.getConnectDevice().status; 280 // int status = mApplication.getConnectDevice().status;
269 // Log.d("status_charge", "fadeIn: " + status); 281 // Log.d("status_charge", "fadeIn: " + status);
270 value = LIGHT_MIN_VALUE; 282 value = LIGHT_MIN_VALUE;
  283 +// if (byMeshAddress.brightness > value) {
  284 +// value = byMeshAddress.brightness;
  285 +// }
271 handler.post(openRunnable); 286 handler.post(openRunnable);
272 } 287 }
273 288
274 private void fadeOut() { 289 private void fadeOut() {
  290 + fadeOuting = true;
275 DeviceInfo connectDevice = mApplication.getConnectDevice(); 291 DeviceInfo connectDevice = mApplication.getConnectDevice();
276 if (connectDevice == null) { 292 if (connectDevice == null) {
  293 + fadeOuting = false;
277 Log.d("aidl", "connect device is null"); 294 Log.d("aidl", "connect device is null");
278 return; 295 return;
279 } 296 }
280 Light byMeshAddress = Lights.getInstance().getByMeshAddress(connectDevice.meshAddress); 297 Light byMeshAddress = Lights.getInstance().getByMeshAddress(connectDevice.meshAddress);
281 if (byMeshAddress == null) { 298 if (byMeshAddress == null) {
282 Toast.makeText(context, "若智能灯光是出厂设置,请重新配置", Toast.LENGTH_SHORT).show(); 299 Toast.makeText(context, "若智能灯光是出厂设置,请重新配置", Toast.LENGTH_SHORT).show();
  300 + fadeOuting = false;
283 return; 301 return;
284 } 302 }
285 if (byMeshAddress.status == ConnectionStatus.OFF) { 303 if (byMeshAddress.status == ConnectionStatus.OFF) {
286 handler.removeCallbacks(openRunnable); 304 handler.removeCallbacks(openRunnable);
  305 + fadeOuting = false;
  306 + setLightValue(LIGHT_MIN_VALUE);
  307 + close();
287 return; 308 return;
288 } 309 }
289 maxValue = Utils.getInt(context, "brightness", 50); 310 maxValue = Utils.getInt(context, "brightness", 50);

1.76 KB | W: | H:

1.76 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

987 Bytes | W: | H:

987 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin

9.07 KB | W: | H:

9.07 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

448 Bytes | W: | H:

448 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin

818 Bytes | W: | H:

818 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.44 KB | W: | H:

1.44 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.22 KB | W: | H:

1.22 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

82.7 KB | W: | H:

82.7 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

90.8 KB | W: | H:

90.8 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

140 KB | W: | H:

140 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

11.9 KB | W: | H:

11.9 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

29.3 KB | W: | H:

29.3 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.5 KB | W: | H:

1.5 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.35 KB | W: | H:

1.35 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

2.91 KB | W: | H:

2.91 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

2.54 KB | W: | H:

2.54 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

996 Bytes | W: | H:

996 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.14 KB | W: | H:

1.14 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

2.23 KB | W: | H:

2.23 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

3.91 KB | W: | H:

3.91 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.52 KB | W: | H:

1.52 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.48 KB | W: | H:

1.48 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

3.2 KB | W: | H:

3.2 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

3.32 KB | W: | H:

3.32 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

299 Bytes | W: | H:

299 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin

38.1 KB | W: | H:

38.1 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

20.1 KB | W: | H:

20.1 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

18 KB | W: | H:

18 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

15.6 KB | W: | H:

15.6 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

19 KB | W: | H:

19 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.41 KB | W: | H:

1.41 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

485 Bytes | W: | H:

485 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin

17.5 KB | W: | H:

17.5 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.4 KB | W: | H:

1.4 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

8.15 KB | W: | H:

8.15 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

16.2 KB | W: | H:

16.2 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

11.9 KB | W: | H:

11.9 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.09 KB | W: | H:

1.09 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
1 -<?xml version="1.0" encoding="utf-8"?>  
2 -<!-- 1 +<?xml version="1.0" encoding="utf-8"?><!--
3 ~ Copyright (c) 2016 wugian 2 ~ Copyright (c) 2016 wugian
4 ~ Licensed under the Apache License, Version 2.0 (the "License"); 3 ~ Licensed under the Apache License, Version 2.0 (the "License");
5 ~ you may not use this file except in compliance with the License. 4 ~ you may not use this file except in compliance with the License.
@@ -15,324 +14,398 @@ @@ -15,324 +14,398 @@
15 --> 14 -->
16 15
17 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 16 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
18 - android:layout_width="match_parent"  
19 - android:layout_height="match_parent"  
20 - android:background="@drawable/ic_general_bg"  
21 - android:orientation="horizontal"> 17 + android:layout_width="match_parent"
  18 + android:layout_height="match_parent"
  19 + android:background="@drawable/ic_general_bg"
  20 + android:orientation="horizontal">
22 21
23 <ScrollView 22 <ScrollView
24 - android:scrollbars="none"  
25 - android:layout_width="fill_parent"  
26 - android:layout_height="fill_parent">  
27 - <TableLayout android:orientation="vertical"  
28 - android:gravity="center|top"  
29 - android:layout_width="wrap_content"  
30 - android:layout_height="wrap_content">  
31 - <TableRow android:layout_width="match_parent"  
32 - android:layout_height="wrap_content">  
33 -  
34 - <TextView android:layout_width="match_parent"  
35 - android:layout_height="wrap_content"  
36 - android:layout_marginTop="20dp"  
37 - android:gravity="center|left"  
38 - android:layout_marginLeft="40dp"  
39 - android:drawableLeft="@drawable/ic_arrow"  
40 - android:id="@+id/type_tv"  
41 - android:text="@string/setting"  
42 - android:textSize="40sp"/> 23 + android:layout_width="fill_parent"
  24 + android:layout_height="fill_parent"
  25 + android:scrollbars="none">
  26 +
  27 + <TableLayout
  28 + android:layout_width="wrap_content"
  29 + android:layout_height="wrap_content"
  30 + android:gravity="center|top"
  31 + android:orientation="vertical">
  32 +
  33 + <TableRow
  34 + android:layout_width="match_parent"
  35 + android:layout_height="wrap_content">
  36 +
  37 + <TextView
  38 + android:id="@+id/type_tv"
  39 + android:layout_width="match_parent"
  40 + android:layout_height="wrap_content"
  41 + android:layout_marginLeft="40dp"
  42 + android:layout_marginTop="20dp"
  43 + android:drawableLeft="@drawable/ic_arrow"
  44 + android:gravity="center|left"
  45 + android:text="@string/setting"
  46 + android:textSize="40sp" />
43 </TableRow> 47 </TableRow>
44 48
45 49
46 - <TableRow android:layout_width="match_parent"  
47 - android:layout_marginLeft="40dp"  
48 - android:layout_height="wrap_content">  
49 - <TextView style="@style/GeneralTextViewTheme"  
50 - android:layout_marginRight="15dp"  
51 - android:text="@string/ip_promote"/>  
52 - <EditText style="@style/GeneralTextViewTheme"  
53 - android:id="@+id/ip_et"  
54 - android:hint="@string/ip_promote"  
55 - android:textColor="@color/black"  
56 - android:layout_width="400dp"/> 50 + <TableRow
  51 + android:layout_width="match_parent"
  52 + android:layout_height="wrap_content"
  53 + android:layout_marginLeft="40dp">
  54 +
  55 + <TextView
  56 + style="@style/GeneralTextViewTheme"
  57 + android:layout_marginRight="15dp"
  58 + android:text="@string/ip_promote" />
  59 +
  60 + <EditText
  61 + android:id="@+id/ip_et"
  62 + style="@style/GeneralTextViewTheme"
  63 + android:layout_width="400dp"
  64 + android:hint="@string/ip_promote"
  65 + android:textColor="@color/black" />
57 66
58 </TableRow> 67 </TableRow>
59 68
60 - <TableRow android:layout_width="match_parent"  
61 - android:layout_marginLeft="40dp"  
62 - android:id="@+id/name_row"  
63 - android:layout_height="wrap_content">  
64 - <TextView style="@style/GeneralTextViewTheme"  
65 - android:layout_marginRight="15dp"  
66 - android:text="@string/usr_promote"/>  
67 - <EditText style="@style/GeneralTextViewTheme"  
68 - android:textColor="@color/black"  
69 - android:layout_width="400dp"  
70 - android:hint="@string/usr_promote"  
71 - android:id="@+id/usr_et"/> 69 + <TableRow
  70 + android:id="@+id/name_row"
  71 + android:layout_width="match_parent"
  72 + android:layout_height="wrap_content"
  73 + android:layout_marginLeft="40dp">
  74 +
  75 + <TextView
  76 + style="@style/GeneralTextViewTheme"
  77 + android:layout_marginRight="15dp"
  78 + android:text="@string/usr_promote" />
  79 +
  80 + <EditText
  81 + android:id="@+id/usr_et"
  82 + style="@style/GeneralTextViewTheme"
  83 + android:layout_width="400dp"
  84 + android:hint="@string/usr_promote"
  85 + android:textColor="@color/black" />
72 86
73 </TableRow> 87 </TableRow>
74 88
75 - <TableRow android:layout_width="match_parent"  
76 - android:layout_marginLeft="40dp"  
77 - android:id="@+id/pwd_row"  
78 - android:layout_height="wrap_content">  
79 - <TextView style="@style/GeneralTextViewTheme"  
80 - android:layout_marginRight="15dp"  
81 - android:text="@string/pwd_promote"/>  
82 - <EditText style="@style/GeneralTextViewTheme"  
83 - android:textColor="@color/black"  
84 - android:layout_width="400dp"  
85 - android:hint="@string/pwd_promote"  
86 - android:id="@+id/pwd_et"/> 89 + <TableRow
  90 + android:id="@+id/pwd_row"
  91 + android:layout_width="match_parent"
  92 + android:layout_height="wrap_content"
  93 + android:layout_marginLeft="40dp">
  94 +
  95 + <TextView
  96 + style="@style/GeneralTextViewTheme"
  97 + android:layout_marginRight="15dp"
  98 + android:text="@string/pwd_promote" />
  99 +
  100 + <EditText
  101 + android:id="@+id/pwd_et"
  102 + style="@style/GeneralTextViewTheme"
  103 + android:layout_width="400dp"
  104 + android:hint="@string/pwd_promote"
  105 + android:textColor="@color/black" />
87 106
88 </TableRow> 107 </TableRow>
89 108
90 - <TableRow android:layout_width="match_parent"  
91 - android:layout_marginLeft="40dp"  
92 - android:layout_height="wrap_content">  
93 - <TextView style="@style/GeneralTextViewTheme"  
94 - android:layout_marginRight="15dp"  
95 - android:text="@string/folder_promote"/>  
96 - <EditText style="@style/GeneralTextViewTheme"  
97 - android:textColor="@color/black"  
98 - android:layout_width="400dp"  
99 - android:hint="@string/folder_promote"  
100 - android:id="@+id/folder_et"/> 109 + <TableRow
  110 + android:layout_width="match_parent"
  111 + android:layout_height="wrap_content"
  112 + android:layout_marginLeft="40dp">
  113 +
  114 + <TextView
  115 + style="@style/GeneralTextViewTheme"
  116 + android:layout_marginRight="15dp"
  117 + android:text="@string/folder_promote" />
  118 +
  119 + <EditText
  120 + android:id="@+id/folder_et"
  121 + style="@style/GeneralTextViewTheme"
  122 + android:layout_width="400dp"
  123 + android:hint="@string/folder_promote"
  124 + android:textColor="@color/black" />
101 125
102 </TableRow> 126 </TableRow>
103 127
104 - <TableRow android:layout_width="match_parent"  
105 - android:layout_marginLeft="40dp"  
106 - android:layout_height="wrap_content">  
107 -  
108 - <Button style="@style/GeneralTextViewTheme"  
109 - android:id="@+id/checkAppUpdate_btn"  
110 - android:textColor="@color/black"  
111 - android:onClick="checkAppUpdate"  
112 - android:text="@string/check_for_update"/>  
113 -  
114 - <Button style="@style/GeneralTextViewTheme"  
115 - android:text="@string/testing_connection"  
116 - android:textColor="@color/black"  
117 - android:id="@+id/testConnect_btn"  
118 - android:onClick="testConnecting"  
119 - android:layout_width="400dp"/> 128 + <TableRow
  129 + android:layout_width="match_parent"
  130 + android:layout_height="wrap_content"
  131 + android:layout_marginLeft="40dp">
  132 +
  133 + <Button
  134 + android:id="@+id/checkAppUpdate_btn"
  135 + style="@style/GeneralTextViewTheme"
  136 + android:onClick="checkAppUpdate"
  137 + android:text="@string/check_for_update"
  138 + android:textColor="@color/black" />
  139 +
  140 + <Button
  141 + android:id="@+id/testConnect_btn"
  142 + style="@style/GeneralTextViewTheme"
  143 + android:layout_width="400dp"
  144 + android:onClick="testConnecting"
  145 + android:text="@string/testing_connection"
  146 + android:textColor="@color/black" />
120 </TableRow> 147 </TableRow>
121 148
122 - <TableRow android:layout_width="match_parent"  
123 - android:layout_marginLeft="40dp"  
124 - android:layout_height="wrap_content">  
125 -  
126 - <Button style="@style/GeneralTextViewTheme"  
127 - android:onClick="copyOutDb"  
128 - android:id="@+id/copyOut_btn"  
129 - android:textColor="@color/black"  
130 - android:text="@string/cp_db"/>  
131 - <Button style="@style/GeneralTextViewTheme"  
132 - android:text="@string/pull_remote_db_data"  
133 - android:textColor="@color/black"  
134 - android:id="@+id/copyIn_btn"  
135 - android:onClick="copyInDb"/> 149 + <TableRow
  150 + android:layout_width="match_parent"
  151 + android:layout_height="wrap_content"
  152 + android:layout_marginLeft="40dp">
  153 +
  154 + <Button
  155 + android:id="@+id/copyOut_btn"
  156 + style="@style/GeneralTextViewTheme"
  157 + android:onClick="copyOutDb"
  158 + android:text="@string/cp_db"
  159 + android:textColor="@color/black" />
  160 +
  161 + <Button
  162 + android:id="@+id/copyIn_btn"
  163 + style="@style/GeneralTextViewTheme"
  164 + android:onClick="copyInDb"
  165 + android:text="@string/pull_remote_db_data"
  166 + android:textColor="@color/black" />
136 167
137 </TableRow> 168 </TableRow>
138 169
139 - <TableRow android:layout_width="match_parent"  
140 - android:layout_marginLeft="40dp"  
141 - android:layout_height="wrap_content">  
142 -  
143 - <Button style="@style/GeneralTextViewTheme"  
144 - android:onClick="choseSource"  
145 - android:id="@+id/choseSource_btn"  
146 - android:textColor="@color/black"  
147 - android:visibility="visible"  
148 - android:text="@string/chose_source"/>  
149 -  
150 - <Button style="@style/GeneralTextViewTheme"  
151 - android:layout_width="300dp"  
152 - android:layout_height="48dp"  
153 - android:textColor="@color/black"  
154 - android:maxLines="1"  
155 - android:onClick="updateDb"  
156 - android:id="@+id/updateDb_btn"  
157 - android:visibility="visible"  
158 - android:text="@string/update_db"/> 170 + <TableRow
  171 + android:layout_width="match_parent"
  172 + android:layout_height="wrap_content"
  173 + android:layout_marginLeft="40dp">
  174 +
  175 + <Button
  176 + android:id="@+id/choseSource_btn"
  177 + style="@style/GeneralTextViewTheme"
  178 + android:onClick="choseSource"
  179 + android:text="@string/check_config"
  180 + android:textColor="@color/black"
  181 + android:visibility="visible" />
  182 +
  183 + <Button
  184 + android:id="@+id/updateDb_btn"
  185 + style="@style/GeneralTextViewTheme"
  186 + android:layout_width="300dp"
  187 + android:layout_height="48dp"
  188 + android:maxLines="1"
  189 + android:onClick="updateDb"
  190 + android:text="@string/update_db"
  191 + android:textColor="@color/black"
  192 + android:visibility="visible" />
159 </TableRow> 193 </TableRow>
160 194
161 - <TableRow android:layout_width="match_parent"  
162 - android:layout_marginLeft="40dp"  
163 - android:layout_height="wrap_content">  
164 -  
165 - <Button style="@style/GeneralTextViewTheme"  
166 - android:id="@+id/addNewClazzBtn"  
167 - android:onClick="addNewClazz"  
168 - android:visibility="visible"  
169 - android:textColor="@color/black"  
170 - android:text="@string/update_type1"/>  
171 -  
172 - <Button style="@style/GeneralTextViewTheme"  
173 - android:onClick="update1905Movies"  
174 - android:visibility="visible"  
175 - android:id="@+id/update1905_btn"  
176 - android:textColor="@color/black"  
177 - android:text="@string/update_1905_source"/> 195 + <TableRow
  196 + android:layout_width="match_parent"
  197 + android:layout_height="wrap_content"
  198 + android:layout_marginLeft="40dp">
  199 +
  200 + <Button
  201 + android:id="@+id/addNewClazzBtn"
  202 + style="@style/GeneralTextViewTheme"
  203 + android:onClick="addNewClazz"
  204 + android:text="@string/update_type1"
  205 + android:textColor="@color/black"
  206 + android:visibility="visible" />
  207 +
  208 + <Button
  209 + android:id="@+id/update1905_btn"
  210 + style="@style/GeneralTextViewTheme"
  211 + android:onClick="update1905Movies"
  212 + android:text="@string/update_1905_source"
  213 + android:textColor="@color/black"
  214 + android:visibility="visible" />
178 </TableRow> 215 </TableRow>
179 216
180 - <TableRow android:layout_width="match_parent"  
181 - android:layout_marginLeft="40dp"  
182 - android:layout_height="wrap_content">  
183 -  
184 - <Button style="@style/GeneralTextViewTheme"  
185 - android:onClick="setLights"  
186 - android:visibility="visible"  
187 - android:textColor="@color/black"  
188 - android:text="@string/set_sm_light"/>  
189 -  
190 - <Button style="@style/GeneralTextViewTheme"  
191 - android:onClick="setSmartSwitch"  
192 - android:visibility="visible"  
193 - android:textColor="@color/black"  
194 - android:text="设置智能开关"/>  
195 -  
196 - <Button style="@style/GeneralTextViewTheme"  
197 - android:onClick="update1905Movies"  
198 - android:visibility="invisible"  
199 - android:textColor="@color/black"  
200 - android:text="@string/update_1905_source"/> 217 + <TableRow
  218 + android:layout_width="match_parent"
  219 + android:layout_height="wrap_content"
  220 + android:layout_marginLeft="40dp">
  221 +
  222 + <Button
  223 + style="@style/GeneralTextViewTheme"
  224 + android:onClick="setLights"
  225 + android:text="@string/set_sm_light"
  226 + android:textColor="@color/black"
  227 + android:visibility="visible" />
  228 +
  229 + <Button
  230 + style="@style/GeneralTextViewTheme"
  231 + android:onClick="setSmartSwitch"
  232 + android:text="设置智能开关"
  233 + android:textColor="@color/black"
  234 + android:visibility="visible" />
  235 +
  236 + <Button
  237 + style="@style/GeneralTextViewTheme"
  238 + android:onClick="update1905Movies"
  239 + android:text="@string/update_1905_source"
  240 + android:textColor="@color/black"
  241 + android:visibility="invisible" />
201 </TableRow> 242 </TableRow>
202 - <TableRow android:layout_width="match_parent"  
203 - android:layout_marginLeft="40dp"  
204 - android:layout_height="wrap_content">  
205 -  
206 - <Button style="@style/GeneralTextViewTheme"  
207 - android:onClick="testOpenDoor"  
208 - android:visibility="visible"  
209 - android:textColor="@color/black"  
210 - android:text="调试智能门禁"/>  
211 -  
212 - <Button style="@style/GeneralTextViewTheme"  
213 - android:onClick="setSmartScreen"  
214 - android:visibility="visible"  
215 - android:textColor="@color/black"  
216 - android:text="设置智能幕布"/>  
217 -  
218 - <Button style="@style/GeneralTextViewTheme"  
219 - android:onClick="update1905Movies"  
220 - android:visibility="invisible"  
221 - android:textColor="@color/black"  
222 - android:text="@string/update_1905_source"/> 243 +
  244 + <TableRow
  245 + android:layout_width="match_parent"
  246 + android:layout_height="wrap_content"
  247 + android:layout_marginLeft="40dp">
  248 +
  249 + <Button
  250 + style="@style/GeneralTextViewTheme"
  251 + android:onClick="testOpenDoor"
  252 + android:text="调试智能门禁"
  253 + android:textColor="@color/black"
  254 + android:visibility="visible" />
  255 +
  256 + <Button
  257 + style="@style/GeneralTextViewTheme"
  258 + android:onClick="setSmartScreen"
  259 + android:text="设置智能幕布"
  260 + android:textColor="@color/black"
  261 + android:visibility="visible" />
  262 +
  263 + <Button
  264 + style="@style/GeneralTextViewTheme"
  265 + android:onClick="update1905Movies"
  266 + android:text="@string/update_1905_source"
  267 + android:textColor="@color/black"
  268 + android:visibility="invisible" />
223 </TableRow> 269 </TableRow>
224 - <TableRow android:layout_width="match_parent"  
225 - android:layout_marginLeft="40dp"  
226 - android:visibility="gone"  
227 - android:layout_height="wrap_content">  
228 -  
229 - <TextView style="@style/GeneralTextViewTheme"  
230 - android:onClick="addNewClazz"  
231 - android:visibility="visible"  
232 - android:layout_gravity="center"  
233 - android:textColor="@color/white"  
234 - android:text="@string/pre_ads_times"/> 270 +
  271 + <TableRow
  272 + android:layout_width="match_parent"
  273 + android:layout_height="wrap_content"
  274 + android:layout_marginLeft="40dp"
  275 + android:visibility="gone">
  276 +
  277 + <TextView
  278 + style="@style/GeneralTextViewTheme"
  279 + android:layout_gravity="center"
  280 + android:onClick="addNewClazz"
  281 + android:text="@string/pre_ads_times"
  282 + android:textColor="@color/white"
  283 + android:visibility="visible" />
235 284
236 <Spinner 285 <Spinner
237 - android:id="@+id/choseAdsTime_sp"  
238 - android:gravity="center"  
239 - android:paddingLeft="20dp"  
240 - android:paddingRight="40dp"  
241 - android:layout_width="wrap_content"  
242 - android:layout_height="wrap_content"  
243 - /> 286 + android:id="@+id/choseAdsTime_sp"
  287 + android:layout_width="wrap_content"
  288 + android:layout_height="wrap_content"
  289 + android:gravity="center"
  290 + android:paddingLeft="20dp"
  291 + android:paddingRight="40dp" />
244 </TableRow> 292 </TableRow>
245 293
246 - <TableRow android:layout_width="match_parent"  
247 - android:layout_marginLeft="40dp"  
248 - android:layout_height="wrap_content"> 294 + <TableRow
  295 + android:layout_width="match_parent"
  296 + android:layout_height="wrap_content"
  297 + android:layout_marginLeft="40dp">
249 298
250 - <TextView style="@style/GeneralTextViewTheme"  
251 - android:onClick="getMoviesFromDoubanAndSave"  
252 - android:layout_marginRight="15dp"  
253 - android:text="@string/seri_num"/> 299 + <TextView
  300 + style="@style/GeneralTextViewTheme"
  301 + android:layout_marginRight="15dp"
  302 + android:onClick="getMoviesFromDoubanAndSave"
  303 + android:text="@string/seri_num" />
254 304
255 - <TextView style="@style/GeneralTextViewTheme"  
256 - android:id="@+id/seriNum_tv"  
257 - /> 305 + <TextView
  306 + android:id="@+id/seriNum_tv"
  307 + style="@style/GeneralTextViewTheme" />
258 </TableRow> 308 </TableRow>
259 309
260 - <TableRow android:layout_width="match_parent"  
261 - android:layout_marginLeft="40dp"  
262 - android:gravity="center|left"  
263 - android:layout_height="wrap_content"> 310 + <TableRow
  311 + android:visibility="gone"
  312 + android:layout_width="match_parent"
  313 + android:layout_height="wrap_content"
  314 + android:layout_marginLeft="40dp"
  315 + android:gravity="center|left">
  316 +
  317 + <TextView
  318 + style="@style/GeneralTextViewTheme"
  319 + android:layout_marginRight="15dp"
  320 + android:text="@string/start_open" />
264 321
265 - <TextView style="@style/GeneralTextViewTheme"  
266 - android:layout_marginRight="15dp"  
267 - android:text="@string/start_open"/>  
268 - <CheckBox android:layout_width="wrap_content"  
269 - android:id="@+id/startOpen"  
270 - android:layout_height="wrap_content"/> 322 + <CheckBox
  323 + android:id="@+id/startOpen"
  324 + android:layout_width="wrap_content"
  325 + android:layout_height="wrap_content" />
271 326
272 327
273 </TableRow> 328 </TableRow>
274 329
275 - <TableRow android:layout_width="match_parent"  
276 - android:layout_marginLeft="40dp"  
277 - android:gravity="center|left"  
278 - android:id="@+id/ssid_row"  
279 - android:layout_height="wrap_content"> 330 + <TableRow
  331 + android:id="@+id/ssid_row"
  332 + android:visibility="gone"
  333 + android:layout_width="match_parent"
  334 + android:layout_height="wrap_content"
  335 + android:layout_marginLeft="40dp"
  336 + android:gravity="center|left">
280 337
281 - <TextView style="@style/GeneralTextViewTheme"  
282 - android:layout_marginRight="15dp"  
283 - android:text="@string/open_wifi_ap"/>  
284 - <CheckBox android:layout_width="match_parent"  
285 - android:id="@+id/openAp"  
286 - android:layout_height="wrap_content"/> 338 + <TextView
  339 + style="@style/GeneralTextViewTheme"
  340 + android:layout_marginRight="15dp"
  341 + android:text="@string/open_wifi_ap" />
287 342
288 - </TableRow> 343 + <CheckBox
  344 + android:id="@+id/openAp"
  345 + android:layout_width="match_parent"
  346 + android:layout_height="wrap_content" />
289 347
290 - <TableRow android:layout_width="match_parent"  
291 - android:layout_marginLeft="40dp"  
292 - android:gravity="center|left"  
293 - android:id="@+id/ssid1_row"  
294 - android:layout_height="wrap_content"> 348 + </TableRow>
295 349
296 - <TextView style="@style/GeneralTextViewTheme"  
297 - android:layout_marginRight="15dp"  
298 - android:text="@string/ssid"/>  
299 - <EditText android:layout_width="match_parent"  
300 - android:hint="@string/ssid_hint"  
301 - android:id="@+id/ssid"  
302 - android:layout_height="wrap_content"/> 350 + <TableRow
  351 + android:id="@+id/ssid1_row"
  352 + android:layout_width="match_parent"
  353 + android:layout_height="wrap_content"
  354 + android:layout_marginLeft="40dp"
  355 + android:gravity="center|left"
  356 + android:visibility="gone">
  357 +
  358 + <TextView
  359 + style="@style/GeneralTextViewTheme"
  360 + android:layout_marginRight="15dp"
  361 + android:text="@string/ssid" />
  362 +
  363 + <EditText
  364 + android:id="@+id/ssid"
  365 + android:layout_width="match_parent"
  366 + android:layout_height="wrap_content"
  367 + android:hint="@string/ssid_hint" />
303 368
304 </TableRow><!-- android:text="@string/ssid_hint"--> 369 </TableRow><!-- android:text="@string/ssid_hint"-->
305 370
306 - <TableRow android:layout_width="match_parent"  
307 - android:layout_marginLeft="40dp"  
308 - android:gravity="center|left"  
309 - android:id="@+id/ssid2_row"  
310 - android:layout_height="wrap_content"> 371 + <TableRow
  372 + android:id="@+id/ssid2_row"
  373 + android:layout_width="match_parent"
  374 + android:layout_height="wrap_content"
  375 + android:layout_marginLeft="40dp"
  376 + android:visibility="gone"
  377 + android:gravity="center|left">
311 378
312 - <TextView style="@style/GeneralTextViewTheme"  
313 - android:layout_marginRight="15dp"  
314 - android:text="@string/pwd"/>  
315 - <EditText android:layout_width="match_parent"  
316 - android:id="@+id/pwd"  
317 - android:hint="@string/pwd_hint" 379 + <TextView
  380 + style="@style/GeneralTextViewTheme"
  381 + android:layout_marginRight="15dp"
  382 + android:text="@string/pwd" />
318 383
319 - android:layout_height="wrap_content"/> 384 + <EditText
  385 + android:id="@+id/pwd"
  386 + android:layout_width="match_parent"
  387 + android:layout_height="wrap_content"
  388 +
  389 + android:hint="@string/pwd_hint" />
320 390
321 </TableRow><!--android:text="@string/pwd_hint1"--> 391 </TableRow><!--android:text="@string/pwd_hint1"-->
322 392
323 - <TableRow android:layout_width="match_parent"  
324 - android:layout_marginLeft="40dp"  
325 - android:gravity="center|left"  
326 - android:layout_height="wrap_content"> 393 + <TableRow
  394 + android:layout_width="match_parent"
  395 + android:layout_height="wrap_content"
  396 + android:layout_marginLeft="40dp"
  397 + android:gravity="center|left">
  398 +
  399 + <TextView
  400 + style="@style/GeneralTextViewTheme"
  401 + android:layout_marginRight="15dp"
  402 + android:text="@string/app_list" />
327 403
328 - <TextView style="@style/GeneralTextViewTheme"  
329 - android:layout_marginRight="15dp"  
330 - android:text="@string/app_list"/>  
331 <com.xgimi.gimicinema.view.MetroGridView 404 <com.xgimi.gimicinema.view.MetroGridView
332 - android:layout_width="match_parent"  
333 - android:id="@+id/appList"  
334 - android:numColumns="1"  
335 - android:layout_height="wrap_content"/> 405 + android:id="@+id/appList"
  406 + android:layout_width="match_parent"
  407 + android:layout_height="wrap_content"
  408 + android:numColumns="1" />
336 409
337 </TableRow> 410 </TableRow>
338 </TableLayout> 411 </TableLayout>
@@ -93,6 +93,7 @@ @@ -93,6 +93,7 @@
93 <string name="load_more">加载更多</string> 93 <string name="load_more">加载更多</string>
94 <string name="update_1905_source">更新1905片源</string> 94 <string name="update_1905_source">更新1905片源</string>
95 <string name="chose_source">选择片源</string> 95 <string name="chose_source">选择片源</string>
  96 + <string name="check_config">查看配置</string>
96 97
97 <string name="use_all">使用全部</string> 98 <string name="use_all">使用全部</string>
98 <string name="use_qn">仅使用本地片源</string> 99 <string name="use_qn">仅使用本地片源</string>

50.3 KB | W: | H:

50.3 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

58.3 KB | W: | H:

58.3 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

42.1 KB | W: | H:

42.1 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

68 KB | W: | H:

68 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

68.3 KB | W: | H:

68.3 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

49.7 KB | W: | H:

49.7 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

52.6 KB | W: | H:

52.6 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

50.9 KB | W: | H:

50.9 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

3.34 KB | W: | H:

3.34 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

2.15 KB | W: | H:

2.15 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.76 KB | W: | H:

1.76 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

448 Bytes | W: | H:

448 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin

4.73 KB | W: | H:

4.73 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

7.54 KB | W: | H:

7.54 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

10.2 KB | W: | H:

10.2 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type

3.34 KB | W: | H:

3.34 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

2.15 KB | W: | H:

2.15 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

4.73 KB | W: | H:

4.73 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

7.54 KB | W: | H:

7.54 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

10.2 KB | W: | H:

10.2 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
Please register or login to post a comment