Hide debug button when not in debug mode

This commit is contained in:
M66B
2018-09-26 14:43:22 +00:00
parent a4756fa069
commit ee4cca9872
2 changed files with 6 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
@@ -248,6 +249,10 @@ public class FragmentAbout extends FragmentEx {
}
});
boolean debug = PreferenceManager.getDefaultSharedPreferences(getContext()).getBoolean("debug", false);
btnLog.setVisibility(debug ? View.VISIBLE : View.GONE);
btnDebugInfo.setVisibility(debug ? View.VISIBLE : View.GONE);
return view;
}
}