Merge "Sysui: Include shared prefs in service dump." into lmp-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
624dd5ce9d
@@ -175,6 +175,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||||
DragDownHelper.DragDownCallback, ActivityStarter {
|
DragDownHelper.DragDownCallback, ActivityStarter {
|
||||||
@@ -2963,6 +2964,11 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
|||||||
if (mSecurityController != null) {
|
if (mSecurityController != null) {
|
||||||
mSecurityController.dump(fd, pw, args);
|
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) {
|
private String hunStateToString(Entry entry) {
|
||||||
|
|||||||
@@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -690,7 +690,7 @@ public class ZenModePanel extends LinearLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private SharedPreferences prefs() {
|
private SharedPreferences prefs() {
|
||||||
return mContext.getSharedPreferences(ZenModePanel.class.getSimpleName(), 0);
|
return mContext.getSharedPreferences(mContext.getPackageName(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateMinuteIndex() {
|
private void updateMinuteIndex() {
|
||||||
|
|||||||
Reference in New Issue
Block a user