Commit Graph

3261 Commits

Author SHA1 Message Date
Adrian Roos
fa10423fa0 Add stable insets for stable system windows
Adds a new kind of inset that only accounts for stable system
windows like the system or navigation bar.

Bug: 15457292
Change-Id: I681b711f6f40a94c25b7acd3a44eb3539486afab
2014-07-02 12:34:05 +00:00
Narayan Kamath
f29131f701 Merge "Fix native crashes when APKs can't be opened." 2014-07-01 19:11:01 +00:00
Narayan Kamath
cef0b39b92 Fix native crashes when APKs can't be opened.
There was lax / incomplete error checking around the
construction of Apk handles. This change changes the ApkHandle
API and makes it throw IOException if the zipfile couldn't
be opened.

Additionally :
- Fix a resource leak in DefaultContainerService
- Report errors correctly during package moves.

bug: 15563874
(cherry picked from commit ec4516470d)

Change-Id: Ia35b464355467d0d36faf34fae85acbbab3f2896
2014-07-02 12:43:52 +01:00
Narayan Kamath
4fe15b23dc am 4161316f: am 94171212: am 104da1e4: Merge "Fix broken assumptions in LocalePicker."
* commit '4161316f256c9cc047405a902bcfc17b3738b659':
  Fix broken assumptions in LocalePicker.
2014-07-02 10:11:12 +00:00
Narayan Kamath
4161316f25 am 94171212: am 104da1e4: Merge "Fix broken assumptions in LocalePicker."
* commit '94171212431a45346e40fd97bbe72422e71f04be':
  Fix broken assumptions in LocalePicker.
2014-07-02 09:54:22 +00:00
Brian Attwell
b6efe90b38 Allow ToolbarWidgetWrapper insetStart = 0
Change-Id: I8564cfe07b082e6edb3dc1569b3020f88d286d61
2014-07-01 23:20:30 +00:00
Dianne Hackborn
abc7c49913 Issue #15986092: Add power tracking of flashlight.
Not yet hooked up.

Change-Id: Id95e44ecc365e9f38169c0a629b0a48ddb29aa06
2014-07-01 10:02:45 -07:00
Narayan Kamath
b27c137087 Fix broken assumptions in LocalePicker.
This code assumed that the locale is always 5 chars in
length and was of the form xx-YY. This is not necessarily
true. The language can be 3 letters in length and the locale
might have a script and variant.

Also cleans up several nasty pieces of code and eliminates
unnecessary array copies and improves readability by using
idiomatic java.

bug: 15873165
bug: 10090157

Change-Id: Iab1cfd7b78e5772b1245654f2153caf63a96033d
2014-07-01 11:12:24 +01:00
Chet Haase
cb923d99e9 null-check before derefing title in MenuItemImpl
The toString() method in MenuItemImpl returns mTitle.toString(),
which crashes when the title is null (which it can be, since there
is no requirement that a title be non-null, and you can get one
by simply not assigning a title to begin with or by setting it
to null).

Issue #13420311 MenuItemImpl can't handle a null title

Change-Id: I701d1d565f1d254ffdd41ca64c1abaf2906edb79
2014-07-01 13:31:48 +00:00
Christopher Tate
51fea57e06 Refactor restore to deal with heterogeneous datasets
Transport-based restore now handles both key/value and full-data
(stream) data delivery.

Also: PMBA now holds metadata for *all* apps, not just those with
backup agents.  Since we need to consult this for every restore-
at-install operation we cache this locally now, tagged per transport
and per remote dataset, to avoid having to re-download it as part
of every future restore operation.

Also fixed a bug in LocalTransport that was preventing restore of
key/value datasets, i.e. all of them that were nominally available
prior to this change.

NOTE: at present there is no automatic full-data backup; if for
testing purposes you need to create some to then use for restore,
you still need to use 'bmgr fullbackup ...' to push them.

