36260 Commits

Author SHA1 Message Date
Chong Zhang
92ab103cb6 Set fontScale in override config to be equal to global.
The default fontScale in EMPTY config is 1.0. This will result in
updateFrom always overriding the fontScale to 1.0 since it's non-zero.

We can't set it to 0.0 either as that will make the override config
not equal to EMPTY. The rest of the code doesn't work well with that.

So here we always set the override fontScale to be idential to global.

bug: 29113700
Change-Id: I1dbe507145b8190a9ae5e108948c833d4e037e1d
2016-06-07 15:56:53 -07:00
Andrii Kulian
265bd89c3c Merge "Fix task selection logic" into nyc-dev 2016-06-03 01:37:52 +00:00
Pankaj Kanwar
0bc61eb176 Merge "Delay handleEnable() until Bluetooth state is OFF" into nyc-dev 2016-06-03 00:55:50 +00:00
Svetoslav Ganov
e34bb5a1ff Merge "Properly set default voice interactor" into nyc-dev 2016-06-02 22:36:05 +00:00
Svetoslav Ganov
b625e19a87 Properly set default voice interactor
We need to figure out the default voice interactor to give
it default permissions. This happens before the user has
been unlocked and if the voice interactor is not direct
boot aware we fail to find it, hence no permissions are
granted. Now we query the package manager for both direct
boot aware and unaware components. This is fine as we
don't interact with the assistant until the user is
unlocked.

bug:28963642

Change-Id: Ide5471fa1798e868c6e3a4b5e87570a5556e2d3f
2016-06-02 15:25:15 -07:00
Pavlin Radoslavov
e47ec14318 Delay handleEnable() until Bluetooth state is OFF
During shutdown of the Bluetooth stack, if a request to
enable Bluetooth is received, the request is processed immediately.
As a result, we don't let the Bluetooth service to shutdown cleanly,
and the Bluetooth process with the native backend doesn't go away.
This creates various issues in the native backend stack.

Now, after an enable request is received, if necessary we delay
acting on it, until the Bluetooth state is OFF.

Bug: 17723234
Change-Id: I55db4bbd4f45227aa49eae996dcc328f76557a9b
2016-06-02 14:56:31 -07:00
Andrii Kulian
206b9faa09 Fix task selection logic
When task was selected for activity launched with flag FLAG_ACTIVITY_NEW_TASK
first matching task was omitted if there was another match lower in stack.
This lead to task shuffling in same stack.

Bug: 28848683
Change-Id: I94e55693fc7ed926fc151ba988d257bd2417dd45
2016-06-02 14:54:44 -07:00
Jorim Jaggi
6afd156414 Fix unminimizing dock stack for AppTask.moveToFront
Some apps call AppTask.moveToFront instead of startActivity from
their trampoline activity. We need to handle this case also and
need to do all the post processing after starting an activity
so the docked stack gets unminimized.

Change-Id: I8400995bf1d1a4a4467d01fd55fca7e5800b4645
Fixes: 28722017
2016-06-02 19:14:06 +00:00
David Brazdil
c4f1bc4032 Merge "Do not update packages in encrypted state" into nyc-dev 2016-06-02 16:16:27 +00:00
TreeHugger Robot
2002061f34 Merge "Only reset global restriction owner on DO->PO for the right user" into nyc-dev 2016-06-02 15:59:25 +00:00
TreeHugger Robot
43c3a7e5a7 Merge "make the notification enqueue rate threshold a setting" into nyc-dev 2016-06-02 15:08:03 +00:00
Chris Wren
763a9bb095 make the notification enqueue rate threshold a setting
Bug: 28693065
Change-Id: I08bd2ed342d5347c0075183b239558c50ada4a0a
2016-06-02 15:07:20 +00:00
David Brazdil
89c80bb631 Do not update packages in encrypted state
SystemServer used to run PMS.updatePackagesIfNeeded even when the
device is booting in encrypted state only with core packages
available. This is redundant because the packages are prebuilts
(OAT files always up to date) and the data partition is not mounted
yet, so we are only wasting time opening the OAT files and testing
checksums. Additionally, the attempt to update these packages gets
reported to TRON stats as time spent in the Optimizing Apps dialog
and skews the results.

This patch does not call updatePackagesIfNeeded when in the device
is in encrypted state.

