Remove "Allow incoming file transfers" option from BT settings.
The user preference to allow automatic incoming file transfers for specific devices isn't implemented yet. Remove the preference from the settings UI. Bug: 3385941 Change-Id: Ib8fee9a0d99063a8c05d52a960664364e4812ace
This commit is contained in:
@@ -28,12 +28,6 @@
|
||||
android:order="20"
|
||||
android:persistent="false" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="allow_incoming"
|
||||
android:title="@string/bluetooth_device_advanced_enable_opp_title"
|
||||
android:order="30"
|
||||
android:persistent="false" />
|
||||
|
||||
<Preference
|
||||
android:key="unpair"
|
||||
android:title="@string/bluetooth_device_context_unpair"
|
||||
|
@@ -58,7 +58,6 @@ public class DeviceProfilesSettings extends SettingsPreferenceFragment
|
||||
private CachedBluetoothDevice mCachedDevice;
|
||||
|
||||
private PreferenceGroup mProfileContainer;
|
||||
private CheckBoxPreference mAllowIncomingPref;
|
||||
private EditTextPreference mDeviceNamePref;
|
||||
private final HashMap<String,CheckBoxPreference> mAutoConnectPrefs
|
||||
= new HashMap<String,CheckBoxPreference>();
|
||||
@@ -93,17 +92,6 @@ public class DeviceProfilesSettings extends SettingsPreferenceFragment
|
||||
getPreferenceScreen().setOrderingAsAdded(false);
|
||||
|
||||
mProfileContainer = (PreferenceGroup) findPreference(KEY_PROFILE_CONTAINER);
|
||||
mAllowIncomingPref = (CheckBoxPreference) findPreference(KEY_ALLOW_INCOMING);
|
||||
|
||||
// Configure incoming file transfer preference if device supports OPP
|
||||
// or else remove the preference item
|
||||
if (isObjectPushSupported(device)) {
|
||||
mAllowIncomingPref.setChecked(isIncomingFileTransfersAllowed());
|
||||
mAllowIncomingPref.setOnPreferenceChangeListener(this);
|
||||
} else {
|
||||
getPreferenceScreen().removePreference(mAllowIncomingPref);
|
||||
mAllowIncomingPref = null;
|
||||
}
|
||||
|
||||
mDeviceNamePref = (EditTextPreference) findPreference(KEY_RENAME_DEVICE);
|
||||
mDeviceNamePref.setSummary(mCachedDevice.getName());
|
||||
@@ -210,9 +198,7 @@ public class DeviceProfilesSettings extends SettingsPreferenceFragment
|
||||
}
|
||||
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
if (preference == mAllowIncomingPref) {
|
||||
setIncomingFileTransfersAllowed((Boolean) newValue);
|
||||
} else if (preference == mDeviceNamePref) {
|
||||
if (preference == mDeviceNamePref) {
|
||||
mCachedDevice.setName((String) newValue);
|
||||
} else if (preference instanceof CheckBoxPreference) {
|
||||
boolean autoConnect = (Boolean) newValue;
|
||||
|
Reference in New Issue
Block a user