Lines Matching refs:key

75     private static boolean isGlobal(String key) {
76 return key.equals(CameraSettings.KEY_VIDEO_TIME_LAPSE_FRAME_INTERVAL)
77 || key.equals(CameraSettings.KEY_CAMERA_ID)
78 || key.equals(CameraSettings.KEY_RECORD_LOCATION)
79 || key.equals(CameraSettings.KEY_CAMERA_FIRST_USE_HINT_SHOWN)
80 || key.equals(CameraSettings.KEY_VIDEO_FIRST_USE_HINT_SHOWN)
81 || key.equals(CameraSettings.KEY_VIDEO_EFFECT);
84 public String getString(String key, String defValue) {
85 if (isGlobal(key) || !mPrefLocal.contains(key)) {
86 return mPrefGlobal.getString(key, defValue);
88 return mPrefLocal.getString(key, defValue);
92 public int getInt(String key, int defValue) {
93 if (isGlobal(key) || !mPrefLocal.contains(key)) {
94 return mPrefGlobal.getInt(key, defValue);
96 return mPrefLocal.getInt(key, defValue);
100 public long getLong(String key, long defValue) {
101 if (isGlobal(key) || !mPrefLocal.contains(key)) {
102 return mPrefGlobal.getLong(key, defValue);
104 return mPrefLocal.getLong(key, defValue);
108 public float getFloat(String key, float defValue) {
109 if (isGlobal(key) || !mPrefLocal.contains(key)) {
110 return mPrefGlobal.getFloat(key, defValue);
112 return mPrefLocal.getFloat(key, defValue);
116 public boolean getBoolean(String key, boolean defValue) {
117 if (isGlobal(key) || !mPrefLocal.contains(key)) {
118 return mPrefGlobal.getBoolean(key, defValue);
120 return mPrefLocal.getBoolean(key, defValue);
125 public Set<String> getStringSet(String key, Set<String> defValues) {
129 public boolean contains(String key) {
130 if (mPrefLocal.contains(key)) return true;
131 if (mPrefGlobal.contains(key)) return true;
162 public Editor remove(String key) {
163 mEditorGlobal.remove(key);
164 mEditorLocal.remove(key);
168 public Editor putString(String key, String value) {
169 if (isGlobal(key)) {
170 mEditorGlobal.putString(key, value);
172 mEditorLocal.putString(key, value);
177 public Editor putInt(String key, int value) {
178 if (isGlobal(key)) {
179 mEditorGlobal.putInt(key, value);
181 mEditorLocal.putInt(key, value);
186 public Editor putLong(String key, long value) {
187 if (isGlobal(key)) {
188 mEditorGlobal.putLong(key, value);
190 mEditorLocal.putLong(key, value);
195 public Editor putFloat(String key, float value) {
196 if (isGlobal(key)) {
197 mEditorGlobal.putFloat(key, value);
199 mEditorLocal.putFloat(key, value);
204 public Editor putBoolean(String key, boolean value) {
205 if (isGlobal(key)) {
206 mEditorGlobal.putBoolean(key, value);
208 mEditorLocal.putBoolean(key, value);
214 public Editor putStringSet(String key, Set<String> values) {
236 String key) {
238 listener.onSharedPreferenceChanged(this, key);