Commit Graph

12 Commits

Author SHA1 Message Date
Jerry Zhang
5d36a177d9 Refactor setCurrentFunction and setUsbDataUnlocked into one method
This allows us to get rid of an extraneous config switch and
simplify some code.

Test: Manually change usb configuration
Change-Id: Id78da530ff485ecd7a915056832eec1dd8c91954
2016-10-13 17:32:22 -07:00
Sudheer Shanka
9e9e63b7b3 Part3 - Don't add padlock if the restriction is not set by admin.
Bug: 26687435
Change-Id: Ibfea6d7d5bd32e7a05dcc2cc32b121c9e50b6a34
2016-02-16 11:04:11 +00:00
Sudheer Shanka
1c3fd76ee0 Add padlock to usb modes when disabled by admin.
Change-Id: I8504febd78f083eb3ff88926fe29d69edc62b6ef
2016-01-21 18:41:05 +00:00
Jason Monk
e779213d8e Merge "Don\'t show MIDI USB option if not supported" am: c2a9cd03f7 am: 92aafd3ed5
am: 1150cfce95

* commit '1150cfce95950f9de3e6e340b6d8efaf5bbd3eb0':
  Don't show MIDI USB option if not supported
2015-11-04 15:12:06 +00:00
Zoran Jovanovic
81ec094554 Don't show MIDI USB option if not supported
If device doesn't support MIDI, don't show MIDI in "Use USB for" menu
when USB cable is connected.
(Selecting MIDI will crash the Settings app.)

Change-Id: I60f4cbb6357f162fecb574cdb6766cf5ed92e78e
2015-11-04 15:21:58 +01:00
Jason Monk
f2686165cf am cde29f77: am 618bc11b: am 72fecf9f: am d3c60afe: Include the usb data mode regardless of data role
* commit 'cde29f771a85dc3f7e5b567ffcaa07aaa486fcf4':
  Include the usb data mode regardless of data role
2015-09-10 20:53:52 +00:00
Jason Monk
d3c60afe52 Include the usb data mode regardless of data role
Turns out there are valid data modes in host mode (like midi).
Need to allow these through for the dialog to set the proper
current state.

Bug: 23905770
Change-Id: I7a37ad95ccaf18f211d2b2d330c7f1d7af4cfc16
2015-09-10 10:38:14 -04:00
Yasuhiro Matsuda
a5c73b423d Merge "Handle the case where null is returned for USB_STATE intent." 2015-08-26 09:36:41 +00:00
Jason Monk
94e460fd45 Fix Usb-C dialog issues
- Fix theme
 - Fix PTP bug introduced in initial USB-C support

Bug: 21615151
Change-Id: I577f06929b028fe3f50ef5b9adcfa9507fd1df0e
2015-08-12 14:14:33 -04:00
Yasuhiro Matsuda
acb7b31bff Handle the case where null is returned for USB_STATE intent.
USB_STATE is not received if USB_STATE has not changed from
the initial state. This CL adds handling for that case.

BUG: 22163689
Change-Id: I232a558caaac4f4984f7629e2574d478fc7ad432
2015-08-07 18:14:04 +09:00
Jason Monk
9824c5da1e resolved conflicts for merge of 1adca55f to mnc-dr-dev
Change-Id: Iac88fbc39bbfb7aaa730652794b4aa73618c1d9c
2015-08-04 16:23:32 -04:00
Jason Monk
83290eef8c Update USB dialog for USB-C power option
Also includes a bit of visual updates, options now have summaries
as well.

Code has been refactored a bit, and is more flexible to easily
support any kind of power/data flow combination once its time
to support that.

Currently devices don't have USB-C ports, they can be simulated
with the following commands:
  $ adb shell dumpsys usb add-port "matrix" dual
  # ?s control whether these can be changed
  $ adb shell dumpsys usb connect-port "matrix" ufp? sink? device?
  # Do testing here
  $ adb shell dumpsys usb disconnect-port "matrix"
  $ adb shell dumpsys usb remove-port "matrix"
  $ adb shell dumpsys usb reset
  # Use the help for more info
  $ adb shell dumpsys usb -h

Bug: 21615151
Change-Id: I53ad4de51ff10a197c87bf2741756c1821ee9e74
2015-08-04 09:18:57 -04:00