Skip to content

Commit

Permalink
Check boxes to Switches in PrivacyGuardPerfs
Browse files Browse the repository at this point in the history
Change-Id: I329df30a6a095a6a5f5829d8b627b00769e18685
  • Loading branch information
nickdoherty81 authored and PRJosh committed Jan 28, 2016
1 parent 782f5d0 commit ddf52d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion res/xml/privacy_guard_prefs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">

<CheckBoxPreference
<SwitchPreference
android:key="privacy_guard_default"
android:title="@string/privacy_guard_default_title"
android:summary="@string/privacy_guard_default_summary"
Expand Down
6 changes: 3 additions & 3 deletions src/com/android/settings/privacyguard/PrivacyGuardPrefs.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.PreferenceScreen;
import android.preference.SwitchPreference;
import android.provider.Settings;
import android.provider.Settings.SettingNotFoundException;
import android.view.LayoutInflater;
Expand All @@ -42,7 +42,7 @@ public class PrivacyGuardPrefs extends SettingsPreferenceFragment implements

private static final String KEY_PRIVACY_GUARD_DEFAULT = "privacy_guard_default";

private CheckBoxPreference mPrivacyGuardDefault;
private SwitchPreference mPrivacyGuardDefault;

@Override
public void onCreate(Bundle savedInstanceState) {
Expand All @@ -51,7 +51,7 @@ public void onCreate(Bundle savedInstanceState) {
addPreferencesFromResource(R.xml.privacy_guard_prefs);
PreferenceScreen prefSet = getPreferenceScreen();

mPrivacyGuardDefault = (CheckBoxPreference) findPreference(KEY_PRIVACY_GUARD_DEFAULT);
mPrivacyGuardDefault = (SwitchPreference) findPreference(KEY_PRIVACY_GUARD_DEFAULT);
mPrivacyGuardDefault.setOnPreferenceChangeListener(this);

mPrivacyGuardDefault.setChecked(Settings.System.getInt(getContentResolver(),
Expand Down

0 comments on commit ddf52d7

Please sign in to comment.