Properly set sys.usb.config when ums is enabled.
Use sys.usb.config also for ums, but leave sys.storage.ums.enabled for compatibility with custom init.rc that use it. PS2: Rebased - moved updates to init.recovery.usb.rc Change-Id: Iad3441d23ac37612e58f63e4038d05c5c1a37b25
This commit is contained in:
@@ -1613,6 +1613,7 @@ int TWPartitionManager::usb_storage_enable(void) {
|
||||
}
|
||||
}
|
||||
property_set("sys.storage.ums_enabled", "1");
|
||||
property_set("sys.usb.config", "mass_storage,adb");
|
||||
return true;
|
||||
error_handle:
|
||||
if (mtp_was_enabled)
|
||||
@@ -1637,6 +1638,7 @@ int TWPartitionManager::usb_storage_disable(void) {
|
||||
Update_System_Details();
|
||||
UnMount_Main_Partitions();
|
||||
property_set("sys.storage.ums_enabled", "0");
|
||||
property_set("sys.usb.config", "adb");
|
||||
if (mtp_was_enabled)
|
||||
if (!Enable_MTP())
|
||||
Disable_MTP();
|
||||
|
||||
Reference in New Issue
Block a user