Commit Graph

38466 Commits

Author SHA1 Message Date
Makoto Onuki
ac2898228e Always scan the Settings app for updated shortcuts.
The setting apps' version code is 25 for both DR and MR1, so the
shortcut manager will not notice when it's changed.

Let's just always scan this app.

Bug 32554059

Change-Id: Ia05363b30a5eeb989dc4c44cf5dbd71cde96de96
2016-10-31 15:46:36 -07:00
TreeHugger Robot
e97969b4d0 Merge "[DO NOT MERGE] Only setSize if -s arg is specified" into nyc-mr1-dev 2016-10-28 00:11:14 +00:00
Fyodor Kupolov
b87a491de6 [DO NOT MERGE] Only setSize if -s arg is specified
Calculate size of installed APKs only when INSTALL_EXTERNAL flag is set.
calculateInstalledSize is expensive and may take up to 20% of total
installation time.

Bug: 32180551
Bug: 29932779
Change-Id: I173d2b38820cc86cbfacecd1bacef57369d10af7
2016-10-27 15:29:41 -07:00
Jeff Sharkey
286f069221 Merge "Only bind to RESOLVE_EPHEMERAL_PACKAGE once." into nyc-mr1-dev 2016-10-27 20:18:10 +00:00
Jeff Sharkey
7765d7320d Only bind to RESOLVE_EPHEMERAL_PACKAGE once.
We never unbind, so we only ever need one bind request; creating more
bind requests just wastes resources.

Test: builds
Bug: 32446301
Change-Id: I7d6c4a93b8f5bb8d9aed7a5041b193e19a2d65fc
2016-10-26 23:01:53 +00:00
Marie Janssen
a80d745c65 Bluetooth: prevent enabling BLE in airplane mode
Enabling BLE in airplane mode puts BluetoothManagerService in an
unexpected state which causes Bluetooth to be on when airplane mode
is disabled.

Also fixes a bug where a crash of a BLE client would trigger a restart
into ON mode.

Test: SL4A BleBackgroundScanTest:test_airplane_mode_disables_ble

Bug: 32140251
Bug: 32140271
Bug: 32369494

Change-Id: Ie65157e65c3a1ca914f567a7a0c631175d1e5835
(cherry picked from commit bd93b7b3dc6141cef6236cf0ca7dcc5acf5bfeed)
2016-10-26 14:55:47 -07:00
TreeHugger Robot
e9db00e39f Merge "[DO NOT MERGE] Don't accidentally delete renamed packages" into nyc-mr1-dev 2016-10-26 20:22:53 +00:00
Svetoslav Ganov
e2c85890ac [DO NOT MERGE] Don't accidentally delete renamed packages
Apps on the system image can change their package by declaring
their old one in the manifest. If a package is renamed it is
internally referred by its old name.

The reconciliation code was using the new package name for
renamed packages and was concluding the apk is orphaned thus
deleting it. This puts the package in a bad state where the app
is gone and the version on the system partition is disabled.

Also Play was showing an update for a renamed system app as
an install while it is an update because of the same reason,
it was using the new package name while the app is internally
referred by the old one.

The fix for both above is to internally normalize the package
name by using the old one if the package was renamed or the
package name as is.

Test: With the fix put the old calculator on the system image
and booted, then put the renamed calculator and booted, updated
calculator from play and rebooted - calculator keeps working.
Also did the above steps without the patch to put calculator
in a bad state and flashed the system with the patch which
fixed the broken calculator app.

bug:32321269

Change-Id: I98bfc05c399edfc9854ebcce44182fefa55ceeff
2016-10-26 18:14:06 +00:00
Jorim Jaggi
ec50931d88 Make sure to call dismissKeyguard after setOccluded
If we call it before, SystemUI will not dismiss the Keyguard as
it is still occluded in that state.

Change-Id: I15cf9cc43b9a2b747bfd224a6dfbd769eee19d69
Fixes: 32202560
2016-10-24 15:40:06 -07:00
Andrii Kulian
6e4f6ecbab Merge "DO NOT MERGE -- Use focused activity value when moving task back" into nyc-mr1-dev 2016-10-19 18:31:37 +00:00
Marie Janssen
9fa2491850 Bluetooth: More logging of bluetooth service state
Bug: 32140251
Bug: 32140271
Bug: 32060415

