3467 Commits

Author SHA1 Message Date
Adrian Roos
4f994eb2dd Disable trust agents after wrong credential is entered
Bug: 16498202
Change-Id: I36f2e80aec8c04bcb6e6d9f1b0e2ebb8fc49998e
2014-07-24 14:32:26 +00:00
Robin Lee
3ea4310a22 Show disclosure when an intent switches profiles
If an activity in one profile starts an activity in another profile
without any user interaction - such as operating the chooser - a toast
appears, saying something like 'you are using this app in your work
space'.

@bug 14375080

Change-Id: Id2dc5973a9b68ee29d0227947c19b78f021fb6ac
2014-07-24 09:12:55 +00:00
Geoffrey Borggaard
987672d262 Fixes setting password through DevicePolicyManager
LockPatternUtils wasn't taking the userId into account when
looking up the salt.
Bug: 16204999

Change-Id: I0626b5a0a55c244122c24fb4446f270918f3187c
2014-07-23 20:03:51 +00:00
Jeff Davidson
6bbf39cf6b Implement VpnService.setBlocking().
Bug: 12879610
Change-Id: I3a0ad9eae5f7dd9c01f75b9da71810bad38f9fec
2014-07-23 11:18:57 -07:00
Dianne Hackborn
10eaa8574b Fix issue #16467284: Make noteStartVideo and noteStartAudio nesting
Also add new methods to clear these states, so we can avoid any
nesting issues from getting the tracking state stuck.

Change-Id: Iba0eaba2a9a186355c24d392f16118982c5331ed
2014-07-23 17:05:04 +00:00
Narayan Kamath
37197df479 Add an internal API to get all asset locales.
This will allow us to not copy paste this code verbatim into
bundled apps.

bug: 10090157

(cherry picked from commit 9e6d9d4c812d01ac07180c5d6ab64c36fb9b2aa7)

Change-Id: I34690a2b6dad51f1592f37d3c2a8c81345632c2f
2014-07-23 11:17:30 +01:00
Alan Viverette
ed8e09b664 Remove dialog icons
BUG: 16493564
Change-Id: Ica59abb70a924cccd705172d323a535ef9b75cf1
2014-07-22 18:41:37 -07:00
Chong Zhang
f3d00e4e0a update battery stats for audio/video
Bug: 12979595

Change-Id: I581376cb88a2d14dc4bad77d454b9bba73d0eb9b
2014-07-23 00:01:46 +00:00
Alan Viverette
22a117d1b6 Add popupTheme attr, propagate from ActionBar to ToolBar
BUG: 16347549
Change-Id: I934ec2469f8c136f750e2e2cf9b333e229393ac3
2014-07-22 19:34:30 +00:00
Adam Powell
33a234b3b0 Merge "Sort ResolverActivity items based on UsageStats" into lmp-dev 2014-07-21 15:42:19 +00:00
Adam Powell
09a65601b2 Sort ResolverActivity items based on UsageStats
Sort targets by the total amount of time the user has spent with their
containing package in the foreground.

Bug 15694906

Change-Id: I63c956424f78eb22911517674dfefd96901d19f8
2014-07-20 17:12:13 -07:00
Adrian Roos
edad7b24c1 Update LockPatternUtils to new alarm API
Change-Id: Idc6c2865b86e467e1e254452326f327f145177b0
2014-07-21 12:07:52 +00:00
Dianne Hackborn
13420f2311 Fix issue #16400873: Apps that show ads as new tasks stay in recents...
...even when I hit back or close the activity in UI

Change the semantics of NEW_DOCUMENT to have the recents entry be
removed by default when its activity is finished, with various ways
to explicitly turn off this behavior.

Change-Id: Idc717706d27de80f28b53ad76f9e375d85118d71
2014-07-20 15:58:11 -07:00
Sandeep Siddhartha
055897208d Move sound trigger calls to VoiceInteractionManagerService
- This ensures that any data being loaded on the DSP comes from the framework

