summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/statusbar/policy/Prefs.java
diff options
context:
space:
mode:
authorJoe Onorato <joeo@google.com>2010-11-29 14:54:24 -0800
committerJoe Onorato <joeo@google.com>2010-11-29 14:54:24 -0800
commit2039e484740ae5c314082398e5696339b615cb22 (patch)
treea93c0f83871844c9c1bc0ae1d354b59934dbf864 /packages/SystemUI/src/com/android/systemui/statusbar/policy/Prefs.java
parent536c58fbe51a53d0e6e78c360c9f6069ae0fd465 (diff)
downloadframeworks_base-2039e484740ae5c314082398e5696339b615cb22.zip
frameworks_base-2039e484740ae5c314082398e5696339b615cb22.tar.gz
frameworks_base-2039e484740ae5c314082398e5696339b615cb22.tar.bz2
Do not disturb.
Change-Id: I9550970f322872787ef903ca762dfdf2ed9d2835
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/statusbar/policy/Prefs.java')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/Prefs.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Prefs.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Prefs.java
new file mode 100644
index 0000000..05eafe8
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Prefs.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2010 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.policy;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+
+public class Prefs {
+ private static final String SHARED_PREFS_NAME = "status_bar";
+
+ // a boolean
+ public static final String DO_NOT_DISTURB_PREF = "do_not_disturb";
+ public static final boolean DO_NOT_DISTURB_DEFAULT = false;
+
+ public static SharedPreferences read(Context context) {
+ return context.getSharedPreferences(Prefs.SHARED_PREFS_NAME, Context.MODE_PRIVATE);
+ }
+
+ public static SharedPreferences.Editor edit(Context context) {
+ return context.getSharedPreferences(Prefs.SHARED_PREFS_NAME, Context.MODE_PRIVATE).edit();
+ }
+}