updated device info collector for simplify gh issues
This commit is contained in:
@@ -19,9 +19,6 @@ assignees: ''
|
||||
|
||||
**Скриншот ошибки**
|
||||
|
||||
**Информация об устройстве:**
|
||||
- Устройство: Samsung Galaxy J1 Mini
|
||||
- OS: Android 9 | OneUi 3.0
|
||||
- Коммит: fa12e8f (В О Приложении написана версия коммита)
|
||||
**Скопируйте сюда информацию об устройстве нажав на кнопку "Скопировать информацию об устройстве" в Настройках -> Другое и удалите этот текст**
|
||||
|
||||
**Дополнительная информация о баге или мыслях почему оно может происходить (если есть)**
|
||||
|
||||
@@ -101,4 +101,20 @@ public class Device {
|
||||
+ (isEMUI() ? "', EmuiVersion='" + this.EmuiVersion : "")
|
||||
+ "', modelName='" + this.modelName + "'";
|
||||
}
|
||||
|
||||
public String forLogging() {
|
||||
return "**Информация об устройстве:** " + "\n\n"
|
||||
+ "- Commit: " + getBuildNumber() + "\n"
|
||||
+ "- Android SDK: " + this.sdkVersion + "\n"
|
||||
+ "- Product: " + this.productName + "\n"
|
||||
+ "- Device: " + this.deviceName + "\n"
|
||||
+ "- Board: " + this.boardName + "\n"
|
||||
+ "- Manufacturer: " + this.manufacturerName + "\n"
|
||||
+ "- Brand: " + this.brandName + "\n"
|
||||
+ "- Model: " + this.modelName
|
||||
+ (isMIUI() ? "- Miui Version Code: " + this.MiuiUiVersionCode + "\n" + "- Miui Version Name: " + this.MiuiUiVersionName + "\n" : "")
|
||||
+ (isSamsung() ? "- OneUi Major Version: " + this.OneUiMajorVersion + "\n" + "- OneUi Minor Version: " + this.OneUiMinorVersion + "\n" : "")
|
||||
+ (hasMiuiIncrCode() ? "- Miui Version Incremental Code: " + this.MiuiIncrementalCode + "\n" : "")
|
||||
+ (isEMUI() ? "- Emui Version: " + this.EmuiVersion : "");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import com.vtosters.lite.R;
|
||||
import com.vtosters.lite.auth.VKAccountManager;
|
||||
import com.vtosters.lite.general.fragments.MaterialPreferenceToolbarFragment;
|
||||
import com.vtosters.lite.im.ImEngineProvider;
|
||||
import ru.vtosters.lite.deviceinfo.DeviceInfoCollector;
|
||||
import ru.vtosters.lite.ssfs.UsersList;
|
||||
import ru.vtosters.lite.ui.activities.VKAdminTokenActivity;
|
||||
import ru.vtosters.lite.ui.components.BackupManager;
|
||||
@@ -98,6 +99,13 @@ public class OtherFragment extends MaterialPreferenceToolbarFragment {
|
||||
return true;
|
||||
});
|
||||
|
||||
findPreference("copydebuginfo").setOnPreferenceClickListener(preference -> {
|
||||
copyText(new DeviceInfoCollector().collect().forLogging());
|
||||
Toast.makeText(requireContext(), "Информация об устройстве скопирована", LENGTH_SHORT).show();
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
findPreference("applicationrestart").setOnPreferenceClickListener(preference -> {
|
||||
restartApplication();
|
||||
|
||||
|
||||
@@ -52,6 +52,10 @@
|
||||
android:title="@string/dialogrecomm"/>
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/vtsystem">
|
||||
<Preference
|
||||
android:key="copydebuginfo"
|
||||
android:summary="Для отправки информации об ошибке на Github Issues"
|
||||
android:title="Скопировать информацию об устройстве"/>
|
||||
<Preference
|
||||
android:key="applicationrestart"
|
||||
android:title="@string/applicationrestart"/>
|
||||
|
||||
Reference in New Issue
Block a user