4792 Commits

Author SHA1 Message Date
Adam Powell
82b9565bd1 Backport ChooserTarget package source check from N
Fix a bug where a ChooserTargetService could supply a ChooserTarget
pointing at a non-exported activity outside of its own package and
have it launch.

Bug 28384423

Change-Id: I3f5854f91c5695ad9253d71055ef58224df47008
2016-04-29 15:38:13 +00:00
Clara Bayarri
ea2d644923 Fix Custom action mode menu item onclick is not working
BUG: 23575152
Change-Id: I7c07a769bd03c2d756e04f16296f418e965a993f
2015-09-01 17:18:05 +01:00
Ajay Panicker
c211978650 Add StateMachine.removeDeferredMessages()
Bug: 23111466
Change-Id: Ifbb67d4eb080313af0968d5cb6b9508837e3458e
2015-08-26 19:34:52 -07:00
Dianne Hackborn
865b79b43b Fix issue #23326715: Clarify --checkin/-c options in batterystats
Change-Id: I3f026447ba7c6d2c3f9ef065269c31a78cf73512
2015-08-18 17:33:00 -07:00
Daniel Sandler
8ad3e81701 Merge ""I tried to think of the most harmless thing."" into mnc-dev 2015-08-14 19:59:35 +00:00
Dan Sandler
deafeedc81 "I tried to think of the most harmless thing."
Bug: 21984798
Change-Id: I33ffabb72c831ff814363601a82ac9a388cb1e99
2015-08-14 15:25:55 -04:00
Svet Ganov
52153f4c05 Add GTS test to ensure valid default permission grants - framework
The platform grants runtime permissions by default to apps on the
system image that provide core device use cases which a user expects
to work out-of-the-box. We are now adding a test to ensure that
OEMs cannot pregrant premissions on non approved components.

bug:23043018

Change-Id: Id76717cce0ee59678956bd0be347d3c045fe4c51
2015-08-12 21:57:59 -07:00
Raph Levien
beabcb92cb Merge "Fix Insertion ActionMode not showing on RTL languages" into mnc-dev 2015-08-12 21:00:07 +00:00
Clara Bayarri
f95ed10d9d Fix Insertion ActionMode not showing on RTL languages
When long pressing on an empty Text field with the system language set
to RTL, the "paste" popup was not showing up.

The Floating Toolbar requires a content rect to determine where the
text is and place itself close to it. In the case of an empty field,
we create a "fake" content rect by taking the placement of the cursor
+1 pixel to the right. In RTL languages, this +1 causes the content
rect to be considered off the bounds of the view, as the cursor is
aligned to the right, and hence the Floating Toolbar is hidden.

After making the rect a 0 width rect, we ran into the issue that
it was considered out of bounds due to the calculation ignoring rects
that simply touch the edge of the view's bounds.

BUG: 22540083
Change-Id: I29c79b701f586970b2611178233eff082b802ec1
2015-08-12 21:03:28 +01:00
Adrian Roos
fe836fabd9 Prevent overlap of color views in landscape
Removes overlap from the color views which resulted in subotimal looks
when both color views were translucent and the nav bar was on the right
edge.

Also fixes a bug introduced in I2df7092a91eceeb815367ef917dd7289f4f2b27e
where the navigation-bar-on-right-side case got forgotten and caused
flickering in landscape when IMMERSIVE_STICKY was set but the navigation bar
was visible.

Bug: 22876533
Change-Id: I449a82eb3dc3f7b5051f26b37b362a196b4ff63a
2015-08-11 17:36:43 -07:00
Chris Wren
a35c96eb90 add metrics to assistant
long press
  screenshot enabled
  context enabled

