Merge "Import translations. DO NOT MERGE"
diff --git a/api/current.txt b/api/current.txt
index e5156e8..7b23d9b 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -49983,6 +49983,7 @@
method public org.json.JSONArray put(int, int) throws org.json.JSONException;
method public org.json.JSONArray put(int, long) throws org.json.JSONException;
method public org.json.JSONArray put(int, java.lang.Object) throws org.json.JSONException;
+ method public java.lang.Object remove(int);
method public org.json.JSONObject toJSONObject(org.json.JSONArray) throws org.json.JSONException;
method public java.lang.String toString(int) throws org.json.JSONException;
}
diff --git a/core/java/android/os/StatFs.java b/core/java/android/os/StatFs.java
index 2314057..9e9521a 100644
--- a/core/java/android/os/StatFs.java
+++ b/core/java/android/os/StatFs.java
@@ -18,14 +18,14 @@
import libcore.io.ErrnoException;
import libcore.io.Libcore;
-import libcore.io.StructStatFs;
+import libcore.io.StructStatVfs;
/**
* Retrieve overall information about the space on a filesystem. This is a
- * wrapper for Unix statfs().
+ * wrapper for Unix statvfs().
*/
public class StatFs {
- private StructStatFs mStat;
+ private StructStatVfs mStat;
/**
* Construct a new StatFs for looking at the stats of the filesystem at
@@ -39,9 +39,9 @@
mStat = doStat(path);
}
- private static StructStatFs doStat(String path) {
+ private static StructStatVfs doStat(String path) {
try {
- return Libcore.os.statfs(path);
+ return Libcore.os.statvfs(path);
} catch (ErrnoException e) {
throw new IllegalArgumentException("Invalid path: " + path, e);
}
@@ -66,7 +66,7 @@
/**
* The size, in bytes, of a block on the file system. This corresponds to
- * the Unix {@code statfs.f_bsize} field.
+ * the Unix {@code statvfs.f_bsize} field.
*/
public long getBlockSizeLong() {
return mStat.f_bsize;
@@ -82,7 +82,7 @@
/**
* The total number of blocks on the file system. This corresponds to the
- * Unix {@code statfs.f_blocks} field.
+ * Unix {@code statvfs.f_blocks} field.
*/
public long getBlockCountLong() {
return mStat.f_blocks;
@@ -99,7 +99,7 @@
/**
* The total number of blocks that are free on the file system, including
* reserved blocks (that are not available to normal applications). This
- * corresponds to the Unix {@code statfs.f_bfree} field. Most applications
+ * corresponds to the Unix {@code statvfs.f_bfree} field. Most applications
* will want to use {@link #getAvailableBlocks()} instead.
*/
public long getFreeBlocksLong() {
@@ -125,7 +125,7 @@
/**
* The number of blocks that are free on the file system and available to
- * applications. This corresponds to the Unix {@code statfs.f_bavail} field.
+ * applications. This corresponds to the Unix {@code statvfs.f_bavail} field.
*/
public long getAvailableBlocksLong() {
return mStat.f_bavail;
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 4998742..0149f03 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -41,6 +41,7 @@
import android.view.ViewTreeObserver;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
+import android.view.accessibility.AccessibilityNodeProvider;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.widget.AbsoluteLayout;
@@ -2051,6 +2052,13 @@
}
*/
+ @Override
+ public AccessibilityNodeProvider getAccessibilityNodeProvider() {
+ AccessibilityNodeProvider provider =
+ mProvider.getViewDelegate().getAccessibilityNodeProvider();
+ return provider == null ? super.getAccessibilityNodeProvider() : provider;
+ }
+
@Deprecated
@Override
public boolean shouldDelayChildPressedState() {
diff --git a/core/java/android/webkit/WebViewClassic.java b/core/java/android/webkit/WebViewClassic.java
index 3afab09..5a9e6c9 100644
--- a/core/java/android/webkit/WebViewClassic.java
+++ b/core/java/android/webkit/WebViewClassic.java
@@ -90,6 +90,7 @@
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.AccessibilityNodeInfo;
+import android.view.accessibility.AccessibilityNodeProvider;
import android.view.inputmethod.BaseInputConnection;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
@@ -1769,6 +1770,11 @@
}
@Override
+ public AccessibilityNodeProvider getAccessibilityNodeProvider() {
+ return null;
+ }
+
+ @Override
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
if (!mWebView.isEnabled()) {
// Only default actions are supported while disabled.
diff --git a/core/java/android/webkit/WebViewProvider.java b/core/java/android/webkit/WebViewProvider.java
index fa17ab9..41d6333 100644
--- a/core/java/android/webkit/WebViewProvider.java
+++ b/core/java/android/webkit/WebViewProvider.java
@@ -32,6 +32,7 @@
import android.view.ViewGroup.LayoutParams;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
+import android.view.accessibility.AccessibilityNodeProvider;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.webkit.WebView.HitTestResult;
@@ -279,6 +280,8 @@
interface ViewDelegate {
public boolean shouldDelayChildPressedState();
+ public AccessibilityNodeProvider getAccessibilityNodeProvider();
+
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info);
public void onInitializeAccessibilityEvent(AccessibilityEvent event);
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 1e20ab2..8b51bf3 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -28,6 +28,7 @@
import android.os.Parcel;
import android.os.Parcelable;
import android.os.StrictMode;
+import android.os.Trace;
import android.text.Editable;
import android.text.InputType;
import android.text.TextUtils;
@@ -2151,6 +2152,8 @@
* @return A view displaying the data associated with the specified position
*/
View obtainView(int position, boolean[] isScrap) {
+ Trace.traceBegin(Trace.TRACE_TAG_VIEW, "obtainView");
+
isScrap[0] = false;
View scrapView;
@@ -2213,6 +2216,8 @@
}
}
+ Trace.traceEnd(Trace.TRACE_TAG_VIEW);
+
return child;
}
diff --git a/core/java/android/widget/GridView.java b/core/java/android/widget/GridView.java
index 63147dd..a7d546a 100644
--- a/core/java/android/widget/GridView.java
+++ b/core/java/android/widget/GridView.java
@@ -20,6 +20,7 @@
import android.content.Intent;
import android.content.res.TypedArray;
import android.graphics.Rect;
+import android.os.Trace;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.KeyEvent;
@@ -1364,6 +1365,8 @@
*/
private void setupChild(View child, int position, int y, boolean flow, int childrenLeft,
boolean selected, boolean recycled, int where) {
+ Trace.traceBegin(Trace.TRACE_TAG_VIEW, "setupGridItem");
+
boolean isSelected = selected && shouldShowSelector();
final boolean updateChildSelected = isSelected != child.isSelected();
final int mode = mTouchMode;
@@ -1459,6 +1462,8 @@
!= position) {
child.jumpDrawablesToCurrentState();
}
+
+ Trace.traceEnd(Trace.TRACE_TAG_VIEW);
}
/**
diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java
index d990a20..c44ac32 100644
--- a/core/java/android/widget/ListView.java
+++ b/core/java/android/widget/ListView.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.os.Trace;
import com.android.internal.R;
import com.android.internal.util.Predicate;
import com.google.android.collect.Lists;
@@ -1876,6 +1877,8 @@
*/
private void setupChild(View child, int position, int y, boolean flowDown, int childrenLeft,
boolean selected, boolean recycled) {
+ Trace.traceBegin(Trace.TRACE_TAG_VIEW, "setupListItem");
+
final boolean isSelected = selected && shouldShowSelector();
final boolean updateChildSelected = isSelected != child.isSelected();
final int mode = mTouchMode;
@@ -1956,6 +1959,8 @@
!= position) {
child.jumpDrawablesToCurrentState();
}
+
+ Trace.traceEnd(Trace.TRACE_TAG_VIEW);
}
@Override
diff --git a/core/java/com/android/internal/util/FastPrintWriter.java b/core/java/com/android/internal/util/FastPrintWriter.java
index fa53cfa..9bec10e 100644
--- a/core/java/com/android/internal/util/FastPrintWriter.java
+++ b/core/java/com/android/internal/util/FastPrintWriter.java
@@ -458,7 +458,7 @@
if (lnum == 0) {
println("0");
} else {
- super.print(lnum);
+ super.println(lnum);
}
}
diff --git a/docs/html/about/versions/jelly-bean.jd b/docs/html/about/versions/jelly-bean.jd
index 71957be..5812f3d 100644
--- a/docs/html/about/versions/jelly-bean.jd
+++ b/docs/html/about/versions/jelly-bean.jd
@@ -5,7 +5,14 @@
tab2.link=#android-41
@jd:body
-
+<div id="butterbar-wrapper" >
+ <div id="butterbar" >
+ <div id="butterbar-message">
+<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
+ Take the Android Developer Survey</a>
+ </div>
+ </div>
+</div>
<style>
#android-41 {display:none;}
diff --git a/docs/html/channels/io2013.jd b/docs/html/channels/io2013.jd
index 977eb2f..b2bde31 100644
--- a/docs/html/channels/io2013.jd
+++ b/docs/html/channels/io2013.jd
@@ -1,7 +1,15 @@
fullpage=true
page.title=Google I/O 13
@jd:body
-
+<div id="butterbar-wrapper" >
+ <div id="butterbar" >
+ <div id="butterbar-message">
+<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
+ Take the Android Developer Survey</a>
+ </div>
+ </div>
+</div>
+
<style>
#ioplayer-frame {
z-index:10;
diff --git a/docs/html/design/downloads/index.jd b/docs/html/design/downloads/index.jd
index 00f4467..ab6bb1b 100644
--- a/docs/html/design/downloads/index.jd
+++ b/docs/html/design/downloads/index.jd
@@ -1,5 +1,13 @@
page.title=Downloads
@jd:body
+<div id="butterbar-wrapper" >
+ <div id="butterbar" >
+ <div id="butterbar-message">
+<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
+ Take the Android Developer Survey</a>
+ </div>
+ </div>
+</div>
<div class="layout-content-row">
<div class="layout-content-col span-9">
diff --git a/docs/html/design/index.jd b/docs/html/design/index.jd
index 1e6b40c..d4ef07f 100644
--- a/docs/html/design/index.jd
+++ b/docs/html/design/index.jd
@@ -2,6 +2,14 @@
header.hide=1
footer.hide=1
@jd:body
+<div id="butterbar-wrapper" >
+ <div id="butterbar" >
+ <div id="butterbar-message">
+<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
+ Take the Android Developer Survey</a>
+ </div>
+ </div>
+</div>
<style>
#landing-graphic-container {
diff --git a/docs/html/develop/index.jd b/docs/html/develop/index.jd
index 7b5cb4a..f96e868 100644
--- a/docs/html/develop/index.jd
+++ b/docs/html/develop/index.jd
@@ -4,6 +4,14 @@
carousel=1
tabbedList=1
@jd:body
+<div id="butterbar-wrapper" >
+ <div id="butterbar" >
+ <div id="butterbar-message">
+<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
+ Take the Android Developer Survey</a>
+ </div>
+ </div>
+</div>
<style>
#noplayer-message {
diff --git a/docs/html/distribute/googleplay/promote/badges.jd b/docs/html/distribute/googleplay/promote/badges.jd
index 9a32921..93092bf 100644
--- a/docs/html/distribute/googleplay/promote/badges.jd
+++ b/docs/html/distribute/googleplay/promote/badges.jd
@@ -1,5 +1,13 @@
page.title=Google Play Badges
@jd:body
+<div id="butterbar-wrapper" >
+ <div id="butterbar" >
+ <div id="butterbar-message">
+<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
+ Take the Android Developer Survey</a>
+ </div>
+ </div>
+</div>
<p itemprop="description">Google Play badges allow you to promote your app with official branding
in your online ads, promotional materials, or anywhere else you want a link to your app.</p>
diff --git a/docs/html/distribute/googleplay/promote/brand.jd b/docs/html/distribute/googleplay/promote/brand.jd
index 265584f..a047b1f 100644
--- a/docs/html/distribute/googleplay/promote/brand.jd
+++ b/docs/html/distribute/googleplay/promote/brand.jd
@@ -1,6 +1,13 @@
page.title=Brand Guidelines
@jd:body
-
+<div id="butterbar-wrapper" >
+ <div id="butterbar" >
+ <div id="butterbar-message">
+<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
+ Take the Android Developer Survey</a>
+ </div>
+ </div>
+</div>
<p>We encourage you to use the Android and Google Play brands with your Android app
diff --git a/docs/html/distribute/googleplay/promote/index.jd b/docs/html/distribute/googleplay/promote/index.jd
index 6882990..14f37c4 100644
--- a/docs/html/distribute/googleplay/promote/index.jd
+++ b/docs/html/distribute/googleplay/promote/index.jd
@@ -3,6 +3,14 @@
header.hide=0
footer.hide=0
@jd:body
+<div id="butterbar-wrapper" >
+ <div id="butterbar" >
+ <div id="butterbar-message">
+<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
+ Take the Android Developer Survey</a>
+ </div>
+ </div>
+</div>
<!--
<style>
diff --git a/docs/html/distribute/googleplay/promote/linking.jd b/docs/html/distribute/googleplay/promote/linking.jd
index 4fdc5db..014582a 100644
--- a/docs/html/distribute/googleplay/promote/linking.jd
+++ b/docs/html/distribute/googleplay/promote/linking.jd
@@ -1,5 +1,13 @@
page.title=Linking to Your Products
@jd:body
+<div id="butterbar-wrapper" >
+ <div id="butterbar" >
+ <div id="butterbar-message">
+<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
+ Take the Android Developer Survey</a>
+ </div>
+ </div>
+</div>
<div class="sidebox-wrapper">
<div class="sidebox">
diff --git a/docs/html/distribute/googleplay/publish/preparing.jd b/docs/html/distribute/googleplay/publish/preparing.jd
index 5593f4f..dd35b25 100644
--- a/docs/html/distribute/googleplay/publish/preparing.jd
+++ b/docs/html/distribute/googleplay/publish/preparing.jd
@@ -1,6 +1,14 @@
page.title=Launch Checklist
page.tags="publishing","launch","Google Play", "Developer Console"
@jd:body
+<div id="butterbar-wrapper" >
+ <div id="butterbar" >
+ <div id="butterbar-message">
+<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
+ Take the Android Developer Survey</a>
+ </div>
+ </div>
+</div>
<div id="qv-wrapper"><div id="qv">
<h2>Checklist</h2>
diff --git a/docs/html/distribute/googleplay/quality/core.jd b/docs/html/distribute/googleplay/quality/core.jd
index 9e23bcc..3fd221c 100644
--- a/docs/html/distribute/googleplay/quality/core.jd
+++ b/docs/html/distribute/googleplay/quality/core.jd
@@ -1,5 +1,13 @@
page.title=Core App Quality Guidelines
@jd:body
+<div id="butterbar-wrapper" >
+ <div id="butterbar" >
+ <div id="butterbar-message">
+<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
+ Take the Android Developer Survey</a>
+ </div>
+ </div>
+</div>
<div id="qv-wrapper"><div id="qv">
<h2>Quality Criteria</h2>
diff --git a/docs/html/distribute/googleplay/quality/index.jd b/docs/html/distribute/googleplay/quality/index.jd
index ef537b1..def42e5 100644
--- a/docs/html/distribute/googleplay/quality/index.jd
+++ b/docs/html/distribute/googleplay/quality/index.jd
@@ -1,5 +1,13 @@
page.title=App Quality
@jd:body
+<div id="butterbar-wrapper" >
+ <div id="butterbar" >
+ <div id="butterbar-message">
+<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
+ Take the Android Developer Survey</a>
+ </div>
+ </div>
+</div>
<p>App quality directly influences the long-term success of your app—in
terms of installs, user rating and reviews, engagement, and user retention.
diff --git a/docs/html/distribute/googleplay/quality/tablet.jd b/docs/html/distribute/googleplay/quality/tablet.jd
index 5a707be..c80c3cc 100644
--- a/docs/html/distribute/googleplay/quality/tablet.jd
+++ b/docs/html/distribute/googleplay/quality/tablet.jd
@@ -1,5 +1,13 @@
page.title=Tablet App Quality Checklist
@jd:body
+<div id="butterbar-wrapper" >
+ <div id="butterbar" >
+ <div id="butterbar-message">
+<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
+ Take the Android Developer Survey</a>
+ </div>
+ </div>
+</div>
<div id="qv-wrapper"><div id="qv">
<h2>Checklist</h2>
diff --git a/docs/html/distribute/googleplay/spotlight/index.jd b/docs/html/distribute/googleplay/spotlight/index.jd
index b83080e..88cdec4 100644
--- a/docs/html/distribute/googleplay/spotlight/index.jd
+++ b/docs/html/distribute/googleplay/spotlight/index.jd
@@ -3,7 +3,14 @@
header.hide=0
@jd:body
-
+<div id="butterbar-wrapper" >
+ <div id="butterbar" >
+ <div id="butterbar-message">
+<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
+ Take the Android Developer Survey</a>
+ </div>
+ </div>
+</div>
<p>Android developers, their apps, and their successes with Android and Google Play. </p>
diff --git a/docs/html/distribute/index.jd b/docs/html/distribute/index.jd
index 54f9301..8e7c6e1 100644
--- a/docs/html/distribute/index.jd
+++ b/docs/html/distribute/index.jd
@@ -2,6 +2,14 @@
header.hide=1
@jd:body
+<div id="butterbar-wrapper" >
+ <div id="butterbar" >
+ <div id="butterbar-message">
+<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
+ Take the Android Developer Survey</a>
+ </div>
+ </div>
+</div>
<div class="marquee">
diff --git a/docs/html/distribute/promote/device-art.jd b/docs/html/distribute/promote/device-art.jd
index 55b846e..58e183c 100644
--- a/docs/html/distribute/promote/device-art.jd
+++ b/docs/html/distribute/promote/device-art.jd
@@ -1,5 +1,13 @@
page.title=Device Art Generator
@jd:body
+<div id="butterbar-wrapper" >
+ <div id="butterbar" >
+ <div id="butterbar-message">
+<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
+ Take the Android Developer Survey</a>
+ </div>
+ </div>
+</div>
<p>The device art generator allows you to quickly wrap your app screenshots in real device artwork.
This provides better visual context for your app screenshots on your web site or in other
diff --git a/docs/html/google/backup/signup.jd b/docs/html/google/backup/signup.jd
index 550d590..f9ad600 100644
--- a/docs/html/google/backup/signup.jd
+++ b/docs/html/google/backup/signup.jd
@@ -226,7 +226,7 @@
} else if ($("input#agree").is(':checked')
&& packagename.length
&& packagename != DEFAULT_TEXT) {
- window.location = "https://play.google.com/apps/publish/v2/GetBackupApiKey?p=" +
+ window.location = "https://play.google.com/apps/publish/GetBackupApiKey?p=" +
encodeURIComponent(packagename);
} else {
$("label#agreeLabel,label#pnameLabel").parent().stop().animate({color: "#258AAF"}, 200,
diff --git a/docs/html/google/index.jd b/docs/html/google/index.jd
index 4020cf4..095388e 100644
--- a/docs/html/google/index.jd
+++ b/docs/html/google/index.jd
@@ -1,6 +1,14 @@
page.title=Google Services
header.hide=1
@jd:body
+<div id="butterbar-wrapper" >
+ <div id="butterbar" >
+ <div id="butterbar-message">
+<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
+ Take the Android Developer Survey</a>
+ </div>
+ </div>
+</div>
<style>
div.landing-cell,
diff --git a/docs/html/google/play/billing/index.jd b/docs/html/google/play/billing/index.jd
index 481a79c..0818514 100644
--- a/docs/html/google/play/billing/index.jd
+++ b/docs/html/google/play/billing/index.jd
@@ -1,5 +1,13 @@
page.title=Google Play In-app Billing
@jd:body
+<div id="butterbar-wrapper" >
+ <div id="butterbar" >
+ <div id="butterbar-message">
+<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
+ Take the Android Developer Survey</a>
+ </div>
+ </div>
+</div>
<p>In-app Billing is a Google Play service that lets you sell digital content from inside
your applications. You can use the service to sell a wide range of content, including downloadable
diff --git a/docs/html/guide/components/index.jd b/docs/html/guide/components/index.jd
index 87bae53..6ede873 100644
--- a/docs/html/guide/components/index.jd
+++ b/docs/html/guide/components/index.jd
@@ -4,6 +4,14 @@
page.landing.image=images/develop/app_components.png
@jd:body
+<div id="butterbar-wrapper" >
+ <div id="butterbar" >
+ <div id="butterbar-message">
+<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
+ Take the Android Developer Survey</a>
+ </div>
+ </div>
+</div>
<div class="landing-docs">
diff --git a/docs/html/index.jd b/docs/html/index.jd
index d82deec..a972309 100644
--- a/docs/html/index.jd
+++ b/docs/html/index.jd
@@ -3,6 +3,14 @@
carousel=true
page.metaDescription=The official site for Android developers. Provides the Android SDK and documentation for app developers and designers.
@jd:body
+<div id="butterbar-wrapper" >
+ <div id="butterbar" >
+ <div id="butterbar-message">
+<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
+ Take the Android Developer Survey</a>
+ </div>
+ </div>
+</div>
<div class="wrap">
diff --git a/docs/html/tools/index.jd b/docs/html/tools/index.jd
index f9d452c..e9094a7 100644
--- a/docs/html/tools/index.jd
+++ b/docs/html/tools/index.jd
@@ -1,6 +1,13 @@
page.title=Developer Tools
@jd:body
-
+<div id="butterbar-wrapper" >
+ <div id="butterbar" >
+ <div id="butterbar-message">
+<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
+ Take the Android Developer Survey</a>
+ </div>
+ </div>
+</div>
<img src="{@docRoot}images/tools-home.png" style="float:right;" height="415" width="763" />
diff --git a/docs/html/training/index.jd b/docs/html/training/index.jd
index 72ad018..82fbd16 100644
--- a/docs/html/training/index.jd
+++ b/docs/html/training/index.jd
@@ -3,7 +3,14 @@
page.metaDescription=Android Training provides a collection of classes that aim to help you build great apps for Android. Each class explains the steps required to solve a problem or implement a feature using code snippets and sample code for you to use in your apps.
@jd:body
-
+<div id="butterbar-wrapper" >
+ <div id="butterbar" >
+ <div id="butterbar-message">
+<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
+ Take the Android Developer Survey</a>
+ </div>
+ </div>
+</div>
<p>Welcome to Training for Android developers. Here you'll find sets of lessons within classes
that describe how to accomplish a specific task with code samples you can re-use in your app.
diff --git a/docs/html/training/sync-adapters/creating-authenticator.jd b/docs/html/training/sync-adapters/creating-authenticator.jd
index 1b272e7..dfa9027 100644
--- a/docs/html/training/sync-adapters/creating-authenticator.jd
+++ b/docs/html/training/sync-adapters/creating-authenticator.jd
@@ -235,7 +235,7 @@
<p>
The following snippet shows the XML file for the authenticator you created previously:
</p>
-<pre>the
+<pre>
<?xml version="1.0" encoding="utf-8"?>
<account-authenticator
xmlns:android="http://schemas.android.com/apk/res/android"
diff --git a/docs/html/training/sync-adapters/index.jd b/docs/html/training/sync-adapters/index.jd
index 1f7977b..b107cbe 100644
--- a/docs/html/training/sync-adapters/index.jd
+++ b/docs/html/training/sync-adapters/index.jd
@@ -11,7 +11,7 @@
<h2>Dependencies and prerequisites</h2>
<ul>
- <li>Android 3.0 (API Level 11) or higher</li>
+ <li>Android 2.1 (API Level 7) or higher</li>
</ul>
<h2>You should also read</h2>
diff --git a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
index 58fc8e8..6343d0a 100644
--- a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
+++ b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
@@ -71,7 +71,7 @@
import libcore.io.IoUtils;
import libcore.io.Libcore;
import libcore.io.Streams;
-import libcore.io.StructStatFs;
+import libcore.io.StructStatVfs;
/*
* This service copies a downloaded apk to a file passed in as
@@ -246,7 +246,7 @@
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
try {
- final StructStatFs stat = Libcore.os.statfs(path);
+ final StructStatVfs stat = Libcore.os.statvfs(path);
final long totalSize = stat.f_blocks * stat.f_bsize;
final long availSize = stat.f_bavail * stat.f_bsize;
return new long[] { totalSize, availSize };
diff --git a/services/input/EventHub.cpp b/services/input/EventHub.cpp
index 65749b3..fab091f 100644
--- a/services/input/EventHub.cpp
+++ b/services/input/EventHub.cpp
@@ -1188,6 +1188,11 @@
mBuiltInKeyboardId = device->id;
}
+ // 'Q' key support = cheap test of whether this is an alpha-capable kbd
+ if (hasKeycodeLocked(device, AKEYCODE_Q)) {
+ device->classes |= INPUT_DEVICE_CLASS_ALPHAKEY;
+ }
+
// See if this device has a DPAD.
if (hasKeycodeLocked(device, AKEYCODE_DPAD_UP) &&
hasKeycodeLocked(device, AKEYCODE_DPAD_DOWN) &&
@@ -1205,14 +1210,6 @@
}
}
- // 'Q' key support = cheap test of whether this is an alpha-capable kbd. Many gamepads will
- // report a broader set of HID usages than they need, however, so we only want to mark this
- // device as a keyboard if it is not a gamepad.
- if (hasKeycodeLocked(device, AKEYCODE_Q) &&
- !(device->classes & INPUT_DEVICE_CLASS_GAMEPAD)) {
- device->classes |= INPUT_DEVICE_CLASS_ALPHAKEY;
- }
-
// Disable kernel key repeat since we handle it ourselves
unsigned int repeatRate[] = {0,0};
if (ioctl(fd, EVIOCSREP, repeatRate)) {
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index f99f4ba..65006e5 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -10989,23 +10989,37 @@
}
final static class MemItem {
+ final boolean isProc;
final String label;
final String shortLabel;
final long pss;
final int id;
+ final boolean hasActivities;
ArrayList<MemItem> subitems;
- public MemItem(String _label, String _shortLabel, long _pss, int _id) {
+ public MemItem(String _label, String _shortLabel, long _pss, int _id,
+ boolean _hasActivities) {
+ isProc = true;
label = _label;
shortLabel = _shortLabel;
pss = _pss;
id = _id;
+ hasActivities = _hasActivities;
+ }
+
+ public MemItem(String _label, String _shortLabel, long _pss, int _id) {
+ isProc = false;
+ label = _label;
+ shortLabel = _shortLabel;
+ pss = _pss;
+ id = _id;
+ hasActivities = false;
}
}
- static final void dumpMemItems(PrintWriter pw, String prefix, ArrayList<MemItem> items,
- boolean sort) {
- if (sort) {
+ static final void dumpMemItems(PrintWriter pw, String prefix, String tag,
+ ArrayList<MemItem> items, boolean sort, boolean isCompact) {
+ if (sort && !isCompact) {
Collections.sort(items, new Comparator<MemItem>() {
@Override
public int compare(MemItem lhs, MemItem rhs) {
@@ -11021,9 +11035,19 @@
for (int i=0; i<items.size(); i++) {
MemItem mi = items.get(i);
- pw.print(prefix); pw.printf("%7d kB: ", mi.pss); pw.println(mi.label);
+ if (!isCompact) {
+ pw.print(prefix); pw.printf("%7d kB: ", mi.pss); pw.println(mi.label);
+ } else if (mi.isProc) {
+ pw.print("proc,"); pw.print(tag); pw.print(","); pw.print(mi.shortLabel);
+ pw.print(","); pw.print(mi.id); pw.print(","); pw.print(mi.pss);
+ pw.println(mi.hasActivities ? ",a" : ",e");
+ } else {
+ pw.print(tag); pw.print(","); pw.print(mi.shortLabel); pw.print(",");
+ pw.println(mi.pss);
+ }
if (mi.subitems != null) {
- dumpMemItems(pw, prefix + " ", mi.subitems, true);
+ dumpMemItems(pw, prefix + " ", mi.shortLabel, mi.subitems,
+ true, isCompact);
}
}
}
@@ -11068,6 +11092,12 @@
"Backup", "A Services", "Home", "Previous",
"B Services", "Cached"
};
+ static final String[] DUMP_MEM_OOM_COMPACT_LABEL = new String[] {
+ "sys", "pers", "fore",
+ "vis", "percept", "heavy",
+ "backup", "servicea", "home", "prev",
+ "serviceb", "cached"
+ };
final void dumpApplicationMemoryUsage(FileDescriptor fd,
PrintWriter pw, String prefix, String[] args, boolean brief,
@@ -11075,6 +11105,7 @@
boolean dumpDetails = false;
boolean dumpDalvik = false;
boolean oomOnly = false;
+ boolean isCompact = false;
int opti = 0;
while (opti < args.length) {
@@ -11088,12 +11119,15 @@
dumpDalvik = true;
} else if ("-d".equals(opt)) {
dumpDalvik = true;
+ } else if ("-c".equals(opt)) {
+ isCompact = true;
} else if ("--oom".equals(opt)) {
oomOnly = true;
} else if ("-h".equals(opt)) {
- pw.println("meminfo dump options: [-a] [--oom] [process]");
+ pw.println("meminfo dump options: [-a] [-d] [-c] [--oom] [process]");
pw.println(" -a: include all available information for each process.");
pw.println(" -d: include dalvik details when dumping process details.");
+ pw.println(" -c: dump in a compact machine-parseable representation.");
pw.println(" --oom: only show processes organized by oom adj.");
pw.println("If [process] is specified it can be the name or ");
pw.println("pid of a specific process to dump.");
@@ -11116,10 +11150,9 @@
dumpDetails = true;
}
- if (isCheckinRequest) {
+ if (isCheckinRequest || isCompact) {
// short checkin version
- pw.println(uptime + "," + realtime);
- pw.flush();
+ pw.print("time,"); pw.print(uptime); pw.print(","); pw.println(realtime);
} else {
pw.println("Applications Memory Usage (kB):");
pw.println("Uptime: " + uptime + " Realtime: " + realtime);
@@ -11141,20 +11174,24 @@
Debug.MemoryInfo mi = null;
for (int i = procs.size() - 1 ; i >= 0 ; i--) {
- ProcessRecord r = procs.get(i);
- IApplicationThread thread;
- int oomAdj;
+ final ProcessRecord r = procs.get(i);
+ final IApplicationThread thread;
+ final int pid;
+ final int oomAdj;
+ final boolean hasActivities;
synchronized (this) {
thread = r.thread;
+ pid = r.pid;
oomAdj = r.getSetAdjWithServices();
+ hasActivities = r.hasActivities;
}
if (thread != null) {
if (!isCheckinRequest && dumpDetails) {
- pw.println("\n** MEMINFO in pid " + r.pid + " [" + r.processName + "] **");
- pw.flush();
+ pw.println("\n** MEMINFO in pid " + pid + " [" + r.processName + "] **");
}
if (dumpDetails) {
try {
+ pw.flush();
mi = null;
mi = thread.dumpMemInfo(fd, isCheckinRequest, true, dumpDalvik, innerArgs);
} catch (RemoteException e) {
@@ -11168,9 +11205,9 @@
mi = new Debug.MemoryInfo();
}
if (!brief && !oomOnly) {
- Debug.getMemoryInfo(r.pid, mi);
+ Debug.getMemoryInfo(pid, mi);
} else {
- mi.dalvikPss = (int)Debug.getPss(r.pid);
+ mi.dalvikPss = (int)Debug.getPss(pid);
}
}
@@ -11185,8 +11222,9 @@
if (!isCheckinRequest && mi != null) {
totalPss += myTotalPss;
- MemItem pssItem = new MemItem(r.processName + " (pid " + r.pid + ")",
- r.processName, myTotalPss, 0);
+ MemItem pssItem = new MemItem(r.processName + " (pid " + pid +
+ (hasActivities ? " / activities)" : ")"),
+ r.processName, myTotalPss, pid, hasActivities);
procMems.add(pssItem);
nativePss += mi.nativePss;
@@ -11203,7 +11241,7 @@
}
for (int oomIndex=0; oomIndex<oomPss.length; oomIndex++) {
- if (r.setAdj <= DUMP_MEM_OOM_ADJ[oomIndex]
+ if (oomAdj <= DUMP_MEM_OOM_ADJ[oomIndex]
|| oomIndex == (oomPss.length-1)) {
oomPss[oomIndex] += myTotalPss;
if (oomProcs[oomIndex] == null) {
@@ -11231,7 +11269,8 @@
ArrayList<MemItem> oomMems = new ArrayList<MemItem>();
for (int j=0; j<oomPss.length; j++) {
if (oomPss[j] != 0) {
- String label = DUMP_MEM_OOM_LABEL[j];
+ String label = isCompact ? DUMP_MEM_OOM_COMPACT_LABEL[j]
+ : DUMP_MEM_OOM_LABEL[j];
MemItem item = new MemItem(label, label, oomPss[j],
DUMP_MEM_OOM_ADJ[j]);
item.subitems = oomProcs[j];
@@ -11301,29 +11340,45 @@
}
}
- if (!brief && !oomOnly) {
+ if (!brief && !oomOnly && !isCompact) {
pw.println();
pw.println("Total PSS by process:");
- dumpMemItems(pw, " ", procMems, true);
+ dumpMemItems(pw, " ", "proc", procMems, true, isCompact);
pw.println();
}
- pw.println("Total PSS by OOM adjustment:");
- dumpMemItems(pw, " ", oomMems, false);
+ if (!isCompact) {
+ pw.println("Total PSS by OOM adjustment:");
+ }
+ dumpMemItems(pw, " ", "oom", oomMems, false, isCompact);
if (!brief && !oomOnly) {
PrintWriter out = categoryPw != null ? categoryPw : pw;
- out.println();
- out.println("Total PSS by category:");
- dumpMemItems(out, " ", catMems, true);
+ if (!isCompact) {
+ out.println();
+ out.println("Total PSS by category:");
+ }
+ dumpMemItems(out, " ", "cat", catMems, true, isCompact);
}
- pw.println();
+ if (!isCompact) {
+ pw.println();
+ }
if (!brief) {
MemInfoReader memInfo = new MemInfoReader();
memInfo.readMemInfo();
- pw.print("Total RAM: "); pw.print(memInfo.getTotalSize()/1024); pw.println(" kB");
- pw.print(" Free RAM: "); pw.print(cachedPss + (memInfo.getCachedSize()/1024)
- + (memInfo.getFreeSize()/1024)); pw.println(" kB");
+ if (!isCompact) {
+ pw.print("Total RAM: "); pw.print(memInfo.getTotalSize()/1024);
+ pw.println(" kB");
+ pw.print(" Free RAM: "); pw.print(cachedPss + (memInfo.getCachedSize()/1024)
+ + (memInfo.getFreeSize()/1024)); pw.println(" kB");
+ } else {
+ pw.print("ram,"); pw.print(memInfo.getTotalSize()/1024); pw.print(",");
+ pw.print(cachedPss + (memInfo.getCachedSize()/1024)
+ + (memInfo.getFreeSize()/1024)); pw.print(",");
+ pw.println(totalPss - cachedPss);
+ }
}
- pw.print(" Used PSS: "); pw.print(totalPss - cachedPss); pw.println(" kB");
+ if (!isCompact) {
+ pw.print(" Used PSS: "); pw.print(totalPss - cachedPss); pw.println(" kB");
+ }
if (!brief) {
final int[] SINGLE_LONG_FORMAT = new int[] {
Process.PROC_SPACE_TERM|Process.PROC_OUT_LONG
@@ -11344,11 +11399,18 @@
Process.readProcFile("/sys/kernel/mm/ksm/pages_volatile",
SINGLE_LONG_FORMAT, null, longOut, null);
long voltile = longOut[0] * ProcessList.PAGE_SIZE / 1024;
- if (sharing != 0 || shared != 0 || unshared != 0 || voltile != 0) {
- pw.print(" KSM: "); pw.print(sharing); pw.print(" kB saved from shared ");
- pw.print(shared); pw.println(" kB");
- pw.print(" "); pw.print(unshared); pw.print(" kB unshared; ");
- pw.print(voltile); pw.println(" kB volatile");
+ if (!isCompact) {
+ if (sharing != 0 || shared != 0 || unshared != 0 || voltile != 0) {
+ pw.print(" KSM: "); pw.print(sharing);
+ pw.print(" kB saved from shared ");
+ pw.print(shared); pw.println(" kB");
+ pw.print(" "); pw.print(unshared); pw.print(" kB unshared; ");
+ pw.print(voltile); pw.println(" kB volatile");
+ }
+ } else {
+ pw.print("ksm,"); pw.print(sharing); pw.print(",");
+ pw.print(shared); pw.print(","); pw.print(unshared); pw.print(",");
+ pw.println(voltile);
}
}
}
diff --git a/services/java/com/android/server/am/ProcessList.java b/services/java/com/android/server/am/ProcessList.java
index 5585ac8..6a72e44f 100644
--- a/services/java/com/android/server/am/ProcessList.java
+++ b/services/java/com/android/server/am/ProcessList.java
@@ -39,7 +39,7 @@
// This is a process only hosting activities that are not visible,
// so it can be killed without any disruption.
static final int CACHED_APP_MAX_ADJ = 15;
- static int CACHED_APP_MIN_ADJ = 9;
+ static final int CACHED_APP_MIN_ADJ = 9;
// The B list of SERVICE_ADJ -- these are the old and decrepit
// services that aren't as shiny and interesting as the ones in the A list.
diff --git a/services/java/com/android/server/am/ProcessRecord.java b/services/java/com/android/server/am/ProcessRecord.java
index 14f4102..21a6ff0 100644
--- a/services/java/com/android/server/am/ProcessRecord.java
+++ b/services/java/com/android/server/am/ProcessRecord.java
@@ -465,8 +465,10 @@
}
public int getSetAdjWithServices() {
- if (setAdj >= ProcessList.CACHED_APP_MIN_ADJ && hasStartedServices) {
- return ProcessList.SERVICE_B_ADJ;
+ if (setAdj >= ProcessList.CACHED_APP_MIN_ADJ) {
+ if (hasStartedServices) {
+ return ProcessList.SERVICE_B_ADJ;
+ }
}
return setAdj;
}