diff options
author | John Spurlock <jspurlock@google.com> | 2014-10-21 12:15:28 -0400 |
---|---|---|
committer | John Spurlock <jspurlock@google.com> | 2014-10-21 12:26:45 -0400 |
commit | 7bbb9f64103c297d1b9738339f3bfeed0f41030e (patch) | |
tree | 0d7ccdd1465b14c841389e914a9a79958fb047f8 /packages/SystemUI/src/com/android/systemui/statusbar | |
parent | a9a550dd8e87b33979670cf856838ba227500547 (diff) | |
download | frameworks_base-7bbb9f64103c297d1b9738339f3bfeed0f41030e.zip frameworks_base-7bbb9f64103c297d1b9738339f3bfeed0f41030e.tar.gz frameworks_base-7bbb9f64103c297d1b9738339f3bfeed0f41030e.tar.bz2 |
Sysui: Include shared prefs in service dump.
Also:
- Remove obsolete Prefs helper.
- Use common file for zen-mode prefs.
Bug: 18062541
Change-Id: I9a6a4733eac0ec1c55da5d359c996cb5fe3bb8af
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/statusbar')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java | 6 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/policy/Prefs.java | 32 |
2 files changed, 6 insertions, 32 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index 4980c1c..e5c9bdd 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -175,6 +175,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; +import java.util.Map; public class PhoneStatusBar extends BaseStatusBar implements DemoMode, DragDownHelper.DragDownCallback, ActivityStarter { @@ -2963,6 +2964,11 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, if (mSecurityController != null) { mSecurityController.dump(fd, pw, args); } + pw.println("SharedPreferences:"); + for (Map.Entry<String, ?> entry : mContext.getSharedPreferences(mContext.getPackageName(), + Context.MODE_PRIVATE).getAll().entrySet()) { + pw.print(" "); pw.print(entry.getKey()); pw.print("="); pw.println(entry.getValue()); + } } private String hunStateToString(Entry entry) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Prefs.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Prefs.java deleted file mode 100644 index f339401..0000000 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Prefs.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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"; - - 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(); - } -} |