CLDR-derived date formats like donut does.
There are a few strings here that are not in the donut versions
of the files, for places where donut just uses ICU data directly
instead of format strings from resources.
BUG=1979894
Automated import of CL 150506
Manual merge of https://android-git.corp.google.com/g/Gerrit#change,5804 from donut:
Ensure that we never trigger ArrayIndexOutOfBoundsException by checking that
the index is always < the array's length. Also ensures that the object's
state is consistent. Should resolve a denial-of-service bug when handling
malformed WAP pushes.
Also add a try-catch around call to dispatchMessage(), in case there are other lurking bugs. (This is also already in Donut.)
Automated import of CL 150264
Fix permissions issue for uninstall of updated system applications.
If an existing update for a system application is uninstalled, when reverting back to the existing
version in system partition, permissions have to be granted again.
BUG=1893639
Automated import of CL 150122
primarily, this is to handle various lengths of text due to translations,
but also allows us to be more flexible WRT the content for the top section.
Automated import of CL 149839
which allows us to set the language and country (based on MCC otherwise
locale country). If we are unable to retrieve the ToS, or verify the
content, we load the default ToS (en_US) from the device.
BUG=1856455
Automated import of CL 149797
When we moved the media recorder to the media server process, we lost
the permission check that was done at the process boundary in the
AudioRecord binder interface because the AudioRecord object is created
in the same process. This change adds a permission check in the
MediaRecorderClient:setAudioSource() method.
BUG=1868334
Automated import of CL 149136
Some debugging code was added to camera service. Later it was #ifdef'd
out, but this change also removed the camera permission check. This
change puts the permission check back in.
BUG=1869264
Automated import of CL 149133
To address issues where we could leave half-installed applications around if there was a failure during the install, we split getPackageLP() into two phases: the first would create the record, and only after doing all verification checks would we call insertPackageSettingLP() to do the remaining part of the original implementation and actually insert the record into the data structures.
Unfortunately it was only in insertPackageSettingLP() that we would set the sharedUser field of the PackageSetting structure, so when before that we went to verify certificates, we didn't think it had requested a shared user ID, and let it through without checking.
This fix simply sets the sharedUser field when the PackageSetting structure is first created, so we will actually check against its certs. We still also set this again in insertPackageSettingLP(), but there is no harm in this because the only time we call this function is in that big install func, which just passes in the same shared user that it had when first getting the package.
BUG=1851541
Automated import of CL 148824