Depend on support lib preferences

Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
This commit is contained in:
Jason Monk
2015-09-10 15:52:51 -04:00
parent 136ed7b6b2
commit 39b467482d
308 changed files with 2684 additions and 1762 deletions

View File

@@ -16,15 +16,14 @@
package com.android.settings.bluetooth;
import static android.os.UserManager.DISALLOW_CONFIG_BLUETOOTH;
import android.app.AlertDialog;
import android.bluetooth.BluetoothClass;
import android.bluetooth.BluetoothDevice;
import android.content.Context;
import android.content.DialogInterface;
import android.os.UserManager;
import android.preference.Preference;
import android.support.v7.preference.Preference;
import android.support.v7.preference.PreferenceViewHolder;
import android.text.Html;
import android.text.TextUtils;
import android.util.Log;
@@ -42,6 +41,8 @@ import com.android.settingslib.bluetooth.LocalBluetoothProfile;
import java.util.List;
import static android.os.UserManager.DISALLOW_CONFIG_BLUETOOTH;
/**
* BluetoothDevicePreference is the preference type used to display each remote
* Bluetooth device in the Bluetooth Settings screen.
@@ -129,7 +130,7 @@ public final class BluetoothDevicePreference extends Preference implements
}
@Override
protected void onBindView(View view) {
public void onBindViewHolder(PreferenceViewHolder view) {
// Disable this view if the bluetooth enable/disable preference view is off
if (null != findPreferenceInHierarchy("bt_checkbox")) {
setDependency("bt_checkbox");
@@ -144,7 +145,7 @@ public final class BluetoothDevicePreference extends Preference implements
}
}
super.onBindView(view);
super.onBindViewHolder(view);
}
public void onClick(View v) {

View File

@@ -24,7 +24,7 @@ import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.os.Handler;
import android.os.SystemProperties;
import android.preference.Preference;
import android.support.v7.preference.Preference;
import android.util.Log;
import com.android.settings.R;

View File

@@ -25,12 +25,12 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.text.Editable;
import android.text.Html;
import android.text.InputFilter;
import android.text.InputFilter.LengthFilter;
import android.text.InputType;
import android.text.TextWatcher;
import android.text.InputFilter.LengthFilter;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
@@ -44,8 +44,6 @@ import com.android.settings.R;
import com.android.settingslib.bluetooth.CachedBluetoothDeviceManager;
import com.android.settingslib.bluetooth.LocalBluetoothManager;
import android.view.KeyEvent;
import java.util.Locale;
/**

View File

@@ -16,8 +16,6 @@
package com.android.settings.bluetooth;
import com.android.settings.R;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
@@ -26,8 +24,10 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.text.TextUtils;
import android.os.PowerManager;
import android.text.TextUtils;
import com.android.settings.R;
/**
* BluetoothPairingRequest is a receiver for any Bluetooth pairing request. It

View File

@@ -23,11 +23,11 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.preference.Preference;
import android.support.v7.preference.Preference;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import android.widget.Button;
import android.widget.TextView;
import com.android.internal.app.AlertActivity;
import com.android.internal.app.AlertController;

View File

@@ -16,12 +16,12 @@
package com.android.settings.bluetooth;
import com.android.settings.ProgressCategory;
import com.android.settings.R;
import android.content.Context;
import android.util.AttributeSet;
import com.android.settings.ProgressCategory;
import com.android.settings.R;
/**
* A Bluetooth discovery progress category
*/

View File

