Commit Graph

2204 Commits

Author SHA1 Message Date
Brian Attwell
7035f2be61 QuickContacts can prioritize phone mimetype. Part1
Define the ContactsContract for a new QuickContact extra.
This can be used to tell QuickContacts to prioritize a
given mimetype.

Bug: 18391003
Change-Id: Ie5a93ad9e1919f470a638d4235d91fe337cb5ca3
2015-02-26 11:47:25 -08:00
Santos Cordon
d4ceaf6167 Add PHONE_ACCOUNT_ADDRESS to the call log DB.
Also update some javadoc comments.

Change-Id: If0f8fa0148b3aed74ed434b1017a279ce29b3842
2015-02-19 23:43:12 -08:00
Svetoslav
1b71ea9b09 Remove unnecessary volume validators
Change-Id: I5f13016fa23978c8d35e9b85ec0ebecdf40a3d74
2015-02-17 18:35:02 -08:00
Marco Nelissen
8c98b8eb68 am 2fddfea3: am a3404263: am 2f71ee24: am ffaee8bd: Merge "Fix NPE" into lmp-mr1-dev
* commit '2fddfea3e5311bb5503d148d7ad18240a13ee033':
  Fix NPE
2015-02-18 00:40:19 +00:00
Marco Nelissen
2fddfea3e5 am a3404263: am 2f71ee24: am ffaee8bd: Merge "Fix NPE" into lmp-mr1-dev
* commit 'a3404263c08c711fa5f2d73a92ec7c6f366b9338':
  Fix NPE
2015-02-18 00:15:00 +00:00
Marco Nelissen
a3404263c0 am 2f71ee24: am ffaee8bd: Merge "Fix NPE" into lmp-mr1-dev
* commit '2f71ee24c5d982ccaa490c7a3e1390473909fbf0':
  Fix NPE
2015-02-18 00:07:58 +00:00
Marco Nelissen
0e24cb7fb5 Fix NPE
Path can be null if sd card was ejected, and we shouldn't make a thumbnail
in that case.

Bug: 19380821
Change-Id: Iee69effdd321622de026ad7b57c74cf9da81a176
2015-02-17 14:35:37 -08:00
John Spurlock
b25334ca3c Merge "Allow sysui-managed remote volume controllers." 2015-02-13 14:50:50 +00:00
John Spurlock
cdb57aeb0e Allow sysui-managed remote volume controllers.
- Relax restriction on audio service calls that assume the volume
  ui is systemui, allow calls from a blessed component app.
- Blessed component app service saved in secure settings.
- SystemUI mediates requests to replace the volume dialog, prompts
  the user on activation.
- Show a low pri ongoing notification when the volume dialog is
  being replaced, to allow user restoration at any time.
- Replace the controller management code in VolumeUI to use a
  ServiceMonitor, backed by the new blessed app component setting.
- Add proper zen-related noman client wrappers, make avail to the
  registered volume controller.
- Everything is still @hidden, no api impact.

Bug: 19260237
Change-Id: Ie1383f57659090318a7eda737fdad5b8f88737d4
2015-02-12 22:48:37 -05:00
Svetoslav
64d6e9ceec Fix a reversed condition in the next alarm validator
bug:19361375

Change-Id: Ib5ac90503842aafd994423632fd1f463e49088a0
2015-02-12 11:30:39 -08:00
Svetoslav
683914bfb1 Rewrite of the settings provider.
This change modifies how global, secure, and system settings are
managed. In particular, we are moving away from the database to
an in-memory model where the settings are persisted asynchronously
to XML.

This simplifies evolution and improves performance, for example,
changing a setting is down from around 400 ms to 10 ms as we do not
hit the disk. The trade off is that we may lose data if the system
dies before persisting the change.

In practice this is not a problem because 1) this is very rare;
2) apps changing a setting use the setting itself to know if it
changed, so next time the app runs (after a reboot that lost data)
the app will be oblivious that data was lost.

When persisting the settings we delay the write a bit to batch
multiple changes. If a change occurs we reschedule the write
but when a maximal delay occurs after the first non-persisted
change we write to disk no matter what. This prevents a malicious
app poking the settings all the time to prevent them being persisted.

The settings are persisted in separate XML files for each type of
setting per user. Specifically, they are in the user's system
directory and the files are named: settings_type_of_settings.xml.

Data migration is performed after the data base is upgraded to its
last version after which the global, system, and secure tables are
dropped.