Change-Id: Ie15f0994850ba8f298ca07c49fe0b89e066d9e2b
2014-07-20 11:22:55 -07:00
Adam Powell
2aa09a94dd Don't apply the ActionBar style to a Toolbar as a result of setActionBar
While this is a convenient idea, it effectively means that any styling
directly applied to a Toolbar in a layout gets stomped by the
theme-global ActionBar style. Obey the more local, specific styling
from the Toolbar instead.

Change-Id: Ief6a7cb90052bdced87f1dc0925c1dfbc0df4792
2014-07-19 16:01:12 -07:00
John Spurlock
7b41467704 Zen mode filtering should use new usage constants.
Refactor stream-based calls to usage-based calls.

Bug:15279516
Change-Id: I3f7757d8123c14670e2ad5f8e6aa4e9803efe7ec
2014-07-19 11:57:51 -04:00
Yohei Yukawa
ff328ae743 Add FLAG_CURSOR_ANCHOR_INFO_IMMEDIATE support in TextView
This CL adds an initial support of
CursorAnchorInfoRequest#FLAG_CURSOR_ANCHOR_INFO_IMMEDIATE for
TextView.

This implementation is not highly optimized yet, but it just
works as it should.

BUG: 16379288
Change-Id: Iecb32b4c4dcd7db14d8b2a0d929e1d64e161bc58
2014-07-19 12:59:52 +09:00
Fabrice Di Meglio
6eed108eeb Revert "Fix LocalePicker background"
This reverts commit 6bbea8cf4252839d0c6f2a3152f506a7b2b2d753.

Change-Id: I430c725c8e5987fb643528594ef3a9a83827e7be
2014-07-19 01:58:09 +00:00
Adam Powell
e49d939378 Add EXTRA_REPLACEMENT_EXTRAS for ACTION_CHOOSER
This allows the calling app to supply a set of alternative extras to
be sent along with the target intent if the user chooses specific
items from the full set available on the device. When replacement
extras have the same key as extras in the initial intent, the
replacement extras dominate.

Change-Id: I5d64c80447386f22402b71291bb289a74015d619
2014-07-18 16:27:11 -07:00
Adam Lesinski
0debc9aff4 First iteration of a public UsageStats API
UsageStats API that allows apps to get a list of packages that have been
recently used, along with basic stats like how long they have been in
the foreground and the most recent time they were running.

Bug: 15165667

Change-Id: I2a2d1ff69bd0b5703ac3d9de1780df42ad90d439
2014-07-18 15:24:20 -07:00
Christopher Tate
89101f7fe8 Tear down agents properly at EOD in full restore
The restore engine wasn't tearing down the bound agent after reaching
the end of data for the app, and furthermore was allowing the restore
operation to resume running the queue before all data had been delivered
to the current target.

Also make LocalTransport deliver data in 2K chunks rather than 32K,
as a first step towards making its timing characteristics more like
we'll see in networked situations.

Finally, added a bunch of MORE_DEBUG output for finding odd bugs
like this.

Change-Id: Icdbe6a070af6cc7c708a938ad044108d40ebce9a
2014-07-17 19:12:09 -07:00
Torne (Richard Coles)
08cfaf6726 Use the WebView's loader library to load the real library.
Load libwebviewchromiumloader and use it to load the real WebView
library, to enable sharing of the relro segment between different
application processes without requiring that the library be preloaded in
the zygote. A system service is added to track whether the relro segment
file has been prepared, and block loading of the library until it has
been.

Bug: 13005501
Change-Id: I846b37c7b8e2a4eb8a39e4fd455bccbb2048c173
2014-07-17 09:18:43 -07:00
Dianne Hackborn
fee756ff91 Implement issue #16330060: Inform ActivityManager about WebView...
...state changes.

Add a new API to tell the activity manager about a new dependency
one process has on another package.  Start using it already for
when apps is Context.createPackageContext() to load code from another
app.

Also do some work on getting the monitoring of proc/uid states
in shape so it can be used by unundled code, along with an
AppImportanceMonitor class for doing so.

Some small fixes and additions to VoiceInteractionService.

Improve handling of unaccounted/overcounted battery use so that
they aren't shown to the user unless they are significant.