Bug: 22949579
Change-Id: Iac178207fa7149cda03c9a817a0d1450e46e1c59
2015-08-06 15:11:42 -04:00
Mitchell Wills
bce3eb22af Merge "Fix incorrect default wifi power draw values" into mnc-dev 2015-08-05 16:59:23 +00:00
Mitchell Wills
385dfd349f Merge "Charge apps for wifi tx time while scanning" into mnc-dev 2015-08-04 21:55:46 +00:00
Mitchell Wills
f901649bd9 Charge apps for wifi tx time while scanning
Bug: 22955562
Change-Id: Ie2c6ab65e7b592272e1cad120ac606fcfd6ea677
2015-08-04 14:47:01 -07:00
Mitchell Wills
083e1d9e4b Fix incorrect default wifi power draw values
Bug: 22848679
Change-Id: Ief4e3e05b051b93efbe30fdc8903cce6765d2ed8
2015-08-04 10:28:16 -07:00
Adam Lesinski
fbabe7dd6a BatteryStats: Add debug logging to find source of b/22716723
Bug:22716723
Change-Id: I97b940b702666b393555622d034e1c694b1e346a
2015-08-03 15:45:13 -07:00
Alan Viverette
ef3f58e59b Merge "Make ResolverDrawerLayout look like a ScrollView to accessibility" into mnc-dev 2015-08-03 20:17:57 +00:00
Alan Viverette
e76bf46ab9 Merge "Add badge content description to TargetInfo, use in ResolverActivity" into mnc-dev 2015-08-03 20:17:31 +00:00
Alan Viverette
1ff29f2d56 Make ResolverDrawerLayout look like a ScrollView to accessibility
Disable accessibility focus on the layout itself and expose the class
name as ScrollView so that we can get auto-scroll working until we have
first-class support for specifying automatic scrolling behavior.

Bug: 22667764
Change-Id: I9b97e40f16038046898e5b56b935a61db9073ac6
2015-08-03 10:01:23 -04:00
Svetoslav Ganov
8dbd484850 Merge "Add per UID control to app ops." into mnc-dev 2015-08-01 02:28:02 +00:00
Svet Ganov
2af5708ab0 Add per UID control to app ops.
The app ops mananger service maintains a mapping from UID to
a list of packages where each package is mapped to a list of
non-default app op states (default states are inferred and
not stored). Hence, specifying the app op state for a UID
requires setting the app op for each package in the shared
UID.

This is problematic when installing new packages if there
is a non-default app op policy set for another already
installed package in the same UID as the app op for the new
package has to be updated to be in sync. The package installer
cannot do this as it is in another process and the app op
update will not be atomic. Therefore, the app ops manager
service has to support specifying app op policy on a per
UID basis.

We now have a UID state object that contains the per package
non-default app op states as well as the per uid non-default
app op states. If there is a UID policy specified then it
takes precedence over the per package one. Even further,
changing the uid policy updates the package policies in this
UID if the state is non-default. Changing a package app op
state also updates the app op state for the whole UID if
the per UID policy for this op is non-default. Clearing the
app op state for a package, clears the policy for the UID
as well.

bug:22802981

Change-Id: I78044906d9fcc6066abf07e706c2c88f3397d293
2015-07-31 17:45:27 -07:00
Alan Viverette
ce5d92c313 Add badge content description to TargetInfo, use in ResolverActivity
Bug: 22667344
Change-Id: Iee241b9179c74a15b1c635cf90d2f96f6f7b31cd
2015-07-31 16:46:56 -04:00
Dianne Hackborn
c1836bb0f1 Merge "Change MNC codename to just M." into mnc-dev 2015-07-31 17:11:58 +00:00
Dianne Hackborn
0e3de6caca Change MNC codename to just M.
Change-Id: I4281d200ff6560791c47cf9073ceea1cb509361e
2015-07-29 15:20:21 -07:00
Adrian Roos
e2cd84196e Merge "Fix pattern lock for accessibility" into mnc-dev 2015-07-29 21:23:25 +00:00
Adrian Roos
d2def94639 Fix pattern lock for accessibility
- remove the content description in Keyguard
- only show virtual views when pattern is in progress
- add a content description when the pattern is not in progress

