Commit Graph

2214 Commits

Author SHA1 Message Date
Santos Cordon
56027514f3 Do not hide any call log entries when they are added.
When a call log entry is added, and it's phone account does not match a
currently registered one, we set it to hidden.  This code was built for
the calllog restore case where call log entries would be hidden when
added if the original phone account wasn't also
present on the new device (where the restore is being performed).

We no longer do that so we're removing the code that sets any call log
entry to hidden.

Change-Id: I26ee27369e94c73446f7553f84cd4d8d4f2ff658
2015-03-12 11:55:32 -07:00
Ricky Wai
73f43da509 Merge "Add Phone.ENTERPRISE_CONTENT_URI" 2015-03-10 22:46:23 +00:00
Svetoslav
dbbeeb3f44 Remove unused settings constants from the SDK (framework).
The settings constants for various volumes do nothing and are
used by nothing since API version 2. These are however backed
up in the cloud which is a waste of resource. This change
removes these constants from the SDK while keeping them hidden
to avoid breaking released apps and also prevents unnecessary
backup.

Change-Id: I2e91863115f5a4b997a14f8d0f57b4dc9689cfab
2015-03-10 19:53:12 +00:00
Makoto Onuki
edb8450b56 Cache photo URI too in calllog (contract)
Enterprise phone lookup returns special photo URLs for corp contacts, which
can't be obtained just with contact IDs.  So we need to cache the URIs too and
otherwise pictures sometimes don't show up.

Bug 19546108

Change-Id: Iffd5ed16527a143ea55e40e42667e7d0c16d814a
2015-03-09 13:57:02 -07:00
Tor Norbye
c615c6fc9c Annotate methods to be called from overrides with @CallSuper
Change-Id: Ibc587c2aaee9f3e7f448079f72a75459fe4e15e7
2015-03-07 20:49:18 -08:00
Brian Attwell
54b804fa74 Merge "Prioritize regular names over phonetic names. P1" 2015-03-05 19:26:36 +00:00
Brian Attwell
643db51d4e Prioritize regular names over phonetic names. P1
Bug: 19587274
Change-Id: I503c0fff6da30b9f1d6b6cbeaedfc4d9314f8a00
2015-03-05 05:54:04 +00:00
Ricky Wai
fa5bbaf6f6 Add Phone.ENTERPRISE_CONTENT_URI
Bug: 19550047

Change-Id: I0c780c27913d2c005be4f1ac033cba9a479a0b4f
2015-03-04 19:19:31 +00:00
Santos Cordon
c66f3baa42 Hide calllog entries for unregistered phone accounts
Change-Id: If1f873dd41c973442fa7a24020e56d13b7b5ad2c
2015-03-03 00:33:35 +00:00
John Spurlock
08c7116ab9 Remove unused imports in frameworks/base.
Change-Id: I031443de83f93eb57a98863001826671b18f3b17
2015-02-28 14:47:49 -05:00
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