diff options
author | Adam Powell <adamp@google.com> | 2012-06-03 14:11:43 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-06-03 14:11:43 -0700 |
commit | 7c86958d73e7216a92bdfd84fce4440e1def7eaa (patch) | |
tree | 931a308f3288f1885537641b6a2221e49c6b1af6 /core | |
parent | 778fa81f5da05dcc45260caa70c97971bdccf8bb (diff) | |
parent | 9a1de308cea2d160778fd977825f10a07b49d738 (diff) | |
download | frameworks_base-7c86958d73e7216a92bdfd84fce4440e1def7eaa.zip frameworks_base-7c86958d73e7216a92bdfd84fce4440e1def7eaa.tar.gz frameworks_base-7c86958d73e7216a92bdfd84fce4440e1def7eaa.tar.bz2 |
Merge "Add MediaRouter API." into jb-dev
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/view/ActionProvider.java | 31 | ||||
-rw-r--r-- | core/res/AndroidManifest.xml | 6 | ||||
-rw-r--r-- | core/res/res/values/public.xml | 5 | ||||
-rwxr-xr-x | core/res/res/values/strings.xml | 26 |
4 files changed, 51 insertions, 17 deletions
diff --git a/core/java/android/view/ActionProvider.java b/core/java/android/view/ActionProvider.java index ed976ab..9150d19 100644 --- a/core/java/android/view/ActionProvider.java +++ b/core/java/android/view/ActionProvider.java @@ -19,28 +19,25 @@ package android.view; import android.content.Context; /** - * This class is a mediator for accomplishing a given task, for example sharing a file. - * It is responsible for creating a view that performs an action that accomplishes the task. - * This class also implements other functions such a performing a default action. - * <p> - * An ActionProvider can be optionally specified for a {@link MenuItem} and in such a - * case it will be responsible for creating the action view that appears in the - * {@link android.app.ActionBar} as a substitute for the menu item when the item is - * displayed as an action item. Also the provider is responsible for performing a - * default action if a menu item placed on the overflow menu of the ActionBar is - * selected and none of the menu item callbacks has handled the selection. For this - * case the provider can also optionally provide a sub-menu for accomplishing the - * task at hand. - * </p> - * <p> - * There are two ways for using an action provider for creating and handling of action views: + * An ActionProvider defines rich menu interaction in a single component. + * ActionProvider can generate action views for use in the action bar, + * dynamically populate submenus of a MenuItem, and handle default menu + * item invocations. + * + * <p>An ActionProvider can be optionally specified for a {@link MenuItem} and will be + * responsible for creating the action view that appears in the {@link android.app.ActionBar} + * in place of a simple button in the bar. When the menu item is presented in a way that + * does not allow custom action views, (e.g. in an overflow menu,) the ActionProvider + * can perform a default action.</p> + * + * <p>There are two ways to use an action provider: * <ul> * <li> - * Setting the action provider on a {@link MenuItem} directly by calling + * Set the action provider on a {@link MenuItem} directly by calling * {@link MenuItem#setActionProvider(ActionProvider)}. * </li> * <li> - * Declaring the action provider in the menu XML resource. For example: + * Declare the action provider in an XML menu resource. For example: * <pre> * <code> * <item android:id="@+id/my_menu_item" diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 9b417a2..d9d87c1 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -636,6 +636,12 @@ android:permissionGroup="android.permission-group.SYSTEM_TOOLS" android:protectionLevel="signature" /> + <!-- Allows an application to route media output to other devices. --> + <permission android:name="android.permission.ROUTE_MEDIA_OUTPUT" + android:permissionGroup="android.permission-group.SYSTEM_TOOLS" + android:label="@string/permlab_route_media_output" + android:description="@string/permdesc_route_media_output" /> + <!-- =========================================== --> <!-- Permissions associated with telephony state --> <!-- =========================================== --> diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index 51be22d..801fdf6 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -881,6 +881,11 @@ <java-symbol type="string" name="granularity_label_word" /> <java-symbol type="string" name="granularity_label_link" /> <java-symbol type="string" name="granularity_label_line" /> + <java-symbol type="string" name="default_audio_route_name" /> + <java-symbol type="string" name="default_audio_route_name_headphones" /> + <java-symbol type="string" name="default_audio_route_name_dock_speakers" /> + <java-symbol type="string" name="default_audio_route_name_hdmi" /> + <java-symbol type="string" name="default_audio_route_category_name" /> <java-symbol type="plurals" name="abbrev_in_num_days" /> <java-symbol type="plurals" name="abbrev_in_num_hours" /> diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index d7386fa..2ffb20b 100755 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -3149,6 +3149,11 @@ <!-- Description of an application permission, used to invoke default container service to copy content. --> <string name="permdesc_copyProtectedData">Allows the app to invoke default container service to copy content. Not for use by normal apps.</string> + <!-- Title of an application permission that lets an application route media output. --> + <string name="permlab_route_media_output">Route media output</string> + <!-- Description of an application permission that lets an application route media output. --> + <string name="permdesc_route_media_output">Allows an application to route media output to other external devices.</string> + <!-- Shown in the tutorial for tap twice for zoom control. --> <string name="tutorial_double_tap_to_zoom_message_short">Touch twice for zoom control</string> @@ -3563,4 +3568,25 @@ from the activity resolver to use just this once. [CHAR LIMIT=25] --> <string name="activity_resolver_use_once">Just once</string> + <!-- Name of the default audio route when nothing is connected to + a headphone or other wired audio output jack. [CHAR LIMIT=25] --> + <string name="default_audio_route_name">Phone speaker</string> + + <!-- Name of the default audio route for tablets when nothing + is connected to a headphone or other wired audio output jack. [CHAR LIMIT=25] --> + <string name="default_audio_route_name" product="tablet">Tablet speakers</string> + + <!-- Name of the default audio route when wired headphones are + connected. [CHAR LIMIT=25] --> + <string name="default_audio_route_name_headphones">Headphones</string> + + <!-- Name of the default audio route when an audio dock is connected. [CHAR LIMIT=25] --> + <string name="default_audio_route_name_dock_speakers">Dock speakers</string> + + <!-- Name of the default audio route when HDMI is connected. [CHAR LIMIT=25] --> + <string name="default_audio_route_name_hdmi">HDMI audio</string> + + <!-- Name of the default audio route category. [CHAR LIMIT=25] --> + <string name="default_audio_route_category_name">System</string> + </resources> |