History log of /frameworks/base/packages/SystemUI/src/com/android/systemui/usb/UsbResolverActivity.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2ed547e55f820a9c705872d802b051d8ae9c906b 30-Apr-2015 Adam Powell <adamp@google.com> Add alternate intents and refinement callbacks to ChooserActivity

Allow a calling app to supply an array of additional Intents to the
system ChooserActivity.

The chooser will present a merged list of targets that can handle any
of the Intents supplied, including both the standard EXTRA_INTENT as
well as any of the intents supplied in EXTRA_ALTERNATE_INTENTS. These are
treated as ordered; EXTRA_INTENT is considered the first/primary
Intent and EXTRA_ALTERNATE_INTENTS are sorted most important first.

Targets are queried for all supplied Intents. If the same component is
returned for more than one Intent, the target is associated with the
most important Intent that matched.

This allows calling apps to supply several different payloads for an
action depending on what the intended targets are able to support. For
example, an app performing ACTION_SEND may supply image/jpeg data to
compatible targets or a hosted web link to targets that only support
text/plain. The user will have the opportunity to pick from a single
merged list of choices using the best available payload, and will not
be bothered with the implementation details of how the payload will be
delivered to the recipient.

If the calling app wishes to provide further disambiguation or
refinement after the user makes a choice, for example to let the user
choose which of the source intents to send from the primary or
alternates, show a progress dialog as a full-resolution version of a
photo is downloaded from the server before being sent along or while
reticulating splines, the caller can supply an IntentSender to
ACTION_CHOOSER including the extra EXTRA_REFINEMENT_INTENT_SENDER.
This should be the IntentSender obtained from a PendingIntent pointing
at an activity to launch to perform the refinement.

The refinement activity should report that it is finished by obtaining
the ResultReceiver from EXTRA_RESULT_RECEIVER. Available intents to
send to the selected target will be contained in EXTRA_INTENT and
EXTRA_ALTERNATE_INTENTS.

To complete the refinement and send the result along to the chosen
target, the refinement activity should select one of the supplied
intents and send it to the ResultReceiver in a Bundle with the key
EXTRA_INTENT and the result code RESULT_OK. To cancel the refinement,
and let the user select another choice, send RESULT_CANCEL.

While refinement activities cannot modify the filterEquals-affecting
fields of the Intent they return, they may modify extras to provide
additional or altered details to the final recipient. These extras
will be filled into the Intent sent to the final target.

Change-Id: I7ad4739eadd1a0e307675847ccf47ea948918a3a
/frameworks/base/packages/SystemUI/src/com/android/systemui/usb/UsbResolverActivity.java
2442841819f9554f9b5c8b9c147a51b04e50de4d 02-Apr-2015 Adam Powell <adamp@google.com> Implement ChooserTargetService querying for ChooserActivity

First cut at querying services provided by apps that offer
ChooserTargetServices. This first implementation provides no ranking.

Bind to a limit of 5 ChooserTargetServices and offer the
ChooserTargets they provide as options in the system
ChooserActivity. The chooser now presents targets as a grid and
displays the activity icon from the referrer activity.

Change-Id: I45db829f184fc78d4f18d42b2a60b25bc301eba8
/frameworks/base/packages/SystemUI/src/com/android/systemui/usb/UsbResolverActivity.java
fc3f24b4b60c10e0d3f41f70df37e11ea311cc2c 02-Oct-2012 Jeff Sharkey <jsharkey@android.com> Make USB services multi-user aware.

USB settings are now isolated per-user, since they revolve around
installed packages. User-specific settings are returned based on
calling user, or referenced by UserHandle passed to SystemUI. Each
settings Context is wrapped as a specific user, so all broadcasts are
sent correctly. Upgrades any existing USB settings to OWNER.

Physical events, like new devices, are routed to the currently active
user. Switch to using AtomicFile when persisting settings.

Bug: 7244888
Change-Id: I8a723ad3d55ac1bff99276c5f3a3f5e8f013432f
/frameworks/base/packages/SystemUI/src/com/android/systemui/usb/UsbResolverActivity.java
ad5f83e91b6812a6dee4fea7646fa9061d9f9597 15-Mar-2011 Mike Lockwood <lockwood@android.com> USB Manager string clean up:

- Use "Cancel" instead of "Ignore"
- Customize the text for the "always use" checkbox for devices and accessories
- Clean up strings for AccessoryChat test program

Bug: 4074719

Change-Id: Ideec838e4c1f1a82ef4ae411c9124417ffb63165
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/packages/SystemUI/src/com/android/systemui/usb/UsbResolverActivity.java
bce6f8f249ff2b65df9ed790cc460053ab8eccec 13-Mar-2011 Mike Lockwood <lockwood@android.com> Add a dialog to ask user to start an application for a USB device or accessory

This is used when there is only one application available and the user has
not chosen to start it by default.
If more than one application is available we continue to use UsbResolverActivity

Bug: 4074719

Change-Id: Id61f2ccc6de5b9ac70fb4670006ff1fee2028d55
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/packages/SystemUI/src/com/android/systemui/usb/UsbResolverActivity.java
d591357524091254483849e37697255cc8fce2ad 09-Mar-2011 Mike Lockwood <lockwood@android.com> Close USB dialogs if their corresponding accessory or device has disconnected

BUG: 4060065

Change-Id: Ib517e5e4a5422f9f0c8fca601308cecf7743c5d1
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/packages/SystemUI/src/com/android/systemui/usb/UsbResolverActivity.java
3a68b8338b431eb15d28e92f06452efbbda9493e 08-Mar-2011 Mike Lockwood <lockwood@android.com> USB: Add API and dialog for apps to request permissions for USB devices and accessories

New APIs:

UsbManager.hasPermission returns true if the caller has permission
for the given device or accessory

UsbManager.requestPermission poses a dialog to allow the user to give the caller
permission for the device or accessory.
Result is returned via a PendingIntent.
No dialog is displayed if the caller already has permission.

Also moved UsbResolverActivity to SystemUI package

BUG: 4069037

Change-Id: I93be769501a8776b49ac26e468af19f8fa2114c9
/frameworks/base/packages/SystemUI/src/com/android/systemui/usb/UsbResolverActivity.java