Bug: 28833829
Change-Id: I8641d07a8840948ffe261dfb8f99f70de7341972
2016-06-02 15:45:03 +01:00
Philip P. Moltmann
80354c4dfe Merge "Handle the uncommon case that a name is null" into nyc-dev 2016-06-02 00:28:52 +00:00
Jae Seo
bd2b9e0d53 Merge "TIF: Release an existing audio patch before creating a new one" into nyc-dev 2016-06-02 00:04:17 +00:00
TreeHugger Robot
9bdf289f0a Merge "Skip cancelling jobs with FLAG_WILL_BE_FOREGROUND." into nyc-dev 2016-06-01 23:15:20 +00:00
David Sehr
7c5bcfc21a Merge "Installer connection support for dump_profiles" into nyc-dev 2016-06-01 22:16:05 +00:00
TreeHugger Robot
380f3b12a4 Merge "Release AssetManagers when ejecting storage." into nyc-dev 2016-06-01 22:14:57 +00:00
Chia-I Wu
2957d9d604 Merge "Fix clipRect transform rounding errors" into nyc-dev 2016-06-01 22:11:39 +00:00
Jeff Sharkey
34618b5869 Skip cancelling jobs with FLAG_WILL_BE_FOREGROUND.
When FLAG_WILL_BE_FOREGROUND is set on a job (such as a download), we
need to treat the job as if it had a foreground service running so
it can continue making forward progress.  We already ignore the device
idle state when offering to start the job, so this just avoids the
hiccup of stopping the job only to restart it a minute later.

Bug: 26571724
Change-Id: I348903dd3a7dd7104b0c1bf4310e2a48655d2588
2016-06-01 15:51:50 -06:00
Jeff Sharkey
98bf12f999 Release AssetManagers when ejecting storage.
When ejecting a storage device, the system process needs to rapidly
release any open FDs to prevent itself from being killed by vold.

This change examines all ResourceImpls cached inside the system
process and evicts any that reference the storage device being
ejected.  (ResourcesManager will gladly recreate any evicted entries
when asked again in the future.)

Also replace broken use of WeakHashMap, since we want the values to
be weak references, not the keys.

Bug: 28867548
Change-Id: Ib9cfc66497149b6d3f8d49213e9779408a331d2a
2016-06-01 14:52:27 -06:00
Julia Reynolds
6df8a9a89f Merge "Only call finish on operations that have started." into nyc-dev 2016-06-01 20:37:08 +00:00
Chong Zhang
65f1973ba9 Merge "Do not sanitize override config for fullscreen" into nyc-dev 2016-06-01 19:34:04 +00:00
Dianne Hackborn
3e05055af7 Merge "Fix issue #29069028 NYC: device boot failure: NPE in AppIdleController" into nyc-dev 2016-06-01 19:26:09 +00:00
Chong Zhang
a8cc378d15 Do not sanitize override config for fullscreen
bug: 29063336
Change-Id: I65c5d635133a6b3791ce1aef63547f8d38ca24b5
2016-06-01 12:20:10 -07:00
Julia Reynolds
4357e52820 Only call finish on operations that have started.
Change-Id: I77d10913a68be529ea2c5a3f2a53ad91a4a41f47
Fixes: 29069613
2016-06-01 14:49:40 -04:00
TreeHugger Robot
13d534e7f2 Merge "Don't crash activity manager when supplying invalid URI" into nyc-dev 2016-06-01 18:37:35 +00:00
Dianne Hackborn
970e3f412d Fix issue #29069028 NYC: device boot failure: NPE in AppIdleController
Make sure the core parts of JobSchedulerService are initialized
before we start creating the controllers.

Change-Id: I497df12f7e6fbd93581291ec691c4b45104d67d0
2016-06-01 10:55:13 -07:00
Brian Carlstrom
93193135b1 Merge "PackageManager: Don't clear app profiles during system upgrades." into nyc-dev 2016-06-01 17:06:20 +00:00
Dianne Hackborn
438693dd6c Merge "Work on issue #28942589: Tune job scheduler" into nyc-dev 2016-06-01 16:27:06 +00:00
Narayan Kamath
34a6258b2a PackageManager: Don't clear app profiles during system upgrades.
They don't need to be cleared and will remain valid as long as
the application itself hasn't changed.

bug: 28998083
bug: 29067239
Change-Id: I2e4a4ee1b168da81073b8e70b12918db592fe691
2016-06-01 16:12:23 +00:00
David Sehr
a877708286 Installer connection support for dump_profiles
Bug: 28748264
Change-Id: I22322b5a0716a030d9873edcc6dfd7f3ef2d3bca
2016-06-01 08:21:27 -07:00
Dianne Hackborn
e9a988caca Work on issue #28942589: Tune job scheduler
We now have a new settings key that provides all of the existing
tuning parameters, plus some newly redone ones for dealing with
different memory levels.