NOTE: at present the unified transport restore uses a refactored
"engine" implementation to handle stream data that encapsulates
the existing "adb restore" implementation.  However, the adb
restore code path has not yet been refactored to wrap the newly-
extracted engine version; it still contains its own copy of all
the relevant logic.  This will change in a future CL, at which
point offline/USB archive restore will simply wrap the same
shared stream-restore engine implementation.

Bug 15330073
Bug 15989617

Change-Id: Ieedb18fd7836ad31ba24656ec9feaaf69e164af8
2014-06-30 17:43:05 -07:00
Alan Viverette
f56ed2db00 Fix Material-themed alert dialog sizing
Also cleans up line width and final usage in AlertController.

BUG: 14904438
Change-Id: Idffa7a1c6edcf4a709ff6322d4bf95ce22d281ea
2014-06-30 15:57:44 -07:00
Lorenzo Colitti
93e6d9db78 Initial RDNSS tracking implementation.
Add a DnsServerRepository to NetlinkTracker that keeps track of
IPv6 DNS servers received via RDNSS. It supports expiring
existing DNS servers when their lifetimes go below zero and
keeping track of more than just the 2 or 3 DNS servers that are
currently in use, so that if they all expire DNS will continue to
work.

It does not yet expire DNS servers using timers, only when a new
update comes in.

Bug: 9180552
Change-Id: I455699076198f43570a3b0b8ec7e5967514d6086
2014-06-27 01:06:21 +09:00
Adrian Roos
2c12cfa1d5 Trust Agents: Add facility to request credential entry
Bug: 15871777
Change-Id: I43c80151f6403ff62961aeb3dc7aafe049e18a62
2014-06-25 23:28:53 +02:00
Adam Powell
755c919ba2 Merge "Set the default content description for Toolbars acting as action bars" 2014-06-23 21:50:10 +00:00
Adam Powell
7901b2a549 Set the default content description for Toolbars acting as action bars
Bug 15814044

Change-Id: I07c20de1349cb07f21eaf0db718da94c0ba7043d
2014-06-24 17:32:06 -07:00
Dianne Hackborn
04d480e1c3 Merge "Fix some problems with proc stats collection." 2014-06-24 17:32:43 +00:00
Dianne Hackborn
306af678a5 Fix some problems with proc stats collection.
Also start debugging why we aren't being able to open
/proc files.

Change-Id: I4655904691ac22108c29858cbd01153a251ccbf5
2014-06-24 15:41:03 -07:00
Christoph Studer
9e58b3c61c Merge "Remove notification APIs from StatusBar service" 2014-06-24 06:38:28 +00:00
Christoph Studer
e71fefcc8b Remove notification APIs from StatusBar service
Bug: 15324972
Bug: 15436573
Change-Id: I838370a23fb07cb876e08c41ef11653f2658719e
2014-06-24 16:47:56 +02:00
Nicolas Prevot
5044988c47 Disable "Always" option for intents targetting non-current user.
In ResolverActivity, if a ResolveInfo is for another user:
disabling the "always" button.

Change-Id: Ib6a1a49e86e3e3546d8aaa70bfd2e8fe148281d6
2014-06-23 14:08:03 +01:00
Dianne Hackborn
3251b90752 Add some wifi tracking to battery stats.
Now track supplicant state and wifi signal strength.
Output looks like this:

         +12m45s235ms (1) 095 +wifi_full_lock +wifi_running wifi_signal_strength=3 wifi_suppl=scanning
         +12m46s095ms (1) 095 -wifi_full_lock wifi_suppl=associated
         +12m46s469ms (2) 095 wifi_suppl=completed +proc=u0a74:"com.google.android.videos"
         +12m52s103ms (1) 095 +wifi_full_lock wifi_suppl=disconn