@@ -16,8 +16,6 @@
package com.android.settings.bluetooth;
import static android.os.UserManager.DISALLOW_CONFIG_BLUETOOTH;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.content.BroadcastReceiver;
@@ -27,11 +25,11 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Resources;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceCategory;
import android.preference.PreferenceGroup;
import android.preference.PreferenceScreen;
import android.provider.Settings;
import android.support.v7.preference.Preference;
import android.support.v7.preference.PreferenceCategory;
import android.support.v7.preference.PreferenceGroup;
import android.support.v7.preference.PreferenceScreen;
import android.text.Spannable;
import android.text.style.TextAppearanceSpan;
import android.util.Log;
@@ -59,6 +57,8 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import static android.os.UserManager.DISALLOW_CONFIG_BLUETOOTH;
/**
* BluetoothSettings is the Settings screen for Bluetooth configuration and
* connection management.
@@ -135,7 +135,7 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem
mInitiateDiscoverable = true;
mEmptyView = (TextView) getView().findViewById(android.R.id.empty);
getListView().setEmptyView(mEmptyView);
setEmptyView(mEmptyView);
mEmptyView.setGravity(Gravity.START | Gravity.CENTER_VERTICAL);
final SettingsActivity activity = (SettingsActivity) getActivity();
@@ -302,7 +302,7 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem
// Paired devices category
if (mPairedDevicesCategory == null) {
mPairedDevicesCategory = new PreferenceCategory(getActivity());
mPairedDevicesCategory = new PreferenceCategory(getPrefContext());
} else {
mPairedDevicesCategory.removeAll();
}
@@ -332,7 +332,7 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem
}
if (mMyDevicePreference == null) {
mMyDevicePreference = new Preference(getActivity());
mMyDevicePreference = new Preference(getPrefContext());
}
mMyDevicePreference.setSummary(getResources().getString(

View File

@@ -19,10 +19,9 @@ package com.android.settings.bluetooth;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceCategory;
import android.preference.PreferenceGroup;
import android.preference.PreferenceScreen;
import android.support.v7.preference.Preference;
import android.support.v7.preference.PreferenceCategory;
import android.support.v7.preference.PreferenceGroup;
import android.util.Log;
import com.android.settings.RestrictedSettingsFragment;
@@ -136,8 +135,7 @@ public abstract class DeviceListPreferenceFragment extends
}
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen,
Preference preference) {
public boolean onPreferenceTreeClick(Preference preference) {
if (KEY_BT_SCAN.equals(preference.getKey())) {
mLocalAdapter.startScanning(true);
return true;
@@ -151,7 +149,7 @@ public abstract class DeviceListPreferenceFragment extends
return true;
}
return super.onPreferenceTreeClick(preferenceScreen, preference);
return super.onPreferenceTreeClick(preference);
}
void onDevicePreferenceClick(BluetoothDevicePreference btPreference) {
@@ -179,7 +177,7 @@ public abstract class DeviceListPreferenceFragment extends
}
BluetoothDevicePreference preference = new BluetoothDevicePreference(
getActivity(), cachedDevice);
getPrefContext(), cachedDevice);
initDevicePreference(preference);
mDeviceListGroup.addPreference(preference);

View File

@@ -16,11 +16,11 @@
package com.android.settings.bluetooth;
import com.android.settings.R;
import android.app.Activity;
import android.os.Bundle;
import com.android.settings.R;
/**
* Activity for Bluetooth device picker dialog. The device picker logic
* is implemented in the {@link BluetoothSettings} fragment.

View File

@@ -16,8 +16,6 @@
package com.android.settings.bluetooth;
import static android.os.UserManager.DISALLOW_CONFIG_BLUETOOTH;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothDevicePicker;
@@ -33,6 +31,8 @@ import com.android.internal.logging.MetricsLogger;
import com.android.settings.R;
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
import static android.os.UserManager.DISALLOW_CONFIG_BLUETOOTH;
/**
* BluetoothSettings is the Settings screen for Bluetooth configuration and
* connection management.

View File

@@ -24,8 +24,8 @@ import android.bluetooth.BluetoothProfile;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.EditTextPreference;
import android.support.v7.preference.CheckBoxPreference;
import android.support.v7.preference.EditTextPreference;
import android.text.Html;
import android.text.TextUtils;
import android.util.Log;

View File

@@ -16,18 +16,18 @@
package com.android.settings.bluetooth;
import com.android.internal.app.AlertActivity;
import com.android.internal.app.AlertController;
import com.android.settings.R;
import com.android.settingslib.bluetooth.LocalBluetoothAdapter;
import com.android.settingslib.bluetooth.LocalBluetoothManager;
import android.bluetooth.BluetoothAdapter;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import com.android.internal.app.AlertActivity;
import com.android.internal.app.AlertController;
import com.android.settings.R;
import com.android.settingslib.bluetooth.LocalBluetoothAdapter;
import com.android.settingslib.bluetooth.LocalBluetoothManager;
/**
* RequestPermissionHelperActivity asks the user whether to enable discovery.
* This is usually started by RequestPermissionActivity.