The global, secure, and system settings now have the same version
and are upgraded as a whole per user to allow migration of settings
between these them. The upgrade steps should be added to the
SettingsProvider.UpgradeController and not in the DatabaseHelper.

Setting states are mapped to an integer key derived from the user
id and the setting type. Therefore, all setting states are in
a lookup table which makes all opertions very fast.

The code is a complete rewrite aiming for improved clarity and
increased maintainability as opposed to using minor optimizations.
Now setting and getting the changed setting takes around 10 ms. We
can optimize later if needed.

Now the code path through the call API and the one through the
content provider APIs end up being the same which fixes bugs where
some enterprise cases were not implemented in the content provider
code path.

Note that we are keeping the call code path as it is a bit faster
than the provider APIs with about 2 ms for setting and getting
a setting. The front-end settings APIs use the call method.

Further, we are restricting apps writing to the system settings.
If the app is targeting API higher than Lollipop MR1 we do not
let them have their settings in the system ones. Otherwise, we
warn that this will become an error. System apps like GMS core
can change anything like the system or shell or root.

Since old apps can add their settings, this can increase the
system memory footprint with no limit. Therefore, we limit the
amount of settings data an app can write to the system settings
before starting to reject new data.

Another problem with the system settings was that an app with a
permission to write there can put invalid values for the settings.
We now have validators for these settings that ensure only valid
values are accepted.

Since apps can put their settings in the system table, when the
app is uninstalled this data is stale in the sytem table without
ever being used. Now we keep the package that last changed the
setting and when the package is removed all settings it touched
that are not in the ones defined in the APIs are dropped.

Keeping in memory settings means that we cannot handle arbitrary
SQL operations, rather the supported operations are on a single
setting by name and all settings (querying). This should not be
a problem in practice but we have to verify it. For that reason,
we log unsupported SQL operations to the event log to do some
crunching and see what if any cases we should additionally support.

There are also tests for the settings provider in this change.

Change-Id: I941dc6e567588d9812905b147dbe1a3191c8dd68
2015-02-11 17:58:22 -08:00
Jorim Jaggi
b10e33ff80 Split up android.policy into framework.jar and services.jar 1/3
Change-Id: Ifd69f1f3dd308a7e17a1442e2f3950da8b03cec4
2015-02-10 14:56:02 +01:00
Bryce Lee
a5669730d0 am 4a88acfc: Merge "Make THEATER_MODE_ON a System API." into lmp-mr1-modular-dev
* commit '4a88acfcc30544fa3424020b1c071d2954a47cb2':
  Make THEATER_MODE_ON a System API.
2015-02-06 19:09:32 +00:00
Bryce Lee
e847b5baef Make THEATER_MODE_ON a System API.
Bug: 19043538
Change-Id: Ibf0d6b45868ca90eb792a40c5d1b1395774486b8
(cherry picked from commit cdfebd60fa)
2015-02-06 02:41:09 +00:00
Brian Attwell
2502f1d414 Merge "Expose EXTRA_MODE" 2015-02-03 17:43:23 +00:00
Brian Attwell
029e6819ae Expose EXTRA_MODE
The ability to set EXTRA_MODE values on QuickContact
intents has existed for ages by setting the extraMode
parameter on showQuickContact().

Now we need a way for QuickContactActivity to read the intent.

Bug: 18777272
Change-Id: If5e4aa5757e62e942926a12a36345512d6fb66ca
2015-02-03 09:37:30 -08:00
Bryce Lee
bea05cef13 Merge "Make THEATER_MODE_ON a System API." 2015-02-03 16:44:26 +00:00
Brian Attwell
3398442905 Merge "Expose QUERY_PARAMETER_VCARD_NO_PHOTO" 2015-02-02 21:34:34 +00:00
Brian Attwell
f9fb60a592 Expose QUERY_PARAMETER_VCARD_NO_PHOTO
QUERY_PARAMETER_VCARD_NO_PHOTO is used to avoid
attaching photos on vcards that get sent over NFC.
Large VCards can't be easily sent over NFC.

I'm deferring writing CTS tests till later.