Change-Id: I22dd79a73f4e70103d3f8964494aebc8a31f971c
2014-07-16 22:50:31 -07:00
Lorenzo Colitti
20ceb90373 Disable logging in NetlinkTracker.
This logging can get quite spammy in GoogleGuest, and there's
currently no reason to think it's necessary. Much of the same
information is available via "adb shell ndc monitor".

Bug: 16328180
Change-Id: I15a8348e261d6b69a4ef8bdaf8a2a431b1c2bc0d
2014-07-17 01:43:39 +00:00
Brian Colonna
a0ee004abf Bug 16152902: Disabling FUL in keyguard and screen lock settings
This is the framework change needed to switch from Face Unlock as
a standard unlock mechanism to Face Unlock as a trustlet.  This
forces isBiometricWeakInstalled() to return false such that neither
keyguard nor Screen Lock Settings thinks it exists.  This means FUL
is no longer a screen lock option.

If Face Unlock was already enabled and someone updates to this build,
the screen lock automatically switches to the backup lock.  That
functionality was already built-in so everything would continue to
work if Face Unlock decided to disappear from someone's device.

Change-Id: I407f6e1d75bfe40c7142c2508c2d68867e02d858
2014-07-16 23:53:21 +00:00
Fabrice Di Meglio
4c23cb1aca Fix LocalePicker background
- use the background defined by the Theme

See bug: #13140648 Settings needs to support the new Quantum Paper theme

Change-Id: I30f1146fbcb57088a62c999dce349d1f85510427
2014-07-16 23:44:15 +00:00
Jeff Sharkey
da96e137bc Parse more split APK manifest details.
Allow split APKs to define activities, services, receivers,
providers, and metadata.  However, support for many manifest items
are explicitly omitted.

Only dexopt split APKs that include code.

Bug: 14975160
Change-Id: I2fbf99e2a62328aa2185e5924755af33060282fc
2014-07-15 18:50:00 -07:00
Dianne Hackborn
fdb1956ff7 Fix issue #15681802: Missing RESET:TIME in complete battery histories
But wait, there's more!

- Keep track of sync durations in the aggregated stats.
- Add events for users that are running and in the foreground.
- Rework the activity manager's tracking of stuff using
  battery in the background to be based on proc stats, which
  allows it to be better about determing when it should reset
  its tracking of background work.
- Also add tracking of scheduled job execution, like we are
  doing for syncs.
- And once I started hooking battery stats in to
  JobSchedulerService, I found a few things I couldn't stop myself
  from changing: (1) make it very explicit that it doesn't start
  scheduling jobs until we have reached the point in system boot
  where third party apps are allowed to run, and (2) adjust
  the various for loops to not use iterators.

Change-Id: I69d812e27bcfee9e58a614f0f6b1c7545d7530b1
2014-07-15 14:48:48 -07:00
Fabrice Di Meglio
bd9152f6ee Update DatePicker widget and its related dialog
- the old DatePicker widget is still there for obvious layout compatibility reasons
- add a new delegate implementation for having a new UI
- use the new delegate only for the DatePickerDialog (which does not need to be
the same)
- added support for Theming and light/dark Themes
- added support for RTL
- added support for Accessibility
- verified support for Keyboard
- verified that CTS tests for DatePicker are passing (for both the legacy and the
new widgets)

Also added a new HapticFeedbackConstants.CALENDAR_DATE and its related code for
enabling day selection vibration

Change-Id: I256bd7c21edd8f3b910413ca15ce26d3a5ef7d9c
2014-07-15 20:26:21 +00:00
Ed Heyl
a50cd8d426 reconcile aosp (f908b61abf0882ce97d6d5076ee1c84393ed1ecd) after branching. Please do not merge.
Change-Id: Icd3f2c31aca8c9888c81da27eaeaffed07ec9820
2014-07-14 23:42:04 -07:00
Adam Powell
278902c982 Updated "with-default" layout added for ResolverActivity
Add a layout that promotes the last chosen activity to the top for
ResolverActivity. Alter ResolverActivity behavior as appropriate: Only
the last selected activity can be set as default. Different activity
selections take effect immediately. You can only set a default if it
was the last-used target of the intent.

