Commit Graph

6439 Commits

Author SHA1 Message Date
Joe Onorato
c3db3e217f Merge "Add data from /proc/pagetypeinfo to procstats." into nyc-dev
am: 4dbdd5d971

* commit '4dbdd5d97155364305abf7c010c165f1a6f79edb':
  Add data from /proc/pagetypeinfo to procstats.

Change-Id: Ic86eb0ad4278dc2d0b7f93148bab00a1f707dc16
2016-05-23 19:50:45 +00:00
Joe Onorato
c23befa183 Add data from /proc/pagetypeinfo to procstats.
This data tells us the number of pages of each type that
are available by page size.  It is collected each time
the procstats snapshot is taken, and printed in the
checkin and verbose (dumpsys procstats -a) modes.

Change-Id: I14562eac15833617391c560638a9e7d239ef8db6
2016-05-23 11:33:11 -07:00
Victor Chang
1e93177121 Merge "New api in LockSettingsService to get StrongAuth synchronously" into nyc-dev
am: d86ac8116b

* commit 'd86ac8116bfc64c61d8124ff8d3e92be5e55cd3e':
  New api in LockSettingsService to get StrongAuth synchronously

Change-Id: I3fe13c51d5d33f5689f0b4130a33cf3a2777e186
2016-05-23 11:58:41 +00:00
Victor Chang
d86ac8116b Merge "New api in LockSettingsService to get StrongAuth synchronously" into nyc-dev 2016-05-23 11:51:56 +00:00
Robert Carr
89770ebf62 Merge "Correctly clear resizing drawable when nulling background." into nyc-dev
am: a3ec065a43

* commit 'a3ec065a43069a19dc42f023a40d54a3178f1b44':
  Correctly clear resizing drawable when nulling background.

Change-Id: I9cbb109bbd7891c30711a68bf88d8b2c4332baa3
2016-05-20 23:01:03 +00:00
TreeHugger Robot
a3ec065a43 Merge "Correctly clear resizing drawable when nulling background." into nyc-dev 2016-05-20 22:56:47 +00:00
Adam Lesinski
fea0c3af7a Merge "Fix parsing of kernel wakelocks" into nyc-dev
am: 6f0d399214

* commit '6f0d3992149aa782450667ed750fe0c3cf8ee334':
  Fix parsing of kernel wakelocks

Change-Id: Ibc60849809b5553e820833437a9d2d47d065a38e
2016-05-20 17:32:42 +00:00
Adam Lesinski
6f0d399214 Merge "Fix parsing of kernel wakelocks" into nyc-dev 2016-05-20 17:23:08 +00:00
Neil Fuller
761f70d5a6 Merge "Add support for ICU data pinning in the Zygote" into nyc-dev 2016-05-20 12:53:48 +00:00
Adam Lesinski
d84ad30ee6 Fix parsing of kernel wakelocks
We handled stale wakelocks (wakelocks that disappear from /d/wakeup_sources)
differently in previous version of Android. They would be set stale, but still be
updated with their previous counts (they would never disappear).

The method setStale has been replaced with endSample(), which is semantically different.
Once a SamplingTimer has endSample() called, it expects any future calls to update() to
be a new sample, meaning the entire amount passed to update() is included in the kernel
wakelock's total. Since stale wakelocks were never removed from the list, this would
increase by large amounts when nothing had actually changed.

This was exacerbated by the fact that there was a bug where the last wakelock in
/d/wakeup_sources was never parsed, so if the order ever changed, this "stale" wakelock
would suddenly re-appear and the entire amount reported would be charged to the wakelock,
instead of just the difference since the last update.

All this was exposed when we added support to handle wakelocks that would disappear and
reappear with smaller values, meaning the kernel had pruned them from its accounting and
reset them.

Bug:28601080
Change-Id: Ic96027f7d580dac5e20aa73d67e5cedac4ccabeb
2016-05-19 17:21:10 -07:00
Robert Carr
692a5feab9 Correctly clear resizing drawable when nulling background.
When a null window background is set, we want to use the
fallback drawable for resizing.

Bug: 28801472

Change-Id: Ia616d7aa18b0d7aa2c7081a85ce7551ecfeca5b3
2016-05-19 15:11:14 -07:00
Sergio Giro
3eb0680642 Merge "ZygoteInit: install AndroidKeyStoreProvider in the Zygote" into nyc-dev
am: 44b9f13f9c

