Dialer: support to show multiple device ids

Show all device IDs for multiple SIM cards when dial "*#06#"
in dialpad.

Change-Id: I1654c5949831bb3faba19f4ce87147dfef6df048
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Dialer: shows deviceinfo when input *#0000#

- it will start DeviceInfo.apk to display phone's deviceinfo
  after input *#0000#

Change-Id: I59f16aafd856bdb68caa96f5ba5d878d7be3ca46
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Dialer: add to support multi-language smart search

- use the new API to realize multi-language smart search
  for contact name.
- change the match rules for number, use fuzzy match rules.

Change-Id: I9eed29efe06e2b0d37f57b299ab41a7f1b5f475b
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Dialer: add to support speed number dial

allow user to set speed dial number from 2~9, when long click
these numbers, it will pop up a screen to set speed number
or dial out directly if you have set it before.

Change-Id: Iaab841933ad0e63dee70e7f4dc7f078507c425b3
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Dialer: add SIM photo in call log

- add the SIM photo for call log and frequent&favorite
  contacts(speed dial fragment).

Change-Id: I36f723c20a2a4279e3965f72e2f2f6424be34d30
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Dialer: support IP call for msim.

- add IP call in options menu in call detail activity.
- add IP call in overflow popup menu in dialpad fragment.

Change-Id: I47e4fc6eea031fcdfffa34f61da3e90f489e55a2
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Dialer: add sub filter for msim call log

 - add spinner to select "ALL SIMS", "SIM1", "SIM2" to filter
   subscription in call log.
 - add spinner to select "ALL CALLS", "INCOMING CALLS ONLY",
   "OUTGOING CALLS ONLY", "MISSED CALLS ONLY" to filter call
   type in call log.

Change-Id: I399b7b15c84076917d8399f1c29523de328d7cad
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Add call log search in dialer

- add a menu to support search call log by name and number in
  the calllog screen

Change-Id: I80c85a9bdea962296ea39dab7ce689df06e8159e
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Fix the FC problem when serach call log in dsds

- Fix FC problem when search call log

Change-Id: Ic13de18905fb0ea436f7a2c7955a6ed04c984a36
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Dialer: add CallRecorder permission for InCallUI

Add CallRecorder related permission for InCallUI.

CallRecorder permission: com.qualcomm.permission.USE_PHONE_SERVICE

Change-Id: I627029b2dcfcde8260929d19cfdec6bb069bc39b
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Dialer: fix show wrong call log when user select SIM filter

When user selects SIM1, call log shows empty; When user selects SIM2,
call log shows SIM1 call log. The reason is CallLogQueryHandler
transfers slot id not sub id to filter database and causes error.

We change to translate sub id from slot id, and transfer sub id to
filter database.

Change-Id: I4aca2c83bb0f1476f308f92b6aa8ed339ea51ea7
CRs-Fixed: 722958
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Dialer: fix still popup account select when select IP call

The codes transfer slot id not sub id into phone account, this
account is invalid, so will still popup account select dialog.
We change to transfer sub id not slot id to match phone app.

CRs-Fixed: 722959

Change-Id: Ib8e69ca7635b5ff4c3716eadeac84ab80daaddfd
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Dialer: Customize features for regional package

1. Add engineering mode secret code "*#7548135*#";
2. Use secret code to trigger factory test mode;
3. Hide diag port and to open diag port menu need to dial *76278#.

Change-Id: Iae26756824f1f2cc9693546eb39a1a45761e4f88
(cherry picked from commit 144951edf8fdc556f81ca7e1bee180a4ba64f9d4)
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Dialer: fix force close when speed dial

When user sets the speed number and call speed number, will
find force close. The reason is using wrong action in the
DialpadFragment.

We replace action ACTION_CALL_PRIVILEGE with ACTION_CALL.

Change-Id: I0dc03ce7ac6bac86f9e9f2a7836546000b876bcd
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Dialer: fix build error in 87G

fix build error in Dialer.

Change-Id: I1e2ebed13193e7438075b3332750e2439991fd60
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Dialer: add support for duration type in call detail

We use one config to control whether show duration type
"active duration" or "call out duration" in call detail.

Change-Id: I0b07404995b5ed0cf0ff9c5cb12914461ce28424
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Dialer: fix wrong visible status of voice search button

When user enters dialer main screen, it will prepare and check
whether should show voice search button, but after back to non-search
mode from search mode, it ignores to check and so the button status
become wrong.

We add to check whether should show voice search button in visibility
updating function.

Change-Id: I4374b3c44156294d00d5290316a7510e41a331a1
CRs-Fixed: 730644
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Dialer: fix sub name not updated in msim call log filter

Original codes use Setting.System.getString() to get names,
but this way is obsolete and will return null, will use SIM1
and SIM2 as names, so not updated after user changes SIM names
in settings.

We'll get the sub names by phone account label, which is right
sub display name, and this is corresponding to names in setting.

Change-Id: Ic59e91c0f95e59408b79141a93e8abe2b7531f38
CRs-Fixed: 731519
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Dialer: Donot do transactions after onSaveInstanceState

Fragment manager try to popBackStack() after onSaveInstanceState().

If onSaveInstanceState() has been called, just return in exitSearchUi()
since we can't do any constructive here.

CRs-Fixed: 713587

Change-Id: I4aa3e33d7094e6098cef4e525e464ae38da5be47
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Dialer: Enable share visible contacts function

Deal with the result which contains contacts that
user selects.

CRs-Fixed: 707535

Change-Id: I212832312dfa79b3857c0bf93f4dc59adc4ea898
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>