Also modify history dump so that when we hit a RESET or START
command, we clear our previous history data, so the next event
will include new data.  This means if you are scanning through
the output, you must at this point clear any binary stats you
have like "running" or "wake_lock" or else you will continue to
think they are on until whatever point later they get turned on
and then back off.

And a small bug fix in proc stats that would cause the system
process to crash.

Change-Id: Ibec416a1ef786d428bd0d1d86e6e3296c41f7648
2014-06-20 16:01:21 -07:00
Mark Renouf
7deaf7c530 am f2dcb390: Merge "Limit swipe dismiss progress to positive values" into klp-modular-dev
* commit 'f2dcb390444ffb42cf8637c99f53d821917554e6':
  Limit swipe dismiss progress to positive values
2014-06-18 19:37:02 +00:00
Christopher Tate
d9b6d546c3 Merge "Adjust full restore API" 2014-06-17 21:03:08 +00:00
Christopher Tate
5a009f9008 Adjust full restore API
Introduces a new constant, BackupTransport.NO_MORE_DATA, defined to
be -1.  The transport returns this constant when asked for the next
chunk of streaming full restore data to indicate that it has reached
EOF on the current restore target's archive stream.

If the transport returns TRANSPORT_PACKAGE_REJECTED from that same
method, then the OS will abort the current target's restore operation
and move on to the next package in the overall restore dataset (by
calling nextRestorePackage() on the transport).

If the transport returns zero when asked for the next chunk of
restore stream data, this will be interpreted as meaning that no data
is currently deliverable but the restore download is still running
properly; the caller will then retry until either data is delivered
or the transport reports NO_MORE_DATA (or an error).

Also sketched in the implementation of this latest API in the
test LocalTransport.

Bug 15330073

Change-Id: I81621cb322f831460133b7dced5bb88d2a4124e1
2014-06-19 16:18:21 -07:00
Dianne Hackborn
f329d050b8 Merge "Add kernel and native memory data to procstats." 2014-06-19 22:33:55 +00:00
Dianne Hackborn
f7097a5b69 Add kernel and native memory data to procstats.
We now collect memory use data in the kernel and native
application for aggregation in procstats.  This should
allows us to do aggregated summaries of how memory use
is distributed across the system -- how much is free vs.
how much is in use.

Fix a bug in how we were tracking per-app version codes:
apps that used a shared user id to have multiple packages
run in the same process could get their version codes
cross-wired.  Now we keep track of version codes in the
list of packages associated with a process.

Bumped the checkin version code to 5, so that we can
distinguish checkins that have this corrected data.

Also fix a bug in battery stats monitoring radio state.

Change-Id: I1c849f2df442df679a34ad7b0ca0c5870bfac8df
2014-06-19 16:37:23 -07:00
Adam Powell
adb11e0732 Merge "Fix ActionBar#isShowing when called before first layout" 2014-06-19 14:48:39 +00:00
Adam Powell
f65bfb700b Fix ActionBar#isShowing when called before first layout
Fix a regression introduced by the new hide offset API addition where
an action bar height of 0 (not yet measured) would cause the bar to be
considered hidden.

Bug 14574446

Change-Id: Ic8e22923ab59df6078136daa336e074c4b7adaf5
2014-06-19 10:55:28 -07:00
Mark Renouf
d1e01b7631 am 7deaf7c5: am f2dcb390: Merge "Limit swipe dismiss progress to positive values" into klp-modular-dev
* commit '7deaf7c5304aed9ca2ed6dc0e6c5e853127e6020':
  Limit swipe dismiss progress to positive values
2014-06-18 21:09:39 +00:00
Mark Renouf
6c5c48a8b0 Limit swipe dismiss progress to positive values
BUG: 15716749

Change-Id: Ibd6daa1a515611e5c9b8a02c6df75130aa8c093b
2014-06-18 16:08:06 +00:00
Brian Colonna
a420a330a9 Merge "Added startWithoutUi() call to Face Unlock AIDL interface." 2014-06-17 21:13:21 +00:00
Jeff Brown
2c43c339de Resolve boot time dependencies related to the power manager.
This change fixes a bug where native daemons may try to communicate
with the power manager before it was fully initialized due to a race
between publishing the binder service and completing init().

