fix bugs.

This commit is contained in:
2025-12-02 15:37:29 +08:00
parent 7bf2297750
commit 8ce028379c
7 changed files with 44 additions and 66 deletions

View File

@@ -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>

View File

@@ -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);
}

View File

@@ -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() {

View File

@@ -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"/>