mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-01 01:06:11 +00:00
Check if debug info available
This commit is contained in:
parent
ab3956eec4
commit
c1eaa33c10
4 changed files with 18 additions and 8 deletions
|
@ -209,9 +209,12 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
|||
}, new Callable<Boolean>() {
|
||||
@Override
|
||||
public Boolean call() {
|
||||
if (DebugHelper.isAvailable()) {
|
||||
drawerLayout.closeDrawer(drawerContainer);
|
||||
onDebugInfo();
|
||||
return true;
|
||||
} else
|
||||
return false;
|
||||
}
|
||||
}).setExternal(true));
|
||||
|
||||
|
|
|
@ -909,10 +909,13 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|||
}, new Callable<Boolean>() {
|
||||
@Override
|
||||
public Boolean call() {
|
||||
if (DebugHelper.isAvailable()) {
|
||||
if (!drawerLayout.isLocked(drawerContainer))
|
||||
drawerLayout.closeDrawer(drawerContainer);
|
||||
onDebugInfo();
|
||||
return true;
|
||||
} else
|
||||
return false;
|
||||
}
|
||||
}).setExternal(true));
|
||||
|
||||
|
|
|
@ -169,6 +169,10 @@ public class DebugHelper {
|
|||
"networkaddress.cache.negative.ttl"
|
||||
));
|
||||
|
||||
static boolean isAvailable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
static EntityMessage getDebugInfo(Context context, String source, int title, Throwable ex, String log, Bundle args) throws IOException, JSONException {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(context.getString(title)).append("\n\n");
|
||||
|
|
|
@ -1824,7 +1824,7 @@ public class Log {
|
|||
}
|
||||
});
|
||||
|
||||
if (report)
|
||||
if (report && DebugHelper.isAvailable())
|
||||
builder.setNeutralButton(R.string.title_report, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
|
|
Loading…
Reference in a new issue