Move reachable DNS server computation out of ConnectivityService
and split it into LinkProperties#isReachable() and a companion
change in WifiStateMachine's makeLinkProperties().
Restore previous ConnectivityService#updateDnses() behaviour, as
the pruning is done in WifiStateMachine now.
Bug: 19470192
Bug: 20733156
Bug: 22098233
Change-Id: I810ef74d504e5dc1ca2017d435cdadd6b82171e6
Since Ia25e7b4f308778891929e31b8cbd741f6848cce4, the TSMS has
picked up the first found spell checker no matter regardless of
the system locale.
The primary goal of this CL is to introduce a low-risk fix for
the situation where two or more spell checker services are
pre-installed but they are well different from each other in
terms of supported languages. Solving the problem in more
ambiguous and complicated situation is beyond the goal of
this CL.
With this CL, we still pick up the first found spell checker
but also require the spell checker supports a certain locale.
We will try several locales starting with the system locale
to some fallback locales until we find one appropriate spell
checker. If no spell checker is picked up in this process,
we simply pick up the first one as we have done.
Examples about what locales will be checked are:
A. System locale: en_US
1. en_US
2. en_GB
3. en
B. System locale: en
1. en
2. en_US
3. en_GB
C. System locale: en_IN
1. en_IN
2. en_US
3. en_GB
4. en
D. System locale: ja_JP
1. ja_JP
2. ja
3. en_US
4. en_GB
5. en
E. System locale: fil_PH
1. fil_PH
2. fil
3. en_US
4. en_GB
5. en
F. System locale: th_TH_TH
1. th_TH_TH
2. th_TH
3. th
4. en_US
5. en_GB
6. en
Bug: 22042994
Change-Id: I094f1c33430f7904a1dac6167431d6df64a07212
The overlaytests testrunner.py script wants to invoke adb shell md5sum
to compute the md5 of a file, but wrongly invokes it as md5. Maybe
it used to have that name, but it doesn't exist under that name in master.
Fix it.
Change-Id: I3ec4be162fab0cd3915f010f9b1add37b5397973
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Additionally:
- make zero more obvious for debugging, rather than emitting
some inscrutable magic value.
Bug: 19537384
Change-Id: Iac9a3297a0dda1ba3d69fd01cf6de81f01fd837e
ext4 filenames are at most 255 bytes. vfat filenames are bit more
lax, but we're often saving them on ext4 through a FUSE daemon, so
limit them the same way.
Since package names are used as directory names, verify that they're
valid filenames.
Tests to verify behavior.
Bug: 18689171
Change-Id: If7df4c40d352954510b71de4ff05d78259c721ed
This change enable the posibility to enforce using a
16-digit pin or MITM for a RFCOMM or L2CAP connection.
This is needed for the SIM access profile.
Change-Id: I3205013f9e758c353381442a86845dab467780f8
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
Code that uses android.system.Os to create sockets as FileDescriptors
should be able to bind them to networks. Note that FileDescriptors
could already be marked as "protected from VPNs" via
NetworkUtils#protectFromVpn(), but heretofore were not easily bound
to any particular network.
Bug: 21449922
Change-Id: I4bb86db5d95d5a55bb2d7e245848d11eaa351e65
On Android, "tl" is a historic hack for what should really
be "fil". Now that we properly support 3-letter language codes,
we should be using "fil" throughout. Given this historical usage,
IMEs that really want to support Tagalog (and not Filipino)
should use the ISO-639-3 code for Tagalog, which is "tgl".
For backward compatibility reasons, this CL uses the similar
approach to I26e3aa0333aa3c76c80a3c1c9090cc2b368c8e10.
InputMethodSubtype.getLocale() continues to return the "locale"
string parameter passed to the constructor as is, but in the
Android framework we do normalizations/conversions whenever
we need a valid ISO-639-3 code.
In I26e3aa0333aa3c76c80a3c1c9090cc2b368c8e10, we rely on the
conversion in the Locale constructor. In this CL, we do replace
"tl" with "fil" by ourselves.
This CL also adds InputMethodSubtype#getLocaleObject() a hidden
API so that we can start relying on the Locale object at least
in the framework.
This CL is based on the investigation by Narayan Kamath and his
patch.
Bug: 20696126
Change-Id: I94f203bddceb9c87710cb187cc3cc0ee6d9092a5
Adds:
- enum ProvisioningChange
- LinkProperties#compareProvisioning()
return a ProvisioningChange value describing the delta in
provisioning between two LinkProperties objects
- LinkProperties#removeDnsServer()
- make "@hide public" isIPv4Provisioned() and isIPv6Provisioned()
Bug: 18581716
Change-Id: I3df90b2b89617f693346f2dbe72e77c88ce91ffd
With NLM_F_ACK set in RTM_NEWNEIGH requests we get some response from
the kernel, whether there was an error or not.
Additionally:
[1] add IpReachabilityMonitor#probeNeighbor() as a public
static method, since it actually depends very little on the
class internals and might be of larger use.
[2] add a unittest for parsing NetlinkErrorMessages.
Bug: 18581716
Change-Id: I5d62e7a9972c7440f0483c38c77677436d3a1a25
This forces the NetlinkSocketObserver thread to exit quickly, rather
than lingering until the next random netlink neighbor multicast message
arrives.
Additionally, add a small unittest to verify that multiple calls to
NetlinkSocket#close() are safe.
Change-Id: I101730fad7eee72f9c6e8a7e7bd10c634f2ceab4
Adapt to Jack compilation specifics.
Fix bad import in VideoDumpActivity.
The extra semicolumn is ignored by javac because of
https://bugs.openjdk.java.net/browse/JDK-8027682 but is not
permitted by ecj or Jack.
This includes cherry-picks of the following changes:
248ef6f9c414db26fd1bc7ec3d4ee4f3b87d54cf
705555dc468e46560d02db102dfcedc1e5c70d9e
f50a51fb4c8d5ca973ce910a21bddf9f8466cb51
bf5ad8d9943c0e1b0b3f1b4524c277f369065d08
Change-Id: Ifbe063e3822a7d63b1681921b9788cfca898ba64
Note that this change is not sufficient to force probing in all cases,
but does cause probing to occur on Linux if the target node hasn't been
confirmed as reachable in the past 5 seconds (delay_first_probe_time).
Bug: 18581716
Bug: 19866451
Bug: 20944464
Change-Id: I29393897118311b48c966c41e2cddb7a784f136f
The implementation of onActivityResult in TextView did not check the
result code, hence treating the cancelled activity result as a
replacement by empty text.
Also added tests to catch this case and basic usage.
Bug: 21183019
Change-Id: Ibdafe89474dd69c5b70c67ec98fed46656f9fdcf
Tests focusing on action mode creation, how the two types of
modes are handled together and how the lifecycle is handled.
Change-Id: I17fe7a83cba4651b295a8ce80bc449f2f2538048
Add netlink socket helpers and parsing code for basic netlink messages.
Additionally, support from some neighbor discovery -specific messages
is included.
Bug: 18581716
Change-Id: Ib2aa924222b63cdbebf09a8bf8ff35ee24269fc5
BUG: 20010079
Api change: ApplicationInfo now has a fullBackupContent int
where -1 is (off) 0 is (on) and >0 indicates an xml
resource that should be parsed in order for a developer
to indicate exactly which files they want to include/exclude
from the backup set.
dd: https://docs.google.com/document/d/1dnNctwhWOI-_qtZ7I3iNRtrbShmERj2GFTzwV4xXtOk/edit#heading=h.wcfw1q2pbmae
Change-Id: I90273dc0aef5e9a3230c6b074a45e8f5409ed5ce
Since package and primary storage movement can take quite awhile,
we want to have SystemUI surface progress and allow the Settings
app to be torn down while the movement proceeds in the background.
Movement requests now return a unique ID that identifies an ongoing
operation, and interested parties can observe ongoing progress and
final status. Internally, progress and status are overloaded so
the values 0-100 are progress, and any values outside that range
are terminal status.
Add explicit constants for special-cased volume UUIDs, and change
the APIs to accept VolumeInfo to reduce confusion. Internally the
UUID value "null" means internal storage, and "primary_physical"
means the current primary physical volume. These values are used
for both package and primary storage movement destinations.
Persist the current primary storage location in MountService
metadata, since it can be moved over time.
Surface disk scanned events with separate volume count so we can
determine when it's partitioned successfully. Also send broadcast
to support TvSettings launching into adoption flow.
Bug: 19993667
Change-Id: Ic8a4034033c3cb3262023dba4a642efc6795af10
Move code for checking file extensions and MIME types from
ExternalStorageProvider into android.os.FileUtils, so it can be used by
other clients (e.g. DownloadsProvider).
BUG=20157955
Change-Id: Ib16a16af723c21fb8d2912c8917dfd68653ea6fa
Since packages can be moved to other volumes, all relevant commands
to installd now require an explicit volume UUID parameter.
Bug: 20275577
Change-Id: Ie84f5bc43c7aada5800b8d71692c7928b42b965e
This was originally to avoid RuntimeException in RouteInfo#matches():
When an IPv6 prefix with a length greater than the max permitted
for IPv4 is matched against an Inet4Address, the call to
NetworkUtils throws RuntimeException.
Change-Id: I92e2bd19a4e7d656cf682fd27678da07e211850d
Start deriving the data path for apps based on the volume UUID where
the app lives. This path is used for all higher-level APIs, giving
us a clean place to switch app storage.
When parsing a package, keep track of the volume UUID where it lives
and update PackageSetting once installed. For now continue treating
moves as installs, but we'll eventually clean this up to avoid the
additional dexopt pass. Wire up move to use the new installd command
to move private data between devices.
Cache LoadedApk only for the current user, since otherwise the data
dir points at the wrong path.
Bug: 19993667
Change-Id: I53336e3b147d5fd3130e6800869af172b628da37
Introduced new 'extractNativeLibs' attribute to manifest/application.
Setting it to false prevents installer from extracting library from apk.
The default value for extractNativeLibs is true.
Bug: 8076853
(cherry picked from commit ff193d642eea7128faad837d19e347cd25212c27)
Change-Id: I1aa2c039bb2a590ae72f256acc9ba5401c2c59b1
This makes the hidden API android.net.Uri.toSafeString omit most parts
of HTTP, HTTPS, and FTP URLs to avoid leaking anything unsafe. Only
the host and port are retained for these URLs.
Bug: 19215516
Change-Id: I2e9e33d9afaa9de5dd07a40532d56f0a2179f62a
Added new restriction types - bundle and bundle-array.
Modified RestrictionsManager.getManifestRestrictions to support new
hierarchical restrictions.
Added RestrictionsManager.convertRestrictionsToBundle, which enables
programmatic conversion from a list of RestrictionEntries to a Bundle.
Modified read/write methods for application restrictions in UserManagerService.
Added unit tests.
Bug: 19540606
Change-Id: I32b264e04d5d177ea5b4c39a8ace5ee0ce907970