urbanairship-core/src/main/java/com/urbanairship/PreferenceDataStore.java
void syncValue() {
            Cursor cursor = null;
            try {
                synchronized (this) {
                    cursor = resolver.query(UrbanAirshipProvider.getPreferencesContentUri(context),
                            new String[] { PreferencesDataManager.COLUMN_NAME_VALUE }, WHERE_CLAUSE_KEY,
                            new String[] { key }, null);
                }

                if (cursor != null) {
                    setValue(cursor.moveToFirst() ? cursor.getString(0) : null);
                } else {
                    Logger.debug("PreferenceDataStore - Unable to get preference " + key + " from" +
                            " database. Falling back to cached value.");
                }
            } finally {
                if (cursor != null) {
                    cursor.close();
                }
            }
        }
/**
         * Syncs the value from the database to the preference.
         */
Syncs the value from the database to the preference.
Syncs the value from the database to the preference .
void syncValue() {
            Cursor cursor = null;
            try {
                synchronized (this) {
                    cursor = resolver.query(UrbanAirshipProvider.getPreferencesContentUri(context),
                            new String[] { PreferencesDataManager.COLUMN_NAME_VALUE }, WHERE_CLAUSE_KEY,
                            new String[] { key }, null);
                }
                if (cursor != null) {
                    setValue(cursor.moveToFirst() ? cursor.getString(0) : null);
                } else {
                    Logger.debug("PreferenceDataStore - Unable to get preference " + key + " from" +
                            " database. Falling back to cached value.");
                }
            } finally {
                if (cursor != null) {
                    cursor.close();
                }
            }
        }
void syncValue ( ) { Cursor cursor = null ; try { synchronized ( this ) { cursor = resolver . query ( UrbanAirshipProvider . getPreferencesContentUri ( context ) , new String [ ] { PreferencesDataManager . COLUMN_NAME_VALUE } , WHERE_CLAUSE_KEY , new String [ ] { key } , null ) ; } if ( cursor != null ) { setValue ( cursor . moveToFirst ( ) ? cursor . getString ( 0 ) : null ) ; } else { Logger . debug ( "PreferenceDataStore - Unable to get preference " + key + " from" + " database. Falling back to cached value." ) ; } } finally { if ( cursor != null ) { cursor . close ( ) ; } } }
Syncs the value from the database to the preference.
Syncs the value from the database to the preference .