Commit d875e8eb by sikang

UPDATE

parent 095f4b65
......@@ -12,6 +12,7 @@ import android.net.Uri;
import android.os.Build;
import android.provider.CallLog;
import android.provider.ContactsContract;
import android.provider.Telephony;
import android.support.v4.content.PermissionChecker;
import android.text.TextUtils;
import android.util.Log;
......@@ -28,6 +29,8 @@ import java.util.Map;
import tech.starwin.database.entity.CallLogEntity;
import tech.starwin.database.entity.ContactEntity;
import tech.starwin.database.entity.SmsEntity;
import tech.starwin.utils.LogUtils;
import tech.starwin.utils.collection.UploadManager;
/**
* Created by SiKang on 2018/10/19.
......@@ -391,8 +394,7 @@ public class DataBaseHelper {
return com.annimon.stream.Optional.of(entity);
} catch (Exception e) {
// UploadUtils.uploadException(e, "getOneContact");
UploadManager.uploadException(e, "getOneContact");
return com.annimon.stream.Optional.empty();
}
}
......@@ -411,11 +413,12 @@ public class DataBaseHelper {
// "subject"},
try {
final String address = cursor.getString(1);
final int type = cursor.getInt(2);
final long date = cursor.getLong(3);
final String body = cursor.getString(4);
final String subject = cursor.getString(5);
final String address = cursor.getString(cursor.getColumnIndex("address"));
final int type = cursor.getInt(cursor.getColumnIndex("type"));
final long date = cursor.getLong(cursor.getColumnIndex("date"));
final String body = cursor.getString(cursor.getColumnIndex("body"));
final String subject = cursor.getString(cursor.getColumnIndex("subject"));
SmsEntity smsEntity = new SmsEntity() {{
setAddress(address);
......@@ -426,7 +429,7 @@ public class DataBaseHelper {
}};
return com.annimon.stream.Optional.of(smsEntity);
} catch (Exception e) {
// UploadUtils.uploadException(e, "getOneSms");
UploadManager.uploadException(e, "getOneSms");
return com.annimon.stream.Optional.empty();
}
}
......
......@@ -8,6 +8,7 @@ import java.io.Serializable;
public class DisplayBean implements Serializable {
private String description;
private String customerMobile;
//登录方式 SMS:短信登录
private String loginType;
private long updateTime;
......
package tech.starwin.mvp.presenter;
import android.annotation.SuppressLint;
import android.content.Context;
import android.support.annotation.NonNull;
......@@ -9,15 +8,11 @@ import com.google.gson.Gson;
import java.io.File;
import okhttp3.ResponseBody;
import tech.starwin.base.BasePresenter;
import tech.starwin.impl.HttpObserver;
import tech.starwin.mvp.api.UploadApi;
import tech.starwin.mvp.beans.BasicAck;
import tech.starwin.mvp.beans.EmploymentBean;
import tech.starwin.mvp.beans.OcrResultBean;
import tech.starwin.mvp.beans.ProductBean;
import tech.starwin.mvp.beans.TotalAmount;
import tech.starwin.utils.GeneralUtils;
import tech.starwin.utils.LoginManager;
import tech.starwin.utils.MultipartBodyMaker;
......
......@@ -350,7 +350,6 @@ public class UserPresenter extends BasePresenter<UserApi> {
* 提交工作信息
*/
public void submitEmploymentInfo(String action, File workCardImage, EmploymentServerBean employmentBean) {
Observable<ResponseBody> info = ServiceGenerator.getService(UserApi.class)
.submitEmploymentInfo(employmentBean.getCompanyName(),
employmentBean.getCompanyProvince(),
......@@ -365,6 +364,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
if (workCardImage != null && !workCardImage.exists()) {
Observable<ResponseBody> upload = getService(UploadApi.class).uploadPhoto(MultipartBodyMaker.makeSimplePart("file", workCardImage), UploadApi.UploadType.EMPLOYMENT_PHOTO.name(), LoginManager.get().getToken());
handleRequest(action, Observable.zip(info, upload, new BiFunction<ResponseBody, ResponseBody, Boolean>() {
@Override
public Boolean apply(ResponseBody responseBody, ResponseBody responseBody2) throws Exception {
......@@ -375,7 +375,6 @@ public class UserPresenter extends BasePresenter<UserApi> {
handleRequest(action, info);
}
}
/**
......
......@@ -61,6 +61,7 @@ public class QMUIHelper {
final QMUIEmptyView emptyView = new QMUIEmptyView(targetView.getContext());
emptyView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
emptyView.setBackgroundColor(Color.WHITE);
//给targetView 套壳
final PageStateLayout pageStateLayout = new PageStateLayout.Builder(targetView)
.setStateView(emptyView)
......
......@@ -42,7 +42,7 @@ public class TitleSpan extends LinearLayout {
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
if (getChildCount() > 1 && indexOfChild(child) != 0) {
if (TextUtils.isEmpty(s.toString().replace(" ", ""))) {
if (TextUtils.isEmpty(s.toString())) {
getChildAt(0).setVisibility(GONE);
} else {
getChildAt(0).setVisibility(VISIBLE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment