When ejecting a storage device, the system process needs to rapidly
release any open FDs to prevent itself from being killed by vold.
This change examines all ResourceImpls cached inside the system
process and evicts any that reference the storage device being
ejected. (ResourcesManager will gladly recreate any evicted entries
when asked again in the future.)
Also replace broken use of WeakHashMap, since we want the values to
be weak references, not the keys.
Bug: 28867548
Change-Id: Ib9cfc66497149b6d3f8d49213e9779408a331d2a
am: c16bc88fc9
* commit 'c16bc88fc99a6446c77d0b075f242c042bb31ded':
trim and strip html tags for load safe label name
Change-Id: I34cebbce65db27304e6d3dcc2c6e0cbc0f005b03
am: 88be465ce5
* commit '88be465ce572f84649e01744a7ec96b6346b3686':
Update override config to include some changes from global config
Change-Id: I0f1f9f64bcd81321f44c48cd01537749ac4727ea
In override config for task we set Configuration#screenLayout field based on
initial global config + shrink to fit the area on screen given for this task.
However this field also contains information (like layout direction) that we
do not intend to override and it can be changed in global config separately.
In this case we need to update the override config with changes from global
config.
Bug: 28616488
Change-Id: I22673257621b3f9ae7933b37bd0fb9446c6042ea
We're building an exception message string, but by explicitly invoking
.toString() we're accidentally triggering an NPE rather than the typed
exception we want to throw. Build the string in a way that will be
safe and sensical even if the CharSequence is null.
Bug 29009255
Change-Id: I1813260f0b36fd44506b8327f997dd20c2d6c8bf
am: efa291a860
* commit 'efa291a8605e91d775faf46ada349ec7f81fcdb9':
Allow apps to bypass Power Save restrictions when launched from a Notification's PendingIntent.
Change-Id: I11bf96280ac5e143d5260cb20238da38b4e0eaa3
This scenario typically happens when the device is on Doze Mode and a
notification action is triggered from a Wear device.
In a nutshell, the workflow is:
- ProcessRecord has a flag telling whether a process has "whitelist
management" privileges.
- When NotificationManager binds a new NotificationListenerService, it
sets the BIND_ALLOW_WHITELIST_MANAGEMENT flag.
- On bind(), ActiveService asserts that only system apps can set that
flag.
- On computeOomAdjLocked(), ActivityManagerService sets the
ProcessRecord flag if necessary.
- Upon creating a notification, NotificationManager calls AM to mark its
PendingIntents as coming from a notification.
- When PendingIntentRecord sends it to the target, it checks if it's
from a notification and if so calls AM to do the temp whitelist.
- On unbind(), ActiveService removes the ProcessRecord flag if necessary.
Fixes: 28818704
Change-Id: I00d46036a2cbb73f7f733fd35bf0b743a02807a1
Always use the packages' derived instruction sets.
This fixes a bug where otas and background dexopt would only
look at one instruction set.
bug:28994818
Change-Id: I730b59d24943c71de30adb485a823fd79c6806a6
am: dfe232c763
* commit 'dfe232c7636d16379191442bdb2bac59d7a60f5c':
API council feedback: hide and document.
Change-Id: I180f504fe21f6f90179d359e8808ffff006e4538
We allow each individual Resources object to select the best
Locale for the given APK. This allows one update to the configuration
instead of multiple updates, once the locale is chosen.
The Java locale is selected from the app context's locale.
Bug:28625993
Bug:27325465
Change-Id: I99e1e53f522e560f3b80bbd1e1c605f552dbdff0
am: 6812bdf387
* commit '6812bdf38797101d3744befe70f3501b75f01ce6':
Use an attribute for the network security config resource
Change-Id: I2236b69a2af2258e7600a4833fe7be95f64e6260
Calling Configuration.setLocales with emtpy LocaleList may change the
layout direction to LTR. To clear the locales in Configuration without
layout direction change, introduce hidden API to Configuration.
Bug: 28695661
Change-Id: I47c339dffb83099bd329ddb60237dab27b05f593
Originally we went with the meta-data approach to make unbundling
easier, however with the amount of platform changes that the config
ended up relying on it would be better to focus on exposing it through
the platform.
Bug:28763009
Change-Id: Iaf80001b1980220cd2e1e05faf2dc86af41700e1
If <uses-sdk> tag is below <application> in AndroidManifest.xml then,
when activity is parsed, targetSdkVersion param is not yet set correctly.
Because of that we're defaulting to RESIZE_MODE_FORCE_RESIZEABLE and the
param resizeableActivity will be ignored.
This CL checks if resizeableActivity was set explicitly when targetSdkVersion
is less than N (or not set).
Bug: 28020462
Change-Id: I099f6c00dd50547ddea873e47dbb447869d0be6f
Since LocaleList needs to depend on android.os.Parcelable, we cannot let
that class belong to "android.util" package, which causes layering
violation.
Bug: 28819696
Change-Id: Ia8de2ee9df3dd0a42b1fe84574439519b680fe18
Rename WindowLayout#minimalWidth and #minimalHeight to #minWidth
and #minHeight to be consistent with other APIs.
Bug: 28775586
Change-Id: Ib7dc26318c4391693ef23f908b4d6090138dd0d7
am: 5bcf7650b4
* commit '5bcf7650b492ca9ce5b685c5e0f535b5927af0c6':
Update docs for ColorStateList to include alpha
Change-Id: Ibb7c034061ec5c6b540e44ca856bed2624c14629
We need to make IIntentSender oneway... but when the system is
calling that for itself, it needs to be able to return a result code.
Solution: instead of directly calling the interface, we have a new
IPC through the activity manager. If the thing being used is the
activity manager impl, it can do the synchronous send and return
the result directly in place. If not, you only get asynchronous
sending and thus never a failure result back (too bad for you!).
Change-Id: I4096e5b00063e8dba66230585a2dfe67e35e8092
Correct and clarify the documentation for ContentValues.
Signed-off-by: Steve Pomeroy <steve@staticfree.info>
(cherry picked from commit 1276b5f29e)
Change-Id: Id6f4e93dcca64dd41daeb4066d804ff173f4747b