Merge "Drop touch events when no window was touched." into klp-dev
diff --git a/docs/html/training/basics/actionbar/adding-buttons.jd b/docs/html/training/basics/actionbar/adding-buttons.jd
index 5fb0d59..26c9d0e 100644
--- a/docs/html/training/basics/actionbar/adding-buttons.jd
+++ b/docs/html/training/basics/actionbar/adding-buttons.jd
@@ -74,7 +74,21 @@
Settings action should always appear in the overflow. (By default, all actions appear in the
overflow, but it's good practice to explicitly declare your design intentions for each action.)
-<p>However, <strong>if your app is using the Support Library</strong> for compatibility on versions
+<p>The {@code icon} attribute requires a resource ID for an
+image. The name that follows {@code @drawable/} must be the name of a bitmap image you've
+saved in your project's {@code res/drawable/} directory. For example,
+{@code "@drawable/ic_action_search"} refers to {@code ic_action_search.png}.
+Likewise, the {@code title} attribute uses a string resource that's defined by an XML
+file in your project's {@code res/values/} directory, as discussed in <a
+href="{@docRoot}training/basics/firstapp/building-ui.html#Strings">Building a Simple User
+Interface</a>.
+
+<p class="note"><strong>Note:</strong> When creating icons and other bitmap images for your app,
+it's important that you provide multiple versions that are each optimized for a different screen
+density. This is discussed more in the lesson about <a
+href="{@docRoot}training/basics/supporting-devices/screens.html">Supporting Different Screens</a>.
+
+<p><strong>If your app is using the Support Library</strong> for compatibility on versions
as low as Android 2.1, the {@code showAsAction} attribute is not available from
the {@code android:} namespace. Instead this attribute is provided by the Support Library
and you must define your own XML namespace and use that namespace as the attribute prefix.
diff --git a/docs/html/training/basics/actionbar/styling.jd b/docs/html/training/basics/actionbar/styling.jd
index a1cc10c..1f76e03 100644
--- a/docs/html/training/basics/actionbar/styling.jd
+++ b/docs/html/training/basics/actionbar/styling.jd
@@ -20,7 +20,7 @@
<ul>
<li><a href="{@docRoot}guide/topics/ui/themes.html">Styles and Themes</a></li>
<li><a class="external-link" target="_blank"
- href="http://jgilfelt.github.io/android-actionbarstylegenerator/">Android Action Bar Style
+ href="http://www.actionbarstylegenerator.com">Android Action Bar Style
Generator</a></li>
</ul>
@@ -146,13 +146,13 @@
<style name="CustomActionBarTheme"
parent="@style/Theme.Holo.Light.DarkActionBar">
<item name="android:actionBarStyle">@style/MyActionBar</item>
- <style>
+ </style>
<!-- ActionBar styles -->
<style name="MyActionBar"
parent="@style/Widget.Holo.Light.ActionBar.Solid.Inverse">
<item name="android:background">@drawable/actionbar_background</item>
- <style>
+ </style>
</resources>
</pre>
@@ -178,7 +178,7 @@
<!-- Support library compatibility -->
<item name="actionBarStyle">@style/MyActionBar</item>
- <style>
+ </style>
<!-- ActionBar styles -->
<style name="MyActionBar"
@@ -187,7 +187,7 @@
<!-- Support library compatibility -->
<item name="background">@drawable/actionbar_background</item>
- <style>
+ </style>
</resources>
</pre>
@@ -236,25 +236,25 @@
<item name="android:actionBarStyle">@style/MyActionBar</item>
<item name="android:actionBarTabTextStyle">@style/MyActionBarTabText</item>
<item name="android:actionMenuTextColor">@color/actionbar_text</item>
- <style>
+ </style>
<!-- ActionBar styles -->
<style name="MyActionBar"
parent="@style/Widget.Holo.ActionBar">
<item name="android:titleTextStyle">@style/MyActionBarTitleText</item>
- <style>
+ </style>
<!-- ActionBar title text -->
<style name="MyActionBarTitleText"
parent="@style/TextAppearance.Holo.Widget.ActionBar.Title">
<item name="android:textColor">@color/actionbar_text</item>
- <style>
+ </style>
<!-- ActionBar tabs text styles -->
<style name="MyActionBarTabText"
parent="@style/Widget.Holo.ActionBar.TabText">
<item name="android:textColor">@color/actionbar_text</item>
- <style>
+ </style>
</resources>
</pre>
@@ -280,7 +280,7 @@
<item name="actionBarStyle">@style/MyActionBar</item>
<item name="actionBarTabTextStyle">@style/MyActionBarTabText</item>
<item name="actionMenuTextColor">@color/actionbar_text</item>
- <style>
+ </style>
<!-- ActionBar styles -->
<style name="MyActionBar"
@@ -289,21 +289,21 @@
<!-- Support library compatibility -->
<item name="titleTextStyle">@style/MyActionBarTitleText</item>
- <style>
+ </style>
<!-- ActionBar title text -->
<style name="MyActionBarTitleText"
parent="@style/TextAppearance.<strong>AppCompat</strong>.Widget.ActionBar.Title">
<item name="android:textColor">@color/actionbar_text</item>
<!-- The textColor property is backward compatible with the Support Library -->
- <style>
+ </style>
<!-- ActionBar tabs text -->
<style name="MyActionBarTabText"
parent="@style/Widget.<strong>AppCompat</strong>.ActionBar.TabText">
<item name="android:textColor">@color/actionbar_text</item>
<!-- The textColor property is backward compatible with the Support Library -->
- <style>
+ </style>
</resources>
</pre>
@@ -392,14 +392,14 @@
<style name="CustomActionBarTheme"
parent="@style/Theme.Holo">
<item name="android:actionBarTabStyle">@style/MyActionBarTabs</item>
- <style>
+ </style>
<!-- ActionBar tabs styles -->
<style name="MyActionBarTabs"
parent="@style/Widget.Holo.ActionBar.TabView">
<!-- tab indicator -->
<item name="android:background">@drawable/actionbar_tab_indicator</item>
- <style>
+ </style>
</resources>
</pre>
@@ -420,7 +420,7 @@
<!-- Support library compatibility -->
<item name="actionBarTabStyle">@style/MyActionBarTabs</item>
- <style>
+ </style>
<!-- ActionBar tabs styles -->
<style name="MyActionBarTabs"
@@ -430,7 +430,7 @@
<!-- Support library compatibility -->
<item name="background">@drawable/actionbar_tab_indicator</item>
- <style>
+ </style>
</resources>
</pre>
@@ -442,7 +442,7 @@
href="{@docRoot}guide/topics/ui/themes.html">Styles and Themes</a> guide.</li>
<li>For even more complete styling for the action bar,
try the <a class="external-link" target="_blank"
- href="www://http.actionbarstylegenerator.com">Android Action Bar Style
+ href="http://www.actionbarstylegenerator.com">Android Action Bar Style
Generator</a>.</li>
</ul>
</div>
\ No newline at end of file
diff --git a/docs/html/training/basics/activity-lifecycle/starting.jd b/docs/html/training/basics/activity-lifecycle/starting.jd
index dce6e30..9046599 100644
--- a/docs/html/training/basics/activity-lifecycle/starting.jd
+++ b/docs/html/training/basics/activity-lifecycle/starting.jd
@@ -220,7 +220,7 @@
</pre>
<p class="caution"><strong>Caution:</strong> Using the {@link android.os.Build.VERSION#SDK_INT} to
-prevent older system's from executing new APIs works in this way on Android 2.0 (API level
+prevent older systems from executing new APIs works in this way on Android 2.0 (API level
5) and higher only. Older versions will encounter a runtime exception.</p>
<p>Once the {@link android.app.Activity#onCreate onCreate()} finishes execution, the system
diff --git a/docs/html/training/basics/supporting-devices/screens.jd b/docs/html/training/basics/supporting-devices/screens.jd
index 1114f21..e52ee70 100644
--- a/docs/html/training/basics/supporting-devices/screens.jd
+++ b/docs/html/training/basics/supporting-devices/screens.jd
@@ -23,8 +23,8 @@
<ul>
<li><a href="{@docRoot}training/multiscreen/index.html">Designing for Multiple
Screens</a></li>
- <li><a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
-Screens</a></li>
+ <li><a href="{@docRoot}guide/topics/resources/providing-resources.html">Providing
+ Resources</a></li>
<li><a href="{@docRoot}design/style/iconography.html">Iconography design guide</a></li>
</ul>
</div>
diff --git a/docs/html/training/training_toc.cs b/docs/html/training/training_toc.cs
index c99fc96..40c170e 100644
--- a/docs/html/training/training_toc.cs
+++ b/docs/html/training/training_toc.cs
@@ -68,6 +68,30 @@
<li class="nav-section">
<div class="nav-section-header">
+ <a href="<?cs var:toroot ?>training/basics/supporting-devices/index.html"
+ description=
+ "How to build your app with alternative resources that provide an
+ optimized user experience on multiple device form factors using a single APK."
+ >Supporting Different Devices</a>
+ </div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>training/basics/supporting-devices/languages.html">
+ Supporting Different Languages
+ </a>
+ </li>
+ <li><a href="<?cs var:toroot ?>training/basics/supporting-devices/screens.html">
+ Supporting Different Screens
+ </a>
+ </li>
+ <li><a href="<?cs var:toroot ?>training/basics/supporting-devices/platforms.html">
+ Supporting Different Platform Versions
+ </a>
+ </li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header">
<a href="<?cs var:toroot ?>training/basics/activity-lifecycle/index.html"
description=
"How Android activities live and die and how to create
@@ -96,30 +120,6 @@
<li class="nav-section">
<div class="nav-section-header">
- <a href="<?cs var:toroot ?>training/basics/supporting-devices/index.html"
- description=
- "How to build your app with alternative resources that provide an
- optimized user experience on multiple device form factors using a single APK."
- >Supporting Different Devices</a>
- </div>
- <ul>
- <li><a href="<?cs var:toroot ?>training/basics/supporting-devices/languages.html">
- Supporting Different Languages
- </a>
- </li>
- <li><a href="<?cs var:toroot ?>training/basics/supporting-devices/screens.html">
- Supporting Different Screens
- </a>
- </li>
- <li><a href="<?cs var:toroot ?>training/basics/supporting-devices/platforms.html">
- Supporting Different Platform Versions
- </a>
- </li>
- </ul>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header">
<a href="<?cs var:toroot ?>training/basics/fragments/index.html"
description=
"How to build a user interface for your app that is flexible enough
diff --git a/location/java/android/location/SettingInjectorService.java b/location/java/android/location/SettingInjectorService.java
index 4bfa150..dbc3f27 100644
--- a/location/java/android/location/SettingInjectorService.java
+++ b/location/java/android/location/SettingInjectorService.java
@@ -176,8 +176,15 @@
/**
* Constructor.
+ * <p/>
+ * Note that to prevent churn in the settings list, there is no support for dynamically
+ * choosing to hide a setting. Instead you should provide a {@code enabled} value of false,
+ * which will gray the setting out and disable the link from "Settings > Location"
+ * to your setting activity. One reason why you might choose to do this is if
+ * {@link android.provider.Settings.Secure#getLocationMode(android.content.ContentResolver)}
+ * is {@link android.provider.Settings.Secure#LOCATION_MODE_OFF}.
*
- * @param summary the {@link Preference#getSummary()} value
+ * @param summary the {@link Preference#getSummary()} value (allowed to be null or empty)
* @param enabled the {@link Preference#isEnabled()} value
*/
public Status(String summary, boolean enabled) {