Dialer - T9 / Landscape Merges

Dialer Landscape Mode

Bring back functionality to the landscape dialer.

Patchset 2 : Fix spacing.

Patchset 3 : Add dialpad settings. (depends on http://review.cyanogenmod.com/#change,10531)

Patchset 4 : Remove uneeded shared preference object.
             Fix preference icon.

Change-Id: Iff644890ac751dc99090a59bb824d319221e86ae

Update drawable resources according to jellybean

Change-Id: I4eae5ffc7c8b96072236e705a5a0ad44e888e33f

Dialpad : T9 Dialer

This adds t9 functionality to the dialer.

Patchset 2  : T9: Add accented characters
Patchset 3  : Support t9 in landscape mode
              Cleanup resume/pause checks
Patchset 4  : Fix "Pressing back shows keypad overlay"
Patchset 5  : Added more accented characters
Patchset 6  : Add missing return.
Patchset 7  : Use Phone.getTypeLabel instead of re-implementing it (pawitp)
              Fix T9 result disappearing on rotate for >1 number in search (pawitp)
              Allow other dialable strings (*, #, +) for number search (pawitp)
              Update strings (pawitp)
              Check if list expanded, dont revert toggle state, keep it open.
              Leave T9 enabled as default.
Patchset 8  : Fix enabling/disabling T9 while dialer open.
              Remove overlay background patterns in landscape mode.
Patchset 9  : Load database only if T9 is enabled.
Patchset 10 : Optimize T9 loading when not enabled/orientation change. (pawitp)
Patchset 11 : Rebase for 4.0.3 merge.
Patchset 12 : Move translatable strings into strings.xml (t9_map/sort type)
Patchset 13 : Fix layout issues when opening dialer via 3rd party apps

Change-Id: I010d664382a39c1613804c97cda50b543e55ac2a

Conflicts:

	src/com/android/contacts/dialpad/DialpadFragment.java

Dialer : Preference t9 enabled by default

Leave t9 enabled by default

Change-Id: Id07a69b5b47817b0545cc11607d422e273bbe0bb

Added Greek characters for T9 search

Dialpad : T9 layout/functionality fixes

This patchset addresses the following :

Highlight matches in results (Based on m0viefreak's commit)
Switch topbar to a listview to maintain consistency (Based on m0viefreak's commit)
Fix overlay issue where if list view open, and via preferences t9 is turned off and returned to dialer
Fix issue where t9 uses last input rather than re-querying
Adjust layout for more space for contacts with long names

Patchset 2 : New toggle drawables by prash

Change-Id: I00f2a6aed2d7ae0213efab8c2e2028be133551c2

Conflicts:

	src/com/android/contacts/dialpad/DialpadFragment.java

Dialpad : T9 add to contact if no match found

Allow user to save the dialed number as a contact

Patchset 2 : Set toggle to GONE rather than INVISIBLE in newContact mode
             Eliminate duplication when setting toggle visibility

Change-Id: I2b3eb5a32352c9565f2276e19576451322db22cc

Conflicts:

	src/com/android/contacts/dialpad/DialpadFragment.java
	src/com/android/contacts/dialpad/T9Search.java

T9 : Fix bug

To reproduce :
Type a few digits
Expand list
Click a contact (Dial on touch turned off)
Press backspace once

Change-Id: I3d26ad0bc03eff80b9f06f69d47e2fb742f0449a

french: T9 Dialpad and other settings (autorotate)

Change-Id: I40a60518fcddd46695bf0b5ff5d10c87874e7e90

Dialer: Fix press on button press after many resume

Move setPhoneNumberFormattingTextWatcher back to onCreateView
as having it in onResume will cause a new text watcher to be
added every resume slowing things down to a halt when the text
has to be formatted many times after many resumes

Change-Id: Id83ecc8b52ca283d8e64df579b97c588b1073ab2

Conflicts:

	src/com/android/contacts/dialpad/DialpadFragment.java

Dialer: Fix initial state for t9 sort mode

On a fresh install, t9 dialer will match by name, but preferences
has match by number selected as default. Fix this by setting default
to match by name.

Also change uppercase S in "Sorting" to lowercase, to maintain
consistency with rest of system.

Change-Id: I7e72cb75823e58ffc8cf28300ff3fba852f638b1

Bulgarian T9 search and dialer buttons

Change-Id: Icd4f4f37e5888115578c12a4086d77d823172331

Conflicts:

	res/values-bg/strings.xml

Dialer: Underp the layout

The 4.0.4 merge increased the size of the action buttons to fill
almost all the available space, due to conflicts with CM's T9
stuff.

Change-Id: I331bef0a17642006f339c4cea47834f48ff13d1c

Conflicts:

	res/layout/dialpad_fragment.xml

Dialpad : Disable overscroll for T9Top

Prevent overscroll on t9top.

Change-Id: I26ae8fb1a84a2e0bc005d4a6283bfa3b75604fc8

CM9-Add Russian T9 strings

Conflicts:

	res/values-ru/strings.xml

Change-Id: I9141b7c310aeb788946fba4d8d2f35aa36da2538

T9 Dialer : Update upon contact info changes

Refresh the local storage of contact info if contact info is updated
while dialer is still active.

Patchset 2 : cleanup
Patchset 3 : Move unregister to onResume (Can't rely on activty being present)

Change-Id: I6ab4fe199ebc67c318217ab20aa1718a02fcbcaa

Conflicts:

	src/com/android/contacts/dialpad/DialpadFragment.java

Dialer : Cleanup / landscape consistency

- Update resource ids after 4.0.4 merge
- Move additional_buttons into main layout to stay uniform with portrait
- Remove bottom padding in landscape views, since actionbar contains overflow
- Remove search button from landscape dialer and move it to actionbar
- Cleanup unused resources

Patchset 2 : Fix fakeMenu button not showing on phones w/ physical menu button

Change-Id: I7f5232bdb029d5a2498f80493d479113ef66a82b

Conflicts:

	src/com/android/contacts/activities/DialtactsActivity.java
	src/com/android/contacts/dialpad/DialpadFragment.java

Contacts (T9 and dialpad): Spanish translation

Spanish translation for Contacts (T9 and dialpad) settings activity

Change-Id: Ib1d9aa4ba466dd20450c16948c1ab8dc532028cd

Updated Hebrew Translation

Change-Id: I50be9ebe80efcb7efaef364bb0d73d4ff4e253e6

Contacts app - Update Italian Translation.

Change-Id: Ib0a48771bec594723b2ee40d174813a0890bbdcc

Contacts: PT-BR translations

Added T9 strings

Change-Id: I6848876549a77980086c64ca85e02a4f19d9dcdd

Conflicts:

        res/values-pt/strings.xml

contacts: updated german translations

Change-Id: Iaa66fc19799dcb938f34a11d29b2c1775cf011de

contacts: updated finnish translations

Change-Id: I6ddfa468009976af1adb24df6b701158358acf1c

Polish translation

Change-Id: I0a9b28ed39ded96f6cbb654573b04acc3547567d

android_packages_apps_Contacts hungarian translations

Change-Id: I394c41e2459af1b6de6078556e790bbc1a5193dd

Contacts: added missing Hebrew T9 strings and drawables

added missing t9 char mapping
added localized drawables

Change-Id: I49dde5a34875cc18b311a8c698089e39b03b6a79

Conflicts:

	res/values-iw/strings.xml

Change-Id: I4c32d79704f2868da76af0f561ca399a41d01d50
Update Russian Translation-Contacts-Russian dialer buttons-CM10

Update Russian Translation-Fix mistakes-CM10
Contacts: Uighur - Remove obsolete translation entries

Restore change: http://r.cyanogenmod.com/#/c/21310/1
Remove obsolete translation entries

Change-Id: Ib0fad46cdbea3966a7be25a936008f890172cca3
Update Japanese translation (CM10)

Change-Id: Ife7b716d4b285b4ca663e4ad91fe9a102ad0e010
Update French translation-Contacts-CM10

Change-Id: I54559c913a03a786860c3e9adc8ecaed0e24c429
Contacts: Danish translation

Change-Id: Ie60f1d38e6e2d1de3a5829f71d987bf95d101d50
Contacts: Dutch translations

Change-Id: Ia32be111101ad6f0a873074d127087d97f280071
Contacts: Adding T9 Korean search, Change some code for complex character search.

- Koreans are used to Choseong search(searching contacts by Initial character of hangul. ex: '한' is searched by 'ㅎ').
In a cm roms, This don't work for korean name contacts. This patch added this feature for t9 search.

- But.. T9 search is only designed for alphabet search. This don't care about complex character search.
So, I have to change some code of T9 search. Also.. if another language want to implement t9 search later, They will can extend.

- I also change some code of initT9map function. This is not my code. Copied from cm7 code base.
https://github.com/CyanogenMod/android_packages_apps_Contacts/commit/63a531957818d631e957e8e0157d45298906e3fb
That commit has many changes. But I fixed some part about search only.

* This patch don't affect another languege search. Those language will work by NormalToNumber class that acts like previously.
I had tested on my Samsung GalaxyS2 few days. But i can't tested on mdpi and xhdpi.

Note: this also ported from my previous patsh for ics. http://review.cyanogenmod.com/#/c/18072/
That changed doesn't reviewed long times. Please continue the progress of that patch.

Change-Id: I178ee607b1ef2f7217374c22b7f8fc5b657ef53c
Contacts: Fix broken export-to-storage function

The contacts exporter relied on a device configuration option that
was hardwired to the older storage path format. Instead of updating
the path, replace its usage with Environment.getExternalStorageDirectory,
which is consistent with how the importer does it.

Change-Id: Icbd06072ddfc3f30c7caffbbfccbcf9df0f0d9b3
Contacts: Fix hebrew characters in dialer

fix some drawables in mdpi and xhdpi that were mislabeled
and misaligned.
original commit was tested only on an hdpi device, hence i probably
missed those.
thanks to Haggai for the heads-up.

Change-Id: I5d5c3013161bd9efeab6e5fbe1e418cafc1405b2
Contacts: Fix dialpad image for korean.
It's my mistake. One xhdpi image has not transparent background.
Changed that image to transparent background, and permissions of image files.

Change-Id: I9d8e0b2c52d60d510ce2d81dd9bdba86f68ce949
Add Unknown Call Type to call logs

Some applications that import call logs from xml create records of an unknown call type.

This prevents Phone application / Contacts from exceptioning out due to the thrown exception by returning an "Unknown Call" with a ? icon

Patch-set 2: add missing string
Patch-set 3: type / spacing cleanup

Change-Id: I93120844dc0cabd63cc5f4701a62cf70877f3ba5
Add lookup in Call logs to lookupNumber

http://review.cyanogenmod.com/#/c/11168/ added caller name display
to GSM phones. But whenever Call log is opened the information was
overwritten, if no contact is present with that phoen number.
This patch add a lookup function that tries to find a match
in the Call log (after oll ther posibilities are exhausted)
and returns that information to be put in cache.

Change-Id: I7b176da60792191c3eb0490afc703efbace62552
PT-BR: Translation for Unknown Call

Change-Id: I82c530101399181a124f748cec40bbd2306f29c8
Update Russian Translation-Contacts-CM10
Contacts: Dutch translations

http://review.cyanogenmod.com/#/c/22464

Change-Id: I9e62d19a383abc638d77443d52570482b9fa8bf0
Added hungarian translation for Unknown Call Type

Change-Id: I41676b30c613ac1aaa38d9d72b9698ce7719163b
Contacts: Missing Danish translation

Added one missing string and changed old CM9 reference

Change-Id: Ie8d7f4c7b401929a75667c9a2fb4c073ffe5617d
Contacts: Add Chinese translation

Patch Set 2: Improved translations and gotten rid of the
unnecessary dependency.

Change-Id: Ie26502ffbcdd1aa1ca07b067450516f8ff377cce
Contacts: Updated italian translation

Change-Id: I6fa8d68eaceff5d11ed7cb95ec19a99d4f712690