Also add some default strings for invoking common intents to make the
no-title invocations a bit more user-friendly than just, "complete
action using."

Bug 15694906

Change-Id: I8c75d2f812926805c949cc76bab48aa4094e002f
2014-07-12 18:48:13 -07:00
Tadashi G. Takaoka
77cbcb6637 Make InputMethodUtils.getLanguageFromLocaleString public
Change-Id: I3e26eded21e59106a3b0edcf9ad05afbe9a30670
2014-07-12 16:08:20 +09:00
Adam Powell
b40484bb30 Correctly set the window callback for ToolbarActionBar
Bug 16134781

Change-Id: I88ec0c2b5dc23767ab0f198ab26601fd46b95628
2014-07-11 17:17:33 -07:00
Barnaby James
d3fdb8bed8 Add VoiceInteraction request type for successful actions.
Add CompleteVoiceRequest to VoiceInteractor to allow apps to indicate when a voice interaction was successfully completed.

Change-Id: I1481cfe96e9e2495d88a7a4fb62263bdd1e03c54
2014-07-11 10:34:50 -07:00
Narayan Kamath
4d8c132609 Allow 3 letter language codes in InputMethodUtils.
Replace locale.substring(0, 2) with a function that always
returns the first component of the locale (assumed to be the
language).

bug: 10090157
Change-Id: Ibb9eb9f65323795d139b16d76b7e7e36a4e0568c
2014-07-11 15:37:08 +00:00
Yohei Yukawa
7c940e94c9 Merge "Polish new IME API for L part 2: CursorAnchorInfo" 2014-07-10 21:43:01 +00:00
Zoltan Szatmary-Ban
c3b07a0c9c BatteryStatsHelper.refreshStats for multiple users
Battery usage list is now populated for apps belonging to a list of users or profiles.

Change-Id: Ie899af74a4b3a0f3cd6ae3c93394f01f4f54a5c7
2014-07-11 14:04:01 +01:00
Yohei Yukawa
0023d0e0c4 Polish new IME API for L part 2: CursorAnchorInfo
This CL addresses feedbacks from internal customers for new
input method APIs that are mainly used for physical keyboard
support in L.

For performance reasons, #onUpdateCursorAnchorInfo is not called
back by default and each input method has to enable this
event notification explicitly whenever fine-grained character
locations are needed.

In L-preview, InputMethodSession#setCursorAnchorMonitorMode was
introduced for this purpose.  However, we got several feedbacks
to be addressed.
- The effect of #setCursorAnchorMonitorMode is not preserved
  during focus change.  IMEs need to call
  #setCursorAnchorMonitorMode every time when #onStartInput is
  called.  This is tricky and hard to understand.
- As #onUpdateCursorAnchorInfo is a new API, not all
  applications/text editors have supported it. Therefore IMEs
  can't always rely on it. However, there is no way to query
  if the attached target is supporting this new API or not.
  It would helpful for IME authors if we can provide a
  reliable way to query if the attached input target is
  supporting the new API or not.

In order to address these issues, the triggering method has
moved from InputMethodSession to InputConnection in this CL,
as an analogy of existing InputConnection#getExtractedText API,
which has provided similar functionality including optional
reactive event callbacks from the application to the IME.

BUG: 15812658
BUG: 16118603
Change-Id: I3c6b69bd9d79b199afe68d838f25effa6048e5cc
2014-07-11 21:13:17 +09:00
Sandeep
d701820031 Always on hotword changes
Add model management API skeleton to VoiceInteractionManagerService
Add an "interactor" for all always-on APIs

- The VoiceInteractionService will get an interactor for the given
  keyphrase and locale.
- It can then check the availability and call methods to start and
  stop recognition on this interactor.

- Add a common class to deal with SoundTrigger APIs

- Cleanup the keyphrase representation:
  We now have separate representations for the keyphrase metadata and
  a keyphrase being used for recognition.
  This'll also help us to handle custom keyphrases in the
  future easily.
  This also ensures that for use within the framework,
  we rely on the ID of the KeyphraseInfo rather than comparing the
  text everytime.

