Commit Graph

19337 Commits

Author SHA1 Message Date
Fyodor Kupolov
2fe1990ba7 [DO NOT MERGE] Increased user switch timeout to 3s
Also report the actual delay if sendResult is eventually called.

Test: Manual - device boots, no timeouts
Bug: 30813554
Change-Id: I1271181ab9d2653fad1167049c84a6780ad46ff0
2016-12-08 17:49:09 -08:00
Ned Burns
5207e1cff1 DO NOT MERGE Fix android:noHistory for Wear
am: d7a313fb11

Change-Id: I3715b2fb1045b7bfce7f52e9b4982fcc0218d28c
2016-12-07 21:14:51 +00:00
Ned Burns
d7a313fb11 DO NOT MERGE Fix android:noHistory for Wear
Modifies swipe-to-close activities to be opaque by default (instead
of translucent by default). Previously, android:noHistory properties
on most activities in Wear were being ignored because they were
usually transitioning to a swipe-to-close activity that was marked
as translucent. This meant that the noHistory activity was still
technically visible, and so would never be culled from the task
history.

Now, we convert a swiped activity to translucent as soon as a swipe
begins, and convert it back after the swipe finishes. The previous
version of SDL tries to do this, but fails in the case where the
context is a ContextWrapper.

This approach is hacky and isn't merge-able into master. We leave
it DO NOT MERGE and will do a long-term fix after the holidays.

Test: Built a test app to verify that noHistory is now being
correctly respected. Manually verified that new activities start
out opaque and not translucent. Manually verified that Home
correctly starts/stops when it's revealed from underneath a
partially swiped activity. Tested general swipe behavior on Settings,
Contacts, Flashlight, Fit.

Bug: 33252029

Change-Id: Ib2e7f21ea1e0d52db03e78d25676501e5f73b31f
2016-12-07 15:05:25 -05:00
Eric Laurent
825a5ea380 AudioService: fix mismatch in device volume index for alias streams
Fix VolumeStreamState.setIndex() to force device volume
index update on an alias stream when no specific device volume exists
on the VolumeStreamState of this alias stream.

This prevents asymetric behaviors of setDeviceVolume() and setAllVolumes()
causing some stream types to be muted and
not unmuted if no specific device volume index exist.

Test: make
Test: wipe device, setup wizard, place call and check nofication volume

Bug: 32626244
Change-Id: Idd170aa9f295b0a9533a589e1891a04c05ab2f2f
(cherry picked from commit 3fb608e4f3)
2016-12-07 18:56:19 +00:00
Mark Renouf
28f0e5bf48 Revert "Allow power button to close an input method"
This reverts commit d28e907183.
Test: manually tested

BUG: 33038203
Change-Id: I7a4c6e95a69abb2e40df73509b6e67b93eacf6ff
2016-12-06 17:43:28 +00:00
TreeHugger Robot
a6dbd4934c Merge "[DO NOT MERGE] Allow multiple toasts for the focused app" into nyc-mr2-dev 2016-12-06 15:19:55 +00:00
Michal Karpinski
b97196b1de Merge changes from topic 'netd-benchmark-and-logging-nyc-mr2-dev' into nyc-mr2-dev
* changes:
  DO NOT MERGE Add connect event reporting
  DO NOT MERGE Extending DNS event reporting
2016-12-06 10:16:37 +00:00
TreeHugger Robot
53db761efb Merge "Avoid NPE around mReusedTask of ActivityStarter" into nyc-mr2-dev 2016-12-05 22:41:24 +00:00
Shunta Sato
9fff53f2cb Avoid NPE around mReusedTask of ActivityStarter
Symptom:
System crash by NPE is observed on ActivityStarter
during phone boot-up.

Detail and sample:
ActivityStarter has possibility to be called itself recursively
by calling TaskRecord$performClearTaskLocked().
Then class variable of mReusedTask is initialized to null
after the call, because the recursive call isn't guarded by
synchronized block.
Then NPE crash occurs on next statement.

Solutions:
Call performClearTaskLocked() before assigning 
intentActivity.task to mReusedTask.

Bug: 32361138
Test: builds, boots, Manual testing of condition in bug
Author: Shigeki Yokomichi <shigeki.x.yokomichi@sonymobile.com>
Change-Id: Iaea3e066a6f7134fcae4338ff864bb236241194c
(cherry picked from commit 0bd28e2c5f)
2016-12-05 12:58:25 -08:00
Svet Ganov
296a60acc3 [DO NOT MERGE] Allow multiple toasts for the focused app
We don't allow apps to add multiple toast windows to
prevent an attacker to keep adding the same toast as
a workaround for our measure to ensure toast windows
are removed after a timeout. The may cause backwards
compatibility issue for apps that add multiple toasts.
While we need to fix the security vulnerability it is
desirable to make the fix as backwards compatible as
possible. This change allows the focused app to add
as many toast windows as it wants since they will be
removed after the timeout and once the app is not the
one the user uses it will lose the multiple toast add
capability.

