- if(task==null){
- return;
- }
- if(task.getStatus()== AsyncTask.Status.RUNNING){
- task.cancel(true);
- }
- }
}
@@ -78,12 +78,7 @@ public class SessionPresenter implements SessionContract.Presenter, SessionInter |
||
| 78 | 78 |
|
| 79 | 79 |
@Override |
| 80 | 80 |
public void onSessionStartError(String session) {
|
| 81 |
-// if (!isWorking) {
|
|
| 82 |
-// return; |
|
| 83 |
-// } |
|
| 84 | 81 |
sessionView.showToast("session启动失败");
|
| 85 |
-// interactor.startSession(); |
|
| 86 |
-// LogHelper.d(TAG,"onSessionStartError session启动失败,自动重试中"); |
|
| 87 | 82 |
} |
| 88 | 83 |
|
| 89 | 84 |
@Override |
@@ -3,17 +3,12 @@ package ai.pai.lensman.settings; |
||
| 3 | 3 |
import android.content.Intent; |
| 4 | 4 |
import android.os.Bundle; |
| 5 | 5 |
import android.support.annotation.Nullable; |
| 6 |
-import android.view.View; |
|
| 7 |
-import android.widget.EditText; |
|
| 8 |
-import android.widget.Toast; |
|
| 9 | 6 |
|
| 10 | 7 |
import ai.pai.lensman.R; |
| 11 | 8 |
import ai.pai.lensman.activities.AboutUsActivity; |
| 12 | 9 |
import ai.pai.lensman.activities.FeedbackActivity; |
| 13 | 10 |
import ai.pai.lensman.activities.WebViewActivity; |
| 14 | 11 |
import ai.pai.lensman.base.BaseActivity; |
| 15 |
-import ai.pai.lensman.utils.BoxUrlContainer; |
|
| 16 |
-import butterknife.BindView; |
|
| 17 | 12 |
import butterknife.ButterKnife; |
| 18 | 13 |
import butterknife.OnClick; |
| 19 | 14 |
|
@@ -1,26 +0,0 @@ |
||
| 1 |
-package ai.pai.lensman.utils; |
|
| 2 |
- |
|
| 3 |
-public class BoxUrlContainer {
|
|
| 4 |
- |
|
| 5 |
- public static String BOX_IP = "192.168.8.101"; |
|
| 6 |
- |
|
| 7 |
- private static String BASE_URL = "http://" + BOX_IP + ":8002/"; |
|
| 8 |
- |
|
| 9 |
- public static String SESSION_START_URL = BASE_URL + "session_start"; |
|
| 10 |
- |
|
| 11 |
- public static String SESSION_END_URL = BASE_URL + "session_end"; |
|
| 12 |
- |
|
| 13 |
- public static String DELETE_PHOTO_URL = BASE_URL + "delete_photo"; |
|
| 14 |
- |
|
| 15 |
- public static String FETCH_THUMBNAIL_URL = BASE_URL + "fetch_thumbnail"; |
|
| 16 |
- |
|
| 17 |
- public static String PHOTO_PATH_PREFIX_URL = BASE_URL + "static/"; |
|
| 18 |
- |
|
| 19 |
- /** |
|
| 20 |
- * lensman # 摄影师唯一标识 |
|
| 21 |
- * session # Session |
|
| 22 |
- * name # fetch_thumbnail 返回 |
|
| 23 |
- */ |
|
| 24 |
- public static String FETCH_ORIGIN_URL = BASE_URL +"fetch_origin"; |
|
| 25 |
- |
|
| 26 |
-} |
@@ -1,40 +0,0 @@ |
||
| 1 |
-<?xml version="1.0" encoding="utf-8"?> |
|
| 2 |
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|
| 3 |
- android:layout_width="match_parent" |
|
| 4 |
- android:layout_height="wrap_content" |
|
| 5 |
- android:orientation="horizontal" |
|
| 6 |
- android:paddingBottom="4dp" |
|
| 7 |
- android:paddingTop="4dp"> |
|
| 8 |
- |
|
| 9 |
- <LinearLayout |
|
| 10 |
- android:layout_width="0dp" |
|
| 11 |
- android:layout_height="wrap_content" |
|
| 12 |
- android:layout_gravity="center_vertical" |
|
| 13 |
- android:orientation="vertical" |
|
| 14 |
- android:layout_weight="1"> |
|
| 15 |
- |
|
| 16 |
- <TextView |
|
| 17 |
- android:id="@+id/tv_device_name" |
|
| 18 |
- android:layout_width="wrap_content" |
|
| 19 |
- android:layout_height="wrap_content" |
|
| 20 |
- android:textColor="@color/dark_grey" |
|
| 21 |
- android:textSize="14sp" /> |
|
| 22 |
- |
|
| 23 |
- <TextView |
|
| 24 |
- android:id="@+id/tv_device_mac" |
|
| 25 |
- android:layout_width="wrap_content" |
|
| 26 |
- android:layout_height="wrap_content" |
|
| 27 |
- android:paddingTop="3dp" |
|
| 28 |
- android:textColor="@color/grey" |
|
| 29 |
- android:textSize="12sp" /> |
|
| 30 |
- </LinearLayout> |
|
| 31 |
- |
|
| 32 |
- <TextView |
|
| 33 |
- android:id="@+id/tv_device_status" |
|
| 34 |
- android:layout_width="wrap_content" |
|
| 35 |
- android:layout_height="wrap_content" |
|
| 36 |
- android:layout_marginRight="12dp" |
|
| 37 |
- android:layout_gravity="center_vertical" |
|
| 38 |
- android:textColor="@color/grey" |
|
| 39 |
- android:textSize="14sp" /> |
|
| 40 |
-</LinearLayout> |