* commit '44b9f13f9cfaf2e1136a1f2baab54b229d221fe4':
  ZygoteInit: install AndroidKeyStoreProvider in the Zygote

Change-Id: Ia20b312dfd8181fadd38f075817630a1c5ab518f
2016-05-19 18:09:30 +00:00
Sergio Giro
69de32071c ZygoteInit: install AndroidKeyStoreProvider in the Zygote
Instead of in activity thread. That way, we can warm up (ie,
precompute cached values) this provider and AndroidBCWorkaroundProvider
(which are installed together) so that the computation doesn't
happen in the app. As a result, the time spent in the first call to
SSLSocketFactory.getDefault() decreases by ~5ms in angler userdebug.
Measured with an app calling SSLSocketFactory.getDefault in onCreate
and timed it with System.currentTimeMillis() .

Bug: 28545496

Change-Id: I73284eccdf6d51dbf55206335d759ccf795c5f41
2016-05-19 16:42:19 +00:00
Neil Fuller
4f41f6198b Add support for ICU data pinning in the Zygote
Upstream ICU caches use SoftReferences. On Android this means
that useful cached data initialized in the Zygote are "lost" when
the Zygote GCs and cannot be shared with apps. This change makes use
of an Android patch to ICU to ensure References created during
Zygote initialization are "strong". i.e. they are never collected.
This prevents them being GCd and ensures they can be shared between
applications.

