mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 10:49:24 +02:00
more version information in bug reports; don't disable button lights on galaxy ace
This commit is contained in:
parent
152911ef4d
commit
d2bf61caf9
2 changed files with 9 additions and 2 deletions
|
@ -21,6 +21,7 @@ package org.geometerplus.zlibrary.ui.android.library;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.pm.PackageInfo;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -34,7 +35,8 @@ public class BugReportActivity extends Activity {
|
||||||
|
|
||||||
private String getVersionName() {
|
private String getVersionName() {
|
||||||
try {
|
try {
|
||||||
return getPackageManager().getPackageInfo(getPackageName(), 0).versionName;
|
final PackageInfo info = getPackageManager().getPackageInfo(getPackageName(), 0);
|
||||||
|
return info.versionName + " (" + info.versionCode + ")";
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -44,6 +46,7 @@ public class BugReportActivity extends Activity {
|
||||||
super.onCreate(icicle);
|
super.onCreate(icicle);
|
||||||
setContentView(R.layout.bug_report_view);
|
setContentView(R.layout.bug_report_view);
|
||||||
final StringBuilder reportText = new StringBuilder();
|
final StringBuilder reportText = new StringBuilder();
|
||||||
|
|
||||||
reportText.append("Model:").append(Build.MODEL).append("\n");
|
reportText.append("Model:").append(Build.MODEL).append("\n");
|
||||||
reportText.append("Device:").append(Build.DEVICE).append("\n");
|
reportText.append("Device:").append(Build.DEVICE).append("\n");
|
||||||
reportText.append("Product:").append(Build.PRODUCT).append("\n");
|
reportText.append("Product:").append(Build.PRODUCT).append("\n");
|
||||||
|
|
|
@ -46,7 +46,7 @@ public final class ZLAndroidLibrary extends ZLibrary {
|
||||||
public final ZLIntegerRangeOption BatteryLevelToTurnScreenOffOption = new ZLIntegerRangeOption("LookNFeel", "BatteryLevelToTurnScreenOff", 0, 100, 50);
|
public final ZLIntegerRangeOption BatteryLevelToTurnScreenOffOption = new ZLIntegerRangeOption("LookNFeel", "BatteryLevelToTurnScreenOff", 0, 100, 50);
|
||||||
public final ZLBooleanOption DontTurnScreenOffDuringChargingOption = new ZLBooleanOption("LookNFeel", "DontTurnScreenOffDuringCharging", true);
|
public final ZLBooleanOption DontTurnScreenOffDuringChargingOption = new ZLBooleanOption("LookNFeel", "DontTurnScreenOffDuringCharging", true);
|
||||||
public final ZLIntegerRangeOption ScreenBrightnessLevelOption = new ZLIntegerRangeOption("LookNFeel", "ScreenBrightnessLevel", 0, 100, 0);
|
public final ZLIntegerRangeOption ScreenBrightnessLevelOption = new ZLIntegerRangeOption("LookNFeel", "ScreenBrightnessLevel", 0, 100, 0);
|
||||||
public final ZLBooleanOption DisableButtonLightsOption = new ZLBooleanOption("LookNFeel", "DisableButtonLights", true);
|
public final ZLBooleanOption DisableButtonLightsOption = new ZLBooleanOption("LookNFeel", "DisableButtonLights", !hasButtonLightsBug());
|
||||||
|
|
||||||
private boolean hasNoHardwareMenuButton() {
|
private boolean hasNoHardwareMenuButton() {
|
||||||
return
|
return
|
||||||
|
@ -67,6 +67,10 @@ public final class ZLAndroidLibrary extends ZLibrary {
|
||||||
return myIsKindleFire;
|
return myIsKindleFire;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean hasButtonLightsBug() {
|
||||||
|
return "GT-S5830".equals(Build.MODEL);
|
||||||
|
}
|
||||||
|
|
||||||
private ZLAndroidActivity myActivity;
|
private ZLAndroidActivity myActivity;
|
||||||
private final Application myApplication;
|
private final Application myApplication;
|
||||||
private ZLAndroidWidget myWidget;
|
private ZLAndroidWidget myWidget;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue