When creating or renaming files on external storage, sanitize the
requested display names to be valid FAT filenames. This also fixes
a handful of directory traversal bugs.
Also relax logic around generating display names to allow any
extension which maps to the requested MIME type. Tests to verify.
Bug: 18512473, 18504132
Change-Id: I89e632019ee145f53d9d9d2050932f8939a756af
Define and print a compact version of network statistics when dump
is requested with the "--checkin" flag. Defaults to last 24 hours,
but included data can be tweaked with various flags.
Groups together detailed network identities into larger umbrella
terms like "mobile" and "wifi."
Bug: 18415963
Change-Id: I70cf9c828ea5c6e5bb6884837d3608f66fbad2e6
There was a window of time in Lollipop where we persisted certificates
after they had passed through a decode/encode cycle. The well-written
OpenSSL library was liberal when decoding (allowing slightly malformed
certs to be parsed), but then strict when encoding, giving us
different bytes for effectively the same certificate.
A related libcore change (0c990ab4a90b8a5492a67b2b728ac9a4a1ccfa1b)
now returns the original bytes verbatim, fixing both pre-Lollipop
installs and installs after that change.
This change recovers any apps that had been installed during the
window of time described above by doing a one-time check to see if
the certs are effectively equal.
Bug: 18228011
Change-Id: Ib82bd6db718d0490d7a26c9c1014b7c8457a7f2d
Mostly just getting them running again, still a few failures related
to native library symlinks that need more investigation.
Bug: 18048725
Change-Id: I4642adab9fb2b9ec1488b700edcee48c09e36005
This is a follow up CL for recent attempt to minimize
the number of default enabled IMEs.
- part1: I831502db502f4073c9c2f50ce7705a4e45e2e1e3
- part2: Ife93d909fb8a24471c425c903e2b7048826e17a3
- part3: I6571d464a46453934f0a8f5e79018a67a9a3c845
It turned out that the changes made in part2 and part3 are
a bit overkill, and users will see no software keyboards
in some particular situations. The problem we missed in
the previous CLs is the fact that
InputMethodInfo#isDefault is indeed a locale-dependent
value, hence it may vary depending on the system locale.
Existing unittests also failed to abstract such
locale-dependent nature.
In order to addresses that regression, the selection logic
is a bit widely reorganized in this CL. Now the logic is
implemented as a series of fallback rules.
Also, unit tests are updated to be able to 1) test the
order of the enabled IMEs, and 2) emulate the
locale-dependent behavior of InputMethodInfo#isDefault
to enrich test cases.
BUG: 17347871
BUG: 18192576
Change-Id: I871ccda787eb0f1099ba3574356c1da4b33681f3
This is necessary/desired for two reasons:
1. UX around network scoring shipped with L despite lacking underlying
platform support. We do not want network scoring applications to
trigger this UX on L devices, and therefore we must break the contract
of what defines a network scorer so that apps build against the new
contract don't trigger the old UX.
2. As a start towards generalizing the term "score" for a potentially
broader role in the future, though that role is very much undefined.
Bug: 18160480
Change-Id: If228977513e32e45bc44dbeda24aa18436fdfca6
If the kernel sends notification of an optimistic address then
treat is a useable address (isGlobalPreferred()).
Note that addresses flagged as IFA_F_OPTIMISTIC are
simultaneously flagged as IFA_F_TENTATIVE (when the tentative
state has cleared either DAD has succeeded or failed, and both
flags are cleared regardless).
Additionally: do not consider RFC 4193 ULA addresses sufficient
for "global preffered". They are, by definition, of global scope
but not sufficient for global reachability.
Bug: 17769720
Change-Id: I759623b28fd52758f2d4d76d167f3cafd9319d6a
This simplifies callers.
Also remove all "implementations" of addStackedLink and
removeStackedLink except the one in LinkProperties, because they
are unused.
Bug: 12111730
Change-Id: Ie294b855facba4b1436299dcb3211b72d9ba448e
Specifically:
[1] provide a hasIPv4(), and
[2] a hasIPv6()
each of which requires an IP address, a default route, and
address-family-specific DNS servers to evaluate to true.
Additionally:
[3] redefine isProvisioned() to return the logical OR
of [1] and [2] above.
Any external caller can still use any of the has*() methods to
construct its own, different definition of "provisioned".
Bug: 17769720
Change-Id: Ia692fb8508484ff403d3920c94d0e1db4563f807
For now, only animators use it but we can consider migrating
drawable cache to it as well.
Bug: 17456416
Change-Id: I571b96856805edb171f0fc52e6bff5a365f46b70
Keep around GET_TASKS as a permission available to apps, so apps still
think they have it and don't get all uppity because they don't.
Add a new REAL_GET_TASKS that is the actual permission now.
Plus some temporary compatibility code until everyone can transition
fromn GET_TASKS to REAL_GET_TASKS.
Change-Id: I12c1102eed24844685dcbd2fa3b612811603958f
Internal logic relies on Arrays.copyOf(), so always give ourselves
valid arrays, using shared empty objects to save overhead.
Bug: 17502649
Change-Id: I5dbb00545bdfe45bbd48144ab505ea08cc92cbcd
With this CL, the behavior of getDefaultEnabledImes() changes
as follows:
- Previously system IMEs are always enabled by default as long
as it is a software keyboard that supports En_* subtype. With
this CL, getDefaultEnabledImes() relies on the locale returned
from getFallbackLocaleForDefaultIme() instead of calling
isSystemImeThatHasEnglishKeyboardSubtype() to minimize the
number of enabled IMEs.
- Previously default enabled system IMEs are chosen in a
country-agnostic way. As a result, "en_IN" is enabled even
when the system locale is "en_US". With this CL, the system
first tries to find IMEs with taking the coutnry into account,
and use the country-agnostic way when and only when fallback
logic is required.
BUG: 17347871
Change-Id: I6571d464a46453934f0a8f5e79018a67a9a3c845
Previously the system tried to enable at least one auxiliary IME
even when the system is not ready. However, this doesn't make
much sense because the user should be able to set up their phone
without auxiliary IMEs. Also, IMEs enabled before the system
becomes ready are kept to be enabled after the system becomes
ready. Thus, we should minimize the number of enabled IMEs
until the system becomes ready.
BUG: 17347871
Change-Id: Ife93d909fb8a24471c425c903e2b7048826e17a3
This is another groundwork for subsequent fixes.
Notable changes in test cases are:
- simplified test cases for voice IMEs.
- added more test cases for keyboard IMEs.
- introduced assertDefaultEnabledImes() to reduce code duplicate.
BUG: 17347871
Change-Id: I8cf61cfa18ac425a2cccc7823474c3f06dc0fa1e
Before fix, test assumed that it was already connected to wifi so remove
these assertions. Also, since association test may be used against
access points with no outside connectivity, remove the ping test to
8.8.8.8 at the end.
Change-Id: I3d4f3d752b72028f642da9f8e9adda4ad18a6a56
This is another groundwork for subsequent fixes.
Notable changes in test cases are:
- A dummy Hinglish IME ("en_US" + "hi") is added
- Added test cases where system locale is "en_GB",
"en_IN", and "hi" as well as "en_US".
BUG: 17347871
Change-Id: Iacf0f47c4dbc147f8153df50ba58fc4da4dacd29
This is another groundwork for subsequent fixes.
Notable changes in test cases are:
- isSystemReady == false is now coverted.
- tests can run even when the system locale of test
environment is different from "en_US"
BUG: 17347871
Change-Id: I9434270735d3b37d8b788d41250b23d7950aaeed
This is another groundwork for subsequent fixes.
Notable changes in test cases are:
- isAsciiCapable is now annotated accordingly.
- "dummy.keyboard0" now has several subtypes like
"en_GB", "en_IN", "hi", "hi_ZZ" like the AOSP
LatinIME.
BUG: 17347871
Change-Id: Ide698ed11c2539ba5862e6b37ea63ed19f8ce566
This is a groundwork for subsequent CLs that are
supposed to improve default input method selection
logics.
Historically we have had a @hide constructor of
InputMethodSubtype. However, this contructor is
a bit obsolete because we can not specify some
parameters that were added in recent platform
releases. We should use InputMethodSubtypeBuilder
instead.
BUG: 17347871
Change-Id: I72ad79682a58344e14380eb20e26edf98aee37cd
This is another follow up CL for Ic8c6fab58c01206872a34e7e.
Ib2371849d32bb44da9ef59f05e648a476e03699a didn't cover
following renamings. This CL fixes them.
- #getCharacterRect -> #getCharacterBounds
- #getCharacterRectFlags -> #getCharacterBoundsFlags
BUG: 17365414
Change-Id: I120795da3f25f1e2fa71f455f92e3cd1c036c1d5
This is a follow up CL for Ia8cbb9f6b41cd9509fc0147fd68763dfde
and Ic8c6fab58c01206872a34e7ee604cdda1581364d.
BUG: 17365414
BUG: 17200900
Change-Id: Ib2371849d32bb44da9ef59f05e648a476e03699a
Sessions can now zero-copy data directly into pre-allocated ASEC
containers. Then at commit time, we compute the total size of the
final app, including any inherited APKs and unpacked libraries, and
resize the container in one step.
This supports both brand new ASEC installs and inheriting from
existing ASEC installs. To keep things simple, it currently requires
copying any inherited ASEC contents, but this could be optimized in
the future.
Expose new vold resize command, and allow read-write mounting of ASEC
containers. Move native library extraction into the installer flow,
since it needs to happen before ASEC is sealed. Move multiArch flag
into NativeLibraryHelper, instead of making everyone pass it
around. Migrate size calculation to shared location.
Separate "other" package name in public API, provide a path to a
storage device when relevant, and add more docs.
Bug: 16514385
Change-Id: I06c6ce588d312ee7e64cce02733895d640b88456
* reduced visibility of most util functions in
ConnectivityManagerTestBase
* reimplemented various waitFor... util function in base class:
instead of relying on received broadcast and synchronization
mechanism, we just poll for what we want with a fixed interval
and a max timeout
* minor style fixes
* removed state transition checks in all test cases of
ConnectivityManagerMobileTest: since exact state transitions
are not that interesting, we just care about if we reach a
particular state and if all network interfaces are in their
corresponding states
* clarified in comment what each test cases are testing, since
some of the test case names are not very straightforward
* any wait for DISCONNECTED checkes with ConnectivityManager are
temporarily commented out
Change-Id: I99cca95c33c6060909e0df684969b75c2dca23a9
LinkProperties can represent way more complicated configurations
than what we can actually apply to interfaces. This makes it
error-prone to use it to represent static configuration, both
when trying to apply configuration coming from LinkProperties
and when trying to save configuration from current
LinkProperties.
Instead, move static configuration (IPv4 only, since we don't
support static IPv6 configuration) into a separate
StaticIpConfiguration class.
Bug: 16114392
Bug: 16893413
Change-Id: Ib33f35c004e30b6067bb20235ffa43c247d174df
This addresses a TODO and also makes it possible to create
routes to destinations that are not valid LinkAddresses, such as
multicast addresses.
Bug: 16875580
Change-Id: Id4c77b00dc3064bf27d78cdcbbe035e645748cfe