* commit 'b1123831c098e9e32c39ce93583dadd121709935':
Revert "Remove the warning if the caller gets the insecure variant and add hostname verification (SNI)"
* commit 'b4b398b7cae59c581930acc58d9b9f09262c0695':
Revert "Remove the warning if the caller gets the insecure variant and add hostname verification (SNI)"
The main purpose for this change is to prepare for adding support for
alternative line breaking algorithms (such as optimal line breaking).
The existing implementation of line breaking was intertwined with
measurement, so it wasn't structured in a way such that other line
breaking algorithms could be easily added. In addition to this,
algorithms (such as optimal line breaking) are usually fairly complex
and computation-intensive, so it is advantageous to implement them in
native code.
This has several other advantages:
* Unlike the Java code in the previous version of generate(), this
implementation separates line breaking from measurement. This
makes it easier to understand and modify the line breaking process
without affecting measurement (and vice versa).
* This native implementation of greedy line breaking is identical to
the Java version in terms of functionality, and it is similar in
terms of performance, depending on the use case. The performance
gains from this change are not significant due to increased JNI
overhead. However, this change is a step in the right direction in
terms of increasing performance. Once more code moves to C++,
there will be fewer JNI crossings per layout call and less data
will be passed from Java to C++, resulting in better performance.
This change moves line breaking from Java to native C++ code. Inspired
by the "Breaking Paragraphs into Lines" paper by Knuth and Plass (1981),
we express the line breaking problem in terms of 'box', 'glue', and
'penalty' primitives, along with a few others. Our implementation
differs in a couple ways:
* We do not want to clip text when words are wider than the view, so
we add a new primitive type to represent break opportunities
between letters. These breaks are avoided whenever possible, but
when single words do not fit on lines by themselves, they can be
broken so the entire word is visible.
* We have to support tab characters, along with user*specified tab
stops, so we add a new primitive type for that purpose.
* We are left*aligning text, and so we are not using shrinking /
stretching glue.
* We do not support hypenation, so we do not use penalties that have
widths.
Change-Id: Ia22d1d1275ef26ff3d7b41ee2658e4db525a0305
There is a bug in how we deal with name overflows combined with resetting
the battery stats data. If we do a reset while a wakelock is being
actively held that has been put into the overflow bucket, then we can
end up reducing the number of known wake locks in the list so when after
that it is released we try to release it under its real name rather than
the overflow name.
This means we need to keep track of which wake locks have been placed
in the overflow bucket while they are actively being used, so we can be
sure to properly handle it as part of that bucket until it is eventually
released.
This makes things... somewhat more complicated. So now we have a class
to take care of all these details, and also use it for other places where
we have the same overflow semantics sync and job stats.
Also fix potential deadlock -- BatteryStatsHelper needs to call on to
ConnectivityManager to find out of there is telepohny, however we use
that class when doing a dump while the battery stats lock is held. To
fix this, we check the connectivity state up in the battery stats service
before acquiring the lock and propagate that information through to the
dump code.
Change-Id: Ib452206af5c36f4b0f03cc94d2845d36613d1ba5
It was being given the argument and just... ignoring it.
But the bulk of this change is to make replacePreferredActivity
better about replacing -- it now detects if the request will not
make a change and, in that case, just do nothing.
The reason for this?
It turns out that each time you install an app, the telephony
system is calling this function over 20 times to set the default
SMS app. This is almost always doing nothing, but before this
change it means we would re-write packages.xml over 20 times...!
There are definitely more improvements that can be made here (delaying
write of packages.xml to allow them to batch together, reducing
the amount of calls being made), but until then this is a big
improvement.
Change-Id: I02c4235b8ecd5c13ef53e65d13c7dc2223719cec
We weren't taking care of the case of an upgrade to L. The main
change here is that the voice interaction service setting now has
an empty string when the user has explicitly said they don't want
one, so when it is null we will initialize it to its default.
Change-Id: Icdd30b4f09498f8928cea759a64628bd43bc5d0e