Merge "Fix bug 5528574 - "View not attached to window manager" upon orientation change when there is a dialog with ActionMode on" into ics-mr1
diff --git a/docs/html/guide/topics/appwidgets/index.jd b/docs/html/guide/topics/appwidgets/index.jd
index 20ce701..61337b7 100644
--- a/docs/html/guide/topics/appwidgets/index.jd
+++ b/docs/html/guide/topics/appwidgets/index.jd
@@ -321,6 +321,10 @@
<li>{@link android.widget.ProgressBar}</li>
<li>{@link android.widget.TextView}</li>
<li>{@link android.widget.ViewFlipper}</li>
+ <li>{@link android.widget.ListView}</li>
+ <li>{@link android.widget.GridView}</li>
+ <li>{@link android.widget.StackView}</li>
+ <li>{@link android.widget.AdapterViewFlipper}</li>
</ul>
<p>Descendants of these classes are not supported.</p>
diff --git a/services/jni/com_android_server_BatteryService.cpp b/services/jni/com_android_server_BatteryService.cpp
index b9f2c1f..2ceb535 100644
--- a/services/jni/com_android_server_BatteryService.cpp
+++ b/services/jni/com_android_server_BatteryService.cpp
@@ -141,10 +141,10 @@
return -1;
}
- size_t count = read(fd, buf, size);
+ ssize_t count = read(fd, buf, size);
if (count > 0) {
- count = (count < size) ? count : size - 1;
- while (count > 0 && buf[count-1] == '\n') count--;
+ while (count > 0 && buf[count-1] == '\n')
+ count--;
buf[count] = '\0';
} else {
buf[0] = '\0';