bug:30150688

Change-Id: I2d9295926cb49b5bb80c7af2546872ff8ca22c64
2016-12-05 20:17:30 +00:00
Christine Franks
cc2801296d TwilightService: Ignore (0,0) coordinate location updates
Location providers may erroneously return (0.0, 0.0) when they
fail to determine the device's location. These location updates
can be safely ignored since the chance of a user actually being
at these coordinates is quite low.

Bug: 31009261
Test: added TwilightServiceTest; both tests pass

Change-Id: Ie9d7d10f81ade9b0be10f98ed74978539efaa658
2016-12-05 11:19:42 -08:00
Jeff Sharkey
d8ee1d0fcd DO NOT MERGE: Check provider access for content changes. am: c813f5dae2
am: 2b7584f5b1

Change-Id: I762e09539e99d1cb8b6fd810992b27255774060d
2016-12-02 18:36:38 +00:00
Jeff Sharkey
2b7584f5b1 DO NOT MERGE: Check provider access for content changes.
am: c813f5dae2

Change-Id: I939bca8887198e2578916356d49b0f2f0a2bf3d2
2016-12-02 18:19:46 +00:00
Michal Karpinski
c429e71cfe DO NOT MERGE Add connect event reporting
Adds reporting of connect events including netId, destination IP address,
destination port, uid and connect latency.
Currently ignores the new data it receives, further work will be
done in the subsequent CLs.

Test: for now just the benchmarking, in the future CTS

Bug: 29748723

(cherry picked from commit 965894eeb9)

Change-Id: Ic27405cca56fbd99a281b74ac0a8981dc49ec896
2016-12-02 17:24:28 +00:00
Michal Karpinski
70444d3ad5 DO NOT MERGE Extending DNS event reporting
This adds hostname, array of addresses, total count of IP addresses
and uid to the existing pipeline.
Currently ignores the new data it receives, further work will be
done in the subsequent CLs.

Test: for now just the benchmarking, in the future unit and CTS

Bug: 29748723

(cherry picked from commit 14c9d2d0df)

Change-Id: I3941b8d6fc1dd578e2af6ed4d3c3d0a722c39918
2016-12-02 17:21:28 +00:00
Michal Karpinski
3db0a14ab0 Merge "DO NOT MERGE Rename the DnsEventListenerService to NetdEventListenerService" into nyc-mr2-dev 2016-12-02 09:26:31 +00:00
Jeff Sharkey
ede3a78432 DO NOT MERGE. Retain DownloadManager Uri grants when clearing. am: 6eee8e37fd
am: 6795459a80

Change-Id: I5ca304b89c30c3c7d0bddb701c60c81c87d8870c
2016-12-02 02:03:58 +00:00
Jeff Sharkey
6795459a80 DO NOT MERGE. Retain DownloadManager Uri grants when clearing.
am: 6eee8e37fd

Change-Id: I431b334bbf3580f51fc8e31da28c9c9d6f5944ee
2016-12-02 01:52:12 +00:00
Jeff Sharkey
6eee8e37fd DO NOT MERGE. Retain DownloadManager Uri grants when clearing.
As part of fixing a recent security issue, DownloadManager now needs
to issue Uri permission grants for all downloads.  However, if an app
that requested a download is upgraded or otherwise force-stopped,
the required permission grants are removed.

We could tell DownloadManager about the app being stopped, but that
would be racy (due to background broadcast), and waking it up would
degrade system health.  Instead, as a special case we now only
consider clearing DownloadManager permission grants when app data
is being cleared.

Bug: 32172542, 30537115
Test: builds, boots, app upgrade doesn't clear grants
Change-Id: I7e3d4546fd12bfe5f81b9fb9857ece58d574a6b9
(cherry picked from commit 23ec811266)
2016-12-01 17:04:32 -07:00
Julius D'souza
a83f940349 DO NOT MERGE: Sync with master: Add initial ambient light sensor rate
am: 5c7ae14148

