diff options
Diffstat (limited to 'core')
27 files changed, 404 insertions, 130 deletions
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java index 98baa0e..d4478bf 100644 --- a/core/java/android/app/ActivityManagerNative.java +++ b/core/java/android/app/ActivityManagerNative.java @@ -1870,6 +1870,15 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM return true; } + case HANG_TRANSACTION: { + data.enforceInterface(IActivityManager.descriptor); + IBinder who = data.readStrongBinder(); + boolean allowRestart = data.readInt() != 0; + hang(who, allowRestart); + reply.writeNoException(); + return true; + } + } return super.onTransact(code, data, reply, flags); @@ -4270,5 +4279,17 @@ class ActivityManagerProxy implements IActivityManager reply.recycle(); } + public void hang(IBinder who, boolean allowRestart) throws RemoteException { + Parcel data = Parcel.obtain(); + Parcel reply = Parcel.obtain(); + data.writeInterfaceToken(IActivityManager.descriptor); + data.writeStrongBinder(who); + data.writeInt(allowRestart ? 1 : 0); + mRemote.transact(HANG_TRANSACTION, data, reply, 0); + reply.readException(); + data.recycle(); + reply.recycle(); + } + private IBinder mRemote; } diff --git a/core/java/android/app/IActivityController.aidl b/core/java/android/app/IActivityController.aidl index aca8305..952c900 100644 --- a/core/java/android/app/IActivityController.aidl +++ b/core/java/android/app/IActivityController.aidl @@ -58,4 +58,11 @@ interface IActivityController * immediately. */ int appNotResponding(String processName, int pid, String processStats); + + /** + * The system process watchdog has detected that the system seems to be + * hung. Return 1 to continue waiting, or -1 to let it continue with its + * normal kill. + */ + int systemNotResponding(String msg); } diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java index 33a2770..a21caee 100644 --- a/core/java/android/app/IActivityManager.java +++ b/core/java/android/app/IActivityManager.java @@ -377,6 +377,8 @@ public interface IActivityManager extends IInterface { public void killUid(int uid, String reason) throws RemoteException; + public void hang(IBinder who, boolean allowRestart) throws RemoteException; + /* * Private non-Binder interfaces */ @@ -638,4 +640,5 @@ public interface IActivityManager extends IInterface { int GET_LAUNCHED_FROM_PACKAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+163; int KILL_UID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+164; int SET_USER_IS_MONKEY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+165; + int HANG_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+166; } diff --git a/core/java/android/app/Service.java b/core/java/android/app/Service.java index 4fbca73..3967740 100644 --- a/core/java/android/app/Service.java +++ b/core/java/android/app/Service.java @@ -633,7 +633,7 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac * * @param id The identifier for this notification as per * {@link NotificationManager#notify(int, Notification) - * NotificationManager.notify(int, Notification)}. + * NotificationManager.notify(int, Notification)}; must not be 0. * @param notification The Notification to be displayed. * * @see #stopForeground(boolean) diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index 67bd952..bfc7bf5 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -2356,6 +2356,8 @@ public class Intent implements Parcelable, Cloneable { * </p> * * @see #ACTION_IDLE_MAINTENANCE_END + * + * @hide */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_IDLE_MAINTENANCE_START = @@ -2383,6 +2385,8 @@ public class Intent implements Parcelable, Cloneable { * by the system. * * @see #ACTION_IDLE_MAINTENANCE_START + * + * @hide */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_IDLE_MAINTENANCE_END = diff --git a/core/java/android/hardware/location/GeofenceHardwareImpl.java b/core/java/android/hardware/location/GeofenceHardwareImpl.java index e3362a7..9823c49 100644 --- a/core/java/android/hardware/location/GeofenceHardwareImpl.java +++ b/core/java/android/hardware/location/GeofenceHardwareImpl.java @@ -470,11 +470,12 @@ public final class GeofenceHardwareImpl { synchronized (mGeofences) { callback = mGeofences.get(geofenceId); } - if (callback == null) return; - try { - callback.onGeofenceAdd(geofenceId, msg.arg2); - } catch (RemoteException e) {Log.i(TAG, "Remote Exception:" + e);} + if (callback != null) { + try { + callback.onGeofenceAdd(geofenceId, msg.arg2); + } catch (RemoteException e) {Log.i(TAG, "Remote Exception:" + e);} + } releaseWakeLock(); break; case REMOVE_GEOFENCE_CALLBACK: @@ -482,13 +483,14 @@ public final class GeofenceHardwareImpl { synchronized (mGeofences) { callback = mGeofences.get(geofenceId); } - if (callback == null) return; - try { - callback.onGeofenceRemove(geofenceId, msg.arg2); - } catch (RemoteException e) {} - synchronized (mGeofences) { - mGeofences.remove(geofenceId); + if (callback != null) { + try { + callback.onGeofenceRemove(geofenceId, msg.arg2); + } catch (RemoteException e) {} + synchronized (mGeofences) { + mGeofences.remove(geofenceId); + } } releaseWakeLock(); break; @@ -498,11 +500,12 @@ public final class GeofenceHardwareImpl { synchronized (mGeofences) { callback = mGeofences.get(geofenceId); } - if (callback == null) return; - try { - callback.onGeofencePause(geofenceId, msg.arg2); - } catch (RemoteException e) {} + if (callback != null) { + try { + callback.onGeofencePause(geofenceId, msg.arg2); + } catch (RemoteException e) {} + } releaseWakeLock(); break; @@ -511,11 +514,12 @@ public final class GeofenceHardwareImpl { synchronized (mGeofences) { callback = mGeofences.get(geofenceId); } - if (callback == null) return; - try { - callback.onGeofenceResume(geofenceId, msg.arg2); - } catch (RemoteException e) {} + if (callback != null) { + try { + callback.onGeofenceResume(geofenceId, msg.arg2); + } catch (RemoteException e) {} + } releaseWakeLock(); break; @@ -530,12 +534,14 @@ public final class GeofenceHardwareImpl { " Transition: " + geofenceTransition.mTransition + " Location: " + geofenceTransition.mLocation + ":" + mGeofences); - try { - callback.onGeofenceTransition( - geofenceTransition.mGeofenceId, geofenceTransition.mTransition, - geofenceTransition.mLocation, geofenceTransition.mTimestamp, - GeofenceHardware.MONITORING_TYPE_GPS_HARDWARE); - } catch (RemoteException e) {} + if (callback != null) { + try { + callback.onGeofenceTransition( + geofenceTransition.mGeofenceId, geofenceTransition.mTransition, + geofenceTransition.mLocation, geofenceTransition.mTimestamp, + GeofenceHardware.MONITORING_TYPE_GPS_HARDWARE); + } catch (RemoteException e) {} + } releaseWakeLock(); break; case GEOFENCE_CALLBACK_BINDER_DIED: @@ -572,16 +578,16 @@ public final class GeofenceHardwareImpl { available = (val == GeofenceHardware.MONITOR_CURRENTLY_AVAILABLE ? true : false); callbackList = mCallbacks[GeofenceHardware.MONITORING_TYPE_GPS_HARDWARE]; - if (callbackList == null) return; - - if (DEBUG) Log.d(TAG, "MonitoringSystemChangeCallback: GPS : " + available); - - for (IGeofenceHardwareMonitorCallback c: callbackList) { - try { - c.onMonitoringSystemChange( - GeofenceHardware.MONITORING_TYPE_GPS_HARDWARE, available, - location); - } catch (RemoteException e) {} + if (callbackList != null) { + if (DEBUG) Log.d(TAG, "MonitoringSystemChangeCallback: GPS : " + available); + + for (IGeofenceHardwareMonitorCallback c: callbackList) { + try { + c.onMonitoringSystemChange( + GeofenceHardware.MONITORING_TYPE_GPS_HARDWARE, available, + location); + } catch (RemoteException e) {} + } } releaseWakeLock(); break; diff --git a/core/java/android/net/nsd/NsdManager.java b/core/java/android/net/nsd/NsdManager.java index 08ba728..9c3e405 100644 --- a/core/java/android/net/nsd/NsdManager.java +++ b/core/java/android/net/nsd/NsdManager.java @@ -306,10 +306,9 @@ public final class NsdManager { switch (message.what) { case AsyncChannel.CMD_CHANNEL_HALF_CONNECTED: mAsyncChannel.sendMessage(AsyncChannel.CMD_CHANNEL_FULL_CONNECTION); - mConnected.countDown(); break; case AsyncChannel.CMD_CHANNEL_FULLY_CONNECTED: - // Ignore + mConnected.countDown(); break; case AsyncChannel.CMD_CHANNEL_DISCONNECTED: Log.e(TAG, "Channel lost"); diff --git a/core/java/android/os/Binder.java b/core/java/android/os/Binder.java index e9e7551..7ffd30b 100644 --- a/core/java/android/os/Binder.java +++ b/core/java/android/os/Binder.java @@ -49,6 +49,11 @@ public class Binder implements IBinder { private static final boolean FIND_POTENTIAL_LEAKS = false; private static final String TAG = "Binder"; + /** + * Control whether dump() calls are allowed. + */ + private static String sDumpDisabled = null; + /* mObject is used by native code, do not remove or rename */ private int mObject; private IInterface mOwner; @@ -224,7 +229,23 @@ public class Binder implements IBinder { } return null; } - + + /** + * Control disabling of dump calls in this process. This is used by the system + * process watchdog to disable incoming dump calls while it has detecting the system + * is hung and is reporting that back to the activity controller. This is to + * prevent the controller from getting hung up on bug reports at this point. + * @hide + * + * @param msg The message to show instead of the dump; if null, dumps are + * re-enabled. + */ + public static void setDumpDisabled(String msg) { + synchronized (Binder.class) { + sDumpDisabled = msg; + } + } + /** * Default implementation is a stub that returns false. You will want * to override this to do the appropriate unmarshalling of transactions. @@ -269,7 +290,15 @@ public class Binder implements IBinder { FileOutputStream fout = new FileOutputStream(fd); PrintWriter pw = new PrintWriter(fout); try { - dump(fd, pw, args); + final String disabled; + synchronized (Binder.class) { + disabled = sDumpDisabled; + } + if (disabled == null) { + dump(fd, pw, args); + } else { + pw.println(sDumpDisabled); + } } finally { pw.flush(); } diff --git a/core/java/android/os/Trace.java b/core/java/android/os/Trace.java index 3307a8c..e53cb5e 100644 --- a/core/java/android/os/Trace.java +++ b/core/java/android/os/Trace.java @@ -65,6 +65,8 @@ public final class Trace { public static final long TRACE_TAG_APP = 1L << 12; /** @hide */ public static final long TRACE_TAG_RESOURCES = 1L << 13; + /** @hide */ + public static final long TRACE_TAG_DALVIK = 1L << 14; private static final long TRACE_TAG_NOT_READY = 1L << 63; private static final int MAX_SECTION_NAME_LEN = 127; diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 4de5933..38fb51b 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -4076,6 +4076,13 @@ public final class Settings { public static final String ENABLED_NOTIFICATION_LISTENERS = "enabled_notification_listeners"; /** + * Whether or not to enable the dial pad autocomplete functionality. + * + * @hide + */ + public static final String DIALPAD_AUTOCOMPLETE = "dialpad_autocomplete"; + + /** * This are the settings to be backed up. * * NOTE: Settings are backed up and restored in the order they appear @@ -4115,7 +4122,8 @@ public final class Settings { MOUNT_UMS_AUTOSTART, MOUNT_UMS_PROMPT, MOUNT_UMS_NOTIFY_ENABLED, - UI_NIGHT_MODE + UI_NIGHT_MODE, + DIALPAD_AUTOCOMPLETE }; /** @@ -5473,7 +5481,6 @@ public final class Settings { WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY, WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED, - WIFI_SCAN_ALWAYS_AVAILABLE, WIFI_NUM_OPEN_NETWORKS_KEPT, EMERGENCY_TONE, CALL_AUTO_RETRY, diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java index 73d400e..578a86e 100644 --- a/core/java/android/speech/tts/TextToSpeech.java +++ b/core/java/android/speech/tts/TextToSpeech.java @@ -42,6 +42,7 @@ import java.util.HashSet; import java.util.List; import java.util.Locale; import java.util.Map; +import java.util.MissingResourceException; import java.util.Set; /** @@ -1128,9 +1129,23 @@ public class TextToSpeech { if (loc == null) { return LANG_NOT_SUPPORTED; } - String language = loc.getISO3Language(); - String country = loc.getISO3Country(); + String language = null, country = null; + try { + language = loc.getISO3Language(); + } catch (MissingResourceException e) { + Log.w(TAG, "Couldn't retrieve ISO 639-2/T language code for locale: " + loc, e); + return LANG_NOT_SUPPORTED; + } + + try { + country = loc.getISO3Country(); + } catch (MissingResourceException e) { + Log.w(TAG, "Couldn't retrieve ISO 3166 country code for locale: " + loc, e); + return LANG_NOT_SUPPORTED; + } + String variant = loc.getVariant(); + // Check if the language, country, variant are available, and cache // the available parts. // Note that the language is not actually set here, instead it is cached so it @@ -1195,8 +1210,23 @@ public class TextToSpeech { return runAction(new Action<Integer>() { @Override public Integer run(ITextToSpeechService service) throws RemoteException { - return service.isLanguageAvailable(loc.getISO3Language(), - loc.getISO3Country(), loc.getVariant()); + String language = null, country = null; + + try { + language = loc.getISO3Language(); + } catch (MissingResourceException e) { + Log.w(TAG, "Couldn't retrieve ISO 639-2/T language code for locale: " + loc, e); + return LANG_NOT_SUPPORTED; + } + + try { + country = loc.getISO3Country(); + } catch (MissingResourceException e) { + Log.w(TAG, "Couldn't retrieve ISO 3166 country code for locale: " + loc, e); + return LANG_NOT_SUPPORTED; + } + + return service.isLanguageAvailable(language, country, loc.getVariant()); } }, LANG_NOT_SUPPORTED, "isLanguageAvailable"); } diff --git a/core/java/android/view/FocusFinder.java b/core/java/android/view/FocusFinder.java index b2988ed..c2c247e 100644 --- a/core/java/android/view/FocusFinder.java +++ b/core/java/android/view/FocusFinder.java @@ -172,6 +172,7 @@ public class FocusFinder { try { // Note: This sort is stable. mSequentialFocusComparator.setRoot(root); + mSequentialFocusComparator.setIsLayoutRtl(root.isLayoutRtl()); Collections.sort(focusables, mSequentialFocusComparator); } finally { mSequentialFocusComparator.recycle(); @@ -180,9 +181,9 @@ public class FocusFinder { final int count = focusables.size(); switch (direction) { case View.FOCUS_FORWARD: - return getForwardFocusable(root, focused, focusables, count); + return getNextFocusable(focused, focusables, count); case View.FOCUS_BACKWARD: - return getBackwardFocusable(root, focused, focusables, count); + return getPreviousFocusable(focused, focusables, count); } return focusables.get(count - 1); } @@ -239,13 +240,6 @@ public class FocusFinder { return closest; } - private static View getForwardFocusable(ViewGroup root, View focused, - ArrayList<View> focusables, int count) { - return (root.isLayoutRtl()) ? - getPreviousFocusable(focused, focusables, count) : - getNextFocusable(focused, focusables, count); - } - private static View getNextFocusable(View focused, ArrayList<View> focusables, int count) { if (focused != null) { int position = focusables.lastIndexOf(focused); @@ -259,13 +253,6 @@ public class FocusFinder { return null; } - private static View getBackwardFocusable(ViewGroup root, View focused, - ArrayList<View> focusables, int count) { - return (root.isLayoutRtl()) ? - getNextFocusable(focused, focusables, count) : - getPreviousFocusable(focused, focusables, count); - } - private static View getPreviousFocusable(View focused, ArrayList<View> focusables, int count) { if (focused != null) { int position = focusables.indexOf(focused); @@ -619,6 +606,7 @@ public class FocusFinder { private final Rect mFirstRect = new Rect(); private final Rect mSecondRect = new Rect(); private ViewGroup mRoot; + private boolean mIsLayoutRtl; public void recycle() { mRoot = null; @@ -628,6 +616,10 @@ public class FocusFinder { mRoot = root; } + public void setIsLayoutRtl(boolean b) { + mIsLayoutRtl = b; + } + public int compare(View first, View second) { if (first == second) { return 0; @@ -641,17 +633,17 @@ public class FocusFinder { } else if (mFirstRect.top > mSecondRect.top) { return 1; } else if (mFirstRect.left < mSecondRect.left) { - return -1; + return mIsLayoutRtl ? 1 : -1; } else if (mFirstRect.left > mSecondRect.left) { - return 1; + return mIsLayoutRtl ? -1 : 1; } else if (mFirstRect.bottom < mSecondRect.bottom) { return -1; } else if (mFirstRect.bottom > mSecondRect.bottom) { return 1; } else if (mFirstRect.right < mSecondRect.right) { - return -1; + return mIsLayoutRtl ? 1 : -1; } else if (mFirstRect.right > mSecondRect.right) { - return 1; + return mIsLayoutRtl ? -1 : 1; } else { // The view are distinct but completely coincident so we consider // them equal for our purposes. Since the sort is stable, this diff --git a/core/java/android/view/Surface.java b/core/java/android/view/Surface.java index e0786f7..ae4005b 100644 --- a/core/java/android/view/Surface.java +++ b/core/java/android/view/Surface.java @@ -71,8 +71,8 @@ public class Surface implements Parcelable { // Guarded state. final Object mLock = new Object(); // protects the native state private String mName; - int mNativeObject; // package scope only for SurfaceControl access - private int mGenerationId; // incremented each time mNativeObject changes + int mNativeSurface; // package scope only for SurfaceControl access + private int mGenerationId; // incremented each time mNativeSurface changes private final Canvas mCanvas = new CompatibleCanvas(); // A matrix to scale the matrix set by application. This is set to null for @@ -158,8 +158,8 @@ public class Surface implements Parcelable { */ public void release() { synchronized (mLock) { - if (mNativeObject != 0) { - nativeRelease(mNativeObject); + if (mNativeSurface != 0) { + nativeRelease(mNativeSurface); setNativeObjectLocked(0); } } @@ -183,8 +183,8 @@ public class Surface implements Parcelable { */ public boolean isValid() { synchronized (mLock) { - if (mNativeObject == 0) return false; - return nativeIsValid(mNativeObject); + if (mNativeSurface == 0) return false; + return nativeIsValid(mNativeSurface); } } @@ -210,7 +210,7 @@ public class Surface implements Parcelable { public boolean isConsumerRunningBehind() { synchronized (mLock) { checkNotReleasedLocked(); - return nativeIsConsumerRunningBehind(mNativeObject); + return nativeIsConsumerRunningBehind(mNativeSurface); } } @@ -233,7 +233,7 @@ public class Surface implements Parcelable { throws OutOfResourcesException, IllegalArgumentException { synchronized (mLock) { checkNotReleasedLocked(); - nativeLockCanvas(mNativeObject, mCanvas, inOutDirty); + nativeLockCanvas(mNativeSurface, mCanvas, inOutDirty); return mCanvas; } } @@ -252,7 +252,7 @@ public class Surface implements Parcelable { synchronized (mLock) { checkNotReleasedLocked(); - nativeUnlockCanvasAndPost(mNativeObject, canvas); + nativeUnlockCanvasAndPost(mNativeSurface, canvas); } } @@ -298,8 +298,8 @@ public class Surface implements Parcelable { int newNativeObject = nativeCreateFromSurfaceControl(surfaceControlPtr); synchronized (mLock) { - if (mNativeObject != 0) { - nativeRelease(mNativeObject); + if (mNativeSurface != 0) { + nativeRelease(mNativeSurface); } setNativeObjectLocked(newNativeObject); } @@ -319,13 +319,13 @@ public class Surface implements Parcelable { if (other != this) { final int newPtr; synchronized (other.mLock) { - newPtr = other.mNativeObject; + newPtr = other.mNativeSurface; other.setNativeObjectLocked(0); } synchronized (mLock) { - if (mNativeObject != 0) { - nativeRelease(mNativeObject); + if (mNativeSurface != 0) { + nativeRelease(mNativeSurface); } setNativeObjectLocked(newPtr); } @@ -344,7 +344,7 @@ public class Surface implements Parcelable { synchronized (mLock) { mName = source.readString(); - setNativeObjectLocked(nativeReadFromParcel(mNativeObject, source)); + setNativeObjectLocked(nativeReadFromParcel(mNativeSurface, source)); } } @@ -355,7 +355,7 @@ public class Surface implements Parcelable { } synchronized (mLock) { dest.writeString(mName); - nativeWriteToParcel(mNativeObject, dest); + nativeWriteToParcel(mNativeSurface, dest); } if ((flags & Parcelable.PARCELABLE_WRITE_RETURN_VALUE) != 0) { release(); @@ -370,19 +370,19 @@ public class Surface implements Parcelable { } private void setNativeObjectLocked(int ptr) { - if (mNativeObject != ptr) { - if (mNativeObject == 0 && ptr != 0) { + if (mNativeSurface != ptr) { + if (mNativeSurface == 0 && ptr != 0) { mCloseGuard.open("release"); - } else if (mNativeObject != 0 && ptr == 0) { + } else if (mNativeSurface != 0 && ptr == 0) { mCloseGuard.close(); } - mNativeObject = ptr; + mNativeSurface = ptr; mGenerationId += 1; } } private void checkNotReleasedLocked() { - if (mNativeObject == 0) { + if (mNativeSurface == 0) { throw new IllegalStateException("Surface has already been released."); } } diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java index 6b530ef..c6da84f 100644 --- a/core/java/android/view/SurfaceControl.java +++ b/core/java/android/view/SurfaceControl.java @@ -499,7 +499,7 @@ public class SurfaceControl { if (surface != null) { synchronized (surface.mLock) { - nativeSetDisplaySurface(displayToken, surface.mNativeObject); + nativeSetDisplaySurface(displayToken, surface.mNativeSurface); } } else { nativeSetDisplaySurface(displayToken, 0); diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 0938bb3..c47e111 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -11749,10 +11749,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback, /** * Resolve all RTL related properties. * + * @return true if resolution of RTL properties has been done + * * @hide */ - public void resolveRtlPropertiesIfNeeded() { - if (!needRtlPropertiesResolution()) return; + public boolean resolveRtlPropertiesIfNeeded() { + if (!needRtlPropertiesResolution()) return false; // Order is important here: LayoutDirection MUST be resolved first if (!isLayoutDirectionResolved()) { @@ -11773,6 +11775,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, resolveDrawables(); } onRtlPropertiesChanged(getLayoutDirection()); + return true; } /** @@ -11825,6 +11828,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, /** * @return true if RTL properties need resolution. + * */ private boolean needRtlPropertiesResolution() { return (mPrivateFlags2 & ALL_RTL_PROPERTIES_RESOLVED) != ALL_RTL_PROPERTIES_RESOLVED; diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index c7ce999..1fef0a2 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -4486,16 +4486,21 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager public void offsetChildrenTopAndBottom(int offset) { final int count = mChildrenCount; final View[] children = mChildren; + boolean invalidate = false; for (int i = 0; i < count; i++) { final View v = children[i]; v.mTop += offset; v.mBottom += offset; if (v.mDisplayList != null) { + invalidate = true; v.mDisplayList.offsetTopAndBottom(offset); - invalidateViewProperty(false, false); } } + + if (invalidate) { + invalidateViewProperty(false, false); + } } /** @@ -5453,15 +5458,19 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * @hide */ @Override - public void resolveRtlPropertiesIfNeeded() { - super.resolveRtlPropertiesIfNeeded(); - int count = getChildCount(); - for (int i = 0; i < count; i++) { - final View child = getChildAt(i); - if (child.isLayoutDirectionInherited()) { - child.resolveRtlPropertiesIfNeeded(); + public boolean resolveRtlPropertiesIfNeeded() { + final boolean result = super.resolveRtlPropertiesIfNeeded(); + // We dont need to resolve the children RTL properties if nothing has changed for the parent + if (result) { + int count = getChildCount(); + for (int i = 0; i < count; i++) { + final View child = getChildAt(i); + if (child.isLayoutDirectionInherited()) { + child.resolveRtlPropertiesIfNeeded(); + } } } + return result; } /** diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 7ecb52e..b63ccab 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -211,6 +211,7 @@ public final class ViewRootImpl implements ViewParent, boolean mHasHadWindowFocus; boolean mLastWasImTarget; boolean mWindowsAnimating; + boolean mDrawDuringWindowsAnimating; boolean mIsDrawing; int mLastSystemUiVisibility; int mClientWindowLayoutFlags; @@ -1396,8 +1397,10 @@ public final class ViewRootImpl implements ViewParent, final int surfaceGenerationId = mSurface.getGenerationId(); relayoutResult = relayoutWindow(params, viewVisibility, insetsPending); - mWindowsAnimating |= - (relayoutResult & WindowManagerGlobal.RELAYOUT_RES_ANIMATING) != 0; + if (!mDrawDuringWindowsAnimating) { + mWindowsAnimating |= + (relayoutResult & WindowManagerGlobal.RELAYOUT_RES_ANIMATING) != 0; + } if (DEBUG_LAYOUT) Log.v(TAG, "relayout: frame=" + frame.toShortString() + " overscan=" + mPendingOverscanInsets.toShortString() @@ -2572,6 +2575,16 @@ public final class ViewRootImpl implements ViewParent, displayLists.clear(); } + /** + * @hide + */ + public void setDrawDuringWindowsAnimating(boolean value) { + mDrawDuringWindowsAnimating = value; + if (value) { + handleDispatchDoneAnimating(); + } + } + boolean scrollToRectOrFocus(Rect rectangle, boolean immediate) { final View.AttachInfo attachInfo = mAttachInfo; final Rect ci = attachInfo.mContentInsets; @@ -2709,7 +2722,6 @@ public final class ViewRootImpl implements ViewParent, AccessibilityNodeInfo focusNode = mAccessibilityFocusedVirtualView; View focusHost = mAccessibilityFocusedHost; - focusHost.clearAccessibilityFocusNoCallbacks(); // Wipe the state of the current accessibility focus since // the call into the provider to clear accessibility focus @@ -2719,6 +2731,10 @@ public final class ViewRootImpl implements ViewParent, mAccessibilityFocusedHost = null; mAccessibilityFocusedVirtualView = null; + // Clear accessibility focus on the host after clearing state since + // this method may be reentrant. + focusHost.clearAccessibilityFocusNoCallbacks(); + AccessibilityNodeProvider provider = focusHost.getAccessibilityNodeProvider(); if (provider != null) { // Invalidate the area of the cleared accessibility focus. diff --git a/core/jni/Android.mk b/core/jni/Android.mk index edc0baf..594d578 100644 --- a/core/jni/Android.mk +++ b/core/jni/Android.mk @@ -25,6 +25,7 @@ LOCAL_SRC_FILES:= \ com_google_android_gles_jni_GLImpl.cpp.arm \ android_app_NativeActivity.cpp \ android_opengl_EGL14.cpp \ + android_opengl_EGLExt.cpp \ android_opengl_GLES10.cpp \ android_opengl_GLES10Ext.cpp \ android_opengl_GLES11.cpp \ diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index 53fde48..ca658da 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -67,6 +67,7 @@ extern int register_android_graphics_YuvImage(JNIEnv* env); extern int register_com_google_android_gles_jni_EGLImpl(JNIEnv* env); extern int register_com_google_android_gles_jni_GLImpl(JNIEnv* env); extern int register_android_opengl_jni_EGL14(JNIEnv* env); +extern int register_android_opengl_jni_EGLExt(JNIEnv* env); extern int register_android_opengl_jni_GLES10(JNIEnv* env); extern int register_android_opengl_jni_GLES10Ext(JNIEnv* env); extern int register_android_opengl_jni_GLES11(JNIEnv* env); @@ -1121,6 +1122,7 @@ static const RegJNIRec gRegJNI[] = { REG_JNI(register_com_google_android_gles_jni_EGLImpl), REG_JNI(register_com_google_android_gles_jni_GLImpl), REG_JNI(register_android_opengl_jni_EGL14), + REG_JNI(register_android_opengl_jni_EGLExt), REG_JNI(register_android_opengl_jni_GLES10), REG_JNI(register_android_opengl_jni_GLES10Ext), REG_JNI(register_android_opengl_jni_GLES11), diff --git a/core/jni/android_opengl_EGL14.cpp b/core/jni/android_opengl_EGL14.cpp index ac4bc1d..664af07 100644 --- a/core/jni/android_opengl_EGL14.cpp +++ b/core/jni/android_opengl_EGL14.cpp @@ -1202,22 +1202,6 @@ android_eglCopyBuffers return (EGLBoolean) 0; } -/* EGLBoolean eglPresentationTimeANDROID ( EGLDisplay dpy, EGLSurface sur, EGLnsecsANDROID time ) */ -static jboolean -android_eglPresentationTimeANDROID - (JNIEnv *_env, jobject _this, jobject dpy, jobject sur, jlong time) { - EGLBoolean _returnValue = (EGLBoolean) 0; - EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy); - EGLSurface sur_native = (EGLSurface) fromEGLHandle(_env, eglsurfaceGetHandleID, sur); - - _returnValue = eglPresentationTimeANDROID( - (EGLDisplay)dpy_native, - (EGLSurface)sur_native, - (EGLnsecsANDROID)time - ); - return _returnValue; -} - static const char *classPathName = "android/opengl/EGL14"; static JNINativeMethod methods[] = { @@ -1256,7 +1240,6 @@ static JNINativeMethod methods[] = { {"eglWaitNative", "(I)Z", (void *) android_eglWaitNative }, {"eglSwapBuffers", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLSurface;)Z", (void *) android_eglSwapBuffers }, {"eglCopyBuffers", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLSurface;I)Z", (void *) android_eglCopyBuffers }, -{"eglPresentationTimeANDROID", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLSurface;J)Z", (void *) android_eglPresentationTimeANDROID }, }; int register_android_opengl_jni_EGL14(JNIEnv *_env) diff --git a/core/jni/android_opengl_EGLExt.cpp b/core/jni/android_opengl_EGLExt.cpp new file mode 100644 index 0000000..5179ddc --- /dev/null +++ b/core/jni/android_opengl_EGLExt.cpp @@ -0,0 +1,162 @@ +/* +** Copyright 2013, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ + +// This source file is automatically generated + +#include "jni.h" +#include "JNIHelp.h" +#include <android_runtime/AndroidRuntime.h> +#include <android_runtime/android_view_Surface.h> +#include <android_runtime/android_graphics_SurfaceTexture.h> +#include <utils/misc.h> + +#include <assert.h> +#include <EGL/egl.h> +#include <EGL/eglext.h> + +#include <gui/Surface.h> +#include <gui/GLConsumer.h> +#include <gui/Surface.h> + +#include <ui/ANativeObjectBase.h> + +static int initialized = 0; + +static jclass egldisplayClass; +static jclass eglcontextClass; +static jclass eglsurfaceClass; +static jclass eglconfigClass; + +static jmethodID egldisplayGetHandleID; +static jmethodID eglcontextGetHandleID; +static jmethodID eglsurfaceGetHandleID; +static jmethodID eglconfigGetHandleID; + +static jmethodID egldisplayConstructor; +static jmethodID eglcontextConstructor; +static jmethodID eglsurfaceConstructor; +static jmethodID eglconfigConstructor; + +static jobject eglNoContextObject; +static jobject eglNoDisplayObject; +static jobject eglNoSurfaceObject; + + + +/* Cache method IDs each time the class is loaded. */ + +static void +nativeClassInit(JNIEnv *_env, jclass glImplClass) +{ + jclass egldisplayClassLocal = _env->FindClass("android/opengl/EGLDisplay"); + egldisplayClass = (jclass) _env->NewGlobalRef(egldisplayClassLocal); + jclass eglcontextClassLocal = _env->FindClass("android/opengl/EGLContext"); + eglcontextClass = (jclass) _env->NewGlobalRef(eglcontextClassLocal); + jclass eglsurfaceClassLocal = _env->FindClass("android/opengl/EGLSurface"); + eglsurfaceClass = (jclass) _env->NewGlobalRef(eglsurfaceClassLocal); + jclass eglconfigClassLocal = _env->FindClass("android/opengl/EGLConfig"); + eglconfigClass = (jclass) _env->NewGlobalRef(eglconfigClassLocal); + + egldisplayGetHandleID = _env->GetMethodID(egldisplayClass, "getHandle", "()I"); + eglcontextGetHandleID = _env->GetMethodID(eglcontextClass, "getHandle", "()I"); + eglsurfaceGetHandleID = _env->GetMethodID(eglsurfaceClass, "getHandle", "()I"); + eglconfigGetHandleID = _env->GetMethodID(eglconfigClass, "getHandle", "()I"); + + + egldisplayConstructor = _env->GetMethodID(egldisplayClass, "<init>", "(I)V"); + eglcontextConstructor = _env->GetMethodID(eglcontextClass, "<init>", "(I)V"); + eglsurfaceConstructor = _env->GetMethodID(eglsurfaceClass, "<init>", "(I)V"); + eglconfigConstructor = _env->GetMethodID(eglconfigClass, "<init>", "(I)V"); + + jobject localeglNoContextObject = _env->NewObject(eglcontextClass, eglcontextConstructor, (jint)EGL_NO_CONTEXT); + eglNoContextObject = _env->NewGlobalRef(localeglNoContextObject); + jobject localeglNoDisplayObject = _env->NewObject(egldisplayClass, egldisplayConstructor, (jint)EGL_NO_DISPLAY); + eglNoDisplayObject = _env->NewGlobalRef(localeglNoDisplayObject); + jobject localeglNoSurfaceObject = _env->NewObject(eglsurfaceClass, eglsurfaceConstructor, (jint)EGL_NO_SURFACE); + eglNoSurfaceObject = _env->NewGlobalRef(localeglNoSurfaceObject); + + + jclass eglClass = _env->FindClass("android/opengl/EGL14"); + jfieldID noContextFieldID = _env->GetStaticFieldID(eglClass, "EGL_NO_CONTEXT", "Landroid/opengl/EGLContext;"); + _env->SetStaticObjectField(eglClass, noContextFieldID, eglNoContextObject); + + jfieldID noDisplayFieldID = _env->GetStaticFieldID(eglClass, "EGL_NO_DISPLAY", "Landroid/opengl/EGLDisplay;"); + _env->SetStaticObjectField(eglClass, noDisplayFieldID, eglNoDisplayObject); + + jfieldID noSurfaceFieldID = _env->GetStaticFieldID(eglClass, "EGL_NO_SURFACE", "Landroid/opengl/EGLSurface;"); + _env->SetStaticObjectField(eglClass, noSurfaceFieldID, eglNoSurfaceObject); +} + +static void * +fromEGLHandle(JNIEnv *_env, jmethodID mid, jobject obj) { + if (obj == NULL){ + jniThrowException(_env, "java/lang/IllegalArgumentException", + "Object is set to null."); + } + + return (void*) (_env->CallIntMethod(obj, mid)); +} + +static jobject +toEGLHandle(JNIEnv *_env, jclass cls, jmethodID con, void * handle) { + if (cls == eglcontextClass && + (EGLContext)handle == EGL_NO_CONTEXT) { + return eglNoContextObject; + } + + if (cls == egldisplayClass && + (EGLDisplay)handle == EGL_NO_DISPLAY) { + return eglNoDisplayObject; + } + + if (cls == eglsurfaceClass && + (EGLSurface)handle == EGL_NO_SURFACE) { + return eglNoSurfaceObject; + } + + return _env->NewObject(cls, con, (jint)handle); +} + +// -------------------------------------------------------------------------- +/* EGLBoolean eglPresentationTimeANDROID ( EGLDisplay dpy, EGLSurface sur, EGLnsecsANDROID time ) */ +static jboolean +android_eglPresentationTimeANDROID + (JNIEnv *_env, jobject _this, jobject dpy, jobject sur, jlong time) { + EGLBoolean _returnValue = (EGLBoolean) 0; + EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy); + EGLSurface sur_native = (EGLSurface) fromEGLHandle(_env, eglsurfaceGetHandleID, sur); + + _returnValue = eglPresentationTimeANDROID( + (EGLDisplay)dpy_native, + (EGLSurface)sur_native, + (EGLnsecsANDROID)time + ); + return (jboolean)_returnValue; +} + +static const char *classPathName = "android/opengl/EGLExt"; + +static JNINativeMethod methods[] = { +{"_nativeClassInit", "()V", (void*)nativeClassInit }, +{"eglPresentationTimeANDROID", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLSurface;J)Z", (void *) android_eglPresentationTimeANDROID }, +}; + +int register_android_opengl_jni_EGLExt(JNIEnv *_env) +{ + int err; + err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods)); + return err; +} diff --git a/core/jni/android_view_Surface.cpp b/core/jni/android_view_Surface.cpp index 9a19ce5..d9f6be9 100644 --- a/core/jni/android_view_Surface.cpp +++ b/core/jni/android_view_Surface.cpp @@ -392,7 +392,7 @@ int register_android_view_Surface(JNIEnv* env) jclass clazz = env->FindClass("android/view/Surface"); gSurfaceClassInfo.clazz = jclass(env->NewGlobalRef(clazz)); gSurfaceClassInfo.mNativeObject = - env->GetFieldID(gSurfaceClassInfo.clazz, "mNativeObject", "I"); + env->GetFieldID(gSurfaceClassInfo.clazz, "mNativeSurface", "I"); gSurfaceClassInfo.mLock = env->GetFieldID(gSurfaceClassInfo.clazz, "mLock", "Ljava/lang/Object;"); gSurfaceClassInfo.ctor = env->GetMethodID(gSurfaceClassInfo.clazz, "<init>", "(I)V"); diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml index e14a36c..ad4776d 100644 --- a/core/res/res/values-es-rUS/strings.xml +++ b/core/res/res/values-es-rUS/strings.xml @@ -1172,7 +1172,7 @@ <string name="sms_short_code_confirm_never_allow" msgid="446992765774269673">"No permitir nunca"</string> <string name="sim_removed_title" msgid="6227712319223226185">"Tarjeta SIM eliminada"</string> <string name="sim_removed_message" msgid="2333164559970958645">"La red para celulares no estará disponible hasta que reinicies, luego de insertar una tarjeta SIM válida."</string> - <string name="sim_done_button" msgid="827949989369963775">"Finalizado"</string> + <string name="sim_done_button" msgid="827949989369963775">"Finalizar"</string> <string name="sim_added_title" msgid="3719670512889674693">"Tarjeta SIM agregada"</string> <string name="sim_added_message" msgid="6599945301141050216">"Reinicia el dispositivo para acceder a la red móvil."</string> <string name="sim_restart_button" msgid="4722407842815232347">"Reiniciar"</string> diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml index 9946c92..986a001 100644 --- a/core/res/res/values-in/strings.xml +++ b/core/res/res/values-in/strings.xml @@ -468,7 +468,7 @@ <string name="permdesc_recordAudio" msgid="4906839301087980680">"Memungkinkan aplikasi merekam audio dengan mikrofon. Izin ini memungkinkan aplikasi merekam audio kapan saja tanpa konfirmasi Anda."</string> <string name="permlab_camera" msgid="3616391919559751192">"ambil gambar dan video"</string> <string name="permdesc_camera" msgid="8497216524735535009">"Memungkinkan aplikasi mengambil gambar dan video dengan kamera. Izin ini memungkinkan aplikasi menggunakan kamera kapan saja tanpa konfirmasi Anda."</string> - <string name="permlab_cameraDisableTransmitLed" msgid="2651072630501126222">"nonaktifkan transmisi LED indikator saat kamera digunakan"</string> + <string name="permlab_cameraDisableTransmitLed" msgid="2651072630501126222">"nonaktifkan LED indikator transmisi saat kamera digunakan"</string> <string name="permdesc_cameraDisableTransmitLed" msgid="4764585465480295341">"Izinkan aplikasi sistem yang sudah dipasang sebelumnya menonaktifkan LED indikator penggunaan kamera."</string> <string name="permlab_brick" product="tablet" msgid="2961292205764488304">"noaktifkan tablet secara permanen"</string> <string name="permlab_brick" product="default" msgid="8337817093326370537">"nonaktifkan ponsel secara permanen"</string> diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml index 31e9a95..a69e588 100644 --- a/core/res/res/values-pt/strings.xml +++ b/core/res/res/values-pt/strings.xml @@ -468,10 +468,8 @@ <string name="permdesc_recordAudio" msgid="4906839301087980680">"Permite que o aplicativo grave áudio com o microfone. Esta permissão autoriza o aplicativo a gravar áudio a qualquer momento, sem sua confirmação."</string> <string name="permlab_camera" msgid="3616391919559751192">"tirar fotos e gravar vídeos"</string> <string name="permdesc_camera" msgid="8497216524735535009">"Permite que o aplicativo tire fotos e filme vídeos com a câmera. Esta permissão autoriza o aplicativo a usar a câmera a qualquer momento sem sua confirmação."</string> - <!-- no translation found for permlab_cameraDisableTransmitLed (2651072630501126222) --> - <skip /> - <!-- no translation found for permdesc_cameraDisableTransmitLed (4764585465480295341) --> - <skip /> + <string name="permlab_cameraDisableTransmitLed" msgid="2651072630501126222">"desativar a transmissão do LED indicador quando a câmera estiver em uso"</string> + <string name="permdesc_cameraDisableTransmitLed" msgid="4764585465480295341">"Permite que um aplicativo do sistema pré-instalado desative o LED indicador de uso da câmera."</string> <string name="permlab_brick" product="tablet" msgid="2961292205764488304">"desativar permanentemente o tablet"</string> <string name="permlab_brick" product="default" msgid="8337817093326370537">"desativar permanentemente o telefone"</string> <string name="permdesc_brick" product="tablet" msgid="4334818808001699530">"Permite que o aplicativo desative todo o tablet permanentemente. Isso é muito perigoso."</string> @@ -1493,8 +1491,7 @@ <string name="user_switched" msgid="3768006783166984410">"Usuário atual <xliff:g id="NAME">%1$s</xliff:g>."</string> <string name="owner_name" msgid="2716755460376028154">"Proprietário"</string> <string name="error_message_title" msgid="4510373083082500195">"Erro"</string> - <!-- no translation found for app_no_restricted_accounts (4011285085817350390) --> - <skip /> + <string name="app_no_restricted_accounts" msgid="4011285085817350390">"Este aplicativo não suporta contas para perfis restritos"</string> <string name="app_not_found" msgid="3429141853498927379">"Nenhum aplicativo encontrado para executar a ação"</string> <string name="revoke" msgid="5404479185228271586">"Revogar"</string> </resources> diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml index e03a6e6..6862ed5 100644 --- a/core/res/res/values-sw/strings.xml +++ b/core/res/res/values-sw/strings.xml @@ -156,7 +156,7 @@ <string name="global_action_power_off" msgid="4471879440839879722">"Zima simu"</string> <string name="global_action_bug_report" msgid="7934010578922304799">"Ripoti ya hitilafu"</string> <string name="bugreport_title" msgid="2667494803742548533">"Chukua ripoti ya hitilafu"</string> - <string name="bugreport_message" msgid="398447048750350456">"Hii itakusanya maelezo kuhusu hali yako ya sasa ya kifaa, ili kutuma ujumbe wa barua pepe. Itachukua muda mfupi kuanza ripoti ya hitilafu mpaka itakapokuwa tayari kutumwa; tafadhali vumilia."</string> + <string name="bugreport_message" msgid="398447048750350456">"Hii itakusanya maelezo kuhusu hali ya kifaa chako kwa sasa, na itume kama barua pepe. Itachukua muda mfupi tangu ripoti ya hitilafu ianze kuzalishwa hadi iwe tayari kutumwa; vumilia."</string> <string name="global_action_toggle_silent_mode" msgid="8219525344246810925">"Mtindo wa kimya"</string> <string name="global_action_silent_mode_on_status" msgid="3289841937003758806">"Sauti Imezimwa"</string> <string name="global_action_silent_mode_off_status" msgid="1506046579177066419">"Sauti imewashwa"</string> @@ -1491,7 +1491,7 @@ <string name="user_switched" msgid="3768006783166984410">"Mtumiaji wa sasa <xliff:g id="NAME">%1$s</xliff:g>."</string> <string name="owner_name" msgid="2716755460376028154">"Mmiliki"</string> <string name="error_message_title" msgid="4510373083082500195">"Hitilafu"</string> - <string name="app_no_restricted_accounts" msgid="4011285085817350390">"Programu hii haiwezi kutumiwa na akaunti za wasifu zilizodhibitiwa"</string> + <string name="app_no_restricted_accounts" msgid="4011285085817350390">"Programu hii haiwezi kutumiwa na akaunti za wasifu zilizowekewa vikwazo"</string> <string name="app_not_found" msgid="3429141853498927379">"Hakuna programu iliyopatikana ili kushughulikia kitendo hiki"</string> <string name="revoke" msgid="5404479185228271586">"Batilisha"</string> </resources> diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml index 200a9c2..140dbfb 100644 --- a/core/res/res/values-zh-rCN/strings.xml +++ b/core/res/res/values-zh-rCN/strings.xml @@ -312,7 +312,7 @@ <string name="permlab_stopAppSwitches" msgid="4138608610717425573">"禁止切换应用"</string> <string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"阻止用户切换到其他应用。"</string> <string name="permlab_getTopActivityInfo" msgid="2537922311411546016">"获取当前应用的信息"</string> - <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"允许应用针对目前在屏幕前台运行的应用检索相关隐私信息。"</string> + <string name="permdesc_getTopActivityInfo" msgid="2512448855496067131">"允许应用检索目前在屏幕前台运行的应用专有的信息。"</string> <string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"监控所有应用的启动"</string> <string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"允许应用监视和控制系统是如何启动活动的。恶意应用可能会完全破坏系统。此权限只有在进行开发时才需要,正常使用情况下绝不需要。"</string> <string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"发送包删除的广播"</string> @@ -625,7 +625,7 @@ <string name="permdesc_manageNetworkPolicy" msgid="7537586771559370668">"允许应用管理网络政策和定义专门针对应用的规则。"</string> <string name="permlab_modifyNetworkAccounting" msgid="5088217309088729650">"修改网络使用情况记录方式"</string> <string name="permdesc_modifyNetworkAccounting" msgid="5443412866746198123">"允许该应用修改对于各应用的网络使用情况的统计方式。普通应用不应使用此权限。"</string> - <string name="permlab_accessNotifications" msgid="7673416487873432268">"查看通知"</string> + <string name="permlab_accessNotifications" msgid="7673416487873432268">"访问通知"</string> <string name="permdesc_accessNotifications" msgid="458457742683431387">"允许该应用检索、检查并清除通知,包括其他应用发布的通知。"</string> <string name="permlab_bindNotificationListenerService" msgid="7057764742211656654">"绑定到通知侦听器服务"</string> <string name="permdesc_bindNotificationListenerService" msgid="985697918576902986">"允许应用绑定到通知侦听器服务的顶级接口(普通应用绝不需要此权限)。"</string> |
