Previously we relied on Double.parseDouble() to decode tokens. Since
that method is expensive, we deferred calling it unless absolutely
necessary.
Now we decode the literal type immediately. For efficiency we decode
the token right out of the char buffer. This makes things more
complicated but it saves many calls to charAt().
With this change overall performance is 7% faster for JSON documents
cited in the bug.
benchmark run ms linear runtime %
GsonParseFull no switch, no int parse 309 ============================ 93%
GsonParseFull baseline 330 ============================== 100%
http://b/3201883
Change-Id: I436b6769956b1357a17c807a327d3a234691c73f
When an include tag is parsed, the custom bridge
code never has access to both parsers at the same
time.
The child parser is created out of an in (representing
the layout id), and the code inflating the content of
the include layout doesn't see the parent parser either.
This changeset adds a parser stack in the BridgeContext
in order to allow access to the parent parser when setting
the viewkey. This is only used if the current parser depth
is 1 (top node), as we only want to set the include
node to the top node of the included layout.
Change-Id: I2ac3b72a0c84a269d9019f44f98cbc0b615ab959
Now try to slide dialogs if they end up moving due to the IME (or
other system things) showing/hiding. Pretty hackish, but seems to
work.
Change-Id: Icd297e941cf847fa920c9605145c46be63043d52
This fixes the SlidingDrawer that failed to load.
For some reason, in case of the SlidingDrawer, when the constructor
uses android.R.styleable.SlidingDrawer it's the same values but not
the same instance as the array read from android.R through reflection.
So what works for all other widgets, and has worked since the very first
layoutlib isn't working anymore, and we'll now have to use a wrapper
similarly to what we use in ADT in the project callback.
We should probably provide a single int[] wrapper class in layoutlib
API for all to use.
Change-Id: I4d7d038540f8a24541a588696f1059a020b589e5
addStringTag() caches non-ascii metadata strings for later
processing, and then endFile() will be called at the end of
processFile() to convert non-ascii strings from locale's charset
to utf-8 if required.
Stagefright's processFile() failed to call endFile() when the
processing file is a MIDI file or an OGG file. This patch fixes
this problem to populate metadata correctly.
Reviewed by: Brad Fitzpatrick, Marco Nelissen.
Change-Id: I072e79d81dce1fec63297d2b5d2b870a72e5b66e
This is done by initializing the android.util.Finalizers that's
reponsible for calling out to the native bitmap destructor.
Also implemented the native bitmap destructor
Also fix Bridge by removing obsolete API methods, and removing
some unneeded synchronized blocks now that the whole rendering
(and scene creation) is protected by a synchronized on the bridge
object anyway.
Change-Id: Ie1792da6db354836542dfc11f457fe4a6d78ddfb
- Move SupplicantStateTracker into a seperate file. In the
process clean up code that needs to be present only in SupplicantStateTracker
- Retry twice for password failures
- Clean up supplicant state handling. Dont treat supplicant states
as HSM what values. Instead, just retain SUPPLICANT_STATE_CHANGE
- Add event logging in SupplicantStateTracker
- Move scan handling out SupplicantStateTracker
Change-Id: I083e1c40ef5a858164493b1440b82c5751b3bfb5
Rework sensorservice to allow "virtual sensors", that is
sensors that report a synthetized value based on real sensors.
the main change to sensorservice is around managing which real
sensor need to be activated and which rate to use.
The logic for all this has been moved into SensorDevice, which
essentially wraps the sensor HAL but adds two features to it:
- it keeps track of which sensors need to be activated
- it keeps track of what rate needs to be used
For this purpose an "identity" is associated with each real sensor
activation, so we can track them.
On start-up we check for gravity, linear-acceleration and
rotation-vector sensors, if they're not present in the HAL, we
synthetize them in sensor-service.
Change-Id: I841db2c1b37ef127ed571efa21732ecc5adf1800
Change EXTRA_SHOW_SPN and EXTRA_SHOW_PLMN to be false if spn and plmn
are null or empty respectively. For CDMA EXTRA_SHOW_SPN is always false.
bug: 3191159
Change-Id: Ic13b946cee10b123ec4960f2d22e13c8cb1dd20d