Change-Id: I5020bc4caba313eda5b7a8b2bdcf3e9f348b2f95
2016-12-01 22:35:39 +00:00
Julius D'souza
afccacad68 Merge "DO NOT MERGE: Sync with master: Add initial ambient light sensor rate" into cw-f-dev 2016-12-01 22:26:06 +00:00
Makoto Onuki
986d88d7fe Merge "Fix issue with apps restored to lower versions." into nyc-mr2-dev 2016-12-01 20:47:10 +00:00
Mark Renouf
fed8c7dc73 Allow power button to close an input method
am: d28e907183

Change-Id: I26176ab20b90ca2c5d286b3f34bfacc6527018b5
2016-12-01 01:29:31 +00:00
Mark Renouf
33d498b946 Merge "Allow power button to close an input method" into cw-f-dev 2016-12-01 01:16:59 +00:00
vinodkrishnan
60d4248fdc Revert "DO NOT MERGE Wear Fwk: Disable Animations for A11y"
am: 7b62df8556

Change-Id: Iec37684da3fa447d55498e6c8302fb229fa28373
2016-11-30 21:52:05 +00:00
TreeHugger Robot
a0d9383f71 Merge "Revert "DO NOT MERGE Wear Fwk: Disable Animations for A11y"" into cw-f-dev 2016-11-30 21:43:38 +00:00
Mark Renouf
d28e907183 Allow power button to close an input method
BUG: 33038203
Change-Id: I5c44dc49db6b960b4e3e42545bfbbab62f357f08
2016-11-30 16:01:42 -05:00
vinodkrishnan
7b62df8556 Revert "DO NOT MERGE Wear Fwk: Disable Animations for A11y"
This reverts commit 8500f26d51.

Change-Id: I6408fa3f307d7611443e26b24d3876c1a1f92fdc
2016-11-30 20:09:59 +00:00
Anthony Hugh
c2ca17711e DO NOT MERGE: Properly set FLAG_ACTIVITY_BROUGHT_TO_FRONT for onNewIntent() callback
am: f73d085395

Change-Id: I9cee73a7146ff97dcc7f82447f06281f71bc2466
2016-11-30 03:28:34 +00:00
TreeHugger Robot
75bf81458e Merge "DO NOT MERGE: Properly set FLAG_ACTIVITY_BROUGHT_TO_FRONT for onNewIntent() callback" into cw-f-dev 2016-11-30 03:09:24 +00:00
Anthony Hugh
f73d085395 DO NOT MERGE: Properly set FLAG_ACTIVITY_BROUGHT_TO_FRONT for onNewIntent() callback
It looks like there was a regression where #onNewIntent() was called
before the FLAG_ACTIVITY_BROUGHT_TO_FRONT flag was set.  This
change updates the code so we set the flag properly.

BUG: 33034247
Change-Id: I61959a289dc5af14ee9d3d7bfa213191238efc88
2016-11-30 00:00:15 +00:00
Rubin Xu
873c99c30b Fix boot loop when upgrading direclty from L to N am: bfc7faaf35
am: 492f5263a4

Change-Id: I62f538737c1946aae3fb64555d425c379340bef1
2016-11-25 18:24:55 +00:00
Rubin Xu
492f5263a4 Fix boot loop when upgrading direclty from L to N
am: bfc7faaf35

Change-Id: Iaaf32f1c6fd70dd394252f963d87897899fb2e55
2016-11-25 18:20:48 +00:00
Michal Karpinski
7f9014bb9d DO NOT MERGE Rename the DnsEventListenerService to NetdEventListenerService
The service will be extended to include listening for connect events as well.

Test: this is just a renaming change

Bug: 29748723
Change-Id: I073187e354fc987222ec0108d7f0d3a422397d5e
2016-11-24 17:05:02 +00:00
Rubin Xu
bfc7faaf35 Fix boot loop when upgrading direclty from L to N
A second attempt to fix the upgrade problem due to SID == 0
in the above upgrade path. The previous fix contains a bug
where it would cause future attempts to unify work challenge
to silently fail, and crash SystemUi when unlocking.

This fix adds a check for non-zero SID before doing the initial work
profile unification (which caused the upgrade crash when SID == 0).
This means the initial work profile unification would only happen when
the user has unlocked the lockscreen and SID is generated.

Bug: 32490092
Bug: 33050562
Change-Id: Ib28951b2ec26b4f091df7763d9902f55616fcb5c
2016-11-23 16:59:22 +00:00
Zach Jang
f516131a38 Revert "Catch KeyStoreException for setting profile lock" am: e61672ab08
am: fe3b0b2cc1

Change-Id: Iba7288ba01872f804a22814f4615b202010d7194
2016-11-22 18:03:27 +00:00
Zach Jang
fe3b0b2cc1 Revert "Catch KeyStoreException for setting profile lock"
am: e61672ab08

