private void loadGlobalSettings() { int fadeIn = 0; try { Cursor variableCursor = mGlobalVariableDbHelper.fetchVariable(GlobalVariablesDbAdapter.FADE_IN_DURATION_KEY); startManagingCursor(variableCursor); fadeIn = variableCursor.getInt(variableCursor.getColumnIndexOrThrow(LoginDbAdapter.KEY_DATA)); } catch (Exception e) { mGlobalVariableDbHelper.createIntVariable(GlobalVariablesDbAdapter.FADE_IN_DURATION_KEY, 0); Log.d(TAG, "Couldn't get fade-in", e); } GlobalSettings.setFadeInDuration(fadeIn); int fadeOut = 0; try { Cursor variableCursor = mGlobalVariableDbHelper.fetchVariable(GlobalVariablesDbAdapter.FADE_OUT_DURATION_KEY); startManagingCursor(variableCursor); fadeOut = variableCursor.getInt(variableCursor.getColumnIndexOrThrow(LoginDbAdapter.KEY_DATA)); } catch (Exception e) { mGlobalVariableDbHelper.createIntVariable(GlobalVariablesDbAdapter.FADE_OUT_DURATION_KEY, 0); Log.d(TAG, "Couldn't get fadeOut", e); } GlobalSettings.setFadeOutDuration(fadeOut); boolean sensitiveLogging = false; try { Cursor variableCursor = mGlobalVariableDbHelper.fetchVariable(GlobalVariablesDbAdapter.SENSITIVE_LOGGING); startManagingCursor(variableCursor); sensitiveLogging = variableCursor.getInt(variableCursor.getColumnIndexOrThrow(LoginDbAdapter.KEY_DATA)) > 0; } catch (Exception e) { mGlobalVariableDbHelper.createBooleanVariable( GlobalVariablesDbAdapter.SENSITIVE_LOGGING, false); Log.d(TAG, "Couldn't get sensitiveLogging", e); } GlobalSettings.setSensitiveLogging(sensitiveLogging); }
private void firstStartIntroduction() { Cursor variableCursor = mGlobalVariableDbHelper.fetchVariable(GlobalVariablesDbAdapter.FIRST_START_KEY); startManagingCursor(variableCursor); int firstStart = 1; try { firstStart = variableCursor.getInt( variableCursor.getColumnIndexOrThrow(GlobalVariablesDbAdapter.KEY_DATA)); } catch (Exception e) { mGlobalVariableDbHelper.createIntVariable(GlobalVariablesDbAdapter.FIRST_START_KEY, 0); } if (firstStart == 1) { Intent i = new Intent(SoundboardMenu.this, Introduction.class); startActivity(i); } }