Revert: Add checkbox to enable PTP USB mode.
Change-Id: I7c00c3c3c5da66a31a68fe0767302d2cdda526a1
Signed-off-by: Mike Lockwood <lockwood@android.com>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index fb6cb06..0e42816 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1456,9 +1456,6 @@
<!-- SD card & phone storage settings item title that will result in the phone unmounting the SD card. This will be done before the user phyiscally removes the SD card from the phone. Kind of like the "Safely remove" on some operating systems. -->
<string name="sd_eject_summary" product="default">Unmount the SD card so you can safely remove it</string>
<!-- SD card & phone storage settings item title for toggling PTP mode on and off. When PTP mode is on the device will appear on the USB bus as a PTP camera device instead of an MTP music player. -->
- <string name="ptp_mode">Enable PTP mode</string>
- <!-- SD card & phone storage settings item summary for toggling PTP mode on and off. When PTP mode is on the device will appear on the USB bus as a PTP camera device instead of an MTP music player. -->
- <string name="ptp_mode_summary">Appear on USB as a PTP camera device instead of an MTP device</string>
<!-- SD card & phone storage settings item summary that is displayed when no SD card is inserted. This version of the string can probably never come up on current hardware. [CHAR LIMIT=25] -->
<string name="sd_insert_summary" product="nosdcard">Insert USB storage for mounting</string>
diff --git a/res/xml/device_info_memory.xml b/res/xml/device_info_memory.xml
index 0c05213..030dfa6 100644
--- a/res/xml/device_info_memory.xml
+++ b/res/xml/device_info_memory.xml
@@ -53,9 +53,6 @@
android:icon="@color/memory_avail"
android:title="@string/memory_available"
android:summary="00"/>
- <CheckBoxPreference android:key="ptp_mode_toggle"
- android:title="@string/ptp_mode"
- android:summary="@string/ptp_mode_summary"/>
</PreferenceCategory>
</PreferenceScreen>
diff --git a/src/com/android/settings/deviceinfo/Memory.java b/src/com/android/settings/deviceinfo/Memory.java
index df81b6d..4ef08d1 100644
--- a/src/com/android/settings/deviceinfo/Memory.java
+++ b/src/com/android/settings/deviceinfo/Memory.java
@@ -51,11 +51,9 @@
import android.os.storage.IMountService;
import android.os.storage.StorageEventListener;
import android.os.storage.StorageManager;
-import android.preference.CheckBoxPreference;
import android.preference.Preference;
import android.preference.PreferenceGroup;
import android.preference.PreferenceScreen;
-import android.provider.Settings;
import android.text.format.Formatter;
import android.util.Log;
import android.widget.Toast;
@@ -78,8 +76,6 @@
private static final String MEMORY_SD_GROUP = "memory_sd";
- private static final String PTP_MODE_TOGGLE = "ptp_mode_toggle";
-
private static final String MEMORY_INTERNAL_SIZE = "memory_internal_size";
private static final String MEMORY_INTERNAL_AVAIL = "memory_internal_avail";
@@ -122,8 +118,6 @@
private boolean mMeasured = false;
boolean mSdMountToggleAdded = true;
-
- private CheckBoxPreference mPtpModeToggle;
// Access using getMountService()
private IMountService mMountService = null;
@@ -391,16 +385,6 @@
mSdMountPreferenceGroup.removePreference(mSdMountToggle);
}
- mPtpModeToggle = (CheckBoxPreference)findPreference(PTP_MODE_TOGGLE);
- if (UsbManager.isFunctionSupported(UsbManager.USB_FUNCTION_MTP)) {
- mPtpModeToggle.setChecked(Settings.System.getInt(
- getContentResolver(),
- Settings.System.USE_PTP_INTERFACE, 0) != 0);
- } else {
- // hide the PTP mode toggle checkbox if MTP is not supported
- getPreferenceScreen().removePreference(mPtpModeToggle);
- }
-
mInternalSize = findPreference(MEMORY_INTERNAL_SIZE);
mInternalAvail = findPreference(MEMORY_INTERNAL_AVAIL);
mInternalMediaUsage = findPreference(MEMORY_INTERNAL_MEDIA);
@@ -485,11 +469,6 @@
intent.setClass(getActivity(), com.android.settings.MediaFormat.class);
startActivity(intent);
return true;
- } else if (preference == mPtpModeToggle) {
- Settings.System.putInt(getContentResolver(),
- Settings.System.USE_PTP_INTERFACE,
- mPtpModeToggle.isChecked() ? 1 : 0);
- return true;
}
return false;