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
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
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
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
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
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
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
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
Make sure the core parts of JobSchedulerService are initialized
before we start creating the controllers.
Change-Id: I497df12f7e6fbd93581291ec691c4b45104d67d0
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
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
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
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