Change-Id: I50faa184551748023ea5a573646a75293f553d16
2016-10-19 16:28:31 +00:00
Svetoslav Ganov
d48bd27f0e Merge "[DO NOT MERGE] Catch a missed case when adding a toast" into nyc-mr1-dev 2016-10-19 01:35:37 +00:00
TreeHugger Robot
23655af585 Merge "Only purge sound models that violate the new primary key constraint if they don't contain identical data." into nyc-mr1-dev 2016-10-19 01:17:05 +00:00
Svetoslav Ganov
76043cf69f Merge "Validate input for ContentService#setIsSyncable" into nyc-mr1-dev 2016-10-19 00:33:02 +00:00
Andrii Kulian
da3b648b64 DO NOT MERGE -- Use focused activity value when moving task back
When task is moved back we need to adjust currently focused activity
and sent currently resumed record from ActivityStack. However if this
happens when device is locked, resumed activity record will be null.
Need to used currently focused record from service instead.

Bug: 32172829
Change-Id: I2de9bc4135663ab45af859f21e9e92562deb44d4
2016-10-18 23:03:39 +00:00
Chris Thornton
d5ff116403 Only purge sound models that violate the new primary key constraint if
they don't contain identical data.

Bug: 32174118
Change-Id: Ied5e4e852337e5f819c7ded53dd941d79087ce73
2016-10-18 15:36:27 -07:00
Svetoslav Ganov
5c90c5e32e [DO NOT MERGE] Catch a missed case when adding a toast
We allow a single toast window per UID. It is possible that
the UID had another toast window that is going away and this
CL adds a missed check for when a window is scheduled to be
removed.

bug:31340854

Change-Id: I0621516019542c85fe7121f7fe61659e4d4eb672
2016-10-18 13:21:27 -07:00
Adrian Roos
b7e4e10618 Separate ambient display triggers
Allows configuring notification and sensor triggers
separately. Introduces a helper class that hosts the
logic for determining what kinds of triggers a device
supports.

Bug: 32073185
Change-Id: Ie7e8eb6b895dcc54e6f972e70642c7248b9e223a
Test: disable "ambient display", sensor triggers should still work
2016-10-18 10:43:44 -07:00
Svet Ganov
96b9c75cec Validate input for ContentService#setIsSyncable
The syncable parameter value cannot be set to
SYNCABLE_NO_ACCOUNT_ACCESS which is a synthetic state that
is computed but never persisted. It just means that the sync
adapter cannot access the account regardless of its current
syncable state and we want to keep its current syncable state
to start from there once account access is granted.

bug:31794527

Change-Id: I606c4b517977d0b0d3e7ffe753dfd235a875fcd7
2016-10-18 02:51:15 +00:00
TreeHugger Robot
c81e1f15d2 Merge "Update primary key in VIS sound model database." into nyc-mr1-dev 2016-10-17 22:20:38 +00:00
Chris Thornton
5bd5cf75e1 Update primary key in VIS sound model database.
The public API for getting at KeyphraseSoundModels is based on the user,
locale, and keyphrase ID. However, the sound model database would allow
multiple models to be registered using the same values, as it has a
primary key on the model UUID. This can potentially lead to a scenario
where multiple models are enrolled for the same user, and the data that
is returned when querying models is arbitrary.

V6 of the sound model database now enforces a primary key over the user
ID, locale and keyphrase ID. When inserting a new model with the same
primary key, the old model will be removed and the new model will be
used instead.

When upgrading from V5 to V6, if there are any models that would violate
the primary key constraint, they are all dropped.

