feat#415_绑定直接拿设备直接跳转
This commit is contained in:
parent
acc082c04f
commit
0f49a90240
|
|
@ -240,86 +240,8 @@ public class HotSpotConnentDeviceActivity extends BaseActivity {
|
|||
int devicePosition = 0;
|
||||
|
||||
public void toDevice() {
|
||||
Intent i = new Intent();
|
||||
// try {
|
||||
// Integer controlAmount = Commons.DEVICE.get(devicePosition).getControlAmount();
|
||||
// Integer timerAmount = Commons.DEVICE.get(devicePosition).getTimerAmount();
|
||||
// String type = Commons.DEVICE.get(devicePosition).type;
|
||||
// if (Commons.FishKey.On.equals(Commons.DEVICE.get(devicePosition).isBlacklist)) {//黑名单
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, BlackListActivity.class);
|
||||
// } else {
|
||||
// if (Device.TYPE_1C.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainThree1CControlActivity.class);
|
||||
// } else if (Device.TYPE_AA.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainFiveControlActivity.class);
|
||||
// } else if (Device.TYPE_BD.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainFiveBDControlActivity.class);
|
||||
// } else if (Device.TYPE_2A.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainSix_2A_ControlActivity.class);
|
||||
// } else if (Device.TYPE_2B.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainFour_2B_ControlActivity.class);
|
||||
// } else if (Device.TYPE_3A.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainHot_3A_ControlActivity.class);
|
||||
// } else if (Device.TYPE_2F.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainSeven_2F_ControlActivity.class);
|
||||
// } else if (Device.TYPE_3F.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainFour_3F_ControlActivity.class);
|
||||
// } else if (Device.TYPE_4F.equals(type) || Device.TYPE_5F.equals(type)){
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainSix_4F_ControlActivity.class);
|
||||
// } else {
|
||||
// if (controlAmount == null) {//如果控制器返回空 则默认给三控的页面
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainThreeControlActivity.class);
|
||||
// } else {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainThreeControlActivity.class);
|
||||
// switch (controlAmount) {
|
||||
// case 0: {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainZeroControlActivity.class);
|
||||
// break;
|
||||
// }
|
||||
// case 2: {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainTwoControlActivity.class);
|
||||
// break;
|
||||
// }
|
||||
// case 3: {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainThreeControlActivity.class);
|
||||
// break;
|
||||
// }
|
||||
// case 4: {
|
||||
// if (timerAmount == 6) { // 可丽爱
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainFiveControlActivity.class);
|
||||
// } else {//4控
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainFourControlActivity.class);
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
// case 5: {
|
||||
// if (6 == timerAmount) {//5控六定时器 询多页面
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainSixControlActivity.class);
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
// case 8: {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainEightControlActivity.class);
|
||||
// break;
|
||||
// }
|
||||
// default: {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainThreeControlActivity.class);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainThreeControlActivity.class);
|
||||
// }
|
||||
// i.putExtra("mac",device_mac);
|
||||
// i.putExtra("title",title);
|
||||
i.putExtra(BaseGradeActivity.BINDDEVICE, true);//绑定成功增加经验
|
||||
AppRoute.newToStart(HotSpotConnentDeviceActivity.this,i,deviceObj);
|
||||
AppRoute.newToStart(HotSpotConnentDeviceActivity.this,deviceObj,true);
|
||||
ToastUtil.show(HotSpotConnentDeviceActivity.this, "绑定设备成功");
|
||||
AnimationUtil.startAnimation(HotSpotConnentDeviceActivity.this);
|
||||
|
||||
EventBean eventBean =new EventBean(EventBean.LINK_FINISH,0);
|
||||
EventBus.getDefault().post(eventBean);
|
||||
finish();
|
||||
|
|
@ -494,87 +416,7 @@ public class HotSpotConnentDeviceActivity extends BaseActivity {
|
|||
Commons.HAVE_DEVICE = true;//改变判断是否绑定的变量
|
||||
Commons.IS_CAMERA = false;
|
||||
sp.putBoolean(LoginSPKey.IS_CAMERA, Commons.IS_CAMERA);
|
||||
Intent i = new Intent();
|
||||
// try {
|
||||
// Integer controlAmount = Commons.DEVICE.get(Commons.DevicePosition).getControlAmount();
|
||||
// Integer timerAmount = Commons.DEVICE.get(Commons.DevicePosition).getTimerAmount();
|
||||
// String type = Commons.DEVICE.get(Commons.DevicePosition).type;
|
||||
// if (Commons.FishKey.On.equals(Commons.DEVICE.get(Commons.DevicePosition).isBlacklist)) {//黑名单
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, BlackListActivity.class);
|
||||
// } else {
|
||||
// if (Device.TYPE_1C.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainThree1CControlActivity.class);
|
||||
// } else if (Device.TYPE_AA.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainFiveControlActivity.class);
|
||||
// } else if (Device.TYPE_BD.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainFiveBDControlActivity.class);
|
||||
// } else if (Device.TYPE_2A.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainSix_2A_ControlActivity.class);
|
||||
// } else if (Device.TYPE_2B.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainFour_2B_ControlActivity.class);
|
||||
// } else if (Device.TYPE_3A.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainHot_3A_ControlActivity.class);
|
||||
// } else if (Device.TYPE_2F.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainSeven_2F_ControlActivity.class);
|
||||
// } else if (Device.TYPE_3F.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainFour_3F_ControlActivity.class);
|
||||
// } else if (Device.TYPE_4F.equals(type) || Device.TYPE_5F.equals(type)){
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainSix_4F_ControlActivity.class);
|
||||
// } else {
|
||||
// if (controlAmount == null) {//如果控制器返回空 则默认给三控的页面
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainThreeControlActivity.class);
|
||||
// } else {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainThreeControlActivity.class);
|
||||
// switch (controlAmount) {
|
||||
// case 0: {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainZeroControlActivity.class);
|
||||
// break;
|
||||
// }
|
||||
// case 2: {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainTwoControlActivity.class);
|
||||
// break;
|
||||
// }
|
||||
// case 3: {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainThreeControlActivity.class);
|
||||
// break;
|
||||
// }
|
||||
// case 4: {
|
||||
// if (timerAmount == 6) { // 可丽爱
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainFiveControlActivity.class);
|
||||
// } else {//4控
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainFourControlActivity.class);
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
// case 5: {
|
||||
// if (6 == timerAmount) {//5控六定时器 询多页面
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainSixControlActivity.class);
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
// case 8: {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainEightControlActivity.class);
|
||||
// break;
|
||||
// }
|
||||
// default: {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainThreeControlActivity.class);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainThreeControlActivity.class);
|
||||
// }
|
||||
|
||||
// i.putExtra("title",title);
|
||||
// i.putExtra("mac",device_mac);
|
||||
i.putExtra(BaseGradeActivity.BINDDEVICE, true);//绑定成功增加经验
|
||||
|
||||
AppRoute.newToStart(HotSpotConnentDeviceActivity.this,i,deviceObj);
|
||||
AppRoute.newToStart(HotSpotConnentDeviceActivity.this,deviceObj,true);
|
||||
ToastUtil.show(HotSpotConnentDeviceActivity.this, "绑定设备成功");
|
||||
EventBean eventBean =new EventBean(EventBean.LINK_FINISH,0);
|
||||
EventBus.getDefault().post(eventBean);
|
||||
|
|
@ -619,86 +461,7 @@ public class HotSpotConnentDeviceActivity extends BaseActivity {
|
|||
Commons.HAVE_DEVICE = true;//改变判断是否绑定的变量
|
||||
Commons.IS_CAMERA = false;
|
||||
sp.putBoolean(LoginSPKey.IS_CAMERA, Commons.IS_CAMERA);
|
||||
Intent i = new Intent();
|
||||
// i.putExtra("mac",device_mac);
|
||||
// try {
|
||||
// Integer controlAmount = Commons.DEVICE.get(Commons.DevicePosition).getControlAmount();
|
||||
// Integer timerAmount = Commons.DEVICE.get(Commons.DevicePosition).getTimerAmount();
|
||||
// String type = Commons.DEVICE.get(Commons.DevicePosition).type;
|
||||
// if (Commons.FishKey.On.equals(Commons.DEVICE.get(Commons.DevicePosition).isBlacklist)) {//黑名单
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, BlackListActivity.class);
|
||||
// } else {
|
||||
// if (Device.TYPE_1C.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainThree1CControlActivity.class);
|
||||
// } else if (Device.TYPE_AA.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainFiveControlActivity.class);
|
||||
// } else if (Device.TYPE_BD.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainFiveBDControlActivity.class);
|
||||
// } else if (Device.TYPE_2A.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainSix_2A_ControlActivity.class);
|
||||
// } else if (Device.TYPE_2B.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainFour_2B_ControlActivity.class);
|
||||
// } else if (Device.TYPE_3A.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainHot_3A_ControlActivity.class);
|
||||
// } else if (Device.TYPE_2F.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainSeven_2F_ControlActivity.class);
|
||||
// } else if (Device.TYPE_3F.equals(type)) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainFour_3F_ControlActivity.class);
|
||||
// } else if (Device.TYPE_4F.equals(type) || Device.TYPE_5F.equals(type)){
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainSix_4F_ControlActivity.class);
|
||||
// } else {
|
||||
// if (controlAmount == null) {//如果控制器返回空 则默认给三控的页面
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainThreeControlActivity.class);
|
||||
// } else {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainThreeControlActivity.class);
|
||||
// switch (controlAmount) {
|
||||
// case 0: {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainZeroControlActivity.class);
|
||||
// break;
|
||||
// }
|
||||
// case 2: {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainTwoControlActivity.class);
|
||||
// break;
|
||||
// }
|
||||
// case 3: {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainThreeControlActivity.class);
|
||||
// break;
|
||||
// }
|
||||
// case 4: {
|
||||
// if (timerAmount == 6) { // 可丽爱
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainFiveControlActivity.class);
|
||||
// } else {//4控
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainFourControlActivity.class);
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
// case 5: {
|
||||
// if (6 == timerAmount) {//5控六定时器 询多页面
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainSixControlActivity.class);
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
// case 8: {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainEightControlActivity.class);
|
||||
// break;
|
||||
// }
|
||||
// default: {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainThreeControlActivity.class);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// i.setClass(HotSpotConnentDeviceActivity.this, MainThreeControlActivity.class);
|
||||
// }
|
||||
// i.putExtra("title",title);
|
||||
// i.putExtra("mac",device_mac);
|
||||
i.putExtra(BaseGradeActivity.BINDDEVICE, true);//绑定成功增加经验
|
||||
AppRoute.newToStart(HotSpotConnentDeviceActivity.this,i,deviceObj);
|
||||
AppRoute.newToStart(HotSpotConnentDeviceActivity.this,deviceObj,true);
|
||||
ToastUtil.show(HotSpotConnentDeviceActivity.this, "绑定设备成功");
|
||||
EventBean eventBean =new EventBean(EventBean.LINK_FINISH,0);
|
||||
EventBus.getDefault().post(eventBean);
|
||||
|
|
|
|||
|
|
@ -532,15 +532,8 @@ public class AirKissUtil {
|
|||
Commons.HAVE_DEVICE = true;//改变判断是否绑定的变量
|
||||
Commons.IS_CAMERA = false;
|
||||
sp.putBoolean(Commons.LoginSPKey.IS_CAMERA, Commons.IS_CAMERA);
|
||||
Intent i = new Intent();
|
||||
|
||||
// i.putExtra("mac",device_mac);
|
||||
// i.putExtra("title",title);
|
||||
i.putExtra(BaseGradeActivity.BINDDEVICE, true);//绑定成功增加经验
|
||||
ToastUtil.show(curActivity, "绑定设备成功");
|
||||
AppRoute.newToStart(curActivity,i,deviceObj);
|
||||
|
||||
AnimationUtil.startAnimation(curActivity);
|
||||
AppRoute.newToStart(curActivity,deviceObj,true);
|
||||
curActivity.finish();
|
||||
L.i("===================绑定设备成功=" + device_mac);
|
||||
break;
|
||||
|
|
@ -607,9 +600,7 @@ public class AirKissUtil {
|
|||
Commons.IS_CAMERA = false;
|
||||
sp.putBoolean(Commons.LoginSPKey.IS_CAMERA, Commons.IS_CAMERA);
|
||||
ToastUtil.show(curActivity, "绑定设备成功");
|
||||
Intent i = new Intent();
|
||||
i.putExtra(BaseGradeActivity.BINDDEVICE, true);//绑定成功增加经验
|
||||
AppRoute.newToStart(curActivity,i,deviceObj);
|
||||
AppRoute.newToStart(curActivity,deviceObj,true);
|
||||
|
||||
curActivity.finish();
|
||||
L.i("===================绑定设备成功=" + device_mac);
|
||||
|
|
|
|||
|
|
@ -1035,16 +1035,9 @@ public class NewBindDeviceActivity extends AppCompatActivity {
|
|||
};
|
||||
|
||||
private void toIntent(Device device){
|
||||
Intent i = new Intent();
|
||||
|
||||
dismissDialog();
|
||||
|
||||
// i.putExtra("mac",device_mac);
|
||||
// i.putExtra("title",title);
|
||||
i.putExtra(BaseGradeActivity.BINDDEVICE, true);//绑定成功增加经验
|
||||
ToastUtil.show(NewBindDeviceActivity.this, "绑定设备成功");
|
||||
AppRoute.newToStart(NewBindDeviceActivity.this,i,deviceObj);
|
||||
AnimationUtil.startAnimation(NewBindDeviceActivity.this);
|
||||
AppRoute.newToStart(NewBindDeviceActivity.this,deviceObj,true);
|
||||
EventBus.getDefault().post(new ConnectMessageEvent(1, "test"));
|
||||
finish();
|
||||
L.i("===================绑定设备成功=" + device_mac);
|
||||
|
|
@ -1095,11 +1088,8 @@ public class NewBindDeviceActivity extends AppCompatActivity {
|
|||
Commons.HAVE_DEVICE = true;//改变判断是否绑定的变量
|
||||
Commons.IS_CAMERA = false;
|
||||
sp.putBoolean(Commons.LoginSPKey.IS_CAMERA, Commons.IS_CAMERA);
|
||||
Intent i = new Intent();
|
||||
i.putExtra(BaseGradeActivity.BINDDEVICE, true);//绑定成功增加经验
|
||||
ToastUtil.show(NewBindDeviceActivity.this, "绑定设备成功");
|
||||
AppRoute.newToStart(NewBindDeviceActivity.this,i,deviceObj);
|
||||
AnimationUtil.startAnimation(NewBindDeviceActivity.this);
|
||||
AppRoute.newToStart(NewBindDeviceActivity.this,deviceObj,true);
|
||||
finish();
|
||||
L.i("===================绑定设备成功=" + device_mac);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1180,7 +1180,7 @@ public class DeviceFragment extends BaseV4Fragment implements ObservableScrollVi
|
|||
lv_camera.setAdapter(cameraAdapter);
|
||||
return;
|
||||
}
|
||||
Intent intent = new Intent();
|
||||
// Intent intent = new Intent();
|
||||
int index = 0;
|
||||
for (int i1 = 0; i1 < Commons.DEVICE.size(); i1++) {
|
||||
if (showDevice.get(position).getDeviceId().equals(Commons.DEVICE.get(i1).getDeviceId())) {
|
||||
|
|
@ -1193,9 +1193,9 @@ public class DeviceFragment extends BaseV4Fragment implements ObservableScrollVi
|
|||
sp.putBoolean(LoginSPKey.IS_CAMERA, Commons.IS_CAMERA);
|
||||
Device clickItem = (Device) lv_device.getItemAtPosition(position);
|
||||
if (clickItem!=null){
|
||||
AppRoute.newToStart(requireActivity(),intent,clickItem);
|
||||
AppRoute.newToStart(requireActivity(),clickItem,false);
|
||||
}else {
|
||||
AppRoute.oldToStart(requireActivity(),intent);
|
||||
AppRoute.oldToStart(requireActivity());
|
||||
}
|
||||
// try {
|
||||
// Integer controlAmount = Commons.DEVICE.get(Commons.DevicePosition).getControlAmount();
|
||||
|
|
|
|||
|
|
@ -6,11 +6,7 @@ import android.content.ClipboardManager;
|
|||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.ifish.activity.BlackListActivity;
|
||||
import com.ifish.activity.HotSpotConnentDeviceActivity;
|
||||
import com.ifish.activity.MainEightControlActivity;
|
||||
import com.ifish.activity.MainFiveBDControlActivity;
|
||||
import com.ifish.activity.MainFiveControlActivity;
|
||||
|
|
@ -27,59 +23,64 @@ import com.ifish.activity.MainThreeControlActivity;
|
|||
import com.ifish.activity.MainTwoControlActivity;
|
||||
import com.ifish.activity.MainZeroControlActivity;
|
||||
import com.ifish.basebean.Device;
|
||||
import com.ifish.baseclass.BaseGradeActivity;
|
||||
|
||||
public class AppRoute {
|
||||
public static void newToStart( Activity activity,Intent i ,Device device){
|
||||
|
||||
public static void newToStart( Activity activity,Device device,boolean isBind){
|
||||
if (device!=null){
|
||||
try {
|
||||
i.putExtra("device",device);
|
||||
L.i("jjia----deviceBean---"+device.toString());
|
||||
toAction(activity,i,device.getControlAmount(),device.getTimerAmount(),device.type);
|
||||
toAction(activity,device,isBind);
|
||||
}catch (Exception e) {
|
||||
Intent i = new Intent();
|
||||
ClipboardManager clipboardManager = (ClipboardManager) activity.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
ClipData mClipData = ClipData.newPlainText("Label", e.getMessage());
|
||||
clipboardManager.setPrimaryClip(mClipData);
|
||||
Toast.makeText(activity, "错误日志复制到剪贴板!", Toast.LENGTH_SHORT).show();
|
||||
i.setClass(activity, MainThreeControlActivity.class);
|
||||
}
|
||||
activity.startActivity(i);
|
||||
AnimationUtil.startAnimation(activity);
|
||||
}
|
||||
|
||||
|
||||
}else {
|
||||
oldToStart( activity, i );
|
||||
oldToStart(activity);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void toAction(Activity activity,Intent i,Integer controlAmount,Integer timerAmount, String type) {
|
||||
|
||||
public static void toAction(Activity activity,Device device,boolean isBind) {
|
||||
Intent i = new Intent();
|
||||
i.putExtra("device",device);
|
||||
i.putExtra(BaseGradeActivity.BINDDEVICE, isBind);//绑定成功增加经验
|
||||
if (Commons.FishKey.On.equals(Commons.DEVICE.get(Commons.DevicePosition).isBlacklist)) {//黑名单
|
||||
i.setClass(activity, BlackListActivity.class);
|
||||
} else {
|
||||
if (Device.TYPE_1C.equals(type)) {
|
||||
if (Device.TYPE_1C.equals(device.type)) {
|
||||
i.setClass(activity, MainThree1CControlActivity.class);
|
||||
} else if (Device.TYPE_AA.equals(type)) {
|
||||
} else if (Device.TYPE_AA.equals(device.type)) {
|
||||
i.setClass(activity, MainFiveControlActivity.class);
|
||||
} else if (Device.TYPE_BD.equals(type)) {
|
||||
} else if (Device.TYPE_BD.equals(device.type)) {
|
||||
i.setClass(activity, MainFiveBDControlActivity.class);
|
||||
} else if (Device.TYPE_2A.equals(type)) {
|
||||
} else if (Device.TYPE_2A.equals(device.type)) {
|
||||
i.setClass(activity, MainSix_2A_ControlActivity.class);
|
||||
} else if (Device.TYPE_2B.equals(type)) {
|
||||
} else if (Device.TYPE_2B.equals(device.type)) {
|
||||
i.setClass(activity, MainFour_2B_ControlActivity.class);
|
||||
} else if (Device.TYPE_3A.equals(type)) {
|
||||
} else if (Device.TYPE_3A.equals(device.type)) {
|
||||
i.setClass(activity, MainHot_3A_ControlActivity.class);
|
||||
} else if (Device.TYPE_2F.equals(type)) {
|
||||
} else if (Device.TYPE_2F.equals(device.type)) {
|
||||
i.setClass(activity, MainSeven_2F_ControlActivity.class);
|
||||
} else if (Device.TYPE_3F.equals(type)) {
|
||||
} else if (Device.TYPE_3F.equals(device.type)) {
|
||||
i.setClass(activity, MainFour_3F_ControlActivity.class);
|
||||
} else if (Device.TYPE_4F.equals(type) || Device.TYPE_5F.equals(type)) {
|
||||
} else if (Device.TYPE_4F.equals(device.type) || Device.TYPE_5F.equals(device.type)) {
|
||||
i.setClass(activity, MainSix_4F_ControlActivity.class);
|
||||
} else {
|
||||
if (controlAmount == null) {//如果控制器返回空 则默认给三控的页面
|
||||
if (device.getControlAmount() == null) {//如果控制器返回空 则默认给三控的页面
|
||||
i.setClass(activity, MainThreeControlActivity.class);
|
||||
} else {
|
||||
i.setClass(activity, MainThreeControlActivity.class);
|
||||
switch (controlAmount) {
|
||||
switch (device.getControlAmount()) {
|
||||
case 0: {
|
||||
i.setClass(activity, MainZeroControlActivity.class);
|
||||
break;
|
||||
|
|
@ -93,7 +94,7 @@ public class AppRoute {
|
|||
break;
|
||||
}
|
||||
case 4: {
|
||||
if (timerAmount == 6) { // 可丽爱
|
||||
if (device.getTimerAmount() == 6) { // 可丽爱
|
||||
i.setClass(activity, MainFiveControlActivity.class);
|
||||
} else {//4控
|
||||
i.setClass(activity, MainFourControlActivity.class);
|
||||
|
|
@ -101,7 +102,7 @@ public class AppRoute {
|
|||
break;
|
||||
}
|
||||
case 5: {
|
||||
if (6 == timerAmount) {//5控六定时器 询多页面
|
||||
if (6 == device.getTimerAmount()) {//5控六定时器 询多页面
|
||||
i.setClass(activity, MainSixControlActivity.class);
|
||||
}
|
||||
break;
|
||||
|
|
@ -118,17 +119,17 @@ public class AppRoute {
|
|||
}
|
||||
}
|
||||
}
|
||||
activity.startActivity(i);
|
||||
AnimationUtil.startAnimation(activity);
|
||||
}
|
||||
|
||||
public static void oldToStart(Activity activity,Intent i ){
|
||||
public static void oldToStart(Activity activity){
|
||||
Intent i = new Intent();
|
||||
try {
|
||||
Integer controlAmount = Commons.DEVICE.get(Commons.DevicePosition).getControlAmount();
|
||||
Integer timerAmount = Commons.DEVICE.get(Commons.DevicePosition).getTimerAmount();
|
||||
String type = Commons.DEVICE.get(Commons.DevicePosition).type;
|
||||
|
||||
|
||||
toAction(activity,i,controlAmount,timerAmount,type);
|
||||
L.i("jjia-------mainclick--type-"+type);
|
||||
Device device = Commons.DEVICE.get(Commons.DevicePosition);
|
||||
toAction(activity,device,false);
|
||||
L.i("jjia-------mainclick--type-"+device.type);
|
||||
L.i("jjia-------mainclick--"+Commons.DEVICE.get(Commons.DevicePosition).toString());
|
||||
|
||||
} catch (Exception e) {
|
||||
|
|
@ -137,8 +138,9 @@ public class AppRoute {
|
|||
clipboardManager.setPrimaryClip(mClipData);
|
||||
Toast.makeText(activity, "错误日志复制到剪贴板!", Toast.LENGTH_SHORT).show();
|
||||
i.setClass(activity, MainThreeControlActivity.class);
|
||||
}
|
||||
activity.startActivity(i);
|
||||
AnimationUtil.startAnimation(activity);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue