fix crash notf name and translate
crash
This commit is contained in:
@@ -46,7 +46,7 @@ public class PalettesManager {
|
||||
PALETTES_DIR.mkdirs();
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 23 && !Environment.getExternalStorageDirectory().canWrite()) {
|
||||
makeText(getGlobalContext(), "Не выдано разрешение на запись и чтение файлов", Toast.LENGTH_LONG).show();
|
||||
makeText(getGlobalContext(), AndroidUtils.getString("cannot_write"), Toast.LENGTH_LONG).show();
|
||||
LifecycleUtils.getCurrentActivity().requestPermissions(new String[]{"android.permission.WRITE_EXTERNAL_STORAGE"}, 228);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import java.io.StringWriter;
|
||||
|
||||
import ru.vtosters.lite.deviceinfo.DeviceInfoCollector;
|
||||
import ru.vtosters.lite.services.LogWriterService;
|
||||
import ru.vtosters.lite.utils.AndroidUtils;
|
||||
|
||||
public class CrashReporter {
|
||||
protected static String logString;
|
||||
@@ -41,7 +42,7 @@ public class CrashReporter {
|
||||
logString = getStackTrace(th) + "\n\n" + new DeviceInfoCollector().collect().toDeviceName();
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 26) {
|
||||
var notificationChannel = new NotificationChannel("crashes", "crash", NotificationManager.IMPORTANCE_DEFAULT);
|
||||
var notificationChannel = new NotificationChannel("crashes", AndroidUtils.getString("crash_service_name"), NotificationManager.IMPORTANCE_DEFAULT);
|
||||
notificationChannel.enableVibration(true);
|
||||
notificationChannel.enableLights(true);
|
||||
((NotificationManager) getGlobalContext().getSystemService(Context.NOTIFICATION_SERVICE)).createNotificationChannel(notificationChannel);
|
||||
|
||||
@@ -50,7 +50,7 @@ public class OTADialog extends ModalBottomSheetWrapper<OTADialog> implements OT
|
||||
|
||||
container.setOrientation(LinearLayout.VERTICAL);
|
||||
|
||||
changelogView.setText("Изменения: \n" + changelog);
|
||||
changelogView.setText(AndroidUtils.getString("changelog") + ": \n" + changelog);
|
||||
changelogView.setTextColor(ThemesUtils.getTextAttr());
|
||||
container.addView(changelogView, new LinearLayout.LayoutParams(-1, -2));
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ public class StickersFragment extends BaseToolbarFragment {
|
||||
.setTitle(requireContext().getString(R.string.stickersapi8))
|
||||
.setMessage(requireContext().getString(R.string.stickersapi9) +
|
||||
requireContext().getString(R.string.stickersapi10))
|
||||
.setNeutralButton("Открыть бота", (dl, i) -> {
|
||||
.setNeutralButton(AndroidUtils.getString("open_bot"), (dl, i) -> {
|
||||
var intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://t.me/botfather"));
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
requireActivity().startActivity(intent);
|
||||
|
||||
@@ -6335,6 +6335,9 @@
|
||||
<string name="amoledtheme_title">AMOLED-тема</string>
|
||||
<string name="amoledtheme_summ">Полностью чёрная тема для устройств с AMOLED-экранами</string>
|
||||
<string name="monettheme_title">Monet-тема</string>
|
||||
<string name="monettheme_summ">Динамическая покраска приложения на основе обоев телефона</string>
|
||||
<string name="monettheme_summ">Динамическая покраска интерфейса на основе обоев телефона</string>
|
||||
<string name="accents">Акценты</string>
|
||||
<string name="cannot_write">Отсутствует разрешение на запись и чтение файлов</string>
|
||||
<string name="open_bot">Открыть бота</string>
|
||||
<string name="crash_service_name">Уведомления об ошибках</string>
|
||||
</resources>
|
||||
@@ -6475,4 +6475,7 @@ May look like a fake leaving the online"</string>
|
||||
<string name="monettheme_title">Monet theme</string>
|
||||
<string name="monettheme_summ">Dynamic app theme based on phone wallpaper</string>
|
||||
<string name="accents">Accents</string>
|
||||
<string name="cannot_write">No permission to write or read files</string>
|
||||
<string name="open_bot">Open a bot</string>
|
||||
<string name="crash_service_name">Error notifications</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user