Commit Graph

6114 Commits

Author SHA1 Message Date
Ricky Wai
d398244513 Hide work profile key in user credentials screen
Bug: 28878708
Change-Id: Ib250fae2388b061430d93b7d65133002ce664993
2016-05-25 13:11:09 +00:00
Keisuke Kuroyanagi
edebcae978 Merge "Set input method mode for CascadingMenuPopup." into nyc-dev 2016-05-25 02:06:25 +00:00
Tianjie Xu
dcd3644f22 Report OTA time statistics
Read time and I/O for OTA update from last_install, and report the
statistics using MetricsLogger.histogram.

Bug: 28658632
Change-Id: I7fd06a82cbabd346d6d44f81ebad08f6baf4b8d0
2016-05-24 13:00:30 -07: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
d86ac8116b Merge "New api in LockSettingsService to get StrongAuth synchronously" into nyc-dev 2016-05-23 11:51:56 +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
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
Keisuke Kuroyanagi
24b260de62 Set input method mode for CascadingMenuPopup.
Set INPUT_METHOD_NOT_NEEDED not to steal input focus.

Bug: 28638654
Change-Id: Ic5070b309de459914d2670bd20a9af568438a843
2016-05-19 13:23:51 -07: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
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
Yohei Yukawa
31884efd13 Merge "Move LocaleList to avoid layering violation." into nyc-dev 2016-05-18 02:14:26 +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
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
43141e33f7 Merge "Content description for FloatingToobar overflow." into nyc-dev 2016-05-17 17:08:29 +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
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
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
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
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
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
Adam Powell
86100d18ad Show package icon/label for resolved package-targeted implicit intents
If we're going to show metadata about a resolved implicit intent that
is targeted to a single package with multiple potential targets,
populate the ResolveInfo with the label and icon of the target
package's ApplicationInfo and set resolvePackageName. This helps use
cases such as EXTRA_INITIAL_INTENTS in ChooserActivity, where
sometimes apps set target packages but not components.

Bug 28739056

Change-Id: I8070d341fccc139463c5ac8d66db45fce02252e5
2016-05-13 08:34:37 -07:00
Philip Cuadra
b41088b4df Merge "Pinner service for pinning files into memory" into nyc-dev 2016-05-12 21:55:29 +00:00
Philip Cuadra
7bd0fdd639 Pinner service for pinning files into memory
Pin key files into memory to prevent having to fetch from flash
after boot.  Improves system performance by preventing page cache
thrash.  Retrieves files from a device-specific overlay to allow
specialization.

bug 28251566

Change-Id: I8532f52bd70271794dd7576976d13a524849ce7b
2016-05-12 13:12:20 -07:00
Jorim Jaggi
63c09fd6cd Merge "Fix smallest width configuration calculation" into nyc-dev 2016-05-12 01:50:05 +00:00
Jorim Jaggi
8563943bd3 Fix smallest width configuration calculation
For calculating the smallest width, we need to iterate through all possible
orientations, snap the task bounds to a valid snap target and then use the
smallest width across all orientations.

In addition to that, when flinging the divider handle to the bottom of the
screen, we need to pass in fullscreen task bounds to avoid that this new
logic applies so the maximizing app only receives one configuration change.

Change-Id: I37aa9a40938517dfaf26770eb41327d76aec7c62
Fixes: 28469673
2016-05-11 18:33:01 -07:00
Dianne Hackborn
b3edcd78d2 Merge "Fix issue #28400000: Settings memory UI still showing z-ram..." into nyc-dev 2016-05-12 00:40:18 +00:00
Aurimas Liutikas
9c661a40c1 Stop saving ActionMenuItemView state.
There is no useful state to be saved for these views.
This fixes a crash where we try to restore the state of an
ActionView (that shares the same ID as ActionMenuItemView).

Framework version of ag/1020805

Bug: 28110832
Change-Id: I4a09786a1c08bef1765fd8be3affb21dce296272
2016-05-11 14:46:47 -07:00
Dianne Hackborn
ef0a402f58 Fix issue #28400000: Settings memory UI still showing z-ram...
...but probably shouldn't.

Keep track of whether zram is being included in per-process pss and,
if so, don't add it on separately.

Change-Id: Ic945fc3deca8412272bb6019fe1be4b878cb763a
2016-05-11 14:21:07 -07:00
Christopher Tate
494df79172 Sysconfig define a whitelist of permitted backup transports
Previously any apk bundled in priv-app could insert a backup transport.
Reduce risk surface by giving the OEM explicit control over who is
allowed to handle backup data.

Bug 28406080

Change-Id: I84ed954c31b41b671825122e537971b110e00a4d
2016-05-10 17:11:03 -07:00
Jeff Sharkey
2d3709246e Fail upgrades that change storage devices.
Now that we live in an FBE world, we need the user to be involved
with every package move to ensure that CE storage is unlocked.  This
means that a package upgrade session that would require moving an
app between storage devices cannot be satisfied.

Bug: 27147501
Change-Id: I274d85cbed727d9185178b77bfc6cef196df17f5
2016-05-10 17:01:51 -06:00
TreeHugger Robot
d0fa4d3aaf Merge "Fix status bar background flicker" into nyc-dev 2016-05-06 01:49:34 +00:00
Chris Craik
867b812eff Fix status bar background flicker
Fixes: 28533578

Change-Id: I075f49b7d20e0e95e790a9755d104a0a51575054
2016-05-05 16:22:21 -07:00
Yohei Yukawa
9f76abc8ab Merge "Fix stale InputMethodManager#mFullscreenMode." into nyc-dev 2016-05-05 21:55:50 +00:00
Dianne Hackborn
5a969aa139 Fix issue #28602068: Add count to job scheduler stats
Also increase the event buffer size to 100, and implement
it as a real ring buffer.  And put that implementation in
a generic class for use in other places.

Change-Id: I06936984e2c253fb5f0eb5d15faf0019ec73d4e2
2016-05-04 17:19:04 -07:00
Winson Chung
bd1708a19d Merge changes If7b8ed3f,I309c3825,Iafd06419,I59f73caf into nyc-dev
* changes:
  Fixes several animation issues related to a dismissing task.
  Pipe the dismiss button logic through the touch handler.
  Skip scroll-to animation when undocking and there are no tasks.
  Fixing issue with docking being disallowed for secondary user.
2016-05-03 21:57:03 +00:00
Abodunrinwa Toki
f62dd564ed Merge "Implement alternative ViewGroup.getChildVisibleRect." into nyc-dev 2016-05-03 20:13:26 +00:00
Adam Lesinski
00194e0f24 Merge "BatteryStats: Fix units on battery charge counter" into nyc-dev 2016-05-03 19:47:35 +00:00
Abodunrinwa Toki
4e7a1208ea Implement alternative ViewGroup.getChildVisibleRect.
This CL allows getChildVisibleRect to optionally always call the
view's parent. The previous version attempted to optimize the call
by not calling further up the view heirarchy when the rect isn't
visible in the current view.

The call is hidden and the previous behaviour is preserved to limit
the bits of code that this change affects.

Bug: 28514727
Change-Id: I49550ed4082bcbdcfe4643b962b50f3308092525
2016-05-03 19:41:15 +01:00
Adam Lesinski
a8018ac47a BatteryStats: Fix units on battery charge counter
The unit for the battery charge counter is in micro-Ampere-hours, not coulombs.
We store the value as uAh but display it in dumpsys as mAh.

Bug:27174034
Change-Id: Ib5cc1ee1c5c191336a3e1f18dbb12c38e833f8d0
2016-05-03 10:41:47 -07:00