fix bugs.
This commit is contained in:
@@ -210,16 +210,6 @@
|
||||
android:name=".service.CancelNoticeService"
|
||||
android:enabled="true"
|
||||
android:exported="true" />
|
||||
|
||||
<!-- <provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.fileprovider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_paths" />
|
||||
</provider>-->
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -1061,8 +1061,10 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (pitBean.getPit_number().isEmpty())
|
||||
return;
|
||||
if (roomInfoRespPk == null || roomInfoRespPk.getPk_info() == null) {
|
||||
wheatLayoutSingManager.updateSingleWheat(pitBean, Integer.parseInt(pitBean.getPit_number() != null ? roomPitBean.getPit_number() : "0"));
|
||||
wheatLayoutSingManager.updateSingleWheat(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
||||
} else {
|
||||
wheatLayoutManager1.updateSingleWheat(pitBean, Integer.parseInt(pitBean.getPit_number()), 1);
|
||||
}
|
||||
|
||||
@@ -233,43 +233,43 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
|
||||
}else if (id == R.id.ll_send_log){
|
||||
MvpPre.sendAppLog();
|
||||
}else if (id == R.id.tv_share) {
|
||||
showLoading("正在生成分享文件...");
|
||||
Observable.create(new ObservableOnSubscribe<Boolean>() {
|
||||
@SuppressLint("CheckResult")
|
||||
@Override
|
||||
public void subscribe(ObservableEmitter<Boolean> emitter) throws Exception {
|
||||
try {
|
||||
File file = new File(Application.Companion.getInstance().getAppContent());
|
||||
|
||||
if (FileUtils.isFileExists(file.getParent() +"/DataInfo.zip")){
|
||||
FileUtils.delete(file.getParent() +"/DataInfo.zip");
|
||||
}
|
||||
boolean isZip = ZipUtils.zipFile(Application.Companion.getInstance().getAppContent(),
|
||||
file.getParent() +"/DataInfo.zip");
|
||||
emitter.onNext(isZip);
|
||||
}catch (Exception e){
|
||||
LogUtils.e("压缩失败",e.toString());
|
||||
emitter.onNext(false);
|
||||
}
|
||||
}
|
||||
}).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Consumer<Boolean>() {
|
||||
@SuppressLint("CheckResult")
|
||||
@Override
|
||||
public void accept(Boolean aBoolean) {
|
||||
disLoading();
|
||||
if (aBoolean){
|
||||
File file = new File(Application.Companion.getInstance().getAppContent()+"/DataInfo.zip");
|
||||
Uri uri = FileProvider.getUriForFile(SettingActivity.this, getPackageName()+".fileprovider", file);
|
||||
Intent intent = new Intent(Intent.ACTION_SEND);
|
||||
intent.setType("*/*");
|
||||
intent.putExtra(Intent.EXTRA_STREAM, uri);
|
||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
startActivity(Intent.createChooser(intent,"分享到"));
|
||||
}else {
|
||||
LogUtils.e("压缩失败");
|
||||
}
|
||||
}
|
||||
});
|
||||
// showLoading("正在生成分享文件...");
|
||||
// Observable.create(new ObservableOnSubscribe<Boolean>() {
|
||||
// @SuppressLint("CheckResult")
|
||||
// @Override
|
||||
// public void subscribe(ObservableEmitter<Boolean> emitter) throws Exception {
|
||||
// try {
|
||||
// File file = new File(Application.Companion.getInstance().getAppContent());
|
||||
//
|
||||
// if (FileUtils.isFileExists(file.getParent() +"/DataInfo.zip")){
|
||||
// FileUtils.delete(file.getParent() +"/DataInfo.zip");
|
||||
// }
|
||||
// boolean isZip = ZipUtils.zipFile(Application.Companion.getInstance().getAppContent(),
|
||||
// file.getParent() +"/DataInfo.zip");
|
||||
// emitter.onNext(isZip);
|
||||
// }catch (Exception e){
|
||||
// LogUtils.e("压缩失败",e.toString());
|
||||
// emitter.onNext(false);
|
||||
// }
|
||||
// }
|
||||
// }).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Consumer<Boolean>() {
|
||||
// @SuppressLint("CheckResult")
|
||||
// @Override
|
||||
// public void accept(Boolean aBoolean) {
|
||||
// disLoading();
|
||||
// if (aBoolean){
|
||||
// File file = new File(Application.Companion.getInstance().getAppContent()+"/DataInfo.zip");
|
||||
// Uri uri = FileProvider.getUriForFile(SettingActivity.this, getPackageName()+".fileprovider", file);
|
||||
// Intent intent = new Intent(Intent.ACTION_SEND);
|
||||
// intent.setType("*/*");
|
||||
// intent.putExtra(Intent.EXTRA_STREAM, uri);
|
||||
// intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
// startActivity(Intent.createChooser(intent,"分享到"));
|
||||
// }else {
|
||||
// LogUtils.e("压缩失败");
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}
|
||||
private void showYouthModelDialog() {
|
||||
|
||||
@@ -411,6 +411,8 @@
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="start"
|
||||
android:padding="@dimen/dp_40"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:layout_marginTop="-50dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
@@ -63,8 +63,7 @@ android {
|
||||
|
||||
// 【正式版图标】替换manifest中的占位符(使用main目录下的正式图标)
|
||||
manifestPlaceholders = [
|
||||
appIcon: "@mipmap/ic_launcher", // 需在main/res/mipmap放置该图标
|
||||
fileProviderAuthority: "com.qxcm.qxlive.provider"
|
||||
appIcon: "@mipmap/ic_launcher" // 需在main/res/mipmap放置该图标
|
||||
]
|
||||
}
|
||||
|
||||
@@ -81,8 +80,7 @@ android {
|
||||
//
|
||||
// // 【测试版图标】替换为测试专用图标
|
||||
manifestPlaceholders = [
|
||||
appIcon: "@mipmap/ic_launcher_app_bat", // 需在main/res/mipmap放置该图标
|
||||
fileProviderAuthority: "com.qxcm.qxlive.beta.provider"
|
||||
appIcon: "@mipmap/ic_launcher_app_bat" // 需在main/res/mipmap放置该图标
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,17 +202,6 @@
|
||||
android:exported="true"
|
||||
/>
|
||||
|
||||
|
||||
<!--<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.fileprovider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_paths" />
|
||||
</provider>-->
|
||||
|
||||
</application>
|
||||
<!-- <queries>-->
|
||||
<!-- <!– 支付宝 scheme –>-->
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
package com.qxcm.qxlive;
|
||||
|
||||
public class FileProvider extends androidx.core.content.FileProvider {}
|
||||
Reference in New Issue
Block a user