Settings were persisted on the system background thread but during
first boot the device is under heavy load and persisting settings
competes with other system components using the shared background
thread. As a result persisting settings can be delayed much longer
than the expected 200ms. This can cause issues with setup wizard
being skipped/went over and its component disaabled being persisted
but the setting whether the device is provisioned not being
persisted - now if the device boots it will have no SUW but also
the home button would be missing. Generally, we need a tansactional
abstraction in the system process to peform all delayed operations
atomically.
bug:25472484
Change-Id: Icf38e72403b190a8fa9d0554b8dd83ce78da3bc8
We now have a null object instead of null values and
there was a place where we returned null instead of
the correct null object.
bug:28423485
Change-Id: I2626768acdf8d19fc94aa5e978eb057818450fa5
With I5a40675dd226564c0ee190d0d6f7eb2a7e4673b0, isNull() is used for
null check but accidentally the condition is flipped.
Bug:28406262
Change-Id: I776a6c259765210a7b334a81876233b594fd25ed
We no longer have a null settings value - instead it is a
null object. This change adds a missing null check that is
not changed to check against the null object.
bug:28406262
Change-Id: I5a40675dd226564c0ee190d0d6f7eb2a7e4673b0
A recent change replaced the null state during a setting
lookup with a null object, however missed to update some
null checks to be null object ones.
bug:28405145
Change-Id: I80f0fb3ac6e64f4283b6c617283a009e97a40efe
We used the system proterties as a shared memory mechanism
to propagate information to local settings caches when the
content has changed and the cache should be cleared. The
system properties are unfortunately updated asynchronously
leading to cases where clients may read stale data.
This change adds a simple int array data structure backed
by shared memory which guarantees individual values are
atomically read and updated without memory tear. Multi-
index opearations are not synchronized between each other.
The settings provider is using the new data structure to
propagate the settings generation which drives when caches
are purged.
We have a single memory array keeping the generation for
different settings tables per user. Since memory array is
not a compact data structure and the user space exceeds
the memory array size we use an in-memory map from keys
to indices in the memory array where the generation id of
a key is stored. A key is derived by the setting type in
the 4 most significant bits and the user id in the 28 least
significant bits.
The mapping from a key to an index is cleared if the user is
removed and the corresponding index in the memory arry is
reset to make it available for other users. The size of the
memory array is derived from the max user count that can be
created at the same time.
bug:18826179
Change-Id: I64009cc5105309ef9aa83aba90b82afc8ad8c659
Copy the primary values of LOCK_SCREEN_SHOW_NOTIFICATIONS and
LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS into managed profile upon upgrade.
Bug:27673591
Change-Id: I3207b7e5bf844f0df534324220082edbdabe8444
Previously many usages of UserManager.getProfiles and getEnabledProfiles
were only using ids of returned users. Given that the list of users needs
to be parceled and unparceled for Binder calls, returning array of ids
minimizes memory usage and serialization time.
A new method getProfileIds was introduced which returns an array of userIds.
Existing method calls were updated where appropriate.
Bug: 27705805
Change-Id: Ic5d5decd77567ba0f749e48837a2c6fa10e812c0
- While explicitly bound, the package for a single pre-installed
VrListenerService will be granted permission to access
notification policy, be bound as a notification listener service,
and draw system overlays.
Bug: 22855417
Change-Id: I568d5d9c032e0926e47c8ef4b46e3910b6bdf766
Mostly consists of removing the word "encryption" from most APIs,
since we can't actually make promises about the data being encrypted.
Bug: 27531029
Change-Id: Iace9d7c4e64716abf86ed11847c40f3947e1d625
It's easy for apps to throw custom Parcelables into Bundles, but
if the system tries peeking inside one of these Bundles, it triggers
a BadParcelableException. If that Bundle was passed away from the
Binder thread that delivered it into the system, we end up with a
nasty runtime restart.
This change mitigates this trouble by "defusing" any Bundles parsed by
the system server. That is, if it encounters BadParcelableException
while unpacking a Bundle, it logs and delivers an empty Bundle as
the result.
Simultaneously, to help catch the system process sticking its
fingers into Bundles that are destined for other processes, a Bundle
now tracks if it's "defusable." For example, any Intents delivered
through ActivityThread are marked as being defusable, since they've
arrived at their final destination. Any other Bundles are considered
to be "in transit" and we log if the system tries unparceling them.
Merges several Parcel boolean fields into a flags int. Add better
docs to several classes.
Bug: 27581063
Change-Id: I28cf3e7439503b5dc9a429bafae5eb48f21f0d93
Make sure we commit the Global table last, so that if the
runtime was restarted before the others were written, we don't
get into an inconsistent state of migration.
Not sure if this fixes the following bug, but it's one thing
that stood out as a possibility.
Bug: 27335488
Change-Id: I4166a157e9ff542b1d5e32797693417375e40581
Bug: 22855417
Bug: 26724891
Bug: 27364145
- Add an API for VrListenerService, which is bound/unbound
from the framework when the system VR mode changes.
- Allow only a single bound VrListenerService at a time.
- Monitor allowed VrListenerService implementations from
VrManagerService and evict services as needed when packages,
users, or settings change.
- Remove previous VR functionality in NotificationListenerService.
- Add component target to Activity#setVrMode to allow
explicit selection of the running VrListenerService from
the current VR activity.
Change-Id: I776335f4441be0e793d3126f2d16faf86a8c621a
Allow OEMs to override default behaviour wrt. showing IME with a
hardware keyboard is connected. Current behaviour remains unchanged.
BUG: 27503877
BUG: 27484734
Change-Id: I7ed70b195c3ae98471e413b3eecc5d8fcd3dee26
Ringtones often live on shared media, which is now encrypted with CE
keys and not available until after the user is unlocked. To improve
the user experience while locked, cache the default ringtone,
notification sound, and alarm sound in a DE storage area.
Bug: 26730753
Change-Id: Ie6ad7790af4c87dd25759df3ed017e3b91a2fb87
Constrained the version on an incoming backup set
to the highest version that the SettingsBackupAgent
can handle. This is to deal with either corrupted backup
sets or newer backup sets (when modifiying/downgrading the
SettingsBackupAgent).
Change-Id: I4d666e8d4541c0b86e656a73744837d03318c4ae
Changes to Settings.System.FONT_SCALE were not being handled by any service,
which required a device reboot for any changes to take effect. Changes to
this field by the Settings app worked as expected only because it is able to
poke ActivityManager with an updated configuration, whereas unbundled
applications cannot.
This also ensures the setting value is backed up and doesn't conflict with
a configured value from accessibility onboarding during restore.
Bug:23033258
Change-Id: I98d4aed2f9f5893d054e6b10c4dfda406de8eba2
In this change list, the old WifiAutojoin module is
refactored initially. The old WifiAutojoinController is
replaced with a new WifiQualifiedNetworkSelector.
WifiConfiguration, WifiConfigureStore and
WifiStateMachine have been modified accordingly. The new
network selection logic is refactored with a more clear
and deterministci one. To refer to thedescribed in
details, in "Quality Network Selection and Connectivity
Scan Management in N". The link of the document is:
https://docs.google.com/document/d
/1JPTa2NEk-PgjCJ16fIrR6ohV-kDKveDlYDOeiMCB2_c
cherry-picked from 8d106780b6a638552749e54e169fc72537d4bccc
and make changes on WiFiConfigurationSerializer.java since
it is not on mm-wireless-dev
Bug:26012244
Change-Id: I44e454544b630b891c9a58a18b5a028edcce580f
list. Note additional settings that should not be
restored if they are already set (on account of
the new Setup Wizard, which allows critical
Accessibility Settings to be set before restore).
Change-Id: I95524abbef20ab12e529a2b1e6165adc7294c3db
If the file doesn't exist, database can be kept in memory. It's safe because
the database will be migrated and disposed of immediately after onCreate
finishes.
Bug: 26237300
Change-Id: Ib37c520f28960c8d6b9ce8dd719ffbcc11a97a58