After switching ICU to use strong references, this change
also creates DecimalFormatSymbols objects for common ULocales
(ROOT, US and the user's default, if different). DecimalFormatSymbols
makes use of an ICU Reference cache and this alone has been shown to
improve the construction time of java.text.DecimalFormat by 1-1.5
milliseconds on a Seed device. This saving applies the first time one
is created in each app for each locale, and again if SoftReferences
have been cleared.

The cost to the heap size of the Zygote has been measured at ~107k.
This value will change as more caches are switched to use the new
CacheValue class.

Formatting is typically performed on the UI thread and the intention
of this change is to reduce app start up time and jank in apps like
the Dialer which do a lot of formatting when scrolling lists. The
change may also enable more virtual memory page-sharing between
apps, though this is not the specific goal.

Bug: 28326526
(cherry picked from commit 41c9dc3b69)

Change-Id: I48e4d57ecbb207b9a5e17b6caf5e7b282e4a40e3
2016-05-19 17:24:27 +01:00
Victor Chang
a0940d33dc New api in LockSettingsService to get StrongAuth synchronously
Not all client needs to monitor the StrongAuth, e.g. ConfirmDeviceCredentialBaseFragment
Provide a quick method to get StrongAuth

Bug: 28752364
Change-Id: Iecfd217046da38e43297bdd5832cf7d637b979ed
2016-05-19 15:01:26 +01:00
Andreas Gampe
54748384ea Merge "Frameworks/base: Add more systrace points" into nyc-dev
am: b40bcfb6ad

* commit 'b40bcfb6ad3d60e5606f41c6628c133512e0538e':
  Frameworks/base: Add more systrace points

Change-Id: I1ede493eaab4a86c67a992c2eb4129f81d903d1c
2016-05-19 00:14:14 +00:00
Andreas Gampe
4c8e542f68 Frameworks/base: Add more systrace points
Add more systrace points for application startup.

Bug: 28625993
Change-Id: I76dca9e842fb43f1b85981ef94582074d31528c8
2016-05-18 15:43:45 -07:00
Neil Fuller
c724f2207f Merge "Add support for ICU data pinning in the Zygote" am: 9b1d64410d
am: 8491b4c05d

* commit '8491b4c05d35b15e0a4c1a0ef2396cbb7169698a':
  Add support for ICU data pinning in the Zygote

Change-Id: I64ba8a96ab8990a051a68cbdb35f4b1de3738d09
2016-05-18 11:55:44 +00:00
Neil Fuller
8491b4c05d Merge "Add support for ICU data pinning in the Zygote"
am: 9b1d64410d

* commit '9b1d64410dfddc38ade15d1581de2c89ad79948a':
  Add support for ICU data pinning in the Zygote

Change-Id: I53a2d5f885df5cf633a4a63cb2e3c2bc5c75959e
2016-05-18 11:51:05 +00:00
Neil Fuller
41c9dc3b69 Add support for ICU data pinning in the Zygote
Upstream ICU caches use SoftReferences. On Android this means
that useful cached data initialized in the Zygote are "lost" when
the Zygote GCs and cannot be shared with apps. This change makes use
of an Android patch to ICU to ensure References created during
Zygote initialization are "strong". i.e. they are never collected.
This prevents them being GCd and ensures they can be shared between
applications.

After switching ICU to use strong references, this change
also creates DecimalFormatSymbols objects for common ULocales
(ROOT, US and the user's default, if different). DecimalFormatSymbols
makes use of an ICU Reference cache and this alone has been shown to
improve the construction time of java.text.DecimalFormat by 1-1.5
milliseconds on a Seed device. This saving applies the first time one
is created in each app for each locale, and again if SoftReferences
have been cleared.

The cost to the heap size of the Zygote has been measured at ~107k.
This value will change as more caches are switched to use the new
CacheValue class.

Formatting is typically performed on the UI thread and the intention
of this change is to reduce app start up time and jank in apps like
the Dialer which do a lot of formatting when scrolling lists. The
change may also enable more virtual memory page-sharing between
apps, though this is not the specific goal.

Bug: 28326526
Change-Id: Ia2c73f6525f05b1aa81e57a31eed1616decf6bb5
2016-05-18 11:15:11 +01:00
Yohei Yukawa
ddaf3f4681 Merge "Move LocaleList to avoid layering violation." into nyc-dev
am: 31884efd13

* commit '31884efd13b3ac60078edaa0b7e8a4b75d995538':
  Move LocaleList to avoid layering violation.

Change-Id: I9132fe456a8d79569c651dac0a0bce0153444767
2016-05-18 02:18:38 +00:00
Yohei Yukawa
31884efd13 Merge "Move LocaleList to avoid layering violation." into nyc-dev 2016-05-18 02:14:26 +00:00
Joe Onorato
6b10cec210 Merge changes If51568c3,Idd434c19 into nyc-dev
am: 45165c9373

* commit '45165c9373f1bf2dbe0c3f11b271daa24414ea35':
  Demote the log in ProcessState.ensureNotDead from a wtf to a warning.
  @hide SystemHealthManager.from

Change-Id: Id56c7ee80254eac26132956ef62b83c405a0e2f8
2016-05-18 00:49:54 +00:00
TreeHugger Robot
45165c9373 Merge changes If51568c3,Idd434c19 into nyc-dev
* changes:
  Demote the log in ProcessState.ensureNotDead from a wtf to a warning.
  @hide SystemHealthManager.from
2016-05-18 00:46:47 +00:00
Jorim Jaggi
e48384c867 Merge "Fix threading problems with drawables" into nyc-dev
am: 1e09e9826b

* commit '1e09e9826b24c6d877920b027954e0e861a336a0':
  Fix threading problems with drawables

Change-Id: I06a58a1a9454f9e9c384b9999ef6077cc45cf46f
2016-05-18 00:28:48 +00:00
Yohei Yukawa
23cbe85610 Move LocaleList to avoid layering violation.
Since LocaleList needs to depend on android.os.Parcelable, we cannot let
that class belong to "android.util" package, which causes layering
violation.

Bug: 28819696
Change-Id: Ia8de2ee9df3dd0a42b1fe84574439519b680fe18
2016-05-17 16:42:58 -07:00
Jorim Jaggi
ca0cf0f529 Fix threading problems with drawables
We can't use the same instance on both the main and the background
thread, as this will lead to problems.

Change-Id: Ieec525f028df2d0596667126d8f5004773461517
Fixes: 28745682
2016-05-17 23:05:38 +00:00
Joe Onorato
1cc1d13d6e Demote the log in ProcessState.ensureNotDead from a wtf to a warning.
It's raising alarm bells but there isn't much we can do without a lot
of rewriting inside the ActivityManager.  The only consequence is stats
that are off by a little bit.

Bug: 28581070
Change-Id: If51568c3a708a907ceef6452e7d45599a57454f7
2016-05-17 15:31:38 -07:00
Phil Weaver
efae6e9ff1 Merge "Content description for FloatingToobar overflow." into nyc-dev
am: 43141e33f7

* commit '43141e33f7e7da5b7514549cf23f5228915f11d8':
  Content description for FloatingToobar overflow.

Change-Id: Id7656042c60e76a5afa593df1613e1a609366507
2016-05-17 17:15:25 +00:00
Phil Weaver
43141e33f7 Merge "Content description for FloatingToobar overflow." into nyc-dev 2016-05-17 17:08:29 +00:00
Sergio Giro
57b8a73d0e ZygoteInit: remove extra copy of method DO NOT MERGE ANYWHERE
The method warmUpJcaProviders arrived here from both nyc-dev
and aosp/master, removing duplication.

Change-Id: I2d91ee38fe93f600bec89651416e84ab83ef9d4a
2016-05-17 17:55:27 +01:00
Sergio Giro
9d95ab47ff Merge "ZygoteInit: warm up JCA providers during preload" am: aa733e0b41
am: ef42102cf8

* commit 'ef42102cf8d0dd238deb1871bef07f9646622a91':
  ZygoteInit: warm up JCA providers during preload

Change-Id: I7c8ed5394af0c6e1fd25b289ca615125c4e3c38e
2016-05-17 16:01:45 +00:00
Sergio Giro
ef42102cf8 Merge "ZygoteInit: warm up JCA providers during preload"
am: aa733e0b41

* commit 'aa733e0b41e4e15908a4c89e935f824cc5908b4d':
  ZygoteInit: warm up JCA providers during preload

Change-Id: If96e2e482e3fc01c2d3be5eee6d405f9bb5a6571
2016-05-17 15:56:32 +00:00
Sergio Giro
b07595d194 ZygoteInit: warm up JCA providers during preload
This makes the time spent in the first call of an app to
SSLSocketFactory.getDefault() drop from ~240 ms to ~50 ms. In M
it was around ~6ms. This is due to the fact that, while instantiating
the default factory, all providers are initialized.

In order to obtain the timings above, I created an app calling
SSLSocketFactory.getDefault in onCreate and timed it
with System.currentTimeMillis() .

(cherry picked from commit 6cb7b1c476)

Bug: 28545496

Change-Id: Ic5aab3ece609d9fef06fee4ccb83d8371af075b2
2016-05-17 14:39:44 +01:00
Sergio Giro
d423407254 Merge "ZygoteInit: warm up JCA providers during preload" into nyc-dev
am: 5a68af3840

* commit '5a68af384037f2980215dd45b91c5165c779d4e8':
  ZygoteInit: warm up JCA providers during preload

Change-Id: If7879885eaefbd8499769d688eefde28edd15c87
2016-05-17 11:11:11 +00:00
Sergio Giro
5a68af3840 Merge "ZygoteInit: warm up JCA providers during preload" into nyc-dev 2016-05-17 11:02:20 +00:00
Sergio Giro
6cb7b1c476 ZygoteInit: warm up JCA providers during preload
This makes the time spent in the first call of an app to
SSLSocketFactory.getDefault() drop from ~240 ms to ~50 ms. In M
it was around ~6ms. This is due to the fact that, while instantiating
the default factory, all providers are initialized.

In order to obtain the timings above, I created an app calling
SSLSocketFactory.getDefault in onCreate and timed it
with System.currentTimeMillis() .

Bug: 28545496

Change-Id: I650d4b0435e67e481a41e02b0b538ce5cc993fa3
2016-05-17 10:02:09 +00:00
Christopher Tate
b7ae368079 Merge "Sysconfig define a whitelist of permitted backup transports" into nyc-dev
am: 11d9586117

* commit '11d9586117e983e36b2467bcb436200268cd0933':
  Sysconfig define a whitelist of permitted backup transports

Change-Id: I5987e96ea1d2668037a7f924ad3ee6b5fa96bda8
2016-05-17 01:05:23 +00:00
Chris Tate
11d9586117 Merge "Sysconfig define a whitelist of permitted backup transports" into nyc-dev 2016-05-17 00:56:49 +00:00
Svetoslav Ganov
4f968024f4 Merge "Ensure app op restrictions reset when the app that set them dies." into nyc-dev
am: 008d73bd5b

* commit '008d73bd5b3ca4b1b7a8af61957759d65dd67e3b':
  Ensure app op restrictions reset when the app that set them dies.

Change-Id: I177256a7f65b3f5c98e5ddc5cf57a7cb47c965ab
2016-05-16 22:51:03 +00:00
Svetoslav Ganov
008d73bd5b Merge "Ensure app op restrictions reset when the app that set them dies." into nyc-dev 2016-05-16 22:42:49 +00:00
Svetoslav Ganov
a8bbd76d9b Ensure app op restrictions reset when the app that set them dies.
We were not keeping track when an app that set an app op restriction
dies to clean up after that. As a result we may end up with stale
restrictions that will be there until the device reoots - not cool.
This change adds remote binder death tracking and simplifies the
code as adding the formed would have made more complex.

bug:28770536

Change-Id: I7dcaafba2354843a0cdf0206ab1f96625edc5120
2016-05-16 15:34:34 -07:00
Phil Weaver
1d4e18340e Content description for FloatingToobar overflow.
Was missing a content description. The same button is used for
both opening and closing the toolbar, so it needs to be updated
dynamically.

Bug: 28750935
Change-Id: I7f75701ae6af45e5621c36b81003b658479e8b31
2016-05-16 09:41:14 -07:00
Yohei Yukawa
a1c905caf3 Merge "Make IMS#clearInsetOfPreviousIme() reliable." into nyc-dev
am: cef3337cb5

* commit 'cef3337cb5e27d4f571fb350be055c26d339833d':
  Make IMS#clearInsetOfPreviousIme() reliable.

Change-Id: I76b607cd8086f421fc0d552a348a70fc06aa3d9c
2016-05-16 15:31:05 +00:00
Yohei Yukawa
833bdcedce Make IMS#clearInsetOfPreviousIme() reliable.
This is a follow-up to my previous CL [1] for Bug 15922840 so that we
can clear the following variables in a more reliable way.
 - PhoneWindowManager#mLastInputMethodWindow
 - PhoneWindowManager#mLastInputMethodTargetWindow

The idea behind CL [2] is that when InputMethodManagerService (IMMS) is
switching from an IME to another IME, IMMS can send a signal to
WindowManagerService (WMS) to remember the current IME's inset so that
the system can continue using it to reduce jank until the new inset is
specified by the next IME.  As summarized in Bug 28781358, however, if
the next IME does not show the window after the IME switch, WMS (or
PhoneWindowManager to be precise) keeps using the previous IME's inset
unexpectedly until the new IME shows its window.  All we have seen in
Bug 15922840 and Bug 26663589 fall into this category.

The idea of this CL is just adding a hidden API to InputMethodManager so
that InputMethodService#clearInsetOfPreviousIme() can surely terminate
the IME transition state managed in PhoneWindowManager, rather than
relying on a hack of calling SoftInputWindow#show() and
SoftInputWindow#hide(), which actually does not work for Bug 26663589.

 [1]: Ib04967f39b2529251e4835c42e9f99dba2cf43f2
      2977eb7b6c
 [2]: I5723f627ce323b0d12bd7b93f5b35fc4d342b50c
      792faa2c16

Note that addressing all the corner cases in [2] still requires lots of
non-trivial change.  Hence this CL focuses only on Bug 26663589 (and
the case we handled in Bug 15922840).

Bug: 26663589
Change-Id: Ib567daa009c1139858dccadcfc6a04465ebecf36
2016-05-15 20:05:56 -07:00
Ruchi Kandoi
b60d0a438a Merge "network: Adds the functionality to parse uid in netlink messages." into nyc-dev
am: 2512ec9e37

* commit '2512ec9e376b0fce213f6d635dfb991c79041031':
  network: Adds the functionality to parse uid in netlink messages.

Change-Id: I899110108f1200dbc687732963e85083ec5504e0
2016-05-14 01:36:48 +00:00
Ruchi Kandoi
2512ec9e37 Merge "network: Adds the functionality to parse uid in netlink messages." into nyc-dev 2016-05-14 01:32:54 +00:00
Ruchi Kandoi
fa97fcf7b9 network: Adds the functionality to parse uid in netlink messages.
Netlink notifications about the state of the modem contains uid too.
This patch adds the functionality to add that. It also fixes the bug to
parse the timestamp in the message even in cases where the length is
greater than expected.

Bug: 28527904
Change-Id: I4643bff3eb5b1ffa2dc0b78f1c6947d60487e0d8
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2016-05-13 15:36:23 -07:00
Adam Powell
ac3f24fabd Merge "Show package icon/label for resolved package-targeted implicit intents" into nyc-dev
am: e89dc40706

* commit 'e89dc40706f325e039de7dd6714223908dfb9b17':
  Show package icon/label for resolved package-targeted implicit intents

Change-Id: I178045e372dd962383fbc6d26fe7b99b20f6cf88
2016-05-13 17:17:48 +00:00
TreeHugger Robot
e89dc40706 Merge "Show package icon/label for resolved package-targeted implicit intents" into nyc-dev 2016-05-13 17:11:14 +00:00