diff options
| -rw-r--r-- | core/java/android/app/ApplicationPackageManager.java | 37 | ||||
| -rw-r--r-- | opengl/libs/EGL/eglApi.cpp | 8 | ||||
| -rw-r--r-- | opengl/specs/README | 3 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java | 18 | ||||
| -rw-r--r-- | services/java/com/android/server/EventLogTags.logtags | 6 | ||||
| -rwxr-xr-x | services/java/com/android/server/NotificationManagerService.java | 9 | ||||
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 10 |
7 files changed, 60 insertions, 31 deletions
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java index 8ed7481cddd1..180a442f52c1 100644 --- a/core/java/android/app/ApplicationPackageManager.java +++ b/core/java/android/app/ApplicationPackageManager.java @@ -625,7 +625,7 @@ final class ApplicationPackageManager extends PackageManager { return info.activityInfo.loadIcon(this); } - throw new NameNotFoundException(intent.toURI()); + throw new NameNotFoundException(intent.toUri(0)); } @Override public Drawable getDefaultActivityIcon() { @@ -728,15 +728,22 @@ final class ApplicationPackageManager extends PackageManager { private Drawable getCachedIcon(ResourceName name) { synchronized (sSync) { - WeakReference<Drawable> wr = sIconCache.get(name); + WeakReference<Drawable.ConstantState> wr = sIconCache.get(name); if (DEBUG_ICONS) Log.v(TAG, "Get cached weak drawable ref for " + name + ": " + wr); if (wr != null) { // we have the activity - Drawable dr = wr.get(); - if (dr != null) { - if (DEBUG_ICONS) Log.v(TAG, "Get cached drawable for " - + name + ": " + dr); - return dr; + Drawable.ConstantState state = wr.get(); + if (state != null) { + if (DEBUG_ICONS) { + Log.v(TAG, "Get cached drawable state for " + name + ": " + state); + } + // Note: It's okay here to not use the newDrawable(Resources) variant + // of the API. The ConstantState comes from a drawable that was + // originally created by passing the proper app Resources instance + // which means the state should already contain the proper + // resources specific information (like density.) See + // BitmapDrawable.BitmapState for instance. + return state.newDrawable(); } // our entry has been purged sIconCache.remove(name); @@ -747,14 +754,12 @@ final class ApplicationPackageManager extends PackageManager { private void putCachedIcon(ResourceName name, Drawable dr) { synchronized (sSync) { - sIconCache.put(name, new WeakReference<Drawable>(dr)); - if (DEBUG_ICONS) Log.v(TAG, "Added cached drawable for " - + name + ": " + dr); + sIconCache.put(name, new WeakReference<Drawable.ConstantState>(dr.getConstantState())); + if (DEBUG_ICONS) Log.v(TAG, "Added cached drawable state for " + name + ": " + dr); } } - static final void handlePackageBroadcast(int cmd, String[] pkgList, - boolean hasPkgInfo) { + static void handlePackageBroadcast(int cmd, String[] pkgList, boolean hasPkgInfo) { boolean immediateGc = false; if (cmd == IApplicationThread.EXTERNAL_STORAGE_UNAVAILABLE) { immediateGc = true; @@ -1226,8 +1231,8 @@ final class ApplicationPackageManager extends PackageManager { private final IPackageManager mPM; private static final Object sSync = new Object(); - private static HashMap<ResourceName, WeakReference<Drawable> > sIconCache - = new HashMap<ResourceName, WeakReference<Drawable> >(); - private static HashMap<ResourceName, WeakReference<CharSequence> > sStringCache - = new HashMap<ResourceName, WeakReference<CharSequence> >(); + private static HashMap<ResourceName, WeakReference<Drawable.ConstantState>> sIconCache + = new HashMap<ResourceName, WeakReference<Drawable.ConstantState>>(); + private static HashMap<ResourceName, WeakReference<CharSequence>> sStringCache + = new HashMap<ResourceName, WeakReference<CharSequence>>(); } diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp index a63d5b054d00..2b0ed5dfd654 100644 --- a/opengl/libs/EGL/eglApi.cpp +++ b/opengl/libs/EGL/eglApi.cpp @@ -49,6 +49,8 @@ using namespace android; // ---------------------------------------------------------------------------- +#define EGL_VERSION_HW_ANDROID 0x3143 + struct extention_map_t { const char* name; __eglMustCastToProperFunctionPointerType address; @@ -972,6 +974,12 @@ const char* eglQueryString(EGLDisplay dpy, EGLint name) return dp->getExtensionString(); case EGL_CLIENT_APIS: return dp->getClientApiString(); + case EGL_VERSION_HW_ANDROID: { + if (gEGLImpl[IMPL_HARDWARE].dso) { + return dp->disp[IMPL_HARDWARE].queryString.version; + } + return dp->disp[IMPL_SOFTWARE].queryString.version; + } } return setError(EGL_BAD_PARAMETER, (const char *)0); } diff --git a/opengl/specs/README b/opengl/specs/README index 2fa258777f7f..16b278fd49be 100644 --- a/opengl/specs/README +++ b/opengl/specs/README @@ -9,4 +9,5 @@ for use by Android extensions. 0x3140 EGL_ANDROID_image_native_buffer 0x3141 (unused) 0x3142 EGL_ANDROID_recordable -0x3143 - 0x314F (unused) +0x3143 EGL_VERSION_HW_ANDROID (internal use) +0x3144 - 0x314F (unused) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java index 55a5b0ac3136..135a04c1a6cb 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java @@ -898,7 +898,7 @@ public class NetworkController extends BroadcastReceiver { combinedSignalIconId = mDataSignalIconId; // set by updateDataIcon() mContentDescriptionCombinedSignal = mContentDescriptionDataType; } - + if (mWifiConnected) { if (mWifiSsid == null) { label = context.getString(R.string.status_bar_settings_signal_meter_wifi_nossid); @@ -932,19 +932,23 @@ public class NetworkController extends BroadcastReceiver { mContentDescriptionCombinedSignal = mContext.getString( R.string.accessibility_bluetooth_tether); } - + if (mAirplaneMode && (mServiceState == null || (!hasService() && !mServiceState.isEmergencyOnly()))) { // Only display the flight-mode icon if not in "emergency calls only" mode. - label = context.getString(R.string.status_bar_settings_signal_meter_disconnected); - mContentDescriptionCombinedSignal = mContentDescriptionPhoneSignal - = mContext.getString(R.string.accessibility_airplane_mode); - + // look again; your radios are now airplanes + mContentDescriptionPhoneSignal = mContext.getString( + R.string.accessibility_airplane_mode); mPhoneSignalIconId = mDataSignalIconId = R.drawable.stat_sys_signal_flightmode; mDataTypeIconId = 0; - combinedSignalIconId = mDataSignalIconId; + // combined values from connected wifi take precedence over airplane mode + if (!mWifiConnected) { + label = context.getString(R.string.status_bar_settings_signal_meter_disconnected); + mContentDescriptionCombinedSignal = mContentDescriptionPhoneSignal; + combinedSignalIconId = mDataSignalIconId; + } } else if (!mDataConnected && !mWifiConnected && !mBluetoothTethered && !mWimaxConnected) { // pretty much totally disconnected diff --git a/services/java/com/android/server/EventLogTags.logtags b/services/java/com/android/server/EventLogTags.logtags index 54084361a28a..4dad2092edba 100644 --- a/services/java/com/android/server/EventLogTags.logtags +++ b/services/java/com/android/server/EventLogTags.logtags @@ -50,12 +50,12 @@ option java_package com.android.server # NotificationManagerService.java # --------------------------- # when a NotificationManager.notify is called -2750 notification_enqueue (pkg|3),(id|1|5),(notification|3) +2750 notification_enqueue (pkg|3),(id|1|5),(tag|3),(notification|3) # when someone tries to cancel a notification, the notification manager sometimes # calls this with flags too -2751 notification_cancel (pkg|3),(id|1|5),(required_flags|1) +2751 notification_cancel (pkg|3),(id|1|5),(tag|3),(required_flags|1),(forbidden_flags|1) # when someone tries to cancel all of the notifications for a particular package -2752 notification_cancel_all (pkg|3),(required_flags|1) +2752 notification_cancel_all (pkg|3),(required_flags|1),(forbidden_flags|1) # --------------------------- diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java index 7d1d9765eb9d..5039294a2680 100755 --- a/services/java/com/android/server/NotificationManagerService.java +++ b/services/java/com/android/server/NotificationManagerService.java @@ -707,7 +707,8 @@ public class NotificationManagerService extends INotificationManager.Stub // behalf of the download manager without affecting other apps. if (!pkg.equals("com.android.providers.downloads") || Log.isLoggable("DownloadManager", Log.VERBOSE)) { - EventLog.writeEvent(EventLogTags.NOTIFICATION_ENQUEUE, pkg, id, notification.toString()); + EventLog.writeEvent(EventLogTags.NOTIFICATION_ENQUEUE, pkg, id, tag, + notification.toString()); } if (pkg == null || notification == null) { @@ -944,7 +945,8 @@ public class NotificationManagerService extends INotificationManager.Stub */ private void cancelNotification(String pkg, String tag, int id, int mustHaveFlags, int mustNotHaveFlags, boolean sendDelete) { - EventLog.writeEvent(EventLogTags.NOTIFICATION_CANCEL, pkg, id, mustHaveFlags); + EventLog.writeEvent(EventLogTags.NOTIFICATION_CANCEL, pkg, id, tag, + mustHaveFlags, mustNotHaveFlags); synchronized (mNotificationList) { int index = indexOfNotificationLocked(pkg, tag, id); @@ -972,7 +974,8 @@ public class NotificationManagerService extends INotificationManager.Stub */ boolean cancelAllNotificationsInt(String pkg, int mustHaveFlags, int mustNotHaveFlags, boolean doit) { - EventLog.writeEvent(EventLogTags.NOTIFICATION_CANCEL_ALL, pkg, mustHaveFlags); + EventLog.writeEvent(EventLogTags.NOTIFICATION_CANCEL_ALL, pkg, mustHaveFlags, + mustNotHaveFlags); synchronized (mNotificationList) { final int N = mNotificationList.size(); diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 1b00e9380a62..f38e94814587 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -65,6 +65,8 @@ #define AID_GRAPHICS 1003 #endif +#define EGL_VERSION_HW_ANDROID 0x3143 + #define DISPLAY_COUNT 1 namespace android { @@ -1527,7 +1529,7 @@ status_t SurfaceFlinger::dump(int fd, const Vector<String16>& args) * Dump the layers in the purgatory */ - const size_t purgatorySize = mLayerPurgatory.size(); + const size_t purgatorySize = mLayerPurgatory.size(); snprintf(buffer, SIZE, "Purgatory state (%d entries)\n", purgatorySize); result.append(buffer); for (size_t i=0 ; i<purgatorySize ; i++) { @@ -1548,6 +1550,12 @@ status_t SurfaceFlinger::dump(int fd, const Vector<String16>& args) extensions.getRenderer(), extensions.getVersion()); result.append(buffer); + + snprintf(buffer, SIZE, "EGL : %s\n", + eglQueryString(graphicPlane(0).getEGLDisplay(), + EGL_VERSION_HW_ANDROID)); + result.append(buffer); + snprintf(buffer, SIZE, "EXTS: %s\n", extensions.getExtension()); result.append(buffer); |