Bug: 18777272
Change-Id: I6e3a7bf836978023225c709446b9113de05f6cef
2015-02-02 13:33:53 -08:00
Brian Attwell
462c9f50c3 Remove NAME_VERIFIED. Part 4
Bug: 18777272
Change-Id: I1579a3122b2d45b80de7106a2b9616e323855045
2015-02-02 18:41:27 +00:00
Bryce Lee
cdfebd60fa Make THEATER_MODE_ON a System API.
Bug: 19043538
Change-Id: Ibf0d6b45868ca90eb792a40c5d1b1395774486b8
2015-02-02 08:19:11 -08:00
Zheng Fu
6e7c2c7ca5 Merge "Add backup_id column to raw_contacts, and hash_id column to data" 2015-01-30 21:16:52 +00:00
Bryce Lee
c0086ea950 am 263987f6: am 2a8ccd4b: am 1061652a: Merge "Revert "Make THEATER_MODE_ON setting a system api."" into lmp-mr1-dev
* commit '263987f6268439af69fcfa66a278103e1efe1343':
  Revert "Make THEATER_MODE_ON setting a system api."
2015-01-28 18:05:04 +00:00
Bryce Lee
263987f626 am 2a8ccd4b: am 1061652a: Merge "Revert "Make THEATER_MODE_ON setting a system api."" into lmp-mr1-dev
* commit '2a8ccd4b1f82086f6e38ec32ad084306400dcf93':
  Revert "Make THEATER_MODE_ON setting a system api."
2015-01-28 17:58:41 +00:00
Bryce Lee
034dc3839f Revert "Make THEATER_MODE_ON setting a system api."
This reverts commit 35dafda1b0.

Change-Id: I76e72592791682e0dbee719fbd518962a1bdcd11
2015-01-28 17:45:35 +00:00
Bryce Lee
293465a75c am f2d5253b: am fdb8dff5: am d8cb4040: Merge "Make THEATER_MODE_ON setting a system api." into lmp-mr1-dev
* commit 'f2d5253bce5ef69cb6cb4da7697a228a47b55904':
  Make THEATER_MODE_ON setting a system api.
2015-01-28 17:22:22 +00:00
Bryce Lee
f2d5253bce am fdb8dff5: am d8cb4040: Merge "Make THEATER_MODE_ON setting a system api." into lmp-mr1-dev
* commit 'fdb8dff54cf9327089e5ee4d5bf461ef42020fcd':
  Make THEATER_MODE_ON setting a system api.
2015-01-28 17:15:11 +00:00
Brian Attwell
63f859b2b7 Add Insert.EXTRA_{ACCOUNT,DATA_SET} to API. P #1/2
Names are based on recent suggestions from the API council, such as
implemented inside ag/540453.

Bug: 18777272
Change-Id: I17a5b7cb4d4c5a0ba48936a6fc829acaab73f31d
2015-01-27 00:05:07 +00:00
Bryce Lee
35dafda1b0 Make THEATER_MODE_ON setting a system api.
This will allow an unbundled home to continue accessing this property.

Bug: 19043538
Change-Id: I845a8726e617ca7b6f7f7347a0ac5aa0620d6658
2015-01-26 08:21:10 -08:00
Brian Attwell
9ffad071a9 Unhide AggregationSuggestions.Builder
Additional unbundling from ContactsContract.

I'm going to remove all parameter types except name.
None of them have been implemented since they were
defined in ICS.

Bug: 18777272
Change-Id: I5c4066d1e933cc4ab18df06809687ee2b7eac91c
2015-01-23 01:54:30 +00:00
Dianne Hackborn
4e106cedfe Bring back voice interaction APIs.
Change-Id: I6039d7c0b188ac342441c56f7d19994b9a80ba17
2015-01-21 15:07:20 -08:00
Adrian Roos
4bc5b2bce9 Merge "LockPatternUtils clean up continued" 2015-01-14 22:32:08 +00:00
Adrian Roos
9dd16ebcf2 LockPatternUtils clean up continued
- Deprecate Settings.Secure.LOCK_PATTERN_ENABLED
- Remove unused permanent lock out
- Disallow empty/null arguments to saveLockPattern and saveLockPassword
- Refactor repeated quality checks

Change-Id: I6f369eb60f8f6bb1e33384cd06534c713ab52e79
2015-01-14 22:51:31 +01:00
Adrian Roos
0791e8fb30 Merge "Purge biometric weak and keyguard widgets" 2015-01-14 20:41:35 +00:00
Zheng Fu
9ea9a1375d Add backup_id column to raw_contacts, and hash_id column to data
Bug: 18930508
Change-Id: I244734720247c8db08129f7f19e6a5e823db1bb4
2015-01-12 11:09:08 -08:00
Brian Attwell
cc4b2f731e Ubundle from contacts contract Part 1/3
1. Remove Intents.UI
2. Expose Authority
3. Expose ProviderStatus

Discussion: go/contacts-contact-intent-ui

