+ view.onPrinterStatusFetched(context.getString(R.string.printer_is_disconnected));
}
}
}
@@ -20,6 +20,7 @@ import java.util.ArrayList; |
||
| 20 | 20 |
import java.util.Vector; |
| 21 | 21 |
|
| 22 | 22 |
import ai.pai.lensman.App; |
| 23 |
+import ai.pai.lensman.R; |
|
| 23 | 24 |
import ai.pai.lensman.bean.PhotoBean; |
| 24 | 25 |
import ai.pai.lensman.bean.SessionBean; |
| 25 | 26 |
import ai.pai.lensman.db.DBService; |
@@ -141,8 +142,8 @@ public class SessionPresenter implements SessionContract.Presenter, SessionInter |
||
| 141 | 142 |
if (r != GpCom.ERROR_CODE.SUCCESS) {
|
| 142 | 143 |
sessionView.showToast( GpCom.getErrorText(r)); |
| 143 | 144 |
} |
| 144 |
- } catch (RemoteException e) {
|
|
| 145 |
- e.printStackTrace(); |
|
| 145 |
+ } catch (Exception e) {
|
|
| 146 |
+ sessionView.showToast(App.getAppContext().getString(R.string.go_check_printer)); |
|
| 146 | 147 |
} |
| 147 | 148 |
} |
| 148 | 149 |
|
@@ -93,7 +93,7 @@ |
||
| 93 | 93 |
android:id="@+id/tv_printer_status" |
| 94 | 94 |
android:layout_width="wrap_content" |
| 95 | 95 |
android:layout_height="wrap_content" |
| 96 |
- android:text="@string/query_processing" |
|
| 96 |
+ android:text="@string/click_to_query" |
|
| 97 | 97 |
android:textColor="@color/dark_grey" |
| 98 | 98 |
android:textSize="16sp" /> |
| 99 | 99 |
</LinearLayout> |
@@ -100,4 +100,14 @@ |
||
| 100 | 100 |
<string name="click_to_connect">点击连接</string> |
| 101 | 101 |
|
| 102 | 102 |
<string name="connecting">尝试连接中</string> |
| 103 |
+ |
|
| 104 |
+ <string name="click_to_query">点击查询打印机状态</string> |
|
| 105 |
+ |
|
| 106 |
+ <string name="go_check_printer">请检查打印机</string> |
|
| 107 |
+ |
|
| 108 |
+ <string name="printer_port_open_fail">打印机端口打开失败</string> |
|
| 109 |
+ |
|
| 110 |
+ <string name="printer_status_query_fail">打印机状态查询失败</string> |
|
| 111 |
+ |
|
| 112 |
+ <string name="printer_service_boot_fail">打印机服务连接失败,请退出应用重试</string> |
|
| 103 | 113 |
</resources> |