伤处图片增加配置
This commit is contained in:
parent
bd791dcc56
commit
f5d1c6c2ab
@ -26,11 +26,11 @@ public abstract class AbsShareInterface {
|
|||||||
|
|
||||||
TwitterResultReceiver receiver = new TwitterResultReceiver();
|
TwitterResultReceiver receiver = new TwitterResultReceiver();
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { // API 33+
|
||||||
// Android 12 (API 33) 及以上版本
|
// Android 13 (API 33) 及以上版本使用导出标志
|
||||||
context.registerReceiver(receiver, filter, Context.RECEIVER_NOT_EXPORTED);
|
context.registerReceiver(receiver, filter, Context.RECEIVER_NOT_EXPORTED);
|
||||||
} else {
|
} else {
|
||||||
// Android 12 (API 33) 以下版本
|
// Android 12 (API 32) 以下版本
|
||||||
context.registerReceiver(receiver, filter);
|
context.registerReceiver(receiver, filter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -104,6 +104,7 @@
|
|||||||
|
|
||||||
</queries>
|
</queries>
|
||||||
<application
|
<application
|
||||||
|
android:networkSecurityConfig="@xml/network_security_config"
|
||||||
android:name="com.shayu.phonelive.AppContext"
|
android:name="com.shayu.phonelive.AppContext"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
6
app/src/main/res/xml/network_security_config.xml
Normal file
6
app/src/main/res/xml/network_security_config.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<network-security-config>
|
||||||
|
<domain-config cleartextTrafficPermitted="true">
|
||||||
|
<domain includeSubdomains="true">upload-z0.qiniup.com</domain>
|
||||||
|
</domain-config>
|
||||||
|
</network-security-config>
|
@ -54,14 +54,29 @@ public class UploadQnImpl implements UploadStrategy {
|
|||||||
public void complete(String key, ResponseInfo info, JSONObject response) {
|
public void complete(String key, ResponseInfo info, JSONObject response) {
|
||||||
System.out.println("UploadQnImpl 上传-----ok----> " + info.isOK() + "--key---> " + "---response---> " + (response != null ? response.toString() : null));
|
System.out.println("UploadQnImpl 上传-----ok----> " + info.isOK() + "--key---> " + "---response---> " + (response != null ? response.toString() : null));
|
||||||
//L.e("UploadQnImpl 上传-----ok----> " + info.isOK() + "--key---> " + "---response---> " + (response != null ? response.toString() : null));
|
//L.e("UploadQnImpl 上传-----ok----> " + info.isOK() + "--key---> " + "---response---> " + (response != null ? response.toString() : null));
|
||||||
try {
|
/* try {
|
||||||
assert response != null;
|
assert response != null;
|
||||||
mList.get(mIndex).setRemoteAccessUrl(response.getString("key"));
|
mList.get(mIndex).setRemoteAccessUrl(response.getString("key"));
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
// throw new RuntimeException(e);
|
// throw new RuntimeException(e);
|
||||||
L.e(e);
|
L.e(e);
|
||||||
return;
|
return;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
if (response == null) {
|
||||||
|
// Handle the null case, e.g., log an error, throw a specific exception, etc.
|
||||||
|
L.e("Response is null");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
mList.get(mIndex).setRemoteAccessUrl(response.getString("key"));
|
||||||
|
} catch (JSONException e) {
|
||||||
|
L.e(e);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (mList == null || mList.size() == 0) {
|
if (mList == null || mList.size() == 0) {
|
||||||
if (mUploadCallback != null) {
|
if (mUploadCallback != null) {
|
||||||
mUploadCallback.onFinish(mList, false);
|
mUploadCallback.onFinish(mList, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user