packages/apps/ContactsCommon: Fixing incorrect statusbar icon

Issue: Statusbar notification was showing as download even after
       exporting contacts to sdcard

Fix: When user tries to export contacts to sdcrad as .vcf
      format, always download icon was shown at statusbar. Added
      additional check to display correct icon.

CRs-Fixed: 646418

Change-Id: I40aa73ee634d70decbae29cc0f757f264ca36d02
Contacts: Fix SIM account name display incorrectly issue

SIM name is taken from Settings without judging multiSIM mode.

Judge multiSIM mode before assigning the SIM card name.

CRs-Fixed: 651452

Change-Id: I12f5d88d12709a822af3ece8f92fd1387eda04cc
Contacts: Do not import vCard contact from storage to sim account

Allow to import vCard contact from storage to sim account.

Filter sim account when import vCard contact from storage.

CRs-Fixed: 655178

Change-Id: I1f1b719fb22ab902883a1df67d7c8177ea8abd7b
Filter multi SIM account in the SSSS mode

- when switch phone from DSDS to SSSS mode, multi SIM account
  will not be deleted,need filter it when get valid account

CRs-Fixed: 650552

Change-Id: I9d6e6176a531a410cd08936cb90c7c06f5ddb1bc
Contacts: Fix ANR after press Import/export again while importing vCard

While create import/export dialog, hasContacts() will query DB in UI
thread. Result in Contacts ANR occurred.

Remove the condition of hasContacts() to keep the same behavior as
original design.

CRs-Fixed: 659883

Change-Id: I435be60266c10028c2952ddd21ecb0ecb445bb88
ContactsCommon: Add param to change the right partition's cursor to null

When has exchange account, it has partition0 and partition1,
when destroyLoader(1), it will call onLoaderReset() in
ContactEntryListFragment, but change partition0's cursor to null,
evently this will cause the exception.

Add partition parameter in onLoaderReset() to change the right partition's
cursor to null.

CRs-Fixed: 667238

Change-Id: I0b151fda491b7a9b789becdb6ef971be405f1aca
Contacts: Add user can choose contacts to share visible contacts

Add user can choose contacts to share visible contacts

CRs-Fixed: 671741

Change-Id: Ie54bafa674066665e766232fc9964b98fdbca7a4
Contacts: Support export vCard to both internal/external storage

By current design, it will export vCard to internal storage.

If external storage is avaliable, export vCard to external storage,
or export to internal storage.

CRs-Fixed: 672495

Change-Id: I3d25761088d0e9b501a0eaa8dedab59bc1598fbd
Contacts: Add reasonable prompt for failing to export contacts

Except freeSimCount > 0, we consider other cases as the
sim card is full.

When freeSimCount <=0, check the adn count, it the adn
count is 0, we consider it as sim contacts have not
been loaded completely.

CRs-Fixed: 676506

Change-Id: I2bce07e986606610bcbd6a3f596e9533e6848f18
ContactsCommon: Do not pass a negetive param to getPartition(int) method

When ContactListAdapter#changeCursor(int partitionIndex, Cursor cursor)
is called, partitionIndex equals to -1 if loader.getId() == -1.
And then getPartition(-1) will be called, and that will cause
an ArrayIndexOutOfBoundsException.

Call mAdapter#changeCursor(null) from onLoaderReset() method
when (partitionIndex < 0), do not pass a negative param
to getPartition(int) method.

CRs-Fixed: 677184

Change-Id: If877157df527498b3d8d54d2f62fd169da9c3c91
ContactsCommon: Check the validity of the subscription

The invalid sub index causes ArrayIndexOutOfBoundsException.

Add validity check for the subscription.

CRs-Fixed: 693678

Change-Id: Ia70453756c69349ac2c1b2dfe00e6c30b322c26c
Add support to save multi anr and email in SIM card

- support to save multi anr and email for SIM contacts

CRs-Fixed: 696392

Change-Id: I736dc1776947fa732c3fc164f4846c8879fe8740
ContactsCommon: Fix spelling error.

Change-Id: I9962c619b659d8563e021c661f944abdd381417f
ContactsCommon: fix account filtering

No need to trim accounts when displaying all accounts.

Change-Id: I830882a7f43f8875718897de1362fc5b787cab62
Signed-off-by: Roman Birg <roman@cyngn.com>