diff options
author | Erin Dahlgren <edahlgren@google.com> | 2014-06-13 14:12:08 -0700 |
---|---|---|
committer | Erin Dahlgren <edahlgren@google.com> | 2014-06-18 16:53:15 -0700 |
commit | 6190c36db653e848f29d1caefc4fa1bb61e8a662 (patch) | |
tree | 3dbc2ab0561552605388860369cabaf11dc40ce4 /src_pd | |
parent | 5a344964cb003525727c31d295ca3a592c245606 (diff) | |
download | android_packages_apps_Camera2-6190c36db653e848f29d1caefc4fa1bb61e8a662.tar.gz android_packages_apps_Camera2-6190c36db653e848f29d1caefc4fa1bb61e8a662.tar.bz2 android_packages_apps_Camera2-6190c36db653e848f29d1caefc4fa1bb61e8a662.zip |
New Settings API
Based on discussions from last week and comments on the design doc,
this api begins to implement the following:
1. Adds a "Scope" variable to api, which tells the SettingsManager
whether the setting can be stored globally (so that it is visible
to all parts of the app), or per-camera, or per-module, or per-
custom scope that the api user provides.
2. Separates keys and default values from SettingsManager,
to make it easy to add new settings/defaults from third party
modules.
3. Stores all settings as strings, to avoid upgrade errors, and
handles casting to type requested. Only String, Integer, and
boolean are supported.
4. Opens SharedPreferences files on demand, depending on scope
argument.
5. Creates a "DefaultsStore" to hold the defaults and possible
values of a setting. Then a user can request the default or
possible values of a setting at any time.
Change-Id: I03e0e1dd0955c519f54112e89716014aa963a425
Diffstat (limited to 'src_pd')
-rw-r--r-- | src_pd/com/android/camera/util/CameraSettingsActivityHelper.java (renamed from src_pd/com/android/camera/util/SettingsHelper.java) | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src_pd/com/android/camera/util/SettingsHelper.java b/src_pd/com/android/camera/util/CameraSettingsActivityHelper.java index 28dacd6ac..f7759a3fb 100644 --- a/src_pd/com/android/camera/util/SettingsHelper.java +++ b/src_pd/com/android/camera/util/CameraSettingsActivityHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013 The Android Open Source Project + * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,25 +19,7 @@ package com.android.camera.util; import android.content.Context; import android.preference.PreferenceFragment; -import com.android.camera.settings.SettingsCache.ExtraSettings; -import com.android.camera.settings.SettingsManager.Setting; - -import java.util.Map; - -public class SettingsHelper implements ExtraSettings { - @Override - public void upgradeKeyMap(Map<String, Integer> map) { - } - - @Override - public Setting settingFromId(int id, Context context) { - return null; - } - - public static boolean isOpenSourceLicensesShown() { - return false; - } - +public class CameraSettingsActivityHelper { public static void addAdditionalPreferences(PreferenceFragment fragment, Context context) { } } |