Bug: 18777272
Change-Id: I9c6125cc30710e4637b38f3785608abb9928d1a2
2015-01-09 01:07:45 +00:00
Adrian Roos
230635efe7 Purge biometric weak and keyguard widgets
Bug: 18931518
Change-Id: I5da41908b1d6895a69f981e139f2d268327fafcd
2015-01-07 22:10:35 +01:00
Elliott Hughes
3ce2d52789 am f9f41951: am ee435b16: Merge "telephony: Update comments for preferred network mode"
automerge: 38cba11

* commit '38cba11ba98831b0d6a005b7929d49f52259c564':
  telephony: Update comments for preferred network mode
2014-12-26 19:01:39 +00:00
Elliott Hughes
38cba11ba9 am f9f41951: am ee435b16: Merge "telephony: Update comments for preferred network mode"
* commit 'f9f41951701f5e47b454b7c3f4e7d4654a9c4a3e':
  telephony: Update comments for preferred network mode
2014-12-26 18:59:22 +00:00
Elliott Hughes
ee435b16d8 Merge "telephony: Update comments for preferred network mode" 2014-12-26 18:48:57 +00:00
Sungmin Choi
e099ab18e6 telephony: Update comments for preferred network mode
Change-Id: I4718674ff73116cc6bbec4540c3450ed14663c0d
2014-12-25 07:39:37 +00:00
Jeff Davidson
1eb5ca609a am 0b3718d6: Merge "Add global setting for ephemeral network timeout." into lmp-mr1-dev automerge: cc4f183
automerge: 38e8763

* commit '38e8763df55ebedcf65178f8acced806113af4a5':
  Add global setting for ephemeral network timeout.
2014-12-17 21:05:53 +00:00
Jeff Davidson
38e8763df5 am 0b3718d6: Merge "Add global setting for ephemeral network timeout." into lmp-mr1-dev automerge: cc4f183
* commit '0b3718d6b157bf15db9d709d50019f81f06195b9':
  Add global setting for ephemeral network timeout.
2014-12-17 20:58:44 +00:00
Jeff Davidson
a20ca67d94 Add global setting for ephemeral network timeout.
Bug: 18637384
Change-Id: I6bde3c9eef12caf2cc51c449abffc1c69f60c17f
2014-12-16 13:30:06 -08:00
Erik Kline
0bf20bea81 am 34b3b53f: am 33cd463b: Merge "Re-remove CONNECTIVITY_CHANGE_DELAY and supporting functions." into lmp-mr1-dev automerge: 56d2e8f
* commit '34b3b53f9c21346282cb889363024fa4c7bb558d':
  Re-remove CONNECTIVITY_CHANGE_DELAY and supporting functions.
2014-12-10 21:58:42 +00:00
Erik Kline
34b3b53f9c am 33cd463b: Merge "Re-remove CONNECTIVITY_CHANGE_DELAY and supporting functions." into lmp-mr1-dev
automerge: 56d2e8f

* commit '56d2e8fb7b2ab6e32efea59604eb0cd72745df1b':
  Re-remove CONNECTIVITY_CHANGE_DELAY and supporting functions.
2014-12-10 19:06:50 +00:00
Jeremy Joslin
902cc578a4 am d4753450: am c4b2ec1a: am 1edc73aa: Merge "Don\'t send the same PendingIntent more than once." into lmp-mr1-dev
* commit 'd4753450f37d88fec11d1405250529ca794ae70c':
  Don't send the same PendingIntent more than once.
2014-12-09 01:00:09 +00:00
Pavel Zhamaitsiak
0cec63a283 am 913c9895: am d89f0d3d: am b81ce34a: Merge "Revert "Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev"" into lmp-mr1-dev
* commit '913c9895466c6749aa1c41b875d69d5de3e3b66b':
  Revert "Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev"
2014-12-09 00:18:39 +00:00
Jeremy Joslin
d4753450f3 am c4b2ec1a: am 1edc73aa: Merge "Don\'t send the same PendingIntent more than once." into lmp-mr1-dev
* commit 'c4b2ec1a3a808c2dae0894e5f0cfd43d6ec1d5a2':
  Don't send the same PendingIntent more than once.
2014-12-08 19:36:27 +00:00
Pavel Zhamaitsiak
913c989546 am d89f0d3d: am b81ce34a: Merge "Revert "Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev"" into lmp-mr1-dev
* commit 'd89f0d3d54dec1662b1cfed6c8e574ffcc8032d9':
  Revert "Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev"
2014-12-08 19:16:43 +00:00