Change-Id: Ie1a720181bf542bbf213af8b6b83eff0ecd84a98
2016-11-22 17:58:58 +00:00
Zach Jang
e61672ab08 Revert "Catch KeyStoreException for setting profile lock"
This reverts commit c8fa5ed8f2.

Change-Id: Ia1425e649e102cb79280d75e5f49db670214cec3
2016-11-22 17:47:18 +00:00
Makoto Onuki
fac592f64c Fix issue with apps restored to lower versions.
When restoring to a new device, if a restored app is not compatible
with the old version (e.g. lower version or different signature),
then we won't restore shortcuts, which is working as expected.

However when it happens, the shortcut manager forgot to "un-shadow"
the package information, causing the app to not have shortcuts at all.

Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests

Bug 32999759

Change-Id: I89832360114de0ce1c57d763bcaccab4fdb87b6d
2016-11-21 13:49:31 -08:00
Marie Janssen
6689f33436 Bluetooth: BLE app tracking fixes
Simplify tracking registered BLE Apps and clear the state when we
try to recover bluetooth from starting to ON.

Test: enable and disable bluetooth an LE-only app running
Bug: 32609235
Change-Id: I3233bf8402a3c8fc4886ef21b1e9411bc78d4e2c
2016-11-18 14:36:24 -08:00
Ricky Wai
c40b9a8ee2 Catch KeyStoreException for setting profile lock am: c8fa5ed8f2
am: 3b546019dc

Change-Id: Id668766a96473ae2f68e83dae1ecb547b26de6fc
2016-11-18 01:43:01 +00:00
Ricky Wai
3b546019dc Catch KeyStoreException for setting profile lock
am: c8fa5ed8f2

Change-Id: I28777d9d80ba13df463e05b95dd2524633554c9d
2016-11-18 01:38:04 +00:00
Ricky Wai
c8fa5ed8f2 Catch KeyStoreException for setting profile lock
When device upgrades from L->N, sid(in gatekeeper) could be 0
even primary profile screenlock is set.
We are now trying to catch the exception so when sid==0 happens,
it will try to tie profile lock again when primary profile is unlocked.

Bug: 32490092
Change-Id: I73011d872ac15e7e09be9bda0165cf7f6a75493a
2016-11-18 00:02:24 +00:00
Jeff Sharkey
c813f5dae2 DO NOT MERGE: Check provider access for content changes.
For an app to either send or receive content change notifications,
require that they have some level of access to the underlying
provider.

Without these checks, a malicious app could sniff sensitive user data
from the notifications of otherwise private providers.

Test: builds, boots, PoC app now fails
Bug: 32555637
Change-Id: If2dcd45cb0a9f1fb3b93e39fc7b8ae9c34c2fdef
2016-11-17 21:02:31 +00:00
Damien Bargiacchi
4e9436261f Allow config.xml to set the default display's default color mode
am: 4364bbf93f

Change-Id: I6d68be94598f3fe28225826e00459d5707b7ecee
2016-11-09 19:14:26 +00:00
Damien Bargiacchi
7da025f142 Merge "Allow config.xml to set the default display's default color mode" into cw-f-dev 2016-11-09 19:05:37 +00:00
Philip Cuadra
ac39b9626d Pinner Service - update Camera app max size to 80MB
The prebuilt camera app in /system/app uses uncompressed libs to save
memory.  A recent update pushed it over the arbitrary 50MB limit.  This
change moves that arbitrary limit to 80MB.

Bug 32289474
Tested manually

Change-Id: Icf4e4476447fd363f2ab311b237f17a0e9d43053
2016-11-08 11:23:23 -08:00
Damien Bargiacchi
4364bbf93f Allow config.xml to set the default display's default color mode
Bug: 31928803
Change-Id: I2707ae47611dca134fa9b4afa2d09e0812b3efd3
2016-11-07 11:20:55 -08:00
Julius D'souza
5c7ae14148 DO NOT MERGE: Sync with master: Add initial ambient light sensor rate
Bug: 32150144

Change-Id: Ica81107feddd7a5fa3b6ac585dab06a188c747b0
2016-11-07 11:04:41 -08:00
Jorim Jaggi
3188386ff8 Fix waitingForDrawn callback not called when adjusting for IME
Test: Go into multi-window, with IME target at the top. Open IME,
lock screen and immediately unlock with fingerprint. Make sure
you don't end up with a unrecoverable black screen.

Change-Id: I1b9dd3aab64454e2d2894f5f273b70385615c74f
Fixes: 32544627
2016-11-04 23:50:52 +00:00