The solution was to simplify the dependencies related to the power
manager.  It turns out that most services that were passed in
init are not actually needed until systemReady.  What remained
was a dependency on the activity manager to check permissions for
incoming calls.  So now we start activity manager first.
However, the activity manager also depends on power manager for
wakelocks.  To break the cycle, we now defer initializing the activity
manager's wakelocks until after the power manager has been started.

Cleaned up a bunch of boot-time service dependencies so that we
can have better confidence that they are correctly maintained.

Bug: 13884219
Change-Id: If08e2d7ccd44e7026a72441bb6bd5afd7bb9fffe
2014-06-17 18:20:42 -07:00
Christopher Tate
564054146e Merge "Tweak restore API" 2014-06-17 20:55:27 +00:00
Christopher Tate
6a49dd087f Tweak restore API
We need the transport to tell the system not only what package it's going
to deliver data for next, but also what format that data is in.

Change-Id: I989cf78febf923a4208acb33ed80ccc7869356f5
2014-06-17 14:29:09 -07:00
Brian Colonna
1fbaca86b7 Added startWithoutUi() call to Face Unlock AIDL interface.
This is being done in support of preview-less Face Unlock (b/14433919).  Nothing
is calling this function yet, but it will be called from a trustlet to tell Face
Unlock to authenticate in the background.

If this is committed before the corresponding Face Unlock change, Face Unlock
will not build because it would not be implementing this function, and it must
implement all functions in the interface in order to build.

Change-Id: I4aaea78d58cc5f1f7e13cb981fb9a217cd901496
2014-06-17 13:20:19 -04:00
Lorenzo Colitti
c18cbfdf8d Notify network observers of route changes.
Bug: 9180552
Change-Id: If8432bc74335676320b815784b21f404d3479c35
2014-06-17 11:18:54 +09:00
Lorenzo Colitti
10accbb46e Move netlink updates to a new NetlinkTracker class.
This will allow us to use this logic on other link types such as
Ethernet, and will also avoid increasing the complexity of
WifiStateMachine as we get more information such as routes and
DNS servers from netlink.

Bug: 9180552
Change-Id: I79034827cb0c5f24d783d7243e04b69e12aa3cc6
2014-06-17 11:18:53 +09:00
Vinod Krishnan
61eb51b8f5 am 1e6048e0: Merge "DO NOT MERGE Cherry picking 3 CLs to fix CTS testFitSystemWindows" into klp-modular-dev
* commit '1e6048e0158310ee31e0310661bed06a41ac7dd7':
  DO NOT MERGE Cherry picking 3 CLs to fix CTS testFitSystemWindows
2014-06-14 01:06:50 +00:00
Adam Powell
11335f14b9 DO NOT MERGE Cherry picking 3 CLs to fix CTS testFitSystemWindows
----
Explicitly track consumed state for WindowInsets

Treating 0-insets as fully consumed is incorrect since it means that
you can't dispatch empty insets down the view hierarchy - traversal
terminates immediately. Track consumed state independent of actual
values. Replacing a given set of insets with all zeroes will mark it
consumed.
----
Fix incorrect dispatch of empty WindowInsets from ActionBarOverlayLayout

Fix a bug where ActionBarOverlayLayout was using a private constructor
of WindowInsets to return empty insets that should have been marked
fully consumed. This caused dispatch to further child views not to
stop appropriately, corrupting application layout in some cases.
---
Fix CTS regression in fitSystemWindows

Don't attempt to apply null insets from a call to fitSystemWindows.
Immediately return false since null insets cannot be applied.
----

