summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/java/android/app/ActivityThread.java14
-rw-r--r--core/java/android/app/ContextImpl.java4
-rw-r--r--core/java/android/app/MediaRouteButton.java3
-rw-r--r--core/java/android/appwidget/AppWidgetManager.java13
-rw-r--r--core/java/android/bluetooth/BluetoothSocket.java16
-rw-r--r--core/java/android/content/SyncStorageEngine.java61
-rw-r--r--core/java/android/content/pm/IPackageManager.aidl1
-rw-r--r--core/java/android/content/pm/RegisteredServicesCache.java53
-rw-r--r--core/java/android/server/search/SearchManagerService.java2
-rw-r--r--core/java/android/service/dreams/DreamService.java11
-rw-r--r--core/java/android/view/ScaleGestureDetector.java4
-rw-r--r--core/java/android/widget/CompoundButton.java9
-rw-r--r--core/java/android/widget/RelativeLayout.java38
-rw-r--r--core/java/android/widget/TextView.java18
-rw-r--r--core/java/android/widget/VideoView.java13
-rw-r--r--core/java/com/android/internal/app/MediaRouteChooserDialogFragment.java25
-rw-r--r--core/java/com/android/internal/appwidget/IAppWidgetService.aidl2
-rw-r--r--core/java/com/android/internal/content/PackageHelper.java2
-rw-r--r--core/res/AndroidManifest.xml24
-rw-r--r--core/res/res/drawable-hdpi/dialog_bottom_holo_dark.9.pngbin1110 -> 913 bytes
-rw-r--r--core/res/res/drawable-hdpi/dialog_bottom_holo_light.9.pngbin977 -> 965 bytes
-rw-r--r--core/res/res/drawable-hdpi/dialog_full_holo_dark.9.pngbin1632 -> 1482 bytes
-rw-r--r--core/res/res/drawable-hdpi/dialog_full_holo_light.9.pngbin1515 -> 1515 bytes
-rw-r--r--core/res/res/drawable-hdpi/dialog_middle_holo_dark.9.pngbin589 -> 293 bytes
-rw-r--r--core/res/res/drawable-hdpi/dialog_middle_holo_light.9.pngbin299 -> 302 bytes
-rw-r--r--core/res/res/drawable-hdpi/dialog_top_holo_dark.9.pngbin794 -> 803 bytes
-rw-r--r--core/res/res/drawable-hdpi/dialog_top_holo_light.9.pngbin769 -> 774 bytes
-rw-r--r--core/res/res/drawable-hdpi/menu_dropdown_panel_holo_dark.9.pngbin1268 -> 1273 bytes
-rw-r--r--core/res/res/drawable-hdpi/menu_dropdown_panel_holo_light.9.pngbin1289 -> 1289 bytes
-rw-r--r--core/res/res/drawable-hdpi/menu_hardkey_panel_holo_dark.9.pngbin882 -> 875 bytes
-rw-r--r--core/res/res/drawable-hdpi/menu_hardkey_panel_holo_light.9.pngbin853 -> 850 bytes
-rw-r--r--core/res/res/drawable-mdpi/dialog_bottom_holo_dark.9.pngbin728 -> 618 bytes
-rw-r--r--core/res/res/drawable-mdpi/dialog_bottom_holo_light.9.pngbin636 -> 628 bytes
-rw-r--r--core/res/res/drawable-mdpi/dialog_full_holo_dark.9.pngbin988 -> 935 bytes
-rw-r--r--core/res/res/drawable-mdpi/dialog_full_holo_light.9.pngbin958 -> 944 bytes
-rw-r--r--core/res/res/drawable-mdpi/dialog_middle_holo_dark.9.pngbin389 -> 250 bytes
-rw-r--r--core/res/res/drawable-mdpi/dialog_middle_holo_light.9.pngbin255 -> 259 bytes
-rw-r--r--core/res/res/drawable-mdpi/dialog_top_holo_dark.9.pngbin542 -> 536 bytes
-rw-r--r--core/res/res/drawable-mdpi/dialog_top_holo_light.9.pngbin538 -> 535 bytes
-rw-r--r--core/res/res/drawable-mdpi/menu_dropdown_panel_holo_dark.9.pngbin840 -> 839 bytes
-rw-r--r--core/res/res/drawable-mdpi/menu_dropdown_panel_holo_light.9.pngbin844 -> 836 bytes
-rw-r--r--core/res/res/drawable-mdpi/menu_hardkey_panel_holo_dark.9.pngbin570 -> 567 bytes
-rw-r--r--core/res/res/drawable-mdpi/menu_hardkey_panel_holo_light.9.pngbin562 -> 562 bytes
-rw-r--r--core/res/res/drawable-xhdpi/dialog_bottom_holo_dark.9.pngbin1603 -> 1305 bytes
-rw-r--r--core/res/res/drawable-xhdpi/dialog_bottom_holo_light.9.pngbin1373 -> 1362 bytes
-rw-r--r--core/res/res/drawable-xhdpi/dialog_full_holo_dark.9.pngbin2395 -> 2201 bytes
-rw-r--r--core/res/res/drawable-xhdpi/dialog_full_holo_light.9.pngbin2254 -> 2231 bytes
-rw-r--r--core/res/res/drawable-xhdpi/dialog_middle_holo_dark.9.pngbin755 -> 318 bytes
-rw-r--r--core/res/res/drawable-xhdpi/dialog_middle_holo_light.9.pngbin322 -> 325 bytes
-rw-r--r--core/res/res/drawable-xhdpi/dialog_top_holo_dark.9.pngbin1137 -> 1144 bytes
-rw-r--r--core/res/res/drawable-xhdpi/dialog_top_holo_light.9.pngbin1108 -> 1109 bytes
-rw-r--r--core/res/res/drawable-xhdpi/menu_dropdown_panel_holo_dark.9.pngbin1879 -> 1881 bytes
-rw-r--r--core/res/res/drawable-xhdpi/menu_dropdown_panel_holo_light.9.pngbin1905 -> 1903 bytes
-rw-r--r--core/res/res/drawable-xhdpi/menu_hardkey_panel_holo_dark.9.pngbin1215 -> 1220 bytes
-rw-r--r--core/res/res/drawable-xhdpi/menu_hardkey_panel_holo_light.9.pngbin1189 -> 1178 bytes
-rw-r--r--core/res/res/values/arrays.xml6
-rwxr-xr-xcore/res/res/values/config.xml8
-rw-r--r--docs/html/distribute/googleplay/promote/brand.jd2
-rw-r--r--docs/html/google/play-services/maps.jd115
-rw-r--r--docs/html/google/play-services/plus.jd102
-rw-r--r--docs/html/images/google/gps-googleplus.pngbin0 -> 21182 bytes
-rw-r--r--docs/html/images/google/gps-maps.pngbin0 -> 126253 bytes
-rw-r--r--docs/html/sdk/images/4.0/folders.xcfbin259819 -> 0 bytes
-rw-r--r--docs/html/shareables/README.txt (renamed from docs/html/shareables/README)0
-rw-r--r--docs/html/tools/sdk/images/4.0/folders.xcfbin259819 -> 0 bytes
-rw-r--r--docs/image_sources/activity_lifecycle.graffle (renamed from docs/html/images/activity_lifecycle.graffle)0
-rw-r--r--docs/image_sources/brand/Android_Robot_outlined.ai (renamed from docs/html/images/brand/Android_Robot_outlined.ai)0
-rw-r--r--docs/image_sources/brand/Google_Play_Store.ai (renamed from docs/html/images/brand/Google_Play_Store.ai)0
-rw-r--r--docs/image_sources/brand/en_app_rgb_wo.ai (renamed from docs/html/images/brand/en_app_rgb_wo.ai)0
-rw-r--r--docs/image_sources/brand/en_generic_rgb_wo.ai (renamed from docs/html/images/brand/en_generic_rgb_wo.ai)0
-rwxr-xr-xdocs/image_sources/fundamentals/fragments.graffle (renamed from docs/html/images/fundamentals/fragments.graffle)0
-rw-r--r--docs/image_sources/fundamentals/restore_instance.graffle (renamed from docs/html/images/fundamentals/restore_instance.graffle)0
-rw-r--r--docs/image_sources/fundamentals/service_lifecycle.graffle (renamed from docs/html/images/fundamentals/service_lifecycle.graffle)0
-rw-r--r--docs/image_sources/providers/datamodel.graffle (renamed from docs/html/images/providers/datamodel.graffle)0
-rw-r--r--docs/image_sources/resources/res-selection-flowchart.graffle (renamed from docs/html/images/resources/res-selection-flowchart.graffle)0
-rw-r--r--docs/image_sources/resources/resource_devices_diagram.graffle (renamed from docs/html/images/resources/resource_devices_diagram.graffle)0
-rw-r--r--docs/image_sources/rs_compute.graffle (renamed from docs/html/images/rs_compute.graffle)0
-rw-r--r--docs/image_sources/rs_graphics.graffle (renamed from docs/html/images/rs_graphics.graffle)0
-rw-r--r--docs/image_sources/rs_overview.graffle (renamed from docs/html/images/rs_overview.graffle)0
-rw-r--r--docs/image_sources/training/basics/basic-lifecycle.graffle/QuickLook/Preview.pdf (renamed from docs/html/images/training/basics/basic-lifecycle.graffle/QuickLook/Preview.pdf)bin49980 -> 49980 bytes
-rw-r--r--docs/image_sources/training/basics/basic-lifecycle.graffle/QuickLook/Thumbnail.tiff (renamed from docs/html/images/training/basics/basic-lifecycle.graffle/QuickLook/Thumbnail.tiff)bin8168 -> 8168 bytes
-rw-r--r--docs/image_sources/training/basics/basic-lifecycle.graffle/data.plist (renamed from docs/html/images/training/basics/basic-lifecycle.graffle/data.plist)0
-rw-r--r--docs/image_sources/training/basics/basic-lifecycle.graffle/image1.png (renamed from docs/html/images/training/basics/basic-lifecycle.graffle/image1.png)bin16087 -> 16087 bytes
-rw-r--r--docs/image_sources/training/basics/basic-simple-screen-mock.graffle/QuickLook/Preview.pdf (renamed from docs/html/images/training/basic-simple-screen-mock.graffle/QuickLook/Preview.pdf)bin25152 -> 25152 bytes
-rw-r--r--docs/image_sources/training/basics/basic-simple-screen-mock.graffle/QuickLook/Thumbnail.tiff (renamed from docs/html/images/training/basic-simple-screen-mock.graffle/QuickLook/Thumbnail.tiff)bin5432 -> 5432 bytes
-rw-r--r--docs/image_sources/training/basics/basic-simple-screen-mock.graffle/data.plist (renamed from docs/html/images/training/basic-simple-screen-mock.graffle/data.plist)0
-rw-r--r--docs/image_sources/training/basics/basic-simple-screen-mock.graffle/image1.png (renamed from docs/html/images/training/basic-simple-screen-mock.graffle/image1.png)bin28173 -> 28173 bytes
-rw-r--r--docs/image_sources/training/basics/basic-simple-screen-mock.graffle/image2.png (renamed from docs/html/images/training/basic-simple-screen-mock.graffle/image2.png)bin12453 -> 12453 bytes
-rw-r--r--docs/image_sources/training/fragments-screen-mock.graffle/QuickLook/Preview.pdf (renamed from docs/html/images/training/basics/fragments-screen-mock.graffle/QuickLook/Preview.pdf)bin52394 -> 52394 bytes
-rw-r--r--docs/image_sources/training/fragments-screen-mock.graffle/QuickLook/Thumbnail.tiff (renamed from docs/html/images/training/basics/fragments-screen-mock.graffle/QuickLook/Thumbnail.tiff)bin9292 -> 9292 bytes
-rw-r--r--docs/image_sources/training/fragments-screen-mock.graffle/data.plist (renamed from docs/html/images/training/basics/fragments-screen-mock.graffle/data.plist)0
-rw-r--r--docs/image_sources/training/fragments-screen-mock.graffle/image1.png (renamed from docs/html/images/training/basics/fragments-screen-mock.graffle/image1.png)bin28173 -> 28173 bytes
-rw-r--r--docs/image_sources/training/fragments-screen-mock.graffle/image2.png (renamed from docs/html/images/training/basics/fragments-screen-mock.graffle/image2.png)bin12453 -> 12453 bytes
-rw-r--r--docs/image_sources/ui/actionbar-navigate-up.xcf (renamed from docs/html/images/ui/actionbar-navigate-up.xcf)bin262000 -> 262000 bytes
-rw-r--r--graphics/java/android/graphics/drawable/LayerDrawable.java4
-rw-r--r--libs/hwui/OpenGLRenderer.cpp6
-rw-r--r--location/java/android/location/Geofence.java4
-rw-r--r--media/java/android/media/MediaRouter.java16
-rw-r--r--packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java2
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java13
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java10
-rw-r--r--policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java19
-rw-r--r--policy/src/com/android/internal/policy/impl/keyguard/KeyguardCircleFramedDrawable.java1
-rw-r--r--policy/src/com/android/internal/policy/impl/keyguard/KeyguardTransportControlView.java2
-rw-r--r--services/java/com/android/server/AppWidgetService.java5
-rw-r--r--services/java/com/android/server/AppWidgetServiceImpl.java6
-rwxr-xr-xservices/java/com/android/server/BluetoothManagerService.java66
-rw-r--r--services/java/com/android/server/BootReceiver.java13
-rw-r--r--services/java/com/android/server/DevicePolicyManagerService.java15
-rw-r--r--services/java/com/android/server/EntropyMixer.java7
-rw-r--r--services/java/com/android/server/MountService.java6
-rw-r--r--services/java/com/android/server/SystemServer.java2
-rw-r--r--services/java/com/android/server/TelephonyRegistry.java2
-rw-r--r--services/java/com/android/server/WallpaperManagerService.java2
-rw-r--r--services/java/com/android/server/am/ActivityManagerService.java7
-rw-r--r--services/java/com/android/server/display/WifiDisplayController.java11
-rw-r--r--services/java/com/android/server/dreams/DreamManagerService.java6
-rw-r--r--services/java/com/android/server/pm/PackageManagerService.java18
-rw-r--r--services/java/com/android/server/pm/Settings.java7
-rw-r--r--services/java/com/android/server/power/RampAnimator.java18
-rwxr-xr-xservices/java/com/android/server/wm/WindowManagerService.java2
-rw-r--r--services/tests/servicestests/src/com/android/server/pm/PackageManagerSettingsTests.java8
-rw-r--r--tools/aapt/Android.mk1
-rw-r--r--tools/aapt/ResourceIdCache.cpp107
-rw-r--r--tools/aapt/ResourceIdCache.h30
-rw-r--r--tools/aapt/ResourceTable.cpp15
127 files changed, 682 insertions, 299 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 456d757..d880817 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -4421,12 +4421,14 @@ public final class ActivityThread {
new ArrayList<IActivityManager.ContentProviderHolder>();
for (ProviderInfo cpi : providers) {
- StringBuilder buf = new StringBuilder(128);
- buf.append("Pub ");
- buf.append(cpi.authority);
- buf.append(": ");
- buf.append(cpi.name);
- Log.i(TAG, buf.toString());
+ if (DEBUG_PROVIDER) {
+ StringBuilder buf = new StringBuilder(128);
+ buf.append("Pub ");
+ buf.append(cpi.authority);
+ buf.append(": ");
+ buf.append(cpi.name);
+ Log.i(TAG, buf.toString());
+ }
IActivityManager.ContentProviderHolder cph = installProvider(context, null, cpi,
false /*noisy*/, true /*noReleaseNeeded*/, true /*stable*/);
if (cph != null) {
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 95b6bed..f895ccc 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -168,7 +168,7 @@ class ReceiverRestrictedContext extends ContextWrapper {
* context object for Activity and other application components.
*/
class ContextImpl extends Context {
- private final static String TAG = "ApplicationContext";
+ private final static String TAG = "ContextImpl";
private final static boolean DEBUG = false;
private static final HashMap<String, SharedPreferencesImpl> sSharedPrefs =
@@ -1715,7 +1715,7 @@ class ContextImpl extends Context {
private void warnIfCallingFromSystemProcess() {
if (Process.myUid() == Process.SYSTEM_UID) {
Slog.w(TAG, "Calling a method in the system process without a qualified user: "
- + Debug.getCallers(3));
+ + Debug.getCallers(5));
}
}
diff --git a/core/java/android/app/MediaRouteButton.java b/core/java/android/app/MediaRouteButton.java
index 3ecafc3..a1a147a 100644
--- a/core/java/android/app/MediaRouteButton.java
+++ b/core/java/android/app/MediaRouteButton.java
@@ -217,7 +217,8 @@ public class MediaRouteButton extends View {
void updateRemoteIndicator() {
final RouteInfo selected = mRouter.getSelectedRoute(mRouteTypes);
final boolean isRemote = selected != mRouter.getSystemAudioRoute();
- final boolean isConnecting = selected.getStatusCode() == RouteInfo.STATUS_CONNECTING;
+ final boolean isConnecting = selected != null &&
+ selected.getStatusCode() == RouteInfo.STATUS_CONNECTING;
boolean needsRefresh = false;
if (mRemoteActive != isRemote) {
diff --git a/core/java/android/appwidget/AppWidgetManager.java b/core/java/android/appwidget/AppWidgetManager.java
index 3dd640c..77315f9 100644
--- a/core/java/android/appwidget/AppWidgetManager.java
+++ b/core/java/android/appwidget/AppWidgetManager.java
@@ -544,8 +544,19 @@ public class AppWidgetManager {
* Return a list of the AppWidget providers that are currently installed.
*/
public List<AppWidgetProviderInfo> getInstalledProviders() {
+ return getInstalledProviders(AppWidgetProviderInfo.WIDGET_CATEGORY_HOME_SCREEN);
+ }
+
+ /**
+ * Return a list of the AppWidget providers that are currently installed.
+ *
+ * @param categoryFilter Will only return providers which register as any of the specified
+ * specified categories. See {@link AppWidgetProviderInfo#widgetCategory}.
+ * @hide
+ */
+ public List<AppWidgetProviderInfo> getInstalledProviders(int categoryFilter) {
try {
- List<AppWidgetProviderInfo> providers = sService.getInstalledProviders();
+ List<AppWidgetProviderInfo> providers = sService.getInstalledProviders(categoryFilter);
for (AppWidgetProviderInfo info : providers) {
// Converting complex to dp.
info.minWidth =
diff --git a/core/java/android/bluetooth/BluetoothSocket.java b/core/java/android/bluetooth/BluetoothSocket.java
index 26bde19..d7a214d 100644
--- a/core/java/android/bluetooth/BluetoothSocket.java
+++ b/core/java/android/bluetooth/BluetoothSocket.java
@@ -300,7 +300,6 @@ public final class BluetoothSocket implements Closeable {
if (mDevice == null) throw new IOException("Connect is called on null device");
try {
- // TODO(BT) derive flag from auth and encrypt
if (mSocketState == SocketState.CLOSED) throw new IOException("socket closed");
IBluetooth bluetoothProxy = BluetoothAdapter.getDefaultAdapter().getBluetoothService(null);
if (bluetoothProxy == null) throw new IOException("Bluetooth is off");
@@ -349,7 +348,6 @@ public final class BluetoothSocket implements Closeable {
mUuid, mPort, getSecurityFlags());
} catch (RemoteException e) {
Log.e(TAG, Log.getStackTraceString(new Throwable()));
- // TODO(BT) right error code?
return -1;
}
@@ -388,8 +386,13 @@ public final class BluetoothSocket implements Closeable {
/*package*/ BluetoothSocket accept(int timeout) throws IOException {
BluetoothSocket acceptedSocket;
if (mSocketState != SocketState.LISTENING) throw new IOException("bt socket is not in listen state");
- // TODO(BT) wait on an incoming connection
+ if(timeout > 0) {
+ Log.d(TAG, "accept() set timeout (ms):" + timeout);
+ mSocket.setSoTimeout(timeout);
+ }
String RemoteAddr = waitSocketSignal(mSocketIS);
+ if(timeout > 0)
+ mSocket.setSoTimeout(0);
synchronized(this)
{
if (mSocketState != SocketState.LISTENING)
@@ -397,8 +400,6 @@ public final class BluetoothSocket implements Closeable {
acceptedSocket = acceptSocket(RemoteAddr);
//quick drop the reference of the file handle
}
- // TODO(BT) rfcomm socket only supports one connection, return this?
- // return this;
return acceptedSocket;
}
@@ -451,7 +452,6 @@ public final class BluetoothSocket implements Closeable {
mPfd.detachFd();
}
}
- // TODO(BT) unbind proxy,
}
/*package */ void removeChannel() {
@@ -471,6 +471,8 @@ public final class BluetoothSocket implements Closeable {
ByteBuffer bb = ByteBuffer.wrap(sig);
bb.order(ByteOrder.nativeOrder());
int size = bb.getShort();
+ if(size != SOCK_SIGNAL_SIZE)
+ throw new IOException("Connection failure, wrong signal size: " + size);
byte [] addr = new byte[6];
bb.get(addr);
int channel = bb.getInt();
@@ -487,7 +489,7 @@ public final class BluetoothSocket implements Closeable {
while(left > 0) {
int ret = is.read(b, b.length - left, left);
if(ret <= 0)
- throw new IOException("read failed, socket might closed, read ret: " + ret);
+ throw new IOException("read failed, socket might closed or timeout, read ret: " + ret);
left -= ret;
if(left != 0)
Log.w(TAG, "readAll() looping, read partial size: " + (b.length - left) +
diff --git a/core/java/android/content/SyncStorageEngine.java b/core/java/android/content/SyncStorageEngine.java
index bdc5a3f..1ecab09 100644
--- a/core/java/android/content/SyncStorageEngine.java
+++ b/core/java/android/content/SyncStorageEngine.java
@@ -64,6 +64,7 @@ import java.util.List;
public class SyncStorageEngine extends Handler {
private static final String TAG = "SyncManager";
+ private static final boolean DEBUG = false;
private static final boolean DEBUG_FILE = false;
private static final String XML_ATTR_NEXT_AUTHORITY_ID = "nextAuthorityId";
@@ -443,7 +444,7 @@ public class SyncStorageEngine extends Handler {
mChangeListeners.finishBroadcast();
}
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "reportChange " + which + " to: " + reports);
}
@@ -484,13 +485,17 @@ public class SyncStorageEngine extends Handler {
public void setSyncAutomatically(Account account, int userId, String providerName,
boolean sync) {
- Log.d(TAG, "setSyncAutomatically: " + /* account + */" provider " + providerName
- + ", user " + userId + " -> " + sync);
+ if (DEBUG) {
+ Log.d(TAG, "setSyncAutomatically: " + /* account + */" provider " + providerName
+ + ", user " + userId + " -> " + sync);
+ }
synchronized (mAuthorities) {
AuthorityInfo authority = getOrCreateAuthorityLocked(account, userId, providerName, -1,
false);
if (authority.enabled == sync) {
- Log.d(TAG, "setSyncAutomatically: already set to " + sync + ", doing nothing");
+ if (DEBUG) {
+ Log.d(TAG, "setSyncAutomatically: already set to " + sync + ", doing nothing");
+ }
return;
}
authority.enabled = sync;
@@ -532,13 +537,17 @@ public class SyncStorageEngine extends Handler {
} else if (syncable < -1) {
syncable = -1;
}
- Log.d(TAG, "setIsSyncable: " + account + ", provider " + providerName
- + ", user " + userId + " -> " + syncable);
+ if (DEBUG) {
+ Log.d(TAG, "setIsSyncable: " + account + ", provider " + providerName
+ + ", user " + userId + " -> " + syncable);
+ }
synchronized (mAuthorities) {
AuthorityInfo authority = getOrCreateAuthorityLocked(account, userId, providerName, -1,
false);
if (authority.syncable == syncable) {
- Log.d(TAG, "setIsSyncable: already set to " + syncable + ", doing nothing");
+ if (DEBUG) {
+ Log.d(TAG, "setIsSyncable: already set to " + syncable + ", doing nothing");
+ }
return;
}
authority.syncable = syncable;
@@ -564,7 +573,7 @@ public class SyncStorageEngine extends Handler {
public void setBackoff(Account account, int userId, String providerName,
long nextSyncTime, long nextDelay) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "setBackoff: " + account + ", provider " + providerName
+ ", user " + userId
+ " -> nextSyncTime " + nextSyncTime + ", nextDelay " + nextDelay);
@@ -615,7 +624,7 @@ public class SyncStorageEngine extends Handler {
for (AuthorityInfo authorityInfo : accountInfo.authorities.values()) {
if (authorityInfo.backoffTime != NOT_IN_BACKOFF_MODE
|| authorityInfo.backoffDelay != NOT_IN_BACKOFF_MODE) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "clearAllBackoffs:"
+ " authority:" + authorityInfo.authority
+ " account:" + accountInfo.accountAndUser.account.name
@@ -641,7 +650,7 @@ public class SyncStorageEngine extends Handler {
public void setDelayUntilTime(Account account, int userId, String providerName,
long delayUntil) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "setDelayUntil: " + account + ", provider " + providerName
+ ", user " + userId + " -> delayUntil " + delayUntil);
}
@@ -677,7 +686,7 @@ public class SyncStorageEngine extends Handler {
if (extras == null) {
extras = new Bundle();
}
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "addOrRemovePeriodicSync: " + account + ", user " + userId
+ ", provider " + providerName
+ " -> period " + period + ", extras " + extras);
@@ -833,7 +842,7 @@ public class SyncStorageEngine extends Handler {
public PendingOperation insertIntoPending(PendingOperation op) {
synchronized (mAuthorities) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "insertIntoPending: account=" + op.account
+ " user=" + op.userId
+ " auth=" + op.authority
@@ -865,7 +874,7 @@ public class SyncStorageEngine extends Handler {
public boolean deleteFromPending(PendingOperation op) {
boolean res = false;
synchronized (mAuthorities) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "deleteFromPending: account=" + op.account
+ " user=" + op.userId
+ " auth=" + op.authority
@@ -884,7 +893,7 @@ public class SyncStorageEngine extends Handler {
AuthorityInfo authority = getAuthorityLocked(op.account, op.userId, op.authority,
"deleteFromPending");
if (authority != null) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "removing - " + authority);
+ if (DEBUG) Log.v(TAG, "removing - " + authority);
final int N = mPendingOperations.size();
boolean morePending = false;
for (int i=0; i<N; i++) {
@@ -898,7 +907,7 @@ public class SyncStorageEngine extends Handler {
}
if (!morePending) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "no more pending!");
+ if (DEBUG) Log.v(TAG, "no more pending!");
SyncStatusInfo status = getOrCreateSyncStatusLocked(authority.ident);
status.pending = false;
}
@@ -938,7 +947,7 @@ public class SyncStorageEngine extends Handler {
*/
public void doDatabaseCleanup(Account[] accounts, int userId) {
synchronized (mAuthorities) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) Log.w(TAG, "Updating for new accounts...");
+ if (DEBUG) Log.v(TAG, "Updating for new accounts...");
SparseArray<AuthorityInfo> removing = new SparseArray<AuthorityInfo>();
Iterator<AccountInfo> accIt = mAccounts.values().iterator();
while (accIt.hasNext()) {
@@ -946,8 +955,8 @@ public class SyncStorageEngine extends Handler {
if (!ArrayUtils.contains(accounts, acc.accountAndUser.account)
&& acc.accountAndUser.userId == userId) {
// This account no longer exists...
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
- Log.w(TAG, "Account removed: " + acc.accountAndUser);
+ if (DEBUG) {
+ Log.v(TAG, "Account removed: " + acc.accountAndUser);
}
for (AuthorityInfo auth : acc.authorities.values()) {
removing.put(auth.ident, auth);
@@ -993,7 +1002,7 @@ public class SyncStorageEngine extends Handler {
public SyncInfo addActiveSync(SyncManager.ActiveSyncContext activeSyncContext) {
final SyncInfo syncInfo;
synchronized (mAuthorities) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "setActiveSync: account="
+ activeSyncContext.mSyncOperation.account
+ " auth=" + activeSyncContext.mSyncOperation.authority
@@ -1021,7 +1030,7 @@ public class SyncStorageEngine extends Handler {
*/
public void removeActiveSync(SyncInfo syncInfo, int userId) {
synchronized (mAuthorities) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "removeActiveSync: account=" + syncInfo.account
+ " user=" + userId
+ " auth=" + syncInfo.authority);
@@ -1046,7 +1055,7 @@ public class SyncStorageEngine extends Handler {
long now, int source, boolean initialization) {
long id;
synchronized (mAuthorities) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "insertStartSyncEvent: account=" + accountName + "user=" + userId
+ " auth=" + authorityName + " source=" + source);
}
@@ -1068,7 +1077,7 @@ public class SyncStorageEngine extends Handler {
mSyncHistory.remove(mSyncHistory.size()-1);
}
id = item.historyId;
- if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "returning historyId " + id);
+ if (DEBUG) Log.v(TAG, "returning historyId " + id);
}
reportChange(ContentResolver.SYNC_OBSERVER_TYPE_STATUS);
@@ -1096,7 +1105,7 @@ public class SyncStorageEngine extends Handler {
public void stopSyncEvent(long historyId, long elapsedTime, String resultMessage,
long downstreamActivity, long upstreamActivity) {
synchronized (mAuthorities) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "stopSyncEvent: historyId=" + historyId);
}
SyncHistoryItem item = null;
@@ -1358,7 +1367,7 @@ public class SyncStorageEngine extends Handler {
AccountInfo accountInfo = mAccounts.get(au);
if (accountInfo == null) {
if (tag != null) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, tag + ": unknown account " + au);
}
}
@@ -1367,7 +1376,7 @@ public class SyncStorageEngine extends Handler {
AuthorityInfo authority = accountInfo.authorities.get(authorityName);
if (authority == null) {
if (tag != null) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, tag + ": unknown authority " + authorityName);
}
}
@@ -1392,7 +1401,7 @@ public class SyncStorageEngine extends Handler {
mNextAuthorityId++;
doWrite = true;
}
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "created a new AuthorityInfo for " + accountName
+ ", user " + userId
+ ", provider " + authorityName);
diff --git a/core/java/android/content/pm/IPackageManager.aidl b/core/java/android/content/pm/IPackageManager.aidl
index b0ae5da..b9e432c 100644
--- a/core/java/android/content/pm/IPackageManager.aidl
+++ b/core/java/android/content/pm/IPackageManager.aidl
@@ -378,6 +378,7 @@ interface IPackageManager {
VerifierDeviceIdentity getVerifierDeviceIdentity();
boolean isFirstBoot();
+ boolean isOnlyCoreApps();
void setPermissionEnforced(String permission, boolean enforced);
boolean isPermissionEnforced(String permission);
diff --git a/core/java/android/content/pm/RegisteredServicesCache.java b/core/java/android/content/pm/RegisteredServicesCache.java
index a07a865..aaa0917 100644
--- a/core/java/android/content/pm/RegisteredServicesCache.java
+++ b/core/java/android/content/pm/RegisteredServicesCache.java
@@ -69,6 +69,7 @@ import java.util.Map;
*/
public abstract class RegisteredServicesCache<V> {
private static final String TAG = "PackageManager";
+ private static final boolean DEBUG = false;
public final Context mContext;
private final String mInterfaceName;
@@ -195,7 +196,7 @@ public abstract class RegisteredServicesCache<V> {
}
private void notifyListener(final V type, final int userId, final boolean removed) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.d(TAG, "notifyListener: " + type + " is " + (removed ? "removed" : "added"));
}
RegisteredServicesCacheListener<V> listener;
@@ -291,7 +292,9 @@ public abstract class RegisteredServicesCache<V> {
* given {@link UserHandle}.
*/
private void generateServicesMap(int userId) {
- Slog.d(TAG, "generateServicesMap() for " + userId);
+ if (DEBUG) {
+ Slog.d(TAG, "generateServicesMap() for " + userId);
+ }
final PackageManager pm = mContext.getPackageManager();
final ArrayList<ServiceInfo<V>> serviceInfos = new ArrayList<ServiceInfo<V>>();
@@ -322,6 +325,7 @@ public abstract class RegisteredServicesCache<V> {
}
StringBuilder changes = new StringBuilder();
+ boolean changed = false;
for (ServiceInfo<V> info : serviceInfos) {
// four cases:
// - doesn't exist yet
@@ -334,33 +338,41 @@ public abstract class RegisteredServicesCache<V> {
// - add, notify user that it was added
Integer previousUid = user.persistentServices.get(info.type);
if (previousUid == null) {
- changes.append(" New service added: ").append(info).append("\n");
+ if (DEBUG) {
+ changes.append(" New service added: ").append(info).append("\n");
+ }
+ changed = true;
user.services.put(info.type, info);
user.persistentServices.put(info.type, info.uid);
if (!(mPersistentServicesFileDidNotExist && firstScan)) {
notifyListener(info.type, userId, false /* removed */);
}
} else if (previousUid == info.uid) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
changes.append(" Existing service (nop): ").append(info).append("\n");
}
user.services.put(info.type, info);
} else if (inSystemImage(info.uid)
|| !containsTypeAndUid(serviceInfos, info.type, previousUid)) {
- if (inSystemImage(info.uid)) {
- changes.append(" System service replacing existing: ").append(info)
- .append("\n");
- } else {
- changes.append(" Existing service replacing a removed service: ")
- .append(info).append("\n");
+ if (DEBUG) {
+ if (inSystemImage(info.uid)) {
+ changes.append(" System service replacing existing: ").append(info)
+ .append("\n");
+ } else {
+ changes.append(" Existing service replacing a removed service: ")
+ .append(info).append("\n");
+ }
}
+ changed = true;
user.services.put(info.type, info);
user.persistentServices.put(info.type, info.uid);
notifyListener(info.type, userId, false /* removed */);
} else {
// ignore
- changes.append(" Existing service with new uid ignored: ").append(info)
- .append("\n");
+ if (DEBUG) {
+ changes.append(" Existing service with new uid ignored: ").append(info)
+ .append("\n");
+ }
}
}
@@ -371,22 +383,25 @@ public abstract class RegisteredServicesCache<V> {
}
}
for (V v1 : toBeRemoved) {
+ if (DEBUG) {
+ changes.append(" Service removed: ").append(v1).append("\n");
+ }
+ changed = true;
user.persistentServices.remove(v1);
- changes.append(" Service removed: ").append(v1).append("\n");
notifyListener(v1, userId, true /* removed */);
}
- if (changes.length() > 0) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
+ if (changes.length() > 0) {
Log.d(TAG, "generateServicesMap(" + mInterfaceName + "): " +
serviceInfos.size() + " services:\n" + changes);
- }
- writePersistentServicesLocked();
- } else {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ } else {
Log.d(TAG, "generateServicesMap(" + mInterfaceName + "): " +
serviceInfos.size() + " services unchanged");
}
}
+ if (changed) {
+ writePersistentServicesLocked();
+ }
}
}
diff --git a/core/java/android/server/search/SearchManagerService.java b/core/java/android/server/search/SearchManagerService.java
index 4a21374..46f2723 100644
--- a/core/java/android/server/search/SearchManagerService.java
+++ b/core/java/android/server/search/SearchManagerService.java
@@ -92,7 +92,7 @@ public class SearchManagerService extends ISearchManager.Stub {
Searchables searchables = mSearchables.get(userId);
if (searchables == null) {
- Log.i(TAG, "Building list of searchable activities for userId=" + userId);
+ //Log.i(TAG, "Building list of searchable activities for userId=" + userId);
searchables = new Searchables(mContext, userId);
searchables.buildSearchableList();
mSearchables.append(userId, searchables);
diff --git a/core/java/android/service/dreams/DreamService.java b/core/java/android/service/dreams/DreamService.java
index 6c9290b..f6b6c89 100644
--- a/core/java/android/service/dreams/DreamService.java
+++ b/core/java/android/service/dreams/DreamService.java
@@ -44,13 +44,13 @@ import android.view.accessibility.AccessibilityEvent;
import com.android.internal.policy.PolicyManager;
/**
- * Extend this class to implement a custom Dream (displayed to the user as a "Sleep Mode").
+ * Extend this class to implement a custom dream (available to the user as a "Daydream").
*
* <p>Dreams are interactive screensavers launched when a charging device is idle, or docked in a
* desk dock. Dreams provide another modality for apps to express themselves, tailored for
* an exhibition/lean-back experience.</p>
*
- * <p>The Dream lifecycle is as follows:</p>
+ * <p>The {@code DreamService} lifecycle is as follows:</p>
* <ol>
* <li>{@link #onAttachedToWindow}
* <p>Use this for initial setup, such as calling {@link #setContentView setContentView()}.</li>
@@ -59,14 +59,15 @@ import com.android.internal.policy.PolicyManager;
* <li>{@link #onDreamingStopped}
* <p>Use this to stop the things you started in {@link #onDreamingStarted}.</li>
* <li>{@link #onDetachedFromWindow}
- * <p>Use this to dismantle resources your dream set up. For example, detach from handlers
- * and listeners.</li>
+ * <p>Use this to dismantle resources (for example, detach from handlers
+ * and listeners).</li>
* </ol>
*
* <p>In addition, onCreate and onDestroy (from the Service interface) will also be called, but
* initialization and teardown should be done by overriding the hooks above.</p>
*
- * <p>To be available to the system, Dreams should be declared in the manifest as follows:</p>
+ * <p>To be available to the system, your {@code DreamService} should be declared in the
+ * manifest as follows:</p>
* <pre>
* &lt;service
* android:name=".MyDream"
diff --git a/core/java/android/view/ScaleGestureDetector.java b/core/java/android/view/ScaleGestureDetector.java
index ee3f5d8..51c5c7b 100644
--- a/core/java/android/view/ScaleGestureDetector.java
+++ b/core/java/android/view/ScaleGestureDetector.java
@@ -259,6 +259,8 @@ public class ScaleGestureDetector {
mInputEventConsistencyVerifier.onTouchEvent(event, 0);
}
+ mCurrTime = event.getEventTime();
+
final int action = event.getActionMasked();
final boolean streamComplete = action == MotionEvent.ACTION_UP ||
@@ -341,6 +343,7 @@ public class ScaleGestureDetector {
mPrevSpanX = mCurrSpanX = spanX;
mPrevSpanY = mCurrSpanY = spanY;
mPrevSpan = mCurrSpan = span;
+ mPrevTime = mCurrTime;
mInProgress = mListener.onScaleBegin(this);
}
@@ -359,6 +362,7 @@ public class ScaleGestureDetector {
mPrevSpanX = mCurrSpanX;
mPrevSpanY = mCurrSpanY;
mPrevSpan = mCurrSpan;
+ mPrevTime = mCurrTime;
}
}
diff --git a/core/java/android/widget/CompoundButton.java b/core/java/android/widget/CompoundButton.java
index 421a324..452ad1b 100644
--- a/core/java/android/widget/CompoundButton.java
+++ b/core/java/android/widget/CompoundButton.java
@@ -248,6 +248,15 @@ public abstract class CompoundButton extends Button implements Checkable {
return padding;
}
+ /**
+ * @hide
+ */
+ @Override
+ public int getHorizontalOffsetForDrawables() {
+ final Drawable buttonDrawable = mButtonDrawable;
+ return (buttonDrawable != null) ? buttonDrawable.getIntrinsicWidth() : 0;
+ }
+
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
diff --git a/core/java/android/widget/RelativeLayout.java b/core/java/android/widget/RelativeLayout.java
index e52e84d..49523a2 100644
--- a/core/java/android/widget/RelativeLayout.java
+++ b/core/java/android/widget/RelativeLayout.java
@@ -369,10 +369,10 @@ public class RelativeLayout extends ViewGroup {
int width = 0;
int height = 0;
- int widthMode = MeasureSpec.getMode(widthMeasureSpec);
- int heightMode = MeasureSpec.getMode(heightMeasureSpec);
- int widthSize = MeasureSpec.getSize(widthMeasureSpec);
- int heightSize = MeasureSpec.getSize(heightMeasureSpec);
+ final int widthMode = MeasureSpec.getMode(widthMeasureSpec);
+ final int heightMode = MeasureSpec.getMode(heightMeasureSpec);
+ final int widthSize = MeasureSpec.getSize(widthMeasureSpec);
+ final int heightSize = MeasureSpec.getSize(heightMeasureSpec);
// Record our dimensions if they are known;
if (widthMode != MeasureSpec.UNSPECIFIED) {
@@ -416,6 +416,32 @@ public class RelativeLayout extends ViewGroup {
View[] views = mSortedHorizontalChildren;
int count = views.length;
+
+ // We need to know our size for doing the correct computation of positioning in RTL mode
+ if (isLayoutRtl() && (myWidth == -1 || isWrapContentWidth)) {
+ myWidth = getPaddingStart() + getPaddingEnd();
+ final int childWidthMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
+ for (int i = 0; i < count; i++) {
+ View child = views[i];
+ if (child.getVisibility() != GONE) {
+ LayoutParams params = (LayoutParams) child.getLayoutParams();
+ // Would be similar to a call to measureChildHorizontal(child, params, -1, myHeight)
+ // but we cannot change for now the behavior of measureChildHorizontal() for
+ // taking care or a "-1" for "mywidth" so use here our own version of that code.
+ int childHeightMeasureSpec;
+ if (params.width == LayoutParams.MATCH_PARENT) {
+ childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(myHeight, MeasureSpec.EXACTLY);
+ } else {
+ childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(myHeight, MeasureSpec.AT_MOST);
+ }
+ child.measure(childWidthMeasureSpec, childHeightMeasureSpec);
+
+ myWidth += child.getMeasuredWidth();
+ myWidth += params.leftMargin + params.rightMargin;
+ }
+ }
+ }
+
for (int i = 0; i < count; i++) {
View child = views[i];
if (child.getVisibility() != GONE) {
@@ -924,7 +950,7 @@ public class RelativeLayout extends ViewGroup {
// Find the first non-GONE view up the chain
while (v.getVisibility() == View.GONE) {
- rules = ((LayoutParams) v.getLayoutParams()).getRules();
+ rules = ((LayoutParams) v.getLayoutParams()).getRules(v.getLayoutDirection());
node = mGraph.mKeyNodes.get((rules[relation]));
if (node == null) return null;
v = node.view;
@@ -975,7 +1001,7 @@ public class RelativeLayout extends ViewGroup {
protected void onLayout(boolean changed, int l, int t, int r, int b) {
// The layout has actually already been performed and the positions
// cached. Apply the cached values to the children.
- int count = getChildCount();
+ final int count = getChildCount();
for (int i = 0; i < count; i++) {
View child = getChildAt(i);
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 0a16a66..22bfadb 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -4863,6 +4863,13 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
return highlight;
}
+ /**
+ * @hide
+ */
+ public int getHorizontalOffsetForDrawables() {
+ return 0;
+ }
+
@Override
protected void onDraw(Canvas canvas) {
restartMarqueeIfNeeded();
@@ -4880,6 +4887,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
final int left = mLeft;
final int bottom = mBottom;
final int top = mTop;
+ final boolean isLayoutRtl = isLayoutRtl();
+ final int offset = getHorizontalOffsetForDrawables();
+ final int leftOffset = isLayoutRtl ? 0 : offset;
+ final int rightOffset = isLayoutRtl ? offset : 0 ;
final Drawables dr = mDrawables;
if (dr != null) {
@@ -4895,7 +4906,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
// Make sure to update invalidateDrawable() when changing this code.
if (dr.mDrawableLeft != null) {
canvas.save();
- canvas.translate(scrollX + mPaddingLeft,
+ canvas.translate(scrollX + mPaddingLeft + leftOffset,
scrollY + compoundPaddingTop +
(vspace - dr.mDrawableHeightLeft) / 2);
dr.mDrawableLeft.draw(canvas);
@@ -4906,7 +4917,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
// Make sure to update invalidateDrawable() when changing this code.
if (dr.mDrawableRight != null) {
canvas.save();
- canvas.translate(scrollX + right - left - mPaddingRight - dr.mDrawableSizeRight,
+ canvas.translate(scrollX + right - left - mPaddingRight
+ - dr.mDrawableSizeRight - rightOffset,
scrollY + compoundPaddingTop + (vspace - dr.mDrawableHeightRight) / 2);
dr.mDrawableRight.draw(canvas);
canvas.restore();
@@ -4991,8 +5003,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
canvas.translate(compoundPaddingLeft, extendedPaddingTop + voffsetText);
- final boolean isLayoutRtl = isLayoutRtl();
-
final int layoutDirection = getLayoutDirection();
final int absoluteGravity = Gravity.getAbsoluteGravity(mGravity, layoutDirection);
if (mEllipsize == TextUtils.TruncateAt.MARQUEE &&
diff --git a/core/java/android/widget/VideoView.java b/core/java/android/widget/VideoView.java
index 7c8196d..329b0df 100644
--- a/core/java/android/widget/VideoView.java
+++ b/core/java/android/widget/VideoView.java
@@ -54,7 +54,6 @@ public class VideoView extends SurfaceView implements MediaPlayerControl {
// settable by the client
private Uri mUri;
private Map<String, String> mHeaders;
- private int mDuration;
// all possible internal states
private static final int STATE_ERROR = -1;
@@ -229,7 +228,6 @@ public class VideoView extends SurfaceView implements MediaPlayerControl {
mMediaPlayer = new MediaPlayer();
mMediaPlayer.setOnPreparedListener(mPreparedListener);
mMediaPlayer.setOnVideoSizeChangedListener(mSizeChangedListener);
- mDuration = -1;
mMediaPlayer.setOnCompletionListener(mCompletionListener);
mMediaPlayer.setOnErrorListener(mErrorListener);
mMediaPlayer.setOnInfoListener(mOnInfoListener);
@@ -608,17 +606,12 @@ public class VideoView extends SurfaceView implements MediaPlayerControl {
openVideo();
}
- // cache duration as mDuration for faster access
public int getDuration() {
if (isInPlaybackState()) {
- if (mDuration > 0) {
- return mDuration;
- }
- mDuration = mMediaPlayer.getDuration();
- return mDuration;
+ return mMediaPlayer.getDuration();
}
- mDuration = -1;
- return mDuration;
+
+ return -1;
}
public int getCurrentPosition() {
diff --git a/core/java/com/android/internal/app/MediaRouteChooserDialogFragment.java b/core/java/com/android/internal/app/MediaRouteChooserDialogFragment.java
index 386f387..2bc80ff 100644
--- a/core/java/com/android/internal/app/MediaRouteChooserDialogFragment.java
+++ b/core/java/com/android/internal/app/MediaRouteChooserDialogFragment.java
@@ -136,13 +136,14 @@ public class MediaRouteChooserDialogFragment extends DialogFragment {
if (mRouter == null) return;
final RouteInfo selectedRoute = mRouter.getSelectedRoute(mRouteTypes);
- mVolumeIcon.setImageResource(
+ mVolumeIcon.setImageResource(selectedRoute == null ||
selectedRoute.getPlaybackType() == RouteInfo.PLAYBACK_TYPE_LOCAL ?
R.drawable.ic_audio_vol : R.drawable.ic_media_route_on_holo_dark);
mIgnoreSliderVolumeChanges = true;
- if (selectedRoute.getVolumeHandling() == RouteInfo.PLAYBACK_VOLUME_FIXED) {
+ if (selectedRoute == null ||
+ selectedRoute.getVolumeHandling() == RouteInfo.PLAYBACK_VOLUME_FIXED) {
// Disable the slider and show it at max volume.
mVolumeSlider.setMax(1);
mVolumeSlider.setProgress(1);
@@ -160,7 +161,8 @@ public class MediaRouteChooserDialogFragment extends DialogFragment {
if (mIgnoreSliderVolumeChanges) return;
final RouteInfo selectedRoute = mRouter.getSelectedRoute(mRouteTypes);
- if (selectedRoute.getVolumeHandling() == RouteInfo.PLAYBACK_VOLUME_VARIABLE) {
+ if (selectedRoute != null &&
+ selectedRoute.getVolumeHandling() == RouteInfo.PLAYBACK_VOLUME_VARIABLE) {
final int maxVolume = selectedRoute.getVolumeMax();
newValue = Math.max(0, Math.min(newValue, maxVolume));
selectedRoute.requestSetVolume(newValue);
@@ -652,14 +654,19 @@ public class MediaRouteChooserDialogFragment extends DialogFragment {
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN && mVolumeSlider.isEnabled()) {
- mRouter.getSelectedRoute(mRouteTypes).requestUpdateVolume(-1);
- return true;
+ final RouteInfo selectedRoute = mRouter.getSelectedRoute(mRouteTypes);
+ if (selectedRoute != null) {
+ selectedRoute.requestUpdateVolume(-1);
+ return true;
+ }
} else if (keyCode == KeyEvent.KEYCODE_VOLUME_UP && mVolumeSlider.isEnabled()) {
- mRouter.getSelectedRoute(mRouteTypes).requestUpdateVolume(1);
- return true;
- } else {
- return super.onKeyDown(keyCode, event);
+ final RouteInfo selectedRoute = mRouter.getSelectedRoute(mRouteTypes);
+ if (selectedRoute != null) {
+ mRouter.getSelectedRoute(mRouteTypes).requestUpdateVolume(1);
+ return true;
+ }
}
+ return super.onKeyDown(keyCode, event);
}
public boolean onKeyUp(int keyCode, KeyEvent event) {
diff --git a/core/java/com/android/internal/appwidget/IAppWidgetService.aidl b/core/java/com/android/internal/appwidget/IAppWidgetService.aidl
index b63ad62..e81d389 100644
--- a/core/java/com/android/internal/appwidget/IAppWidgetService.aidl
+++ b/core/java/com/android/internal/appwidget/IAppWidgetService.aidl
@@ -49,7 +49,7 @@ interface IAppWidgetService {
void partiallyUpdateAppWidgetIds(in int[] appWidgetIds, in RemoteViews views);
void updateAppWidgetProvider(in ComponentName provider, in RemoteViews views);
void notifyAppWidgetViewDataChanged(in int[] appWidgetIds, int viewId);
- List<AppWidgetProviderInfo> getInstalledProviders();
+ List<AppWidgetProviderInfo> getInstalledProviders(int categoryFilter);
AppWidgetProviderInfo getAppWidgetInfo(int appWidgetId);
boolean hasBindAppWidgetPermission(in String packageName);
void setBindAppWidgetPermission(in String packageName, in boolean permission);
diff --git a/core/java/com/android/internal/content/PackageHelper.java b/core/java/com/android/internal/content/PackageHelper.java
index c5e7d9d..1a4835b 100644
--- a/core/java/com/android/internal/content/PackageHelper.java
+++ b/core/java/com/android/internal/content/PackageHelper.java
@@ -51,7 +51,7 @@ public class PackageHelper {
public static final int RECOMMEND_FAILED_INVALID_URI = -6;
public static final int RECOMMEND_FAILED_VERSION_DOWNGRADE = -7;
- private static final boolean localLOGV = true;
+ private static final boolean localLOGV = false;
private static final String TAG = "PackageHelper";
// App installation location settings values
public static final int APP_INSTALL_AUTO = 0;
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 7971ccb..316de50 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -143,6 +143,30 @@
<protected-broadcast android:name="android.intent.action.DREAMING_STARTED" />
<protected-broadcast android:name="android.intent.action.DREAMING_STOPPED" />
+ <protected-broadcast android:name="android.intent.action.ANY_DATA_STATE" />
+
+ <protected-broadcast android:name="com.android.server.WifiManager.action.START_SCAN" />
+ <protected-broadcast android:name="com.android.server.WifiManager.action.DELAYED_DRIVER_STOP" />
+ <protected-broadcast android:name="android.net.wifi.WIFI_STATE_CHANGED" />
+ <protected-broadcast android:name="android.net.wifi.WIFI_AP_STATE_CHANGED" />
+ <protected-broadcast android:name="android.net.wifi.SCAN_RESULTS" />
+ <protected-broadcast android:name="android.net.wifi.RSSI_CHANGED" />
+ <protected-broadcast android:name="android.net.wifi.STATE_CHANGE" />
+ <protected-broadcast android:name="android.net.wifi.LINK_CONFIGURATION_CHANGED" />
+ <protected-broadcast android:name="android.net.wifi.CONFIGURED_NETWORKS_CHANGE" />
+ <protected-broadcast android:name="android.net.wifi.supplicant.CONNECTION_CHANGE" />
+ <protected-broadcast android:name="android.net.wifi.supplicant.STATE_CHANGE" />
+ <protected-broadcast android:name="android.net.wifi.p2p.STATE_CHANGED" />
+ <protected-broadcast android:name="android.net.wifi.p2p.DISCOVERY_STATE_CHANGE" />
+ <protected-broadcast android:name="android.net.wifi.p2p.THIS_DEVICE_CHANGED" />
+ <protected-broadcast android:name="android.net.wifi.p2p.PEERS_CHANGED" />
+ <protected-broadcast android:name="android.net.wifi.p2p.CONNECTION_STATE_CHANGE" />
+ <protected-broadcast android:name="android.net.wifi.p2p.PERSISTENT_GROUPS_CHANGED" />
+ <protected-broadcast android:name="android.net.conn.TETHER_STATE_CHANGED" />
+ <protected-broadcast android:name="android.net.conn.INET_CONDITION_ACTION" />
+
+
+
<!-- ====================================== -->
<!-- Permissions for things that cost money -->
diff --git a/core/res/res/drawable-hdpi/dialog_bottom_holo_dark.9.png b/core/res/res/drawable-hdpi/dialog_bottom_holo_dark.9.png
index 9eaf9d5..b23740c 100644
--- a/core/res/res/drawable-hdpi/dialog_bottom_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/dialog_bottom_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/dialog_bottom_holo_light.9.png b/core/res/res/drawable-hdpi/dialog_bottom_holo_light.9.png
index 55a125e..44803d7 100644
--- a/core/res/res/drawable-hdpi/dialog_bottom_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/dialog_bottom_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/dialog_full_holo_dark.9.png b/core/res/res/drawable-hdpi/dialog_full_holo_dark.9.png
index 13205f0..911f3fe 100644
--- a/core/res/res/drawable-hdpi/dialog_full_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/dialog_full_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/dialog_full_holo_light.9.png b/core/res/res/drawable-hdpi/dialog_full_holo_light.9.png
index 6f5dcc1..2129567 100644
--- a/core/res/res/drawable-hdpi/dialog_full_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/dialog_full_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/dialog_middle_holo_dark.9.png b/core/res/res/drawable-hdpi/dialog_middle_holo_dark.9.png
index be3f7a1..9ce7cfc 100644
--- a/core/res/res/drawable-hdpi/dialog_middle_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/dialog_middle_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/dialog_middle_holo_light.9.png b/core/res/res/drawable-hdpi/dialog_middle_holo_light.9.png
index 2e92a6d..396a0f2 100644
--- a/core/res/res/drawable-hdpi/dialog_middle_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/dialog_middle_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/dialog_top_holo_dark.9.png b/core/res/res/drawable-hdpi/dialog_top_holo_dark.9.png
index 0e5444b..22ca61f 100644
--- a/core/res/res/drawable-hdpi/dialog_top_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/dialog_top_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/dialog_top_holo_light.9.png b/core/res/res/drawable-hdpi/dialog_top_holo_light.9.png
index 32ca205..9b54cd5 100644
--- a/core/res/res/drawable-hdpi/dialog_top_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/dialog_top_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/menu_dropdown_panel_holo_dark.9.png b/core/res/res/drawable-hdpi/menu_dropdown_panel_holo_dark.9.png
index e83b346..72ee35f 100644
--- a/core/res/res/drawable-hdpi/menu_dropdown_panel_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/menu_dropdown_panel_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/menu_dropdown_panel_holo_light.9.png b/core/res/res/drawable-hdpi/menu_dropdown_panel_holo_light.9.png
index fd4fbf8..0d1f9bf 100644
--- a/core/res/res/drawable-hdpi/menu_dropdown_panel_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/menu_dropdown_panel_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/menu_hardkey_panel_holo_dark.9.png b/core/res/res/drawable-hdpi/menu_hardkey_panel_holo_dark.9.png
index 8aee55a..465ee6d 100644
--- a/core/res/res/drawable-hdpi/menu_hardkey_panel_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/menu_hardkey_panel_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/menu_hardkey_panel_holo_light.9.png b/core/res/res/drawable-hdpi/menu_hardkey_panel_holo_light.9.png
index 2ebb7a2..76a5c53 100644
--- a/core/res/res/drawable-hdpi/menu_hardkey_panel_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/menu_hardkey_panel_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dialog_bottom_holo_dark.9.png b/core/res/res/drawable-mdpi/dialog_bottom_holo_dark.9.png
index f874d66..31dc4fd 100644
--- a/core/res/res/drawable-mdpi/dialog_bottom_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/dialog_bottom_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dialog_bottom_holo_light.9.png b/core/res/res/drawable-mdpi/dialog_bottom_holo_light.9.png
index 0d6c715..7541e8a 100644
--- a/core/res/res/drawable-mdpi/dialog_bottom_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/dialog_bottom_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dialog_full_holo_dark.9.png b/core/res/res/drawable-mdpi/dialog_full_holo_dark.9.png
index 63144ae..dc37316 100644
--- a/core/res/res/drawable-mdpi/dialog_full_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/dialog_full_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dialog_full_holo_light.9.png b/core/res/res/drawable-mdpi/dialog_full_holo_light.9.png
index 953ba78..0c5770a 100644
--- a/core/res/res/drawable-mdpi/dialog_full_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/dialog_full_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dialog_middle_holo_dark.9.png b/core/res/res/drawable-mdpi/dialog_middle_holo_dark.9.png
index 0c57ffc..ca389e3 100644
--- a/core/res/res/drawable-mdpi/dialog_middle_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/dialog_middle_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dialog_middle_holo_light.9.png b/core/res/res/drawable-mdpi/dialog_middle_holo_light.9.png
index c6be52e..7a836ce 100644
--- a/core/res/res/drawable-mdpi/dialog_middle_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/dialog_middle_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dialog_top_holo_dark.9.png b/core/res/res/drawable-mdpi/dialog_top_holo_dark.9.png
index 7e9f258..fb848a3 100644
--- a/core/res/res/drawable-mdpi/dialog_top_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/dialog_top_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/dialog_top_holo_light.9.png b/core/res/res/drawable-mdpi/dialog_top_holo_light.9.png
index 11cc5a4..2ddcab1 100644
--- a/core/res/res/drawable-mdpi/dialog_top_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/dialog_top_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/menu_dropdown_panel_holo_dark.9.png b/core/res/res/drawable-mdpi/menu_dropdown_panel_holo_dark.9.png
index 9583c9b..31dc342 100644
--- a/core/res/res/drawable-mdpi/menu_dropdown_panel_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/menu_dropdown_panel_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/menu_dropdown_panel_holo_light.9.png b/core/res/res/drawable-mdpi/menu_dropdown_panel_holo_light.9.png
index 54d2cd0..755c145 100644
--- a/core/res/res/drawable-mdpi/menu_dropdown_panel_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/menu_dropdown_panel_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/menu_hardkey_panel_holo_dark.9.png b/core/res/res/drawable-mdpi/menu_hardkey_panel_holo_dark.9.png
index ce48b33..3677994 100644
--- a/core/res/res/drawable-mdpi/menu_hardkey_panel_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/menu_hardkey_panel_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/menu_hardkey_panel_holo_light.9.png b/core/res/res/drawable-mdpi/menu_hardkey_panel_holo_light.9.png
index 1f313af..02b25f0 100644
--- a/core/res/res/drawable-mdpi/menu_hardkey_panel_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/menu_hardkey_panel_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dialog_bottom_holo_dark.9.png b/core/res/res/drawable-xhdpi/dialog_bottom_holo_dark.9.png
index 467ea1f..3c26c6b 100644
--- a/core/res/res/drawable-xhdpi/dialog_bottom_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/dialog_bottom_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dialog_bottom_holo_light.9.png b/core/res/res/drawable-xhdpi/dialog_bottom_holo_light.9.png
index 74929a3..f7423f3 100644
--- a/core/res/res/drawable-xhdpi/dialog_bottom_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/dialog_bottom_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dialog_full_holo_dark.9.png b/core/res/res/drawable-xhdpi/dialog_full_holo_dark.9.png
index a8ab305..75d36be 100644
--- a/core/res/res/drawable-xhdpi/dialog_full_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/dialog_full_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dialog_full_holo_light.9.png b/core/res/res/drawable-xhdpi/dialog_full_holo_light.9.png
index a8f02d6..d9bd337 100644
--- a/core/res/res/drawable-xhdpi/dialog_full_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/dialog_full_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dialog_middle_holo_dark.9.png b/core/res/res/drawable-xhdpi/dialog_middle_holo_dark.9.png
index 97eb217..e9467b4 100644
--- a/core/res/res/drawable-xhdpi/dialog_middle_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/dialog_middle_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dialog_middle_holo_light.9.png b/core/res/res/drawable-xhdpi/dialog_middle_holo_light.9.png
index 1300c19..ce3a880 100644
--- a/core/res/res/drawable-xhdpi/dialog_middle_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/dialog_middle_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dialog_top_holo_dark.9.png b/core/res/res/drawable-xhdpi/dialog_top_holo_dark.9.png
index f82e26b..fa95667 100644
--- a/core/res/res/drawable-xhdpi/dialog_top_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/dialog_top_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/dialog_top_holo_light.9.png b/core/res/res/drawable-xhdpi/dialog_top_holo_light.9.png
index 8bd32a3..555fb81 100644
--- a/core/res/res/drawable-xhdpi/dialog_top_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/dialog_top_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/menu_dropdown_panel_holo_dark.9.png b/core/res/res/drawable-xhdpi/menu_dropdown_panel_holo_dark.9.png
index f67e609..abc48f8 100644
--- a/core/res/res/drawable-xhdpi/menu_dropdown_panel_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/menu_dropdown_panel_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/menu_dropdown_panel_holo_light.9.png b/core/res/res/drawable-xhdpi/menu_dropdown_panel_holo_light.9.png
index ed71eda..48905ed 100644
--- a/core/res/res/drawable-xhdpi/menu_dropdown_panel_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/menu_dropdown_panel_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/menu_hardkey_panel_holo_dark.9.png b/core/res/res/drawable-xhdpi/menu_hardkey_panel_holo_dark.9.png
index 585bccc..c1ad023 100644
--- a/core/res/res/drawable-xhdpi/menu_hardkey_panel_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/menu_hardkey_panel_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/menu_hardkey_panel_holo_light.9.png b/core/res/res/drawable-xhdpi/menu_hardkey_panel_holo_light.9.png
index a0669b9..a1e33d6 100644
--- a/core/res/res/drawable-xhdpi/menu_hardkey_panel_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/menu_hardkey_panel_holo_light.9.png
Binary files differ
diff --git a/core/res/res/values/arrays.xml b/core/res/res/values/arrays.xml
index 1e966f7..f7ff77b 100644
--- a/core/res/res/values/arrays.xml
+++ b/core/res/res/values/arrays.xml
@@ -143,10 +143,6 @@
<item>@drawable/menu_dropdown_panel_holo_dark</item>
<item>@drawable/overscroll_edge</item>
<item>@drawable/overscroll_glow</item>
- <item>@drawable/popup_inline_error_above_holo_dark</item>
- <item>@drawable/popup_inline_error_above_holo_light</item>
- <item>@drawable/popup_inline_error_holo_dark</item>
- <item>@drawable/popup_inline_error_holo_light</item>
<item>@drawable/spinner_16_outer_holo</item>
<item>@drawable/spinner_16_inner_holo</item>
<item>@drawable/spinner_48_outer_holo</item>
@@ -257,8 +253,6 @@
<item>@drawable/ab_solid_shadow_holo</item>
<item>@drawable/item_background_holo_dark</item>
<item>@drawable/item_background_holo_light</item>
- <item>@drawable/ic_ab_back_holo_dark</item>
- <item>@drawable/ic_ab_back_holo_light</item>
<item>@drawable/fastscroll_thumb_holo</item>
<item>@drawable/fastscroll_thumb_pressed_holo</item>
<item>@drawable/fastscroll_thumb_default_holo</item>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index ea28a51..66c23a0 100755
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1006,9 +1006,9 @@
-->
<integer-array name="config_defaultNotificationVibePattern">
<item>0</item>
- <item>150</item>
- <item>200</item>
+ <item>350</item>
<item>250</item>
+ <item>350</item>
</integer-array>
<!-- Vibrator pattern to be used as the default for notifications
@@ -1017,8 +1017,8 @@
-->
<integer-array name="config_notificationFallbackVibePattern">
<item>0</item>
- <item>33</item>
+ <item>100</item>
<item>150</item>
- <item>50</item>
+ <item>100</item>
</integer-array>
</resources>
diff --git a/docs/html/distribute/googleplay/promote/brand.jd b/docs/html/distribute/googleplay/promote/brand.jd
index cb6bf48..834f8a9 100644
--- a/docs/html/distribute/googleplay/promote/brand.jd
+++ b/docs/html/distribute/googleplay/promote/brand.jd
@@ -51,7 +51,7 @@ Instead use "for Android."
<p style="text-align:center">
<a href="{@docRoot}images/brand/Android_Robot_100.png">100x118</a> |
<a href="{@docRoot}images/brand/Android_Robot_200.png">200x237</a><br>
- <a href="{@docRoot}images/brand/Android_Robot_outlined.ai">Illustrator (.ai)</a></p>
+ <a href="{@docRoot}downloads/brand/Android_Robot_outlined.ai">Illustrator (.ai)</a></p>
</div>
<p>The Android robot can be used, reproduced, and modified freely in marketing
diff --git a/docs/html/google/play-services/maps.jd b/docs/html/google/play-services/maps.jd
index eea17e9..85a745d 100644
--- a/docs/html/google/play-services/maps.jd
+++ b/docs/html/google/play-services/maps.jd
@@ -1,73 +1,86 @@
page.title=Google Maps
-page.landing=true
-page.landing.intro=Add Google maps to your Android apps and let your users explore the world. Give your users all of the benefits of the Google Maps, but with the customizations that you need for your app and users.
-page.landing.link=https://developers.google.com/maps/documentation/android/
-page.landing.link.text=developers.google.com/maps
-page.landing.image=images/gps-maps.png
+header.hide=1
@jd:body
+
+<div class="landing-banner">
+
+<div class="col-6">
+ <img src="{@docRoot}images/google/gps-maps.png" alt="">
+</div>
+<div class="col-6">
+
+ <h1 itemprop="name" style="margin-bottom:0;">Google Maps</h1>
+ <p itemprop="description">Allow your users explore the world with rich maps provided by
+ Google. Identify locations with <b>custom markers</b>, augment the map data
+ with <b>image overlays</b>, embed <b>one or more maps</b> as fragments,
+ and much more.</p>
+ <p>The <a
+href="{@docRoot}google/play-services/reference/com/google/android/gms/maps/package-summary.html"
+>Google Maps Android API reference</a> is available here on developer.android.com, but for more
+information about adding maps to your app, visit:</p>
+ <p><a class="external-link"
+href="https://developers.google.com/maps/documentation/android/">developers.google.com/maps</a></p>
+</div>
+</div>
+
+
+
<div class="landing-docs">
- <div class="col-6">
+ <div class="col-6 normal-links">
<h3 style="clear:left">Key Developer Features</h3>
- <a href="https://developers.google.com/maps/documentation/android/map">
- <h4>Bring Maps to your Mobile Apps</h4>
- The Google Maps APIs let you embed Google Maps into an Activity with a simple XML snippet
- in the form of a fragment. With MapFragment, you can take advantage of exciting features such as 3D maps;
- indoor, satellite, terrain, and hybrid maps; and vector-based tiles for efficient caching and drawing.
- </a>
+ <h4>Add Maps in a fragment</h4>
+ <p>With version 2 of the Google Maps Android API, you can embed maps into an activity
+ as a fragment with a simple XML snippet. The new Maps offer exciting features such as 3D maps;
+ indoor, satellite, terrain, and hybrid maps;
+ vector-based tiles for efficient caching and drawing; animated transitions; and much more.
+ <a class="external-link" href="https://developers.google.com/maps/documentation/android/map">Add
+ a map object</a>.</p>
- <a href="https://developers.google.com/maps/documentation/android/marker">
- <h4>Highlight important places and routes</h4>
- <p>
- Overlay markers onto your maps to highlight places your users are interested
- in. You can also define custom colors or icons for your map markers to
- coincide with the look and feel of your app.</p>
-
- <p>In addition, you can draw polylines, a set of connected line segments on a map
- and polygons, a set of polylines in a closed loop.</p>
+ <h4>Customize the map</h4>
+ <p>Add markers onto the map to indicate special points of interest for your users.
+ You can define custom colors or icons for your map markers to
+ match your app's look and feel. To further enhance the app, draw polylines
+ and polygons to indicate paths or regions, or provide complete image overlays.
+ <a class="external-link" href="https://developers.google.com/maps/documentation/android/marker">Draw
+ markers</a>.</p>
</a>
-
- <a href="https://developers.google.com/maps/documentation/android/views">
- <h4>Change views and perspectives</h4>
- Give your users a different view of the world with the ability to control rotation, tilting,
- zooming, and panning properties of the maps you are displaying. Show 3D views of maps,
- zoom in on terrain maps, allow users to swipe across areas, and much more.
- </a>
-
+
+ <h4>Control the user's view</h4>
+ <p>Give your users a different view of the world with the ability to control the rotation, tilt,
+ zoom, and pan properties of the "camera" perspective of the map.
+ <a class="external-link" href="https://developers.google.com/maps/documentation/android/views">Change
+ the view</a>.</p>
</div>
+
<div class="col-6 normal-links">
<h3 style="clear:left">Getting Started</h3>
- <h4>Configure Maps</h4>
+ <h4>1. Get the Google Play services SDK</h4>
<p>The Google Maps Android APIs are part of the Google Play services platform.</p>
<p>To use Google Maps, <a href="{@docRoot}google/play-services/download.html">download and configure</a>
- the Google Play services SDK and see the <a href="https://developers.google.com/maps/documentation/android/start#installing_the_google_maps_android_v2_api">
- Getting Started guide</a> on how to configure Google Maps for your app.
+ the Google Play services SDK from the SDK Manager. Then see the <a class="external-link"
+ href="https://developers.google.com/maps/documentation/android/start#installing_the_google_maps_android_v2_api">
+ Getting Started guide</a> to get your API key for Maps and set up your app.
</p>
- <h4>Run the sample</h4>
- <p>
- The Google Maps sample is located in <code>&lt;android-sdk&gt;/extras/google-play-services/samples/maps</code>
- and shows you how to use the major components of the Google Maps Android APIs.
+ <h4>2. Run the sample</h4>
+ <p>Once you've installed the Google Play services package, the Google Maps sample is located in
+ <code>&lt;android-sdk&gt;/extras/google-play-services/samples/maps</code> and shows you
+ how to use the major components of the Google Maps Android APIs.
</p>
- <h4>Visit the Google Maps developer site</h4>
- <p>
- For instructions on how to fully integrate Google+ into your app, with code snippets, visit the
- <a href="https://developers.google.com/maps/documentation/android/intro">Google Maps developer documentation</a>
- located at developers.google.com.
- </p>
-
- <h4>See the reference documentation</h4>
- <p>
- The <a href="{@docRoot}google/play-services/reference/com/google/android/gms/maps/package-summary.html">Google Maps API reference</a>
- is provided for you on this site and is also available at <a href="https://developers.google.com/maps/documentation/android/reference/com/google/android/gms/maps/package-summary">developers.google.com</a> if you
- prefer to read them there.</p>
- <p>
- In addition, the entire <a href="{@docRoot}google/play-services/reference/packages.html">Google Play
- services platform reference</a> is hosted on this site for your convenience.
+ <h4>3. Read the documentation</h4>
+ <p>For quick access while developing your Android apps, the
+ <a href="{@docRoot}google/play-services/reference/com/google/android/gms/maps/package-summary.html">Google Maps
+ Android API reference</a> is available here on developer.android.com.</p>
+ <p>Extended documentation for the Google Maps Android APIs is provided with the rest of the
+ Google Maps developer documents at <a class="external-link"
+ href="https://developers.google.com/maps/documentation/android/">developers.google.com/maps</a>.
</p>
</div>
+
+
</div>
</div> \ No newline at end of file
diff --git a/docs/html/google/play-services/plus.jd b/docs/html/google/play-services/plus.jd
index 7742318..571360b 100644
--- a/docs/html/google/play-services/plus.jd
+++ b/docs/html/google/play-services/plus.jd
@@ -1,65 +1,83 @@
page.title=Google+
-page.landing=true
-page.landing.intro=Create an engaging social experience and connect with more users by integrating G+ into your app.
-page.landing.link=https://developers.google.com/+/mobile/android/
-page.landing.link.text=developers.google.com/+
-page.landing.image=images/gps-plus.png
+header.hide=1
@jd:body
+
+<div class="landing-banner">
+
+<div class="col-6">
+ <img src="{@docRoot}images/google/gps-googleplus.png" alt="">
+</div>
+<div class="col-6">
+
+ <h1 itemprop="name" style="margin-bottom:0;">Google+</h1>
+ <p itemprop="description">Create an engaging social experience
+ by integrating Google+ features in your app. You can <b>authenticate users</b> and allow them to
+ <b>sign in</b>, add +1 buttons so users can <b>recommend your app content</b>,
+ and allow users to <b>share rich content</b> with Google+.</p>
+
+ <p>The <a
+href="{@docRoot}google/play-services/reference/com/google/android/gms/plus/package-summary.html"
+>Google+ Android API reference</a> is available here on developer.android.com, but for more
+information about integrating Google+, visit:</p>
+<p><a class="external-link"
+href="https://developers.google.com/+/mobile/android/">developers.google.com/+</a></p>
+</div>
+</div>
+
<div class="landing-docs">
- <div class="col-6">
+ <div class="col-6 normal-links">
<h3 style="clear:left">Key Developer Features</h3>
- <a href="https://developers.google.com/+/mobile/android/share">
- <h4>Share to Google+</h4>
- Display a Share dialog that lets your users share rich content from your app, including text,
- photos, URL attachments, and location, into the Google+ stream.
- </a>
+ <h4>Sign in with Google+</h4>
+ <p>Allow users to easily and securely sign in to your app using their Google+ credentials.
+ This allows you to know who they are on Google+ and to build a more personalized experience in
+ your app. <a href="https://developers.google.com/+/mobile/android/sign-in"
+ class="external-link">Add sign in</a>.</p>
- <a href="https://developers.google.com/+/mobile/android/recommend">
+ <h4>Share to Google+</h4>
+ <p>Display a Share dialog that lets your users share rich content from your app,
+ including text, photos, URL attachments, and location, into the Google+ stream.
+ <a href="https://developers.google.com/+/mobile/android/share"
+ class="external-link">Add sharing with Google+</a>.</p>
+
<h4>Recommend content</h4>
- Add a native +1 button so users can recommend content from your app. When users +1, they can
- also share content with their circles. These endorsements can give your app more
- credibility and help it grow faster.
- </a>
-
- <a href="https://developers.google.com/+/mobile/android/sign-in">
- <h4>Sign in with Google+</h4>
- Allow users to easily and securely sign in to your app using their Google+ credentials.
- This allows you to know who they are on Google+ and to build a more personalized experience in your app.
- </a>
- <a href="https://developers.google.com/+/mobile/android/write-moments">
+ <p>Add a native +1 button so users can recommend content from your app. When users +1, they
+ can also share content with their circles. These endorsements can give your app more
+ credibility and help it grow faster. <a class="external-link"
+ href="https://developers.google.com/+/mobile/android/recommend">Add the +1 button</a>.</p>
+
<h4>Save moments</h4>
- Save user actions from your app such as check-ins, reviews, video views, comments, and more,
- to your users' private Google+ history. From there, users can share these moments with others.
- </a>
+ <p>Save user actions from your app such as check-ins, reviews, video views, comments,
+ and more, to your users' private Google+ history. From there, users can share these
+ moments with others. <a class="external-link"
+ href="https://developers.google.com/+/mobile/android/write-moments">Save user
+ moments</a>.</p>
</div>
+
<div class="col-6 normal-links">
<h3 style="clear:left">Getting Started</h3>
- <h4>Get the Google Play services SDK</h4>
+ <h4>1. Get the Google Play services SDK</h4>
<p>The Google+ Android APIs are part of the Google Play services platform.</p>
- <p><a href="{@docRoot}google/play-services/download.html">Download and configure</a>
- the SDK to begin integrating Google+ into your app.
+ <p>To get started, <a href="{@docRoot}google/play-services/download.html">download and configure</a>
+ the Google Play services SDK from the SDK Manager.
</p>
- <h4>Run the sample</h4>
- <p>
- The Google+ sample is located in <code>&lt;android-sdk&gt;/extras/google-play-services/samples/plus</code> and shows you
+ <h4>2. Run the sample</h4>
+ <p>Once you've installed the Google Play services package, the Google+ sample is located in
+ <code>&lt;android-sdk&gt;/extras/google-play-services/samples/plus</code> and shows you
how to use the major components of the Google+ Android APIs.
</p>
- <h4>Visit the Google+ developer site</h4>
- <p>For instructions on how to fully integrate Google+ into your app, with code snippets, visit the
- <a href="https://developers.google.com/+/mobile/android/">Google+ developer documentation</a> located at
- developers.google.com.
- </p>
+ <h4>3. Read the documentation</h4>
+ <p>For quick access while developing your Android apps, the
+ <a href="{@docRoot}google/play-services/reference/com/google/android/gms/plus/package-summary.html">Google+
+ API reference</a> is available here on developer.android.com.</p>
+ <p>Extended documentation for the Google+ Android APIs is provided with the rest of the
+ Google+ developer documents at <a class="external-link"
+ href="https://developers.google.com/+/mobile/android/">developers.google.com/+</a>.</p>
- <h4>See the reference documentation</h4>
- <p>The <a href="{@docRoot}google/play-services/reference/com/google/android/gms/plus/package-summary.html">Google+ API reference</a>
- as well as the entire <a href="{@docRoot}google/play-services/reference/packages.html">Google Play services platform reference</a>
- is provided for you on this site.
- </p>
</div>
</div> \ No newline at end of file
diff --git a/docs/html/images/google/gps-googleplus.png b/docs/html/images/google/gps-googleplus.png
new file mode 100644
index 0000000..383445b
--- /dev/null
+++ b/docs/html/images/google/gps-googleplus.png
Binary files differ
diff --git a/docs/html/images/google/gps-maps.png b/docs/html/images/google/gps-maps.png
new file mode 100644
index 0000000..2500f14
--- /dev/null
+++ b/docs/html/images/google/gps-maps.png
Binary files differ
diff --git a/docs/html/sdk/images/4.0/folders.xcf b/docs/html/sdk/images/4.0/folders.xcf
deleted file mode 100644
index 66cc02c..0000000
--- a/docs/html/sdk/images/4.0/folders.xcf
+++ /dev/null
Binary files differ
diff --git a/docs/html/shareables/README b/docs/html/shareables/README.txt
index 241618e..241618e 100644
--- a/docs/html/shareables/README
+++ b/docs/html/shareables/README.txt
diff --git a/docs/html/tools/sdk/images/4.0/folders.xcf b/docs/html/tools/sdk/images/4.0/folders.xcf
deleted file mode 100644
index 66cc02c..0000000
--- a/docs/html/tools/sdk/images/4.0/folders.xcf
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/activity_lifecycle.graffle b/docs/image_sources/activity_lifecycle.graffle
index 7475c67..7475c67 100644
--- a/docs/html/images/activity_lifecycle.graffle
+++ b/docs/image_sources/activity_lifecycle.graffle
diff --git a/docs/html/images/brand/Android_Robot_outlined.ai b/docs/image_sources/brand/Android_Robot_outlined.ai
index 9105cba..9105cba 100644
--- a/docs/html/images/brand/Android_Robot_outlined.ai
+++ b/docs/image_sources/brand/Android_Robot_outlined.ai
diff --git a/docs/html/images/brand/Google_Play_Store.ai b/docs/image_sources/brand/Google_Play_Store.ai
index 51f07c6..51f07c6 100644
--- a/docs/html/images/brand/Google_Play_Store.ai
+++ b/docs/image_sources/brand/Google_Play_Store.ai
diff --git a/docs/html/images/brand/en_app_rgb_wo.ai b/docs/image_sources/brand/en_app_rgb_wo.ai
index db27314..db27314 100644
--- a/docs/html/images/brand/en_app_rgb_wo.ai
+++ b/docs/image_sources/brand/en_app_rgb_wo.ai
diff --git a/docs/html/images/brand/en_generic_rgb_wo.ai b/docs/image_sources/brand/en_generic_rgb_wo.ai
index 57c1e47..57c1e47 100644
--- a/docs/html/images/brand/en_generic_rgb_wo.ai
+++ b/docs/image_sources/brand/en_generic_rgb_wo.ai
diff --git a/docs/html/images/fundamentals/fragments.graffle b/docs/image_sources/fundamentals/fragments.graffle
index c14282b..c14282b 100755
--- a/docs/html/images/fundamentals/fragments.graffle
+++ b/docs/image_sources/fundamentals/fragments.graffle
diff --git a/docs/html/images/fundamentals/restore_instance.graffle b/docs/image_sources/fundamentals/restore_instance.graffle
index 7489aeb..7489aeb 100644
--- a/docs/html/images/fundamentals/restore_instance.graffle
+++ b/docs/image_sources/fundamentals/restore_instance.graffle
diff --git a/docs/html/images/fundamentals/service_lifecycle.graffle b/docs/image_sources/fundamentals/service_lifecycle.graffle
index 73a17a2..73a17a2 100644
--- a/docs/html/images/fundamentals/service_lifecycle.graffle
+++ b/docs/image_sources/fundamentals/service_lifecycle.graffle
diff --git a/docs/html/images/providers/datamodel.graffle b/docs/image_sources/providers/datamodel.graffle
index f8d730f..f8d730f 100644
--- a/docs/html/images/providers/datamodel.graffle
+++ b/docs/image_sources/providers/datamodel.graffle
diff --git a/docs/html/images/resources/res-selection-flowchart.graffle b/docs/image_sources/resources/res-selection-flowchart.graffle
index 2d64735..2d64735 100644
--- a/docs/html/images/resources/res-selection-flowchart.graffle
+++ b/docs/image_sources/resources/res-selection-flowchart.graffle
diff --git a/docs/html/images/resources/resource_devices_diagram.graffle b/docs/image_sources/resources/resource_devices_diagram.graffle
index ab71dd1..ab71dd1 100644
--- a/docs/html/images/resources/resource_devices_diagram.graffle
+++ b/docs/image_sources/resources/resource_devices_diagram.graffle
diff --git a/docs/html/images/rs_compute.graffle b/docs/image_sources/rs_compute.graffle
index 3fa8c67..3fa8c67 100644
--- a/docs/html/images/rs_compute.graffle
+++ b/docs/image_sources/rs_compute.graffle
diff --git a/docs/html/images/rs_graphics.graffle b/docs/image_sources/rs_graphics.graffle
index 5dee4c6..5dee4c6 100644
--- a/docs/html/images/rs_graphics.graffle
+++ b/docs/image_sources/rs_graphics.graffle
diff --git a/docs/html/images/rs_overview.graffle b/docs/image_sources/rs_overview.graffle
index 5613744..5613744 100644
--- a/docs/html/images/rs_overview.graffle
+++ b/docs/image_sources/rs_overview.graffle
diff --git a/docs/html/images/training/basics/basic-lifecycle.graffle/QuickLook/Preview.pdf b/docs/image_sources/training/basics/basic-lifecycle.graffle/QuickLook/Preview.pdf
index aa97f22..aa97f22 100644
--- a/docs/html/images/training/basics/basic-lifecycle.graffle/QuickLook/Preview.pdf
+++ b/docs/image_sources/training/basics/basic-lifecycle.graffle/QuickLook/Preview.pdf
Binary files differ
diff --git a/docs/html/images/training/basics/basic-lifecycle.graffle/QuickLook/Thumbnail.tiff b/docs/image_sources/training/basics/basic-lifecycle.graffle/QuickLook/Thumbnail.tiff
index 55c1157..55c1157 100644
--- a/docs/html/images/training/basics/basic-lifecycle.graffle/QuickLook/Thumbnail.tiff
+++ b/docs/image_sources/training/basics/basic-lifecycle.graffle/QuickLook/Thumbnail.tiff
Binary files differ
diff --git a/docs/html/images/training/basics/basic-lifecycle.graffle/data.plist b/docs/image_sources/training/basics/basic-lifecycle.graffle/data.plist
index 28c03f5..28c03f5 100644
--- a/docs/html/images/training/basics/basic-lifecycle.graffle/data.plist
+++ b/docs/image_sources/training/basics/basic-lifecycle.graffle/data.plist
diff --git a/docs/html/images/training/basics/basic-lifecycle.graffle/image1.png b/docs/image_sources/training/basics/basic-lifecycle.graffle/image1.png
index cc606c9..cc606c9 100644
--- a/docs/html/images/training/basics/basic-lifecycle.graffle/image1.png
+++ b/docs/image_sources/training/basics/basic-lifecycle.graffle/image1.png
Binary files differ
diff --git a/docs/html/images/training/basic-simple-screen-mock.graffle/QuickLook/Preview.pdf b/docs/image_sources/training/basics/basic-simple-screen-mock.graffle/QuickLook/Preview.pdf
index 192bb8d..192bb8d 100644
--- a/docs/html/images/training/basic-simple-screen-mock.graffle/QuickLook/Preview.pdf
+++ b/docs/image_sources/training/basics/basic-simple-screen-mock.graffle/QuickLook/Preview.pdf
Binary files differ
diff --git a/docs/html/images/training/basic-simple-screen-mock.graffle/QuickLook/Thumbnail.tiff b/docs/image_sources/training/basics/basic-simple-screen-mock.graffle/QuickLook/Thumbnail.tiff
index 85dd23d..85dd23d 100644
--- a/docs/html/images/training/basic-simple-screen-mock.graffle/QuickLook/Thumbnail.tiff
+++ b/docs/image_sources/training/basics/basic-simple-screen-mock.graffle/QuickLook/Thumbnail.tiff
Binary files differ
diff --git a/docs/html/images/training/basic-simple-screen-mock.graffle/data.plist b/docs/image_sources/training/basics/basic-simple-screen-mock.graffle/data.plist
index 3c391df..3c391df 100644
--- a/docs/html/images/training/basic-simple-screen-mock.graffle/data.plist
+++ b/docs/image_sources/training/basics/basic-simple-screen-mock.graffle/data.plist
diff --git a/docs/html/images/training/basic-simple-screen-mock.graffle/image1.png b/docs/image_sources/training/basics/basic-simple-screen-mock.graffle/image1.png
index 80baf14..80baf14 100644
--- a/docs/html/images/training/basic-simple-screen-mock.graffle/image1.png
+++ b/docs/image_sources/training/basics/basic-simple-screen-mock.graffle/image1.png
Binary files differ
diff --git a/docs/html/images/training/basic-simple-screen-mock.graffle/image2.png b/docs/image_sources/training/basics/basic-simple-screen-mock.graffle/image2.png
index f478d16..f478d16 100644
--- a/docs/html/images/training/basic-simple-screen-mock.graffle/image2.png
+++ b/docs/image_sources/training/basics/basic-simple-screen-mock.graffle/image2.png
Binary files differ
diff --git a/docs/html/images/training/basics/fragments-screen-mock.graffle/QuickLook/Preview.pdf b/docs/image_sources/training/fragments-screen-mock.graffle/QuickLook/Preview.pdf
index 19ccd0f..19ccd0f 100644
--- a/docs/html/images/training/basics/fragments-screen-mock.graffle/QuickLook/Preview.pdf
+++ b/docs/image_sources/training/fragments-screen-mock.graffle/QuickLook/Preview.pdf
Binary files differ
diff --git a/docs/html/images/training/basics/fragments-screen-mock.graffle/QuickLook/Thumbnail.tiff b/docs/image_sources/training/fragments-screen-mock.graffle/QuickLook/Thumbnail.tiff
index 8d5c9c6..8d5c9c6 100644
--- a/docs/html/images/training/basics/fragments-screen-mock.graffle/QuickLook/Thumbnail.tiff
+++ b/docs/image_sources/training/fragments-screen-mock.graffle/QuickLook/Thumbnail.tiff
Binary files differ
diff --git a/docs/html/images/training/basics/fragments-screen-mock.graffle/data.plist b/docs/image_sources/training/fragments-screen-mock.graffle/data.plist
index 5602c16..5602c16 100644
--- a/docs/html/images/training/basics/fragments-screen-mock.graffle/data.plist
+++ b/docs/image_sources/training/fragments-screen-mock.graffle/data.plist
diff --git a/docs/html/images/training/basics/fragments-screen-mock.graffle/image1.png b/docs/image_sources/training/fragments-screen-mock.graffle/image1.png
index 80baf14..80baf14 100644
--- a/docs/html/images/training/basics/fragments-screen-mock.graffle/image1.png
+++ b/docs/image_sources/training/fragments-screen-mock.graffle/image1.png
Binary files differ
diff --git a/docs/html/images/training/basics/fragments-screen-mock.graffle/image2.png b/docs/image_sources/training/fragments-screen-mock.graffle/image2.png
index f478d16..f478d16 100644
--- a/docs/html/images/training/basics/fragments-screen-mock.graffle/image2.png
+++ b/docs/image_sources/training/fragments-screen-mock.graffle/image2.png
Binary files differ
diff --git a/docs/html/images/ui/actionbar-navigate-up.xcf b/docs/image_sources/ui/actionbar-navigate-up.xcf
index bf1849a..bf1849a 100644
--- a/docs/html/images/ui/actionbar-navigate-up.xcf
+++ b/docs/image_sources/ui/actionbar-navigate-up.xcf
Binary files differ
diff --git a/graphics/java/android/graphics/drawable/LayerDrawable.java b/graphics/java/android/graphics/drawable/LayerDrawable.java
index 0351b71..dd692c6 100644
--- a/graphics/java/android/graphics/drawable/LayerDrawable.java
+++ b/graphics/java/android/graphics/drawable/LayerDrawable.java
@@ -575,10 +575,6 @@ public class LayerDrawable extends Drawable implements Drawable.Callback {
@Override
public Drawable mutate() {
if (!mMutated && super.mutate() == this) {
- if (!mLayerState.canConstantState()) {
- throw new IllegalStateException("One or more children of this LayerDrawable does " +
- "not have constant state; this drawable cannot be mutated.");
- }
mLayerState = new LayerState(mLayerState, this, null);
final ChildDrawable[] array = mLayerState.mChildren;
final int N = mLayerState.mNum;
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 6787705..bc30738 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -339,6 +339,7 @@ status_t OpenGLRenderer::invokeFunctors(Rect& dirty) {
size_t count = mFunctors.size();
if (count > 0) {
+ interrupt();
SortedVector<Functor*> functors(mFunctors);
mFunctors.clear();
@@ -365,10 +366,7 @@ status_t OpenGLRenderer::invokeFunctors(Rect& dirty) {
mFunctors.add(f);
}
}
- // protect against functors binding to other buffers
- mCaches.unbindMeshBuffer();
- mCaches.unbindIndicesBuffer();
- mCaches.activeTexture(0);
+ resume();
}
return result;
diff --git a/location/java/android/location/Geofence.java b/location/java/android/location/Geofence.java
index 5fef626..5de779a 100644
--- a/location/java/android/location/Geofence.java
+++ b/location/java/android/location/Geofence.java
@@ -38,8 +38,8 @@ public final class Geofence implements Parcelable {
/**
* Create a circular geofence (on a flat, horizontal plane).
*
- * @param latitude latitude in degrees
- * @param longitude longitude in degrees
+ * @param latitude latitude in degrees, between -90 and +90 inclusive
+ * @param longitude longitude in degrees, between -180 and +180 inclusive
* @param radius radius in meters
* @return a new geofence
* @throws IllegalArgumentException if any parameters are out of range
diff --git a/media/java/android/media/MediaRouter.java b/media/java/android/media/MediaRouter.java
index 8701f36..8b489b1 100644
--- a/media/java/android/media/MediaRouter.java
+++ b/media/java/android/media/MediaRouter.java
@@ -313,13 +313,25 @@ public class MediaRouter {
}
/**
- * Return the currently selected route for the given types
+ * Return the currently selected route for any of the given types
*
* @param type route types
* @return the selected route
*/
public RouteInfo getSelectedRoute(int type) {
- return sStatic.mSelectedRoute;
+ if (sStatic.mSelectedRoute != null &&
+ (sStatic.mSelectedRoute.mSupportedTypes & type) != 0) {
+ // If the selected route supports any of the types supplied, it's still considered
+ // 'selected' for that type.
+ return sStatic.mSelectedRoute;
+ } else if (type == ROUTE_TYPE_USER) {
+ // The caller specifically asked for a user route and the currently selected route
+ // doesn't qualify.
+ return null;
+ }
+ // If the above didn't match and we're not specifically asking for a user route,
+ // consider the default selected.
+ return sStatic.mDefaultAudioVideo;
}
/**
diff --git a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
index cf56cba..731a09c 100644
--- a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
+++ b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
@@ -80,7 +80,7 @@ import libcore.io.StructStatFs;
*/
public class DefaultContainerService extends IntentService {
private static final String TAG = "DefContainer";
- private static final boolean localLOGV = true;
+ private static final boolean localLOGV = false;
private static final String LIB_DIR_NAME = "lib";
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index b649b43..4e5fc37 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -21,6 +21,7 @@ import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
+import android.content.pm.IPackageManager;
import android.content.pm.PackageManager;
import android.content.res.XmlResourceParser;
import android.database.Cursor;
@@ -31,6 +32,8 @@ import android.media.AudioManager;
import android.media.AudioService;
import android.net.ConnectivityManager;
import android.os.Environment;
+import android.os.RemoteException;
+import android.os.ServiceManager;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.provider.Settings;
@@ -171,7 +174,15 @@ public class DatabaseHelper extends SQLiteOpenHelper {
db.execSQL("CREATE INDEX bookmarksIndex2 ON bookmarks (shortcut);");
// Populate bookmarks table with initial bookmarks
- loadBookmarks(db);
+ boolean onlyCore = false;
+ try {
+ onlyCore = IPackageManager.Stub.asInterface(ServiceManager.getService(
+ "package")).isOnlyCoreApps();
+ } catch (RemoteException e) {
+ }
+ if (!onlyCore) {
+ loadBookmarks(db);
+ }
// Load initial volume levels into DB
loadVolumeLevels(db);
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index 8086bbc..f18338a 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -455,8 +455,8 @@ public class SettingsProvider extends ContentProvider {
cache.setFullyMatchesDisk(false);
Log.d(TAG, "row count exceeds max cache entries for table " + table);
}
- Log.d(TAG, "cache for settings table '" + table + "' rows=" + rows + "; fullycached=" +
- cache.fullyMatchesDisk());
+ if (LOCAL_LOGV) Log.d(TAG, "cache for settings table '" + table
+ + "' rows=" + rows + "; fullycached=" + cache.fullyMatchesDisk());
}
} finally {
c.close();
diff --git a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
index 91fc67a..06696fe 100644
--- a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
@@ -33,6 +33,7 @@ import android.util.Slog;
public class StorageNotification extends StorageEventListener {
private static final String TAG = "StorageNotification";
+ private static final boolean DEBUG = false;
private static final boolean POP_UMS_ACTIVITY_ON_CONNECT = true;
@@ -70,8 +71,8 @@ public class StorageNotification extends StorageEventListener {
mStorageManager = (StorageManager) context.getSystemService(Context.STORAGE_SERVICE);
final boolean connected = mStorageManager.isUsbMassStorageConnected();
- Slog.d(TAG, String.format( "Startup with UMS connection %s (media state %s)", mUmsAvailable,
- Environment.getExternalStorageState()));
+ if (DEBUG) Slog.d(TAG, String.format( "Startup with UMS connection %s (media state %s)",
+ mUmsAvailable, Environment.getExternalStorageState()));
HandlerThread thr = new HandlerThread("SystemUI StorageNotification");
thr.start();
@@ -101,7 +102,8 @@ public class StorageNotification extends StorageEventListener {
*/
String st = Environment.getExternalStorageState();
- Slog.i(TAG, String.format("UMS connection changed to %s (media state %s)", connected, st));
+ if (DEBUG) Slog.i(TAG, String.format("UMS connection changed to %s (media state %s)",
+ connected, st));
if (connected && (st.equals(
Environment.MEDIA_REMOVED) || st.equals(Environment.MEDIA_CHECKING))) {
@@ -127,7 +129,7 @@ public class StorageNotification extends StorageEventListener {
}
private void onStorageStateChangedAsync(String path, String oldState, String newState) {
- Slog.i(TAG, String.format(
+ if (DEBUG) Slog.i(TAG, String.format(
"Media {%s} state changed from {%s} -> {%s}", path, oldState, newState));
if (newState.equals(Environment.MEDIA_SHARED)) {
/*
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java b/policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java
index 259f1e4..830471a 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java
@@ -31,6 +31,7 @@ import android.os.Looper;
import android.os.Message;
import android.os.PowerManager;
import android.os.RemoteException;
+import android.os.UserHandle;
import android.util.Log;
import android.view.View;
@@ -214,7 +215,7 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback {
handleServiceDisconnected();
break;
case MSG_UNLOCK:
- handleUnlock();
+ handleUnlock(msg.arg1);
break;
case MSG_CANCEL:
handleCancel();
@@ -297,11 +298,18 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback {
/**
* Stops the Face Unlock service and tells the device to grant access to the user.
*/
- void handleUnlock() {
+ void handleUnlock(int authenticatedUserId) {
if (DEBUG) Log.d(TAG, "handleUnlock()");
stop();
- mKeyguardScreenCallback.reportSuccessfulUnlockAttempt();
- mKeyguardScreenCallback.dismiss(true);
+ int currentUserId = mLockPatternUtils.getCurrentUser();
+ if (authenticatedUserId == currentUserId) {
+ if (DEBUG) Log.d(TAG, "Unlocking for user " + authenticatedUserId);
+ mKeyguardScreenCallback.reportSuccessfulUnlockAttempt();
+ mKeyguardScreenCallback.dismiss(true);
+ } else {
+ Log.d(TAG, "Ignoring unlock for authenticated user (" + authenticatedUserId +
+ ") because the current user is " + currentUserId);
+ }
}
/**
@@ -420,7 +428,8 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback {
*/
public void unlock() {
if (DEBUG) Log.d(TAG, "unlock()");
- mHandler.sendEmptyMessage(MSG_UNLOCK);
+ Message message = mHandler.obtainMessage(MSG_UNLOCK, UserHandle.getCallingUserId(), -1);
+ mHandler.sendMessage(message);
}
/**
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardCircleFramedDrawable.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardCircleFramedDrawable.java
index 29124c4..79b66f4 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardCircleFramedDrawable.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardCircleFramedDrawable.java
@@ -134,7 +134,6 @@ class KeyguardCircleFramedDrawable extends Drawable {
}
public void setScale(float scale) {
- Log.i("KFD", "scale: " + scale);
mScale = scale;
}
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardTransportControlView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardTransportControlView.java
index d284602..ffa88d5 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardTransportControlView.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardTransportControlView.java
@@ -189,7 +189,7 @@ public class KeyguardTransportControlView extends FrameLayout implements OnClick
public KeyguardTransportControlView(Context context, AttributeSet attrs) {
super(context, attrs);
- Log.v(TAG, "Create TCV " + this);
+ if (DEBUG) Log.v(TAG, "Create TCV " + this);
mAudioManager = new AudioManager(mContext);
mCurrentPlayState = RemoteControlClient.PLAYSTATE_NONE; // until we get a callback
mIRCD = new IRemoteControlDisplayWeak(mHandler);
diff --git a/services/java/com/android/server/AppWidgetService.java b/services/java/com/android/server/AppWidgetService.java
index 9590712..b94183c 100644
--- a/services/java/com/android/server/AppWidgetService.java
+++ b/services/java/com/android/server/AppWidgetService.java
@@ -281,8 +281,9 @@ class AppWidgetService extends IAppWidgetService.Stub
}
@Override
- public List<AppWidgetProviderInfo> getInstalledProviders() throws RemoteException {
- return getImplForUser(getCallingOrCurrentUserId()).getInstalledProviders();
+ public List<AppWidgetProviderInfo> getInstalledProviders(int categoryFilter)
+ throws RemoteException {
+ return getImplForUser(getCallingOrCurrentUserId()).getInstalledProviders(categoryFilter);
}
@Override
diff --git a/services/java/com/android/server/AppWidgetServiceImpl.java b/services/java/com/android/server/AppWidgetServiceImpl.java
index bba5192..854185d 100644
--- a/services/java/com/android/server/AppWidgetServiceImpl.java
+++ b/services/java/com/android/server/AppWidgetServiceImpl.java
@@ -859,11 +859,7 @@ class AppWidgetServiceImpl {
}
}
- public List<AppWidgetProviderInfo> getInstalledProviders() {
- return getInstalledProviders(AppWidgetProviderInfo.WIDGET_CATEGORY_HOME_SCREEN);
- }
-
- private List<AppWidgetProviderInfo> getInstalledProviders(int categoryFilter) {
+ public List<AppWidgetProviderInfo> getInstalledProviders(int categoryFilter) {
synchronized (mAppWidgetIds) {
ensureStateLoadedLocked();
final int N = mInstalledProviders.size();
diff --git a/services/java/com/android/server/BluetoothManagerService.java b/services/java/com/android/server/BluetoothManagerService.java
index 69ccbc7..ea91875 100755
--- a/services/java/com/android/server/BluetoothManagerService.java
+++ b/services/java/com/android/server/BluetoothManagerService.java
@@ -775,8 +775,18 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
// Send BT state broadcast to update
// the BT icon correctly
- bluetoothStateChangeHandler(BluetoothAdapter.STATE_ON,
- BluetoothAdapter.STATE_TURNING_OFF);
+ if ((mState == BluetoothAdapter.STATE_TURNING_ON) ||
+ (mState == BluetoothAdapter.STATE_ON)) {
+ bluetoothStateChangeHandler(BluetoothAdapter.STATE_ON,
+ BluetoothAdapter.STATE_TURNING_OFF);
+ mState = BluetoothAdapter.STATE_TURNING_OFF;
+ }
+ if (mState == BluetoothAdapter.STATE_TURNING_OFF) {
+ bluetoothStateChangeHandler(BluetoothAdapter.STATE_TURNING_OFF,
+ BluetoothAdapter.STATE_OFF);
+ }
+
+ mHandler.removeMessages(MESSAGE_BLUETOOTH_STATE_CHANGE);
mState = BluetoothAdapter.STATE_OFF;
}
break;
@@ -820,20 +830,33 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
}
}
}
- mHandler.removeMessages(MESSAGE_BLUETOOTH_STATE_CHANGE);
+
+ if (mState == BluetoothAdapter.STATE_TURNING_OFF) {
+ // MESSAGE_USER_SWITCHED happened right after MESSAGE_ENABLE
+ bluetoothStateChangeHandler(mState, BluetoothAdapter.STATE_OFF);
+ mState = BluetoothAdapter.STATE_OFF;
+ }
+ if (mState == BluetoothAdapter.STATE_OFF) {
+ bluetoothStateChangeHandler(mState, BluetoothAdapter.STATE_TURNING_ON);
+ mState = BluetoothAdapter.STATE_TURNING_ON;
+ }
waitForOnOff(true, false);
- bluetoothStateChangeHandler(mState, BluetoothAdapter.STATE_ON);
+ if (mState == BluetoothAdapter.STATE_TURNING_ON) {
+ bluetoothStateChangeHandler(mState, BluetoothAdapter.STATE_ON);
+ }
// disable
handleDisable(false);
+ // Pbap service need receive STATE_TURNING_OFF intent to close
+ bluetoothStateChangeHandler(BluetoothAdapter.STATE_ON,
+ BluetoothAdapter.STATE_TURNING_OFF);
waitForOnOff(false, true);
- bluetoothStateChangeHandler(BluetoothAdapter.STATE_ON,
+ bluetoothStateChangeHandler(BluetoothAdapter.STATE_TURNING_OFF,
BluetoothAdapter.STATE_OFF);
- mState = BluetoothAdapter.STATE_OFF;
sendBluetoothServiceDownCallback();
synchronized (mConnection) {
if (mBluetooth != null) {
@@ -844,6 +867,8 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
}
SystemClock.sleep(100);
+ mHandler.removeMessages(MESSAGE_BLUETOOTH_STATE_CHANGE);
+ mState = BluetoothAdapter.STATE_OFF;
// enable
handleEnable(false, mQuietEnable);
} else if (mBinding || mBluetooth != null) {
@@ -982,14 +1007,9 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
sendBluetoothStateCallback(isUp);
//If Bluetooth is off, send service down event to proxy objects, and unbind
- if (!isUp) {
- //Only unbind with mEnable flag not set
- //For race condition: disable and enable back-to-back
- //Avoid unbind right after enable due to callback from disable
- if ((!mEnable) && (mBluetooth != null)) {
- sendBluetoothServiceDownCallback();
- unbindAndFinish();
- }
+ if (!isUp && canUnbindBluetoothService()) {
+ sendBluetoothServiceDownCallback();
+ unbindAndFinish();
}
}
@@ -1037,4 +1057,22 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
Log.e(TAG,"waitForOnOff time out");
return false;
}
+
+ private boolean canUnbindBluetoothService() {
+ synchronized(mConnection) {
+ //Only unbind with mEnable flag not set
+ //For race condition: disable and enable back-to-back
+ //Avoid unbind right after enable due to callback from disable
+ //Only unbind with Bluetooth at OFF state
+ //Only unbind without any MESSAGE_BLUETOOTH_STATE_CHANGE message
+ try {
+ if (mEnable || (mBluetooth == null)) return false;
+ if (mHandler.hasMessages(MESSAGE_BLUETOOTH_STATE_CHANGE)) return false;
+ return (mBluetooth.getState() == BluetoothAdapter.STATE_OFF);
+ } catch (RemoteException e) {
+ Log.e(TAG, "getState()", e);
+ }
+ }
+ return false;
+ }
}
diff --git a/services/java/com/android/server/BootReceiver.java b/services/java/com/android/server/BootReceiver.java
index 7e1de5a..235c662 100644
--- a/services/java/com/android/server/BootReceiver.java
+++ b/services/java/com/android/server/BootReceiver.java
@@ -20,11 +20,14 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
+import android.content.pm.IPackageManager;
import android.os.Build;
import android.os.DropBoxManager;
import android.os.FileObserver;
import android.os.FileUtils;
import android.os.RecoverySystem;
+import android.os.RemoteException;
+import android.os.ServiceManager;
import android.os.SystemProperties;
import android.provider.Downloads;
import android.util.Slog;
@@ -69,7 +72,15 @@ public class BootReceiver extends BroadcastReceiver {
Slog.e(TAG, "Can't log boot events", e);
}
try {
- removeOldUpdatePackages(context);
+ boolean onlyCore = false;
+ try {
+ onlyCore = IPackageManager.Stub.asInterface(ServiceManager.getService(
+ "package")).isOnlyCoreApps();
+ } catch (RemoteException e) {
+ }
+ if (!onlyCore) {
+ removeOldUpdatePackages(context);
+ }
} catch (Exception e) {
Slog.e(TAG, "Can't remove old update packages", e);
}
diff --git a/services/java/com/android/server/DevicePolicyManagerService.java b/services/java/com/android/server/DevicePolicyManagerService.java
index 5ba71a4..6a62809 100644
--- a/services/java/com/android/server/DevicePolicyManagerService.java
+++ b/services/java/com/android/server/DevicePolicyManagerService.java
@@ -146,8 +146,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
getSendingUserId());
if (Intent.ACTION_BOOT_COMPLETED.equals(action)
|| ACTION_EXPIRED_PASSWORD_NOTIFICATION.equals(action)) {
- Slog.v(TAG, "Sending password expiration notifications for action " + action
- + " for user " + userHandle);
+ if (DBG) Slog.v(TAG, "Sending password expiration notifications for action "
+ + action + " for user " + userHandle);
mHandler.post(new Runnable() {
public void run() {
handlePasswordExpirationNotification(getUserData(userHandle));
@@ -468,7 +468,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
private void handlePackagesChanged(int userHandle) {
boolean removed = false;
- Slog.d(TAG, "Handling package changes for user " + userHandle);
+ if (DBG) Slog.d(TAG, "Handling package changes for user " + userHandle);
DevicePolicyData policy = getUserData(userHandle);
IPackageManager pm = AppGlobals.getPackageManager();
for (int i = policy.mAdminList.size() - 1; i >= 0; i--) {
@@ -982,7 +982,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
long token = Binder.clearCallingIdentity();
try {
String value = cameraDisabled ? "1" : "0";
- Slog.v(TAG, "Change in camera state ["
+ if (DBG) Slog.v(TAG, "Change in camera state ["
+ SYSTEM_PROP_DISABLE_CAMERA + "] = " + value);
SystemProperties.set(SYSTEM_PROP_DISABLE_CAMERA, value);
} finally {
@@ -1682,10 +1682,9 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
}
int neededNumbers = getPasswordMinimumNumeric(null, userHandle);
if (numbers < neededNumbers) {
- Slog
- .w(TAG, "resetPassword: number of numerical digits " + numbers
- + " does not meet required number of numerical digits "
- + neededNumbers);
+ Slog.w(TAG, "resetPassword: number of numerical digits " + numbers
+ + " does not meet required number of numerical digits "
+ + neededNumbers);
return false;
}
int neededLowerCase = getPasswordMinimumLowerCase(null, userHandle);
diff --git a/services/java/com/android/server/EntropyMixer.java b/services/java/com/android/server/EntropyMixer.java
index b63a70e..4632374 100644
--- a/services/java/com/android/server/EntropyMixer.java
+++ b/services/java/com/android/server/EntropyMixer.java
@@ -17,6 +17,7 @@
package com.android.server;
import java.io.File;
+import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
@@ -97,8 +98,10 @@ public class EntropyMixer extends Binder {
private void loadInitialEntropy() {
try {
RandomBlock.fromFile(entropyFile).toFile(randomDevice, false);
+ } catch (FileNotFoundException e) {
+ Slog.w(TAG, "No existing entropy file -- first boot?");
} catch (IOException e) {
- Slog.w(TAG, "unable to load initial entropy (first boot?)", e);
+ Slog.w(TAG, "Failure loading existing entropy file", e);
}
}
@@ -106,7 +109,7 @@ public class EntropyMixer extends Binder {
try {
RandomBlock.fromFile(randomDevice).toFile(entropyFile, true);
} catch (IOException e) {
- Slog.w(TAG, "unable to write entropy", e);
+ Slog.w(TAG, "Unable to write entropy", e);
}
}
diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java
index ad28a36..2e0c977 100644
--- a/services/java/com/android/server/MountService.java
+++ b/services/java/com/android/server/MountService.java
@@ -105,9 +105,9 @@ class MountService extends IMountService.Stub
// TODO: listen for user creation/deletion
- private static final boolean LOCAL_LOGD = true;
- private static final boolean DEBUG_UNMOUNT = true;
- private static final boolean DEBUG_EVENTS = true;
+ private static final boolean LOCAL_LOGD = false;
+ private static final boolean DEBUG_UNMOUNT = false;
+ private static final boolean DEBUG_EVENTS = false;
private static final boolean DEBUG_OBB = false;
// Disable this since it messes up long-running cryptfs operations.
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 894c4d0..55885e6 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -1005,7 +1005,7 @@ class ServerThread extends Thread {
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.android.systemui",
"com.android.systemui.SystemUIService"));
- Slog.d(TAG, "Starting service: " + intent);
+ //Slog.d(TAG, "Starting service: " + intent);
context.startServiceAsUser(intent, UserHandle.OWNER);
}
}
diff --git a/services/java/com/android/server/TelephonyRegistry.java b/services/java/com/android/server/TelephonyRegistry.java
index 26684de..17260d5 100644
--- a/services/java/com/android/server/TelephonyRegistry.java
+++ b/services/java/com/android/server/TelephonyRegistry.java
@@ -139,7 +139,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
public void handleMessage(Message msg) {
switch (msg.what) {
case MSG_USER_SWITCHED: {
- Slog.d(TAG, "MSG_USER_SWITCHED userId=" + msg.arg1);
+ if (DBG) Slog.d(TAG, "MSG_USER_SWITCHED userId=" + msg.arg1);
TelephonyRegistry.this.notifyCellLocation(mCellLocation);
break;
}
diff --git a/services/java/com/android/server/WallpaperManagerService.java b/services/java/com/android/server/WallpaperManagerService.java
index 82dbf54..21a1956 100644
--- a/services/java/com/android/server/WallpaperManagerService.java
+++ b/services/java/com/android/server/WallpaperManagerService.java
@@ -1096,6 +1096,8 @@ class WallpaperManagerService extends IWallpaperManager.Stub {
}
} while (type != XmlPullParser.END_DOCUMENT);
success = true;
+ } catch (FileNotFoundException e) {
+ Slog.w(TAG, "no current wallpaper -- first boot?");
} catch (NullPointerException e) {
Slog.w(TAG, "failed parsing " + file + " " + e);
} catch (NumberFormatException e) {
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 82c9030..5fb2ec9 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -21,7 +21,6 @@ import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import com.android.internal.R;
import com.android.internal.os.BatteryStatsImpl;
import com.android.internal.os.ProcessStats;
-import com.android.internal.widget.LockPatternUtils;
import com.android.server.AttributeCache;
import com.android.server.IntentResolver;
import com.android.server.ProcessMap;
@@ -7935,7 +7934,7 @@ public final class ActivityManagerService extends ActivityManagerNative
}
}, 0, null, null,
android.Manifest.permission.INTERACT_ACROSS_USERS,
- false, false, MY_PID, Process.SYSTEM_UID, UserHandle.USER_ALL);
+ true, false, MY_PID, Process.SYSTEM_UID, UserHandle.USER_ALL);
} finally {
Binder.restoreCallingIdentity(ident);
}
@@ -14257,7 +14256,7 @@ public final class ActivityManagerService extends ActivityManagerNative
}
}, 0, null, null,
android.Manifest.permission.INTERACT_ACROSS_USERS,
- false, false, MY_PID, Process.SYSTEM_UID, UserHandle.USER_ALL);
+ true, false, MY_PID, Process.SYSTEM_UID, UserHandle.USER_ALL);
}
}
} finally {
@@ -14480,7 +14479,7 @@ public final class ActivityManagerService extends ActivityManagerNative
long ident = Binder.clearCallingIdentity();
try {
// We are going to broadcast ACTION_USER_STOPPING and then
- // once that is down send a final ACTION_SHUTDOWN and then
+ // once that is done send a final ACTION_SHUTDOWN and then
// stop the user.
final Intent stoppingIntent = new Intent(Intent.ACTION_USER_STOPPING);
stoppingIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
diff --git a/services/java/com/android/server/display/WifiDisplayController.java b/services/java/com/android/server/display/WifiDisplayController.java
index 886e049..a83675e 100644
--- a/services/java/com/android/server/display/WifiDisplayController.java
+++ b/services/java/com/android/server/display/WifiDisplayController.java
@@ -30,6 +30,7 @@ import android.media.AudioManager;
import android.media.RemoteDisplay;
import android.net.NetworkInfo;
import android.net.Uri;
+import android.net.wifi.WpsInfo;
import android.net.wifi.p2p.WifiP2pConfig;
import android.net.wifi.p2p.WifiP2pDevice;
import android.net.wifi.p2p.WifiP2pDeviceList;
@@ -572,6 +573,16 @@ final class WifiDisplayController implements DumpUtils.Dump {
mConnectingDevice = mDesiredDevice;
WifiP2pConfig config = new WifiP2pConfig();
+ WpsInfo wps = new WpsInfo();
+ if (mConnectingDevice.wpsPbcSupported()) {
+ wps.setup = WpsInfo.PBC;
+ } else if (mConnectingDevice.wpsDisplaySupported()) {
+ // We do keypad if peer does display
+ wps.setup = WpsInfo.KEYPAD;
+ } else {
+ wps.setup = WpsInfo.DISPLAY;
+ }
+ config.wps = wps;
config.deviceAddress = mConnectingDevice.deviceAddress;
// Helps with STA & P2P concurrency
config.groupOwnerIntent = WifiP2pConfig.MIN_GROUP_OWNER_INTENT;
diff --git a/services/java/com/android/server/dreams/DreamManagerService.java b/services/java/com/android/server/dreams/DreamManagerService.java
index 1f40176..7e4a554 100644
--- a/services/java/com/android/server/dreams/DreamManagerService.java
+++ b/services/java/com/android/server/dreams/DreamManagerService.java
@@ -47,7 +47,7 @@ import libcore.util.Objects;
* @hide
*/
public final class DreamManagerService extends IDreamManager.Stub {
- private static final boolean DEBUG = true;
+ private static final boolean DEBUG = false;
private static final String TAG = "DreamManagerService";
private final Object mLock = new Object();
@@ -292,7 +292,7 @@ public final class DreamManagerService extends IDreamManager.Stub {
stopDreamLocked();
- Slog.i(TAG, "Entering dreamland.");
+ if (DEBUG) Slog.i(TAG, "Entering dreamland.");
final Binder newToken = new Binder();
mCurrentDreamToken = newToken;
@@ -310,7 +310,7 @@ public final class DreamManagerService extends IDreamManager.Stub {
private void stopDreamLocked() {
if (mCurrentDreamToken != null) {
- Slog.i(TAG, "Leaving dreamland.");
+ if (DEBUG) Slog.i(TAG, "Leaving dreamland.");
cleanupDreamLocked();
diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java
index 83672c5..fd649a1 100644
--- a/services/java/com/android/server/pm/PackageManagerService.java
+++ b/services/java/com/android/server/pm/PackageManagerService.java
@@ -1020,7 +1020,8 @@ public class PackageManagerService extends IPackageManager.Stub {
readPermissions();
- mRestoredSettings = mSettings.readLPw(sUserManager.getUsers(false));
+ mRestoredSettings = mSettings.readLPw(sUserManager.getUsers(false),
+ mSdkVersion, mOnlyCore);
long startTime = SystemClock.uptimeMillis();
EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_PMS_SYSTEM_SCAN_START,
@@ -1320,6 +1321,10 @@ public class PackageManagerService extends IPackageManager.Stub {
return !mRestoredSettings;
}
+ public boolean isOnlyCoreApps() {
+ return mOnlyCore;
+ }
+
private String getRequiredVerifierLPr() {
final Intent verification = new Intent(Intent.ACTION_PACKAGE_NEEDS_VERIFICATION);
final List<ResolveInfo> receivers = queryIntentReceivers(verification, PACKAGE_MIME_TYPE,
@@ -4113,7 +4118,7 @@ public class PackageManagerService extends IPackageManager.Stub {
}
}
- Slog.i(TAG, "Linking native library dir for " + path);
+ if (DEBUG_INSTALL) Slog.i(TAG, "Linking native library dir for " + path);
final int[] userIds = sUserManager.getUserIds();
synchronized (mInstallLock) {
for (int userId : userIds) {
@@ -6301,20 +6306,21 @@ public class PackageManagerService extends IPackageManager.Stub {
final File packageFile;
if (encryptionParams != null || !"file".equals(mPackageURI.getScheme())) {
- ParcelFileDescriptor out = null;
-
mTempPackage = createTempPackageFile(mDrmAppPrivateInstallDir);
if (mTempPackage != null) {
+ ParcelFileDescriptor out;
try {
out = ParcelFileDescriptor.open(mTempPackage,
ParcelFileDescriptor.MODE_READ_WRITE);
} catch (FileNotFoundException e) {
+ out = null;
Slog.e(TAG, "Failed to create temporary file for : " + mPackageURI);
}
// Make a temporary file for decryption.
ret = mContainerService
.copyResource(mPackageURI, encryptionParams, out);
+ IoUtils.closeQuietly(out);
packageFile = mTempPackage;
@@ -9079,10 +9085,8 @@ public class PackageManagerService extends IPackageManager.Stub {
if (removed.size() > 0) {
for (int j=0; j<removed.size(); j++) {
PreferredActivity pa = removed.get(i);
- RuntimeException here = new RuntimeException("here");
- here.fillInStackTrace();
Slog.w(TAG, "Removing dangling preferred activity: "
- + pa.mPref.mComponent, here);
+ + pa.mPref.mComponent);
pir.removeFilter(pa);
}
mSettings.writePackageRestrictionsLPr(
diff --git a/services/java/com/android/server/pm/Settings.java b/services/java/com/android/server/pm/Settings.java
index 94494ae..06f11bc 100644
--- a/services/java/com/android/server/pm/Settings.java
+++ b/services/java/com/android/server/pm/Settings.java
@@ -1556,7 +1556,7 @@ final class Settings {
}
}
- boolean readLPw(List<UserInfo> users) {
+ boolean readLPw(List<UserInfo> users, int sdkVersion, boolean onlyCore) {
FileInputStream str = null;
if (mBackupSettingsFilename.exists()) {
try {
@@ -1586,7 +1586,10 @@ final class Settings {
mReadMessages.append("No settings file found\n");
PackageManagerService.reportSettingsProblem(Log.INFO,
"No settings file; creating initial state");
- readDefaultPreferredAppsLPw(0);
+ if (!onlyCore) {
+ readDefaultPreferredAppsLPw(0);
+ }
+ mInternalSdkPlatform = mExternalSdkPlatform = sdkVersion;
return false;
}
str = new FileInputStream(mSettingsFilename);
diff --git a/services/java/com/android/server/power/RampAnimator.java b/services/java/com/android/server/power/RampAnimator.java
index 6f063c3..4a4f080 100644
--- a/services/java/com/android/server/power/RampAnimator.java
+++ b/services/java/com/android/server/power/RampAnimator.java
@@ -102,20 +102,26 @@ final class RampAnimator<T> {
final long frameTimeNanos = mChoreographer.getFrameTimeNanos();
final float timeDelta = (frameTimeNanos - mLastFrameTimeNanos)
* 0.000000001f;
- final float amount = timeDelta * mRate / ValueAnimator.getDurationScale();
mLastFrameTimeNanos = frameTimeNanos;
// Advance the animated value towards the target at the specified rate
// and clamp to the target. This gives us the new current value but
// we keep the animated value around to allow for fractional increments
// towards the target.
- int oldCurrentValue = mCurrentValue;
- if (mTargetValue > mCurrentValue) {
- mAnimatedValue = Math.min(mAnimatedValue + amount, mTargetValue);
+ final float scale = ValueAnimator.getDurationScale();
+ if (scale == 0) {
+ // Animation off.
+ mAnimatedValue = mTargetValue;
} else {
- mAnimatedValue = Math.max(mAnimatedValue - amount, mTargetValue);
+ final float amount = timeDelta * mRate / scale;
+ if (mTargetValue > mCurrentValue) {
+ mAnimatedValue = Math.min(mAnimatedValue + amount, mTargetValue);
+ } else {
+ mAnimatedValue = Math.max(mAnimatedValue - amount, mTargetValue);
+ }
}
- mCurrentValue = (int)Math.round(mAnimatedValue);
+ final int oldCurrentValue = mCurrentValue;
+ mCurrentValue = Math.round(mAnimatedValue);
if (oldCurrentValue != mCurrentValue) {
mProperty.setValue(mObject, mCurrentValue);
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index c3fc19c..d0ab917 100755
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -821,7 +821,7 @@ public class WindowManagerService extends IWindowManager.Stub
mTransitionAnimationScale = Settings.Global.getFloat(context.getContentResolver(),
Settings.Global.TRANSITION_ANIMATION_SCALE, mTransitionAnimationScale);
setAnimatorDurationScale(Settings.Global.getFloat(context.getContentResolver(),
- Settings.Global.ANIMATOR_DURATION_SCALE, mTransitionAnimationScale));
+ Settings.Global.ANIMATOR_DURATION_SCALE, mAnimatorDurationScale));
// Track changes to DevicePolicyManager state so we can enable/disable keyguard.
IntentFilter filter = new IntentFilter();
diff --git a/services/tests/servicestests/src/com/android/server/pm/PackageManagerSettingsTests.java b/services/tests/servicestests/src/com/android/server/pm/PackageManagerSettingsTests.java
index 5f93e6f..0f531b7 100644
--- a/services/tests/servicestests/src/com/android/server/pm/PackageManagerSettingsTests.java
+++ b/services/tests/servicestests/src/com/android/server/pm/PackageManagerSettingsTests.java
@@ -139,7 +139,7 @@ public class PackageManagerSettingsTests extends AndroidTestCase {
// Write the package files and make sure they're parsed properly the first time
writeOldFiles();
Settings settings = new Settings(getContext(), getContext().getFilesDir());
- assertEquals(true, settings.readLPw(null));
+ assertEquals(true, settings.readLPw(null, 0, false));
assertNotNull(settings.peekPackageLPr(PACKAGE_NAME_3));
assertNotNull(settings.peekPackageLPr(PACKAGE_NAME_1));
@@ -157,11 +157,11 @@ public class PackageManagerSettingsTests extends AndroidTestCase {
// Write the package files and make sure they're parsed properly the first time
writeOldFiles();
Settings settings = new Settings(getContext(), getContext().getFilesDir());
- assertEquals(true, settings.readLPw(null));
+ assertEquals(true, settings.readLPw(null, 0, false));
// Create Settings again to make it read from the new files
settings = new Settings(getContext(), getContext().getFilesDir());
- assertEquals(true, settings.readLPw(null));
+ assertEquals(true, settings.readLPw(null, 0, false));
PackageSetting ps = settings.peekPackageLPr(PACKAGE_NAME_2);
assertEquals(COMPONENT_ENABLED_STATE_DISABLED_USER, ps.getEnabled(0));
@@ -172,7 +172,7 @@ public class PackageManagerSettingsTests extends AndroidTestCase {
// Write the package files and make sure they're parsed properly the first time
writeOldFiles();
Settings settings = new Settings(getContext(), getContext().getFilesDir());
- assertEquals(true, settings.readLPw(null));
+ assertEquals(true, settings.readLPw(null, 0, false));
// Enable/Disable a package
PackageSetting ps = settings.peekPackageLPr(PACKAGE_NAME_1);
diff --git a/tools/aapt/Android.mk b/tools/aapt/Android.mk
index d9b0681..5b88669 100644
--- a/tools/aapt/Android.mk
+++ b/tools/aapt/Android.mk
@@ -20,6 +20,7 @@ LOCAL_SRC_FILES := \
StringPool.cpp \
XMLNode.cpp \
ResourceFilter.cpp \
+ ResourceIdCache.cpp \
ResourceTable.cpp \
Images.cpp \
Resource.cpp \
diff --git a/tools/aapt/ResourceIdCache.cpp b/tools/aapt/ResourceIdCache.cpp
new file mode 100644
index 0000000..e03f4f6
--- /dev/null
+++ b/tools/aapt/ResourceIdCache.cpp
@@ -0,0 +1,107 @@
+//
+// Copyright 2012 The Android Open Source Project
+//
+// Manage a resource ID cache.
+
+#define LOG_TAG "ResourceIdCache"
+
+#include <utils/String16.h>
+#include <utils/Log.h>
+#include "ResourceIdCache.h"
+#include <map>
+using namespace std;
+
+
+static size_t mHits = 0;
+static size_t mMisses = 0;
+static size_t mCollisions = 0;
+
+static const size_t MAX_CACHE_ENTRIES = 2048;
+static const android::String16 TRUE16("1");
+static const android::String16 FALSE16("0");
+
+struct CacheEntry {
+ // concatenation of the relevant strings into a single instance
+ android::String16 hashedName;
+ uint32_t id;
+
+ CacheEntry() {}
+ CacheEntry(const android::String16& name, uint32_t resId) : hashedName(name), id(resId) { }
+};
+
+static map< uint32_t, CacheEntry > mIdMap;
+
+
+// djb2; reasonable choice for strings when collisions aren't particularly important
+static inline uint32_t hashround(uint32_t hash, int c) {
+ return ((hash << 5) + hash) + c; /* hash * 33 + c */
+}
+
+static uint32_t hash(const android::String16& hashableString) {
+ uint32_t hash = 5381;
+ const char16_t* str = hashableString.string();
+ while (int c = *str++) hash = hashround(hash, c);
+ return hash;
+}
+
+namespace android {
+
+static inline String16 makeHashableName(const android::String16& package,
+ const android::String16& type,
+ const android::String16& name,
+ bool onlyPublic) {
+ String16 hashable = String16(name);
+ hashable += type;
+ hashable += package;
+ hashable += (onlyPublic ? TRUE16 : FALSE16);
+ return hashable;
+}
+
+uint32_t ResourceIdCache::lookup(const android::String16& package,
+ const android::String16& type,
+ const android::String16& name,
+ bool onlyPublic) {
+ const String16 hashedName = makeHashableName(package, type, name, onlyPublic);
+ const uint32_t hashcode = hash(hashedName);
+ map<uint32_t, CacheEntry>::iterator item = mIdMap.find(hashcode);
+ if (item == mIdMap.end()) {
+ // cache miss
+ mMisses++;
+ return 0;
+ }
+
+ // legit match?
+ if (hashedName == (*item).second.hashedName) {
+ mHits++;
+ return (*item).second.id;
+ }
+
+ // collision
+ mCollisions++;
+ mIdMap.erase(hashcode);
+ return 0;
+}
+
+// returns the resource ID being stored, for callsite convenience
+uint32_t ResourceIdCache::store(const android::String16& package,
+ const android::String16& type,
+ const android::String16& name,
+ bool onlyPublic,
+ uint32_t resId) {
+ if (mIdMap.size() < MAX_CACHE_ENTRIES) {
+ const String16 hashedName = makeHashableName(package, type, name, onlyPublic);
+ const uint32_t hashcode = hash(hashedName);
+ mIdMap[hashcode] = CacheEntry(hashedName, resId);
+ }
+ return resId;
+}
+
+void ResourceIdCache::dump() {
+ printf("ResourceIdCache dump:\n");
+ printf("Size: %ld\n", mIdMap.size());
+ printf("Hits: %ld\n", mHits);
+ printf("Misses: %ld\n", mMisses);
+ printf("(Collisions: %ld)\n", mCollisions);
+}
+
+}
diff --git a/tools/aapt/ResourceIdCache.h b/tools/aapt/ResourceIdCache.h
new file mode 100644
index 0000000..65f7781
--- /dev/null
+++ b/tools/aapt/ResourceIdCache.h
@@ -0,0 +1,30 @@
+//
+// Copyright 2012 The Android Open Source Project
+//
+// Manage a resource ID cache.
+
+#ifndef RESOURCE_ID_CACHE_H
+#define RESOURCE_ID_CACHE_H
+
+namespace android {
+class android::String16;
+
+class ResourceIdCache {
+public:
+ static uint32_t lookup(const android::String16& package,
+ const android::String16& type,
+ const android::String16& name,
+ bool onlyPublic);
+
+ static uint32_t store(const android::String16& package,
+ const android::String16& type,
+ const android::String16& name,
+ bool onlyPublic,
+ uint32_t resId);
+
+ static void dump(void);
+};
+
+}
+
+#endif
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp
index 3d7b088..52ebaf0 100644
--- a/tools/aapt/ResourceTable.cpp
+++ b/tools/aapt/ResourceTable.cpp
@@ -8,6 +8,7 @@
#include "XMLNode.h"
#include "ResourceFilter.h"
+#include "ResourceIdCache.h"
#include <androidfw/ResourceTypes.h>
#include <utils/ByteOrder.h>
@@ -1998,6 +1999,9 @@ uint32_t ResourceTable::getResId(const String16& package,
const String16& name,
bool onlyPublic) const
{
+ uint32_t id = ResourceIdCache::lookup(package, type, name, onlyPublic);
+ if (id != 0) return id; // cache hit
+
sp<Package> p = mPackages.valueFor(package);
if (p == NULL) return 0;
@@ -2016,11 +2020,10 @@ uint32_t ResourceTable::getResId(const String16& package,
}
if (Res_INTERNALID(rid)) {
- return rid;
+ return ResourceIdCache::store(package, type, name, onlyPublic, rid);
}
- return Res_MAKEID(p->getAssignedId()-1,
- Res_GETTYPE(rid),
- Res_GETENTRY(rid));
+ return ResourceIdCache::store(package, type, name, onlyPublic,
+ Res_MAKEID(p->getAssignedId()-1, Res_GETTYPE(rid), Res_GETENTRY(rid)));
}
sp<Type> t = p->getTypes().valueFor(type);
@@ -2029,7 +2032,9 @@ uint32_t ResourceTable::getResId(const String16& package,
if (c == NULL) return 0;
int32_t ei = c->getEntryIndex();
if (ei < 0) return 0;
- return getResId(p, t, ei);
+
+ return ResourceIdCache::store(package, type, name, onlyPublic,
+ getResId(p, t, ei));
}
uint32_t ResourceTable::getResId(const String16& ref,