Bug: 32174118
Change-Id: I9597c6a994f01a426625c3be2c53e826f26f5156
2016-10-17 10:12:04 -07:00
Donghyun Cho
c00a6cb9c3 Merge "CEC: Check standby action availability before request for sleep mode" into nyc-mr1-dev 2016-10-16 03:09:23 +00:00
TreeHugger Robot
a6b3caf58e Merge "Don't expose default strong auth timeout as constant" into nyc-mr1-dev 2016-10-13 22:47:30 +00:00
Chris Tate
4bd56fbbee Merge "Retain allowBackup annotation when system+lock wallpaper becomes lock only" into nyc-mr1-dev 2016-10-13 18:51:13 +00:00
Vladislav Kuzkokov
b24489e20a Merge "Revert "Fix backup for users hit by erroneous backup disabling"" into nyc-mr1-dev 2016-10-13 08:34:20 +00:00
TreeHugger Robot
1fefc8b9fa Merge "DO NOT MERGE -- Adjust focus when moving task back" into nyc-mr1-dev 2016-10-13 04:47:46 +00:00
Andrii Kulian
d4b98705b5 DO NOT MERGE -- Adjust focus when moving task back
Resumed and focused activity should be adjusted simultaneously.
This was missing when task was moved back and focus was adjusted only
after previous activity stopped.

Bug: 31983988
Change-Id: Ie6c908b0c8c1adf94680b42ca5a8c9b01308e361
2016-10-13 03:14:07 +00:00
TreeHugger Robot
1553d5411c Merge "Correct recently introduced logic error in seamless rotation detection." into nyc-mr1-dev 2016-10-13 02:05:33 +00:00
Selim Cinek
7ce68fd8a4 Merge "Fixed an issue where the emergency affordance would show" into nyc-mr1-dev 2016-10-13 00:29:59 +00:00
Christopher Tate
edd8dc83d5 Retain allowBackup annotation when system+lock wallpaper becomes lock only
Bug 32069467

Change-Id: I5d0b91c40e1a2896f2b11efeef7bff84503cf2c0
2016-10-13 00:00:53 +00:00
Robert Carr
e441e7f15f Correct recently introduced logic error in seamless rotation detection.
The code detecting whether we should rotate seamlessly (which for
example we do not support for 180 degree rotations) was moved to before
mRotation was updated, so it was always passing the same value for old
and new rotation, and we were failing to perform the 180 degree rotation
check. Correct this.

Test: Rotate the device 180 degrees at once while in Camera. Things look ok.
Bug: 32025371
Change-Id: I0ef08e8cc4e5d87fdff6d839381196c2b52e71d5
2016-10-12 12:50:32 -07:00
Shreyas Basarge
d5541b987a Merge "Add a delay before scheduling local syncs" into nyc-mr1-dev 2016-10-12 17:09:56 +00:00
Selim Cinek
bd740cd56a Fixed an issue where the emergency affordance would show
If a device isn't voice capable, it shouldn't show the emergency
option.

Test: use tablet which isn't voice capable, insert indian sim and
make sure no emergency option is displayed in global actions.
Bug: 31953703
Change-Id: I351e87320f3ffec76d1c1fc5aac78e5c48c0ac54
2016-10-12 09:33:39 -07:00
Michal Karpinski
6dbf67fc48 Don't expose default strong auth timeout as constant
The admin can instead use the value of 0 to reset to default.

Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java

Bug: 31430135
Change-Id: I0d6b29ca4eca65d7ca72a8975a0c28c9050a946c
(cherry picked from commit 943aabd11c)
2016-10-12 09:34:12 +00:00
TreeHugger Robot
6c816c6707 Merge "Stop posting config asynchronously." into nyc-mr1-dev 2016-10-12 01:10:58 +00:00
Julia Reynolds
3ebe72b26a Stop posting config asynchronously.
All of the instances of calling into other services with locks held
should be resolved, so this isn't needed anymore.

Test: have 2 rules end or start at the same time; ensure the resulting
state is correct.

Fixes: 28459870
Bug: 31980467

Change-Id: I3f12f1d3b8460361dab6fa9468f0ede55ca8dd5e
(cherry picked from commit 89aeab0e71)
2016-10-11 23:04:38 +00:00
Christopher Tate
d990e4d3df Respect restoreAnyVersion=true in full-data restore path
The scheduling mechanism was properly checking for it, but the raw
data-handling engine wasn't.  Now it is.

Bug 32054889

Change-Id: Id57ea12be8e2674c4f678f058278b8c14865b6fa
2016-10-11 15:29:39 -07:00
Nick Kralevich
ab7a44b41a Merge "Delete "Show CPU usage"" into nyc-mr1-dev 2016-10-11 18:03:29 +00:00
Andrii Kulian
8e10f945bd Merge "Fix bounds rotation logic" into nyc-mr1-dev 2016-10-11 17:16:31 +00:00
Nick Kralevich
fc4a5c2d85 Delete "Show CPU usage"
This functionality hasn't worked since Lollipop.

