Reformatted changes

This commit is contained in:
Armin Novak 2021-02-25 14:20:37 +01:00 committed by akallabeth
parent bb6e248c5f
commit cb0cba2d47
3 changed files with 18 additions and 8 deletions

View File

@ -70,9 +70,12 @@ public class AboutActivity extends AppCompatActivity
try
{
try (BufferedReader r = new BufferedReader(new InputStreamReader(getAssets().open(file)))) {
try (BufferedReader r =
new BufferedReader(new InputStreamReader(getAssets().open(file))))
{
String line;
while ((line = r.readLine()) != null) {
while ((line = r.readLine()) != null)
{
total.append(line);
total.append("\n");
}

View File

@ -598,10 +598,13 @@ public class SessionActivity extends AppCompatActivity
// check if any key is in the keycodes list
List<Keyboard.Key> keys = modifiersKeyboard.getKeys();
for (Keyboard.Key curKey : keys) {
for (Keyboard.Key curKey : keys)
{
// if the key is a sticky key - just set it to off
if (curKey.sticky) {
switch (keyboardMapper.getModifierState(curKey.codes[0])) {
if (curKey.sticky)
{
switch (keyboardMapper.getModifierState(curKey.codes[0]))
{
case KeyboardMapper.KEYSTATE_ON:
curKey.on = true;
curKey.pressed = false;

View File

@ -89,11 +89,15 @@ public class BookmarkDB extends SQLiteOpenHelper
private static List<String> GetColumns(SQLiteDatabase db, String tableName)
{
List<String> ar = null;
try (Cursor c = db.rawQuery("SELECT * FROM " + tableName + " LIMIT 1", null)) {
if (c != null) {
try (Cursor c = db.rawQuery("SELECT * FROM " + tableName + " LIMIT 1", null))
{
if (c != null)
{
ar = new ArrayList<>(Arrays.asList(c.getColumnNames()));
}
} catch (Exception e) {
}
catch (Exception e)
{
Log.v(tableName, e.getMessage(), e);
e.printStackTrace();
}