Changed the minimum batching for overall jobs from 2 to 1, so
we will never get in the way of immediately scheduling jobs
when the developer asks for this.  We should now be able to rely
on the doze modes to do better batching of jobs for us when it
is really important.

Also work on issue #28981330: Excessive JobScheduler wakeup alarms.
Use a work source with scheduled alarms to blame them on the app
whose job they are being scheduled for, and add a check for whether
a job's timing constraint has been satisfied before considering it
a possible candidate for the next alarm.  (If it is satisified,
the time is in the past, so we should not schedule an alarm for it.)

Finally clean up a bunch of the dumpsys output to make it easier
to understand.

Change-Id: I06cf2c1310448f47cf386f393e9b267335fabaeb
2016-05-31 18:16:19 -07:00
Andrii Kulian
88be465ce5 Merge "Update override config to include some changes from global config" into nyc-dev 2016-06-01 01:08:37 +00:00
Hall Liu
d7007923c5 Merge "Add null check in showLockTaskToast" into nyc-dev 2016-06-01 00:25:05 +00:00
Jorim Jaggi
cc64dfcf66 Don't crash activity manager when supplying invalid URI
Change-Id: I30a058f14d5d0a09ba86fdd10312a51db7a4a9df
Fixes: 29039290
2016-05-31 23:21:30 +00:00
Hall Liu
45784f13ef Add null check in showLockTaskToast
Bug: 29056498
Change-Id: Ic4333ec4f43e3c2916a4963b5ddf9e6ad10136ed
2016-05-31 15:50:48 -07:00
TreeHugger Robot
1755dd08cb Merge "Turn this wtf into just a log." into nyc-dev 2016-05-31 21:42:46 +00:00
Todd Kennedy
1c39a112b4 Merge "Remove STOPSHIP" into nyc-dev 2016-05-31 21:07:34 +00:00
Adrian Roos
ac2b44f502 Merge "Fix crash with intent-less actions" into nyc-dev 2016-05-31 20:51:50 +00:00
Andrii Kulian
f12fce1a3a Update override config to include some changes from global config
In override config for task we set Configuration#screenLayout field based on
initial global config + shrink to fit the area on screen given for this task.
However this field also contains information (like layout direction) that we
do not intend to override and it can be changed in global config separately.
In this case we need to update the override config with changes from global
config.

Bug: 28616488
Change-Id: I22673257621b3f9ae7933b37bd0fb9446c6042ea
2016-05-31 13:14:55 -07:00
Chris Tate
87ad1fce25 Merge "Build JobStatus objects outside the lock" into nyc-dev 2016-05-31 18:36:49 +00:00
Joe Onorato
9d97ee2ad2 Turn this wtf into just a log.
We're seeing this a bunch, but the overhead from the WTF is concerning.
So turn it off.  It means that somewhere there is a race in tearing
down the app, or maybe some place fails to call back in some scenario.

Bug: 28932059
Change-Id: Ice14ade95bb9377ad622d440fb022953ad51c34c
2016-05-31 10:49:08 -07:00
Jae Seo
ee32ede540 TIF: Release an existing audio patch before creating a new one
Bug: 28115694, Bug: 28954262
Change-Id: I04e2e9176a008b72468592db7dc3c7ce376b94f2
2016-05-31 10:33:08 -07:00
Hall Liu
8b655e0f57 Merge "Disable app pinning when emergency call button pressed" into nyc-dev 2016-05-31 17:29:37 +00:00
Ricky Wai
21f98459b7 Merge "Do not get device owner admin info when device owner is null" into nyc-dev 2016-05-31 17:22:55 +00:00
Philip P. Moltmann
236b9e8eb4 Handle the uncommon case that a name is null
Bug: 29037588
Change-Id: I697184bd1ae4d519f8f29bf612ba13843e6662cb
2016-05-31 10:16:30 -07:00
Ricky Wai
90c9dbc919 Do not get device owner admin info when device owner is null
Bug: 29043723
Change-Id: I355c549f891a5e71f654f42ed16a7139da86482a
2016-05-31 18:01:46 +01:00
TreeHugger Robot
ce289e937e Merge "Look at last used app when filtering." into nyc-dev 2016-05-31 11:29:41 +00:00
TreeHugger Robot
89f4bff149 Merge "Cleanup performDexOpt with instruction sets." into nyc-dev 2016-05-31 11:23:44 +00:00