Bug: 15452706
Change-Id: I34276a90305b141b4653aef0048f70350c69d02a
2014-06-13 16:51:01 -07:00
Christopher Tate
2110ca327a Merge "Implement full data backup through transport" 2014-06-13 21:09:46 +00:00
Christopher Tate
9ff53a7100 Implement full data backup through transport
Currently no timed/scheduled full-data backup operations are
performed by the OS, but the plumbing is now in place and can
be tested using 'adb shell bmgr fullbackup pkg [pkg2 pkg3 ...]'.

The LocalTransport test transport implementation has been augmented
to support the new full-data backup API as well.

In addition, 'adb backup' now takes the -compress/-nocompress
command line options to control whether the resulting archive is
compressed before leaving the device.  Previously the archive was
always compressed.  (The default is still to compress, as it will
usually reduce the archive size considerably.)

Internally, the core implementation of gathering the full backup
data stream from the target application has been refactored into
an "engine" component that is shared by both 'adb backup' and the
transport-oriented full backup task.  The archive file header
generation, encryption, and compression logic are now factored out
of the engine itself instead of being hardwired into the data
handling.

Bug 15329632

Change-Id: I4a044faa4070d684ef457bd3e11771198cdf557c
2014-06-15 17:35:33 -07:00
Adam Powell
85c262772d am d3b9bac6: Merge "Fix incorrect dispatch of empty WindowInsets from ActionBarOverlayLayout" into lmp-preview-dev
* commit 'd3b9bac6a96a065cd4058429569e0ed6ec4df032':
  Fix incorrect dispatch of empty WindowInsets from ActionBarOverlayLayout
2014-06-12 22:51:53 +00:00
Alan Viverette
04b8e270f2 Merge "Make overlapAnchor public, make ActionBar spinner overlap" 2014-06-12 05:34:42 +00:00
Alan Viverette
e178c93ff5 Make overlapAnchor public, make ActionBar spinner overlap
BUG: 15566102
Change-Id: I23885c2d66ce0749e4c131491205bb8eb2612923
2014-06-12 13:23:20 -07:00
Adam Powell
61c585756c am 13cfcacf: Allow action bar navigation icon resource id of 0
* commit '13cfcacf2a39b742ed9b0fea25924fc828e8c107':
  Allow action bar navigation icon resource id of 0
2014-06-12 19:57:50 +00:00
Adam Powell
c78f2f7fea am 22e41e9a: Merge "Enable collapsing empty Toolbar-based ActionBars above tabs" into lmp-preview-dev
* commit '22e41e9add1aeb0c8a79741f587c270752a50d16':
  Enable collapsing empty Toolbar-based ActionBars above tabs
2014-06-12 19:57:42 +00:00
Adam Powell
6bb10554ba Allow action bar navigation icon resource id of 0
Fix a bug preventing this from being treated properly.

Bug 15458868

Change-Id: Ib1a7def482755757e524dfddd1eb6a02522c5d6b
2014-06-11 19:57:12 -07:00
Adam Powell
360c1d8922 Enable collapsing empty Toolbar-based ActionBars above tabs
Fixes a regression where Toolbar ActionBars would hold empty space
when previous platform versions would collapse to tabs-only.

Bug 15573337

Change-Id: I6da379d2ed58e8ba8cadcd727606c7fc160ecf91
2014-06-11 19:31:41 -07:00
Adam Powell
720924b6a9 Fix incorrect dispatch of empty WindowInsets from ActionBarOverlayLayout
Fix a bug where ActionBarOverlayLayout was using a private constructor
of WindowInsets to return empty insets that should have been marked
fully consumed. This caused dispatch to further child views not to
stop appropriately, corrupting application layout in some cases.

Bug 15588587

Change-Id: I97fcefa4755addf2385a7e7b0ffbf6d3e91adc5c
2014-06-12 14:53:10 -07:00
Jeff Brown
8c90ff3b8a Merge "Delete stale commented out declarations." 2014-06-10 01:43:44 +00:00