Fixes http://b/issue?id=1905863
This is needed to address two security issues with global search:
http://b/issue?id=1871088 (Apps can read content providers through GlobalSearch)
http://b/issue?id=1819627 (Apps can use GlobalSearch to launch arbirtrary intents)
This also fixes http://b/issue?id=1693153 (SearchManager.OnDismissListener
never gets called)
To fix the security issues, GlobalSearch also needs to require
a non-app permission to access its content provider and launch intents.
+ Move mServerName from SingleServerProfile and VpnProfile.
+ Add mSavedUsername to VpnProfile.
+ Keep empty SingleServerProfile to not break the classes that use it.
+ Remove use of SingleServerProfile from VpnService.java.
Merge commit '110b50ca5158f75abdead740f0956600da2f212d' into donut
* commit '110b50ca5158f75abdead740f0956600da2f212d':
AI 149839: make the home page's announcement block expandable...
As of this change, LocalTransport is successfully propagating data changes from
the backup data format into a repository stored in /cache/backup/[packagename].
Each backup key gets a separate file there for ease of manipulation and testing.
The general semantics of BackupDataReader have been tweaked, too; it now just
returns simple "we're done with the data" when it hits the end, even if no
footer has been found, because on the writing side the footer isn't being
written. Also, reading an entity now merely requires a "big enough" buffer, not
an exactly-sized one.
This is all a work in progress, but this is at least working now for purposes of
this local transport.
Still to do: proper change vs deletion detection, as well as expanding the data
format itself to include necessary metadata etc.
There was old code that would kill the system process in some cases when there
was a bad activity token. This is really no longer used, except in a few
places where it allows apps to kill the system. So just get rid of it and
make the world a better place.
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
When an application requests a backup via dataChanged(), we now journal that
fact on disk. The journal persists and is only removed following a successful
backup pass. When the backup manager is started at boot time, it looks for any
existing journal files and schedules a backup for the apps listed in them, on
the expectation that the device shut down or crashed before a backup could be
performed.
ViewGroup was trying to access the AttachInfo without checking whether the
info object is null. The object can be null at varioous times in the lifecycle
of a list.
It is only used for numeric dates -- spelled-out dates have such a complex
variety of formats that they can only be meaningfully formatted from
locale strings.
In addition, the preference is left null when initializing, on the assumption
that the locale will still specify a more useful numeric format than we can
guess as part of a build-wide configuration.
But if the user has specified a format, the date will be formatted in the
order they asked for, with locale-appropriate punctuation substituted in.
The problem is that setRingerModeInt() does not handle streams not affected by ringer mode: when enabling "Alarm in silent mode" while in silent mode, setRingerModeInt is called after alarm streamis removed from ringer mode affected streams, and nothing is done.
The fix constists in also processing streams that are not affected by ringer mode and to restore last audible volume for them. It does not arm reapplying the volume for streams the are never affected by ringer mode as we don't do this very often.
The other problem noted in the bug report (ringer volume always restored to non zero value when exiting silent mode even if set to zero before) is also fixed: a new parameter is added to setIndex() and setStreamVolumeInt() to explicitely request to store the volume index as last audible instead of doing it automatically if index > 0.
With the new implementation of using a SuggestionItemView, we no longer need to draw a solid background for all items in the suggestion listview. Hence removing the code to draw a default white background, and make the item transparent so the listview-drawn selection hilite shows through.
Also add android.security.Keystore. This is a quick solution. Will be
evolved to a more mature implementation.
PATCH SET 2:
+ Add VpnServiceBinder to hide VpnService and its subclasses.
+ Add sendCommand2() to AndroidServiceProxy to work with the latest mtpd.
PATCH SET 3:
+ Rebase to catch up with new commits; no changes made.
PATCH SET 4:
+ Remove/comment out @Override on interface methods to be compilable for Java 1.5.
PATCH SET 5:
+ Add L2tpService.java.
+ Make VpnService to work on SingleServerProfile; add serverIp to
connect(); set system property "net.vpn.server_ip"; and move
getPppOptionFilePath() from L2tpIpsecService to VpnService
+ Revise VpnManager to start VpnService without worrying about which
type (as the type info is in VpnProfile)
+ Remove installation stuff from VpnManager
PATCH SET 6:
+ Fix PATCH SET 5 (the patch was messed up). Please ignore PATCH SET 5.
PATCH SET 7:
+ Fix styles.
PATCH SET 8:
+ Add CANCELLED to VpnState.
PATCH SET 9:
+ Make VpnProfile serializable (in order to save them to persistent storage)
PATCH SET 10:
+ Remove Keystore.java as it's added in another CL.
* changes:
Make the file backup helper not crash if a file you requested can't be stated. This means you don't need to know if the files you are backing up exist or not -- we'll figure it out for you.
Fix SharedPrefsBackupHelper so it doesn't hard code the paths to the files.
* changes:
TextToSpeech class cleanups - harmonized private member variable names - added success / failure codes (used for now in initialization) - synchronized access to speech completed listener.
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
- harmonized private member variable names
- added success / failure codes (used for now in initialization)
- synchronized access to speech completed listener.
The format strings are newly generated from CLDR. The code is once again
the same as in cupcake: do the natural thing for the locale if the user
has never specified, but follow the checkbox if the user has ever set it.
* changes:
Renaming the Tts class to TextToSpeech for clarity. Switching to HashMap for parameter lists to pass key-value parameter pairs. Using TODO instead of FIXME in comments. Removing methods that don't belong anymore to the TTS interface now the feature becomes part of the platform.