Require that method callers always provide relevant paths, instead of
relying on constructor. Move DisplayMetrics to be an overall parser
parameter, and move PARSE_TRUSTED_OVERLAY to flags.
Parse split APKs and apply deterministic ordering based on split
names. Assert consistent package name and version code across all
split APKs in a package, and enforce unique split names and required
base APK.
Collect certificates for split APKs, enforcing they're all signed
consistently. Better flow control and resource cleanup when
collecting certs. Refactor validation code so it's easier to reason
about. Cleaner maintenance of read buffer when draining stream
contents.
Change-Id: I8bc8c62095fbb933227b9e76ad8771f4b1246fe8
1. Allow IpPrefixes to be created from strings. In order to do
this, factor out the code from LinkAddress which already does
this to a small utility class in NetworkUtils.
2. Truncate prefixes on creation, fixing a TODO.
3. Add a toString method.
4. Write a unit test.
While I'm at it, make RouteInfoTest pass again, and convert it
to use IpPrefix instead of LinkAddress.
Change-Id: I5f68f8af8f4aedb25afaee00e05369f01e82a70b
It previously kept mPath separate from mScanPath for some very odd
edge cases around moving apps-on-SD. This changes it to always use
a single path, refactors moving to keep separate paths.
Refactors method names in PackageParser to be clearer about their
APK-versus-package relationship.
Beginnings of a split package parser. Instead of requiring that
callers check error codes when null, switch to always throwing on
parse errors, to require that callers deal with the error. Longer
term the entire parser should switch to this style, but its too
pervasive for a simple refactoring.
Change-Id: If071d8e55e46e56cc201fadfb51cb471713ae973
If these constants are zero (or, rather, if they're not all
different), the test will fail with more cryptic error messages
whose cause is not obvious. Clearly check for that here.
Bug: 15602893
Change-Id: I7ca4a9c5e3d592fd93fbfa1b50666a1861a0031d
This change uses IpPrefix only in the public API and continues
to use LinkAddress for everything else. It does not change the
callers to use the new APIs, with the exception of changing
all current uses of getDestination to getDestinationLinkAddress
to make room for the new getDestination method that returns an
IpPrefix.
Based on Sreeram's earlier change:
https://googleplex-android-review.git.corp.google.com/#/c/477874/
but a bit simplified and with a bit more documentation.
Bug: 15142362
Bug: 13885501
Change-Id: Ib4cd96b22cbff4ea31bb26a7853989f50da8de4e
(cherry picked from commit 7d3b4b9a3d4de9673119632da0ebd583e50126f7)
1. Rename getNetworkPrefixLength to getPrefixLength. Update all
callers in frameworks/base and add a shim method and a TODO
for the rest.
2. @hide isSameAddressAs. It doesn't add much, and it's just
one-liner that callers can implement if they want.
3. Fix the alignment of the initial paragraph (<ul> should have
been </ul>).
4. Remove the documentation that talks about creating
LinkAddresses, since there's no public API for creating them.
With these changes I think LinkAddress is fine as a public API.
Bug: 15142362
Change-Id: Iaf3b1db577745bb68a9e1dd7f96d666dd3f3ec7c
(cherry picked from commit 9ab53650cfcd91a2a151b44b3fd1381841f76269)
1. Rename getNetworkPrefixLength to getPrefixLength. Update all
callers in frameworks/base and add a shim method and a TODO
for the rest.
2. @hide isSameAddressAs. It doesn't add much, and it's just
one-liner that callers can implement if they want.
3. Fix the alignment of the initial paragraph (<ul> should have
been </ul>).
4. Remove the documentation that talks about creating
LinkAddresses, since there's no public API for creating them.
With these changes I think LinkAddress is fine as a public API.
Bug: 15142362
Change-Id: Iaf3b1db577745bb68a9e1dd7f96d666dd3f3ec7c
This change uses IpPrefix only in the public API and continues
to use LinkAddress for everything else. It does not change the
callers to use the new APIs, with the exception of changing
all current uses of getDestination to getDestinationLinkAddress
to make room for the new getDestination method that returns an
IpPrefix.
Based on Sreeram's earlier change:
https://googleplex-android-review.git.corp.google.com/#/c/477874/
but a bit simplified and with a bit more documentation.
Bug: 15142362
Bug: 13885501
Change-Id: Ib4cd96b22cbff4ea31bb26a7853989f50da8de4e
Adds methods for dealing specifically with long data types. Used by
PackageKeySetData as part of the KeySet work. Add appropriate test methods
to MoreAsserts as well.
Bug: 6967056
Change-Id: I1e263301b353e0cd1b45126be6ef5ec310f311a8
In order to reenable DynamicRotationList for
language-switching-aware IMEs, this CL reverts
I84291fd4a7d6192b3bd0c366c49 with fixing a bug that the dynamic
rotation state is reset even when the list of input methods is
not changed.
With this CL, the dynamic rotation state is preserved when the
enabled input methods is not changed actually.
BUG: 7043015
Change-Id: I506828c7a363e79f1c767eeb28f0d3746ff1cb0d
* commit '19bdd64c3b9dd16778575164c13c8af798832f01':
Address API review comments. 1. Moved le stuff to it's subpackage. Remove BluetoothLe for all classes except *Scanner, *ScanSetting, *Advertiser and *AdvertiseSettings. 2. Make all callbacks abstract classes instead of interfaces. 3. Moved AdvertisementData and ScanRecord out and removed AdvertiseBaseData 4. Removed newBuild and use new Builder for all builders. 5. Using setxxx in builders. 6. Misc other changes.
1. Moved le stuff to it's subpackage. Remove BluetoothLe for all classes
except *Scanner, *ScanSetting, *Advertiser and *AdvertiseSettings.
2. Make all callbacks abstract classes instead of interfaces.
3. Moved AdvertisementData and ScanRecord out and removed
AdvertiseBaseData
4. Removed newBuild and use new Builder for all builders.
5. Using setxxx in builders.
6. Misc other changes.
Fixes b/15140940
Change-Id: I32ae3d24a9491baf96048040b5ac78f6f731e468
NO_SQ: multi-project submit
Ic005b94379f9d847ea, which introduced DynamicRotationList for
smarter input method rotation, is suspected to be causing a
strange behavior that InputMethodManager#switchToNextInputMethod
is choosing unexected/disabled IME/subtype.
With this CL, we switch back to StaticRotationList until the root
cause is addressed.
BUG: 7043015
Change-Id: I95fc8b28536cea6d09ea325e0caee14007cfc0a7
With this CL, the IME rotation order will be updated dynamically
based on user actions on IMEs. Currently only onCommitText is
took into considered.
Imagine that we have the following rotation order.
[A, B, C, D, E]
If a user action for C is observed, the rotation order will be
updated as follows:
[C, A, B, D, E]
Then another user action for D updates the rotation order as
follows:
[D, C, A, B, E]
BUG: 7043015
Change-Id: Ic005b94379f9d847ea87046473ed77d8018d930e
This CL does not change the existing behavior.
In I84291fd4a7d6192b, the IME rotation group is logically
devided into two groups, one is for IMEs that are declared as
supportsSwitchingToNextInputMethod == true, and the other is
IMEs that are not declared so. The problem is that the logic
was implemented with a single ime/subtype list where these two
kinds of IMEs are completely mixed. This makes the code
unnecessarily complex.
With this CL, these two rotation groups are actually managed
as two different collections separately. This allows us to
simplify the rotation logic as well as its test cases.
This CL is also a groundwork to implement smarter
language-switching logic that is applied to
language-switching-aware IMEs only.
BUG: 7043015
Change-Id: I7f08ec299ec41d614e2cd3912320687db1576e80
Installers are interested in both streaming APK data and establishing
a happens-after relationship to support resuming downloads after a
process kill or battery pull.
This exposes a generic OutputStream for writing, and hooks up flush()
to be a blocking call which returns only when all outstanding write()
data has been fsync()'ed to disk.
Tests to verify behavior.
Bug: 14975160
Change-Id: I38289867c80ac659163bb0c2158ef12d99cc570d
Previously, InputMethodSubtypeSwitchingController has relied on
its own internal lock for #getNextInputMethod and
class has to be invalidated whenever
InputMethodManagerService#mMethodMap is updated, any method of
InputMethodSubtypeSwitchingController should be called under
the global lock of InputMethodManagerService#mMethodMap.
As a consequence, we can conclude that
InputMethodSubtypeSwitchingController does not need its own
internal lock.
This CL also adds additional synchronization blocks into
the constructor of InputMethodManagerService to address the
existing inconsistency that methods with *Locked suffix are
called without the lock actually.
BUG: 7043015
Change-Id: I9d4d3d7232c984432185c10c13fb726a6158cac8
Continuous testing showed that the test is flaky because of ANR caused by too
long computation in onCreate(). So this change move computation in another
thread to free the main thread.
Change-Id: I2ecff3f3e659ff092dd4c7c230c35be4a5742c4b
This CL does not change the existing behavior.
Smarter language switching will be coverted by subsequent CLs.
BUG: 7043015
Change-Id: I281a33191d44be448492c2b74760cb8680719124