Bug: 22646748
Change-Id: Id32a37c4c74c82b547cee8861b2856fa0a08c41c
2015-07-29 14:13:53 -07:00
Chris Wren
1bd310e18c Merge "import more metrics enums" into mnc-dev 2015-07-29 14:57:15 +00:00
Adam Lesinski
c96e6f1993 Merge "BatteryStats: Use proper power calculator when energy data is received" into mnc-dev 2015-07-29 00:34:38 +00:00
Adam Lesinski
c691d3ccf4 BatteryStats: Use proper power calculator when energy data is received
We check for the presence of energy data when determining whether to use
the WiFiPowerCalculator or WiFiPowerEstimator. Since we can receive this data
later, we need to switch to the WiFiPowerCalculator if we weren't using it before.

We can't ask the hardware if it supports energy data because that would involve a call into
WiFiManagerService, which can cause a deadlock if we are holding the BatteryStatsService lock
while using this class.

Bug:22776010
Change-Id: Id685d487c56595eab1d382f49da9417a423bb517
2015-07-28 17:11:29 -07:00
Jorim Jaggi
0d210f6395 Animation for touch, wake and unlock
- Add callback to inform SysUI when the screen has been unblocked
and turned on.
- Cleanup inconsistent messaging about device interactive/screen on
and off.
- Add callbacks to inform SysUI about screen states
- Implement a quick fade for the scrim after touch, wake, and unlock.
  First, start with a black scrim on top of everything, and then fade
  it out.
- Make sure we play the normal unlock animation when device is pulsing
- Override navigation bar animations for touch, wake and unlock: Fade
  in the same manner as the scrim.

Bug: 22571198
Bug: 21855614
Change-Id: I8ff08d72cced1e0f03c78d71ff710d8a4f6b848c
2015-07-28 23:02:54 +00:00
Dianne Hackborn
57dd737443 Work on issue #21516866: Implement voice interaction in ResolverActivity
The main change here is to not allow the dialog to go in to its "focus
on the last app the user selected" when running in voice interaction mode,
instead just always giving a simple list.

This also fixes some problems with cleaning up active commands when
an activity finishes and not forcing the current session to go away
when the screen is turned off.

Also added some debug help, having activity print the state of the
voice interactor.

Change-Id: Ifebee9c74d78398a730a280bb4970f47789dadf5
2015-07-28 12:52:11 -07:00
Chris Wren
de061b8175 import more metrics enums
sysui tuners
  inactive apps

Bug: 21114836
Change-Id: I43c4b97c6998374b39d7346bae1e1eca3d761543
2015-07-28 16:55:19 +00:00
Jorim Jaggi
9e49b5d679 Merge "Move PIN/Pattern appear animation to RenderThread (1/2)" into mnc-dev 2015-07-27 18:55:29 +00:00
Phil Burk
fef1b28917 Merge "MIDI: fix running status parser" into mnc-dev 2015-07-27 17:15:04 +00:00
Phil Burk
98e94aead7 MIDI: fix running status parser
Running status was being parsed incorrectly.
This could cause stuck notes or exceptions when sending running
status messages to a Bluetooth MIDI device.

Bug: 22689606
Change-Id: I9f7abce9758927be587eead9614617d5b0076353
Signed-off-by: Phil Burk <philburk@google.com>
2015-07-24 14:11:01 -07:00
Dianne Hackborn
4a368659ba Merge "Fix issue #22414729: Checkin start clock time is different from hsitory reset time" into mnc-dev 2015-07-23 00:56:19 +00:00
Dianne Hackborn
d48954fb6b Fix issue #22414729: Checkin start clock time is different from hsitory reset time
There was a mistake in the code that was supposed to recover from the
initial time on a new device being bad until the real time ultimately
gets set, which was causing us to update the start clock time every time
there was a time change (instead of just when the original start time
appears bad).

Rework all of this, so we now count the start time as bad if it is more
than one year before the current time, only modifying it in that case.
Also when modifying it, adjust the time we set it to take in to account
how much realtime has actually elapsed so far in the battery stats.

