Add one column for subscription and fix empty call logs

Add one column for subscription in callLog database
to mark the call state.

Change-Id: Ibac1d8c0d3ab13663ee44ad5cf04c5bde21ac0f0
CRs-Fixed: 590662
Signed-off-by: hany <hany.alsamman@gmail.com>
Fix EMAIL_FILTER ranking for duplicate emails in different accounts

When there are there are two identical email data items, each belonging
to a different sync adapter account, the "SELECT DISTINCT" operator
causes the two emails to be incorrectly grouped before the account
prioritization sort order is applied.

This can cause the email address to be labelled with the wrong account,
causing it to be incorrectly ranked as an email address from another account.

To fix this, account name and type is added to the group by clause to
ensure that each email address is grouped correctly based on their account
before ranking them by account priority.

Bug: 12207447
Change-Id: Ib79f6c36ee6a83838bcaa82487f2f7fb9716bbf4
(cherry picked from commit 82d88d65f65a0e3eb816cd1ae9d81a0fd78d8a17)
Automatic translation import

Change-Id: Id1a7fb862504fdd4ea167fc4ad375de60770a9c2
Merge tag 'android-4.4.3_r1' into HEAD

Android 4.4.3 release 1
Automatic translation import

Change-Id: I3e33f75fd2ae00621670f46abfe830510df098c5
Automatic translation import

Change-Id: I42ab98534f93ac02a48d2fe80e731c9beb915bd1
Automatic translation import

Change-Id: Id888c11687f6c84b3d979e5578a4c9e5690ae9dd
Automatic translation import

Change-Id: Iaa855f5486dd8fdf54f3440b6e06868256ad8e6b
Automatic translation import

Change-Id: I68fc2be4fad209f194a445b7dab880ffe6939672
ContactProvider: add another check for local accounts

This check gets called when account rows get cleaned up and we need to
make sure not to delete our new local contacts account.

Change-Id: I56d93134cd68a94f5c31b005e6c687ebcabdc070
Signed-off-by: Roman Birg <roman@cyngn.com>
ContactsProvider: Update locale before adding call log

Use a final variable to save the locale, so it will not
be changed when we change the system language.

Use a common variable to save the locale and update it
before adding call log.

CRs-Fixed: 500325

Change-Id: If1aae529385e53c32ba8244445efedc1dd283462
Contacts: Fix the issue of contacts with same values only display one

The default aggregation mode was RawContacts.AGGREGATION_MODE_DEFAULT.
At this condition, raw contacts items were aggregated immediately when
insert operation was completed. As a result, items with same valuses
would have same contact_id. So, contacts list only display one vcard
file contacts after imported one vcard file sereral times.

Change aggregation mode from RawContacts.AGGREGATION_MODE_DEFAULT to
RawContacts.AGGREGATION_MODE_SUSPENDED. This will not trigger aggregate
when insert operation was finished and items with same values will have
different id. So, contacts in one vcard file can display several times
after change codes.

Change-Id: I6f7a044fb4fdf93dd41c71d4f382ef24d0b18f11
CRs-Fixed: 509642
ContactsProvider: Support contact filter in smart dialer

Add query function to match the contacts for smart dialer.

Change-Id: I4eee8654699bd4ec6e1ba66f03e80701d3706865
ContactsProvider: add the full field search for contacts

- append the searchable data for custom type

Change-Id: If53b5a8552d4e69d87dde44832f1cb9431242a5b
Add one column for subscription ID in the call log database

- Add the subscription ID column
- Upgrade the database version
- add the support to delete the selected call log

Change-Id: Ica5ac130f9c64dd9457380614126dcd3cc883232
Create local group database

- add local group database and sql operation
- make Phone account as the default account

Change-Id: Ia9b934b2c81f4f99983e5182230fb7376f60a071
Filter SIM contacts with flag

- add account info in the contacts projection
- add flags to filter SIM contacts

Change-Id: I42521a0170633cdb86bcec84157a0cbbcd5d5ff1
Enable home location feature

Check whether home location provider exist and if yes, query the location.

Change-Id: I50a2ae59654289f889a81f97fb9321eeb29e8eaa
Add the column of duration type in calls

- add one column of call's duration type

Change-Id: I094f520074104b1bff87b21bf32058b6fa28cc4d
ContactsProvider: Fix can't search out local groups in mms app

The LocalGroupsProvider isn't exported, so mms app can't
query local groups via ContactsProvider.

Add android:exported property and set value true in
LocalGroupsProvider.

CRs-Fixed: 618763

Change-Id: I9e39fad24b496cc65a9e2cfb9b5f755b0e4bbfd2