Commit e9f800d8df3d61f0a1123c251c14b6f3ba9dfbcc

Authored by wugian
1 parent b4a982c6

add test open door

... ... @@ -5,6 +5,7 @@ import android.content.Context;
5 5 import android.content.Intent;
6 6 import android.os.Bundle;
7 7 import android.text.TextUtils;
  8 +import android.util.Log;
8 9 import android.view.KeyEvent;
9 10 import android.view.View;
10 11 import android.widget.AdapterView;
... ... @@ -19,6 +20,7 @@ import android.widget.Spinner;
19 20 import android.widget.TableRow;
20 21 import android.widget.TextView;
21 22 import android.widget.Toast;
  23 +import com.gimi.common.cinema.model.MessageEvent;
22 24 import com.gimi.common.cinema.model.SambaMsg;
23 25 import com.gimi.common.cinema.utils.T;
24 26 import com.gimi.common.cinema.utils.WifiApManger;
... ... @@ -27,10 +29,13 @@ import com.xgimi.gimicinema.R;
27 29 import com.xgimi.gimicinema.mview.ISettingView;
28 30 import com.xgimi.gimicinema.presenter.SettingPresenter;
29 31 import com.xgimi.smartscreen.ConfigActivity;
  32 +import org.greenrobot.eventbus.EventBus;
30 33
31 34 import java.util.ArrayList;
32 35 import java.util.HashMap;
33 36
  37 +import static com.qnbar.smc.service.SocketService.JUST_OPEN_DOOR;
  38 +
34 39 /**
35 40 * 设置类
36 41 * Created by pc on 2014/12/16.
... ... @@ -330,4 +335,16 @@ public class SettingActivity extends BaseActivity implements ISettingView {
330 335 Intent intent = new Intent(this, ConfigActivity.class);
331 336 startActivity(intent);
332 337 }
  338 +
  339 + public void testOpenDoor(View view) {
  340 + openDoor(JUST_OPEN_DOOR, "setting test open door");
  341 + }
  342 +
  343 + private void openDoor(int type, String msg) {
  344 + Log.d("room-info", "setting test open door");
  345 + MessageEvent messageEvent = new MessageEvent();
  346 + messageEvent.setEventId(type);
  347 + messageEvent.setMessage(msg);
  348 + EventBus.getDefault().post(messageEvent);
  349 + }
333 350 }
... ...
... ... @@ -204,10 +204,10 @@
204 204 android:layout_height="wrap_content">
205 205
206 206 <Button style="@style/GeneralTextViewTheme"
207   - android:onClick="setLights"
  207 + android:onClick="testOpenDoor"
208 208 android:visibility="visible"
209 209 android:textColor="@color/black"
210   - android:text="@string/set_sm_light"/>
  210 + android:text="调试智能门禁"/>
211 211
212 212 <Button style="@style/GeneralTextViewTheme"
213 213 android:onClick="setSmartScreen"
... ...
Please register or login to post a comment