Change-Id: If74bd711d9b7618c8f6148a9935c452aaaa7e257
2015-07-22 17:26:32 -07:00
Jorim Jaggi
613f55fbbb Move PIN/Pattern appear animation to RenderThread (1/2)
Bug: 22205322
Change-Id: I253f20a397ab89cb78254338a0254619232d7300
2015-07-22 15:23:52 -07:00
Adam Lesinski
6625047a3b Merge "BatteryStats: Use English locale for dump and checkin data" into mnc-dev 2015-07-22 21:28:37 +00:00
Adam Lesinski
8a83c61497 BatteryStats: Use English locale for dump and checkin data
Dump and checkin data is read by tools that expect a consistent
locale.

Bug:22357316
Change-Id: I0d7e6e771c3512278efca7579fe9c4b79b560e28
2015-07-22 13:50:23 -07:00
Jason Monk
a403159a3b Add metrics to tuner
Bug: 22462605
Change-Id: I075f9a25630a89e85dd17603297565988c38075b
2015-07-22 14:41:02 -04:00
Jorim Jaggi
20df623459 Merge "Add callback to voice interaction session for lockscreen shown" into mnc-dev 2015-07-21 22:46:30 +00:00
Jorim Jaggi
c1244a2995 Merge "Touch, wake and unlock" into mnc-dev 2015-07-21 21:53:11 +00:00
Jorim Jaggi
19695d9711 Add callback to voice interaction session for lockscreen shown
Bug: 22402726
Change-Id: Iaf83e2f2b0389d74b6ecf480aa91a34443803f7b
2015-07-21 12:35:16 -07:00
Adam Lesinski
23e19066de Merge "BatteryStats: Read /proc/wakelocks first before trying /d/wakeup_sources" into mnc-dev 2015-07-21 19:26:45 +00:00
Adam Lesinski
6856964444 BatteryStats: Read /proc/wakelocks first before trying /d/wakeup_sources
Previously we tried to read /d/wakeup_sources to gather kernel wakelock data. If that
fails we used the older sys file /proc/wakelocks.
N7 has both /proc/wakelocks and /d/wakeup_sources, but /proc/wakelocks
has the actual data we need. All other devices are using /d/wakeup_sources, so
only N7 experienced a loss of kernel wakelock data.

The original regression was introduced here: ag/659258

Bug:22556242
Change-Id: I51ec68e957f587bc1466e24f0a1dbc8cd7753ac6
2015-07-21 12:08:56 -07:00
Jorim Jaggi
740452e875 Touch, wake and unlock
- Add onFingerprintAcquired, so Keyguard can grab a wakelock to prevent
the device from sleeping.
- If we get a successful fingerprint, wake the device up, immediately
dismiss the keyguard and tell PWM that we kicked off our frame that
will represent the correct state.
- PWM then waits for this frame to be drawn, and then turns on the
screen, which results in unlocking directly to the previsouly
opened app.

Bug: 21855614
Change-Id: I5f43df17fa5e4e9c6a6392eef4a4590b07df4f96
2015-07-20 23:52:20 +00:00
Jorim Jaggi
e446dcee8f Fix SysUI crashes on svelte devices
Bug: 22602295
Change-Id: Idac0d62683c0f6f7cf7b795967632e34d771c4f7
2015-07-20 15:47:15 -07:00
Dianne Hackborn
78ead58df0 Merge "Fix issue #22531747: Assist info should declare if user has disabled..." into mnc-dev 2015-07-20 19:50:50 +00:00
Dianne Hackborn
17f693520d Fix issue #22531747: Assist info should declare if user has disabled...
...context and/or screenshot

Added new API to find out what contextual data has been globally disabled.

Also updated various documentation to make it clear what kind of contextual
data you will get (and when it will be null).

Also added a new Activity.showAssist() API because...  well, I was already
in there, it was easy to do, it is safe, and maybe people will build cool
things with it.

Change-Id: Ia553d6bcdd098dc0fce4b9237fbfaca9652fc74b
2015-07-20 12:49:10 -07:00