updated device info collector for simplify gh issues
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user