Add a callback for the AlwaysOnHotwordDetector

This callback should be passed in by the VoiceInteractionService and is used to notify it
of recognition events.

Change-Id: I26252298773024f53a10cdd2af4404a4e6d74aae
2014-07-10 18:32:37 -07:00
Adam Powell
8e77c47d7c Merge "Elevation for action bars" 2014-07-10 20:54:59 +00:00
Adam Powell
14d1fa4ba7 Elevation for action bars
Expose theme attributes and API for ActionBar to adjust elevation of
the bar.

Remove the windowContentOverlay fake shadow from material themes and
use elevation instead.

Mmm, realtime shadows.

Bug 16207490

Change-Id: I254567a13422b6d2f657b9991608398885f45204
2014-07-10 16:23:39 -07:00
Alan Viverette
3d0f21dab8 API for inflating action bar menus against a different theme
BUG: 16162344
Change-Id: I5bf9f133de56a1830028bca6326cc2c50888a052
2014-07-10 16:15:35 -07:00
Narayan Kamath
ff110bd61a Multi-arch application installs.
Each application now has two ABIs, the primary
and the secondary. The app is always launched with
the primary, but the secondary might be used by other apps
that load the given applications code. This implies we
must:

- dex2oat the app both ways.
- extract shared libraries for both abis.

The former is relatively straightforward but the latter
requires us to change the layout for shared libs that we
unpack from applications. The bulk of this change deals
with the latter.

This change continues to fill in nativeLibraryPath during
scans for backwards compatibility. This will be removed in
a future patch.

Change-Id: Ia943dd11ef815c5cbfc60f17929eaa2a652a385a
2014-07-10 17:16:14 +01:00
Adam Powell
4f6c2050a8 ResolverDrawerLayout for ResolverActivity
Internal widget to allow nested scrolling of the grid of intent filter
targets. Initial logic complete.

Bug 15694906

Change-Id: Ib19723146bf1722db6bdd68f95cc6e623462d0f0
2014-07-09 23:16:15 -07:00
Dianne Hackborn
61659e5daa Add tracking of uid process states in battery stats.
We now keep track of how long each uid had processes in
various states: foreground, active, running.  This is based
on a collapse of the various activity manager process states
into these three bins.

You'll see these in a checkin like this:

8,10013,l,st,61504,61504,83109

Also fix issue #16021555: App showing up as on "top" even
when the screen is off.  This is "fixed" by just saying we
always report the current app at the top of the activity stack,
regardless of the state of the screen.

Change-Id: I1204904225101243eb00b43425d9806bffdd2ab9
2014-07-09 20:04:03 -07:00
Jim Miller
85516d028b Add new "pin complex" type to supported keyguard PINs
This adds a feature to allow DevicePolicyAdmins to prevent using
simple PINs, which are defined as those containing more than 3
repeated values. Examples include '1234', '2468', '1111', '9876', etc.

Bug 12081139

Change-Id: I4ebe1c76a48087dcd7c878e9bd79a4e3ee2a27fe
2014-07-10 01:54:49 +00:00
Jeff Sharkey
ec55ef0934 Extend pm to support sessions and split APKs.
Separate commands to create an install session, stream files into the
staging area, and then commit the install.  Streaming can accept data
from stdin across adb, avoiding extra copy from push.

Extend FileBridge to support blocking close().  Always destroy
session regardless of result.

Bug: 14975160
Change-Id: Ic3f462e7d1901079b785e210228950cdfa676466
2014-07-09 16:55:56 -07:00
Santos Cordon
0bae09fdde Move showCallScreen & isInAPhoneCall to PhoneManager.
Change-Id: I852da78ae80eba120932fb7acb1e5c3db2a8f18a
2014-07-09 18:53:41 +00:00
Jeff Sharkey
4ec2023349 Merge "Derive library path for upgraded system apps." 2014-07-07 17:47:39 +00:00
Jeff Sharkey
8d479b0c2d Derive library path for upgraded system apps.
Bug: 16156270
Change-Id: I368433063ff33d15129c8076ddc6f1e2a0963e54
2014-07-08 14:57:40 -07:00