Bug: 21388590
Change-Id: Ie4388d88f6e06f3e2d2e84e9c4515b3ebc6a0ea5
2016-10-11 09:01:38 -07:00
Shunta Sato
4f26cb5a36 Fix: "adb install -s" adaptation for session based install
Internal implementation of "adb install" has been changed to
session install. As a result '-s' option doesn't work.
Size info is required when using '-s' option in session install.
PackageHelper.fitsOnExternal() returns false and moving app to SD is
failed when size info is not set.

So set size info when '-s' option is used.
And change identity on some method because shell doesn't have some
permission to access to asec.

Bug: 29932779
Author: Ryuki Nakamura <ryuki.x.nakamura@sonymobile.com>
Change-Id: I65edcc0f01ceecaaba17792ad329791a9253d603
2016-10-11 06:33:22 -07:00
Donghyun Cho
02920a08e1 CEC: Check standby action availability before request for sleep mode
When the playback device is asked to go to Standby state with <Standby>
message, it needs to check whether it can accept the request or
not. This check should be done before asking the system for sleep mode.

Additionally, this change will fix the behavior after screen
timeout. After the timeout, playback device may go into sleep mode, but
canGoToStandby() check will prevent the device from tracking the right
current power status value. So need to set the status properly, and keep
HdmiCecLocalDevices enabled for accepting future CEC commands.

Bug: 30182748
Test: Check fugu screen after turning off/on Samsung TV and
Archer. Also tested the case of screen timeout.
Change-Id: Idbcd7abd5d4e22942845760f77f7f7e622b987c0
2016-10-11 17:48:39 +09:00
Christopher Tate
762dfd1566 Ignore wallpaper relaunch timeout during shutdown
Because of course during system shutdown, the wallpaper service
won't actually get relaunched.  Sometimes shutdown can take long
enough that this timeout kicks, so we need to avoid clearing the
live wallpaper state spuriously.

For simplicity we just check at "would have timed out now" time
rather than try to distinguish between the shutdown case and a
genuine crash that raced with the shutdown broadcast.

Bug 32020355

Change-Id: I9335b2c0214b4c750ef950fed157d186aa670176
2016-10-10 17:50:31 -07:00
Lifu Tang
9e4733ed33 Merge "Fixed the memory leak when receiving Nav messages" into nyc-mr1-dev 2016-10-10 19:00:10 +00:00
Jorim Jaggi
b29dadb939 Merge "Fix dismissing window showing" into nyc-mr1-dev 2016-10-10 11:47:02 +00:00
Lifu Tang
fe427f24e5 Fixed the memory leak when receiving Nav messages
Bug: 32038182

Change-Id: Ie659dc945d6efc7feaf9285d3e7375c90cba7234
2016-10-09 09:37:12 -07:00
Wyatt Riley
d270004959 Merge "Removing over-active NTP & XTRA assistance downloads" into nyc-mr1-dev 2016-10-07 21:05:57 +00:00
Jorim Jaggi
f20b1428f8 Fix dismissing window showing
Only show dismissing window if we are about to unlock, and not just
in all cases. For that, set a flag to true during the process, and
reset the flag after the Keyguard has unlocked.

Test: Have a FLAG_SHOW_WHEN_LOCKED activity that starts a
FLAG_DISMISS_KEYGUARD_ACTIVITY. Check whether window is hidden
when toggling the power button. Make sure that the device is
in a trusted state during the whole test.

Change-Id: I9346dd869d1cf50a42c64a5f7c69f8e24f1e1f9b
Fixes: 31810884
2016-10-07 15:31:05 +00:00
Hugo Benichi
ea2f7a4f05 Merge "Reject DHCP packets with no magic cookie" into nyc-mr1-dev 2016-10-07 02:22:35 +00:00
Chris Tate
24ab3aafe2 Merge "Fix job scheduler crash due to uninstall race" into nyc-mr1-dev 2016-10-06 18:10:37 +00:00