• Home
  • History
  • Annotate
  • only in /packages/apps/ContactsCommon/src/com/android/contacts/common/compat/
History log of /packages/apps/ContactsCommon/src/com/android/contacts/common/compat/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
edbbd6d89137a3addf82d121cb3d785fe3074889 02-Jun-2016 Wenyi Wang <wenyiw@google.com> Get rid of CODENAME and use BuildCompat instead

Bug 28954561

Change-Id: I5323833c42484e71a885c0bb2bc1ecf884e873b1
ompatUtils.java
f0f6f3110faa155fe36d93fd521e3f94c9624bb9 31-May-2016 Wenyi Wang <wenyiw@google.com> Fix helper methods in contacts utils

Bug 28954561

Change-Id: I4af27b4f6c05eaad7a10a10a3f007d3792fc4803
ompatUtils.java
f9adef9d8c5d38501e4006917712c1338f26f220 27-May-2016 Wenyi Wang <wenyiw@google.com> Use targetSdkVersion 24 and remove startsWith("N")

Bug 28954561

Change-Id: I318eed3f5723014c9dec4326ca9077aa4491d56b
ompatUtils.java
bf0104458b0c59762f0fc9df8c9012fca33220ab 25-Apr-2016 Ricky Wai <rickywai@google.com> Fix enterprise contacts APIs naming and docs

Bug: 28295752
Change-Id: Ie6e9e82c7560a08c08ed730b68a4be17c7241a47
irectoryCompat.java
4de7acee7c43ab52b674bc4caf9b8ef3b4b72af3 25-Mar-2016 Wenyi Wang <wenyiw@google.com> Add public compat method for addTtsSpan

Bug 25324025

Change-Id: I8547347afd626f51623c75a56d321b5ab5430343
(cherry picked from commit 3de7aa0f57f0ad7229e735f02478ce4397095be4)
honeNumberUtilsCompat.java
86a142247adbc06d70d2b4dc81567ec76c7aaf2c 19-Feb-2016 Wenyi Wang <wenyiw@google.com> Fix isAssertQuery in unit test on LMP

Also fixed the failures/errors related with fixing isAssertQuery

Bug 27244680
Bug 26818072
Bug 25629359

Change-Id: I0c3644c3e4b25f120a30c2227dab000c0546f697
ompatUtils.java
5e31605cafc70ea9040cd9a51234131904076288 19-Feb-2016 Wenyi Wang <wenyiw@google.com> Fix isInsert, isUpdate, isDelete in unit test on LMP

Using CPOWrapper and BuilderWrapper introduced by ag/828480

Bug 27244680
Bug 26818072
Bug 25629359

Change-Id: I0204122408aeed781e0ee81eff26581e1cc7c1ee
ompatUtils.java
7a1b5862b23007335c5be83fe5ec8ce007a6f71d 21-Jan-2016 Nancy Chen <nancychen@google.com> Add TelephonyManager N APIs for voicemail notifications.

In N we can now get the voicemail notification settings from the system.
Make compat methods so they can be used in dialer.

Bug: 24164917
Change-Id: If940ae30fc989542e2cebb89cc6a1b630de66baf
elephonyManagerCompat.java
5a25fdd9a1b73e8962a6a108e4982d3b12ab50b9 16-Jan-2016 Ta-wei Yen <twyen@google.com> Add CompatUtils#isNCompatible()

Add unified check for both app and device compatibility for N features.

TODO: Use similar implementation with M or L once N is released.

Bug:26330692
Change-Id: Ib0fc818ef4d1307838202a54c8b077309676ef90
ompatUtils.java
053c2aee65e46bbbf9962f5fda9e7dd8c9f79e7e 23-Dec-2015 Victor Chang <vichang@google.com> Allow google dialer code to be compiled against M and N SDKs for enterprise features

Following dialer's practice, use src-N and pre-N to separate implementation
in different build sdk

BUG=26312016

Change-Id: Ia9bd420cb2a96b1c31aa3ce2a61fd772b8811f2e
allableCompat.java
ontactsCompat.java
irectoryCompat.java
honeCompat.java
dc7fa8914ad3f204af07606b8b48d66c5afe0acc 09-Jan-2016 Ta-wei Yen <twyen@google.com> Allow google dialer code to be compiled against M and N SDKs

+ Class DirectorySdkCompat and PhoneAccountSdkCompat for N/pre-N version
pre-N is implemented with stubs

Bug:26330692
Change-Id: I53374f68ff3756ba0a502c15d07aa18a2d763e83
irectoryCompat.java
ad093fbe9d3319427c9d00ab63f550749c198176 06-Jan-2016 Nancy Chen <nancychen@google.com> Merge "Add TelecomManagerCompat method for getSimCallManager" into ub-contactsdialer-b-dev
68a2bfb8d1e674b4b4731eed4de69ef581a44655 05-Jan-2016 Tyler Gunn <tgunn@google.com> Merge "Use carrier presence when showing the video call icon." into ub-contactsdialer-b-dev
844f1e96f857f319866943787130f4dafdb7d194 29-Dec-2015 Nancy Chen <nancychen@google.com> Add TelecomManagerCompat method for getSimCallManager

Bug: 25776171
Change-Id: I6dcc1b1aed44dccb283b9b7208327250b8d067e2
elecom/TelecomManagerCompat.java
9abf82bbe15d264618f4c523dd2a4cc733c3070f 23-Dec-2015 Nancy Chen <nancychen@google.com> Make TelecomManager APIs compatible with Lollipop (2/3)

+ Move TelecomManagerCompat to ContactsCommon because it is called by
CallSubjectDialog
+ Move isDefaultDialerCompatible to CompatUtils because it is called in
TelecomManagerCompat
+ Add invokeMethod method to CompatUtils
+ Use TELEPHONY_MANAGER_CLASS and TELECOM_MANAGER_CLASS constants
+ Add @Nullable annotations

Bug: 25776171

Change-Id: I91ebaf59fa8234e52aeac733c424bd4bdfc6d8a2
ompatUtils.java
elephonyManagerCompat.java
elecom/TelecomManagerCompat.java
2503ed0bec0ff380e7ab43d2ea980a5ceea818f3 29-Dec-2015 Nancy Chen <nancychen@google.com> Move TelecomManagerCompat to ContactsCommon (1/3)

Bug: 25776171
Change-Id: Ifd3ac9d3908d0d9348d26ffcca2596f6ee458232
elecom/TelecomManagerCompat.java
362d0793c11c45bed631f1182f04ee669b008f96 23-Dec-2015 Wenyi Wang <wenyiw@google.com> Merge "Backport ContactsContract methods (2/2)" into ub-contactsdialer-b-dev
f8cca0aa9dc922c4c3071834eda3aa33e154f7f2 22-Dec-2015 Wenyi Wang <wenyiw@google.com> Backport ContactsContract methods (2/2)

The methods are:
1. CommonDataKinds.Event.getTypeLabel
2. Contacts.isEnterpriseContactId

Another change is using RectF instance to call drawOval() because
drawOval(RectF oval, Paint paint) was available on Kitkat.

The last change is using PhoneNumberFormattingTextWatcher() on pre-L.

Bug: 25629359
Change-Id: I8a86286b05a80112c2156130d100afe7c50eb07c
ontactsCompat.java
ventCompat.java
honeNumberFormattingTextWatcherCompat.java
4ab7870298df7eb8a9ea43a8d9996abd49de3753 22-Dec-2015 Nancy Chen <nancychen@google.com> Move TelephonyManagerCompat to ContactsCommon (1/2).

Bug: 25776171

Change-Id: Ied554815f54eda4b3197f99a06472db69c0e97c3
elephonyManagerCompat.java
7b5aa015db6c40cdc9745bff4d0ee9c9de25b0d7 22-Dec-2015 Brandon Maxwell <maxwelb@google.com> Merge "Added method to check if methods are available at runtime" into ub-contactsdialer-b-dev
4304ed2a756931bd5efc34e35dc3a105ad6ce0ef 21-Dec-2015 Brandon Maxwell <maxwelb@google.com> Added method to check if methods are available at runtime

Change-Id: Id5fd7b57eb27ce957a93771e9b9297fecd163bf9
ompatUtils.java
159c0327c1151c28fd6bfdf277b61a9f5ccf30b0 21-Dec-2015 Wenyi Wang <wenyiw@google.com> Backport PhoneNumberUtils methods (2/2)

Two methods are: normalizeNumber() and formatNumber().

Bug: 25629359
Change-Id: I81e2ae913026a912f9496da050930b52332cff81
honeNumberUtilsCompat.java
2f72798da5ec8ecc94c3d0788ca920aa83768c5f 19-Dec-2015 Wenyi Wang <wenyiw@google.com> Merge "Ignore class TtsSpan on pre-L SDKs" into ub-contactsdialer-b-dev
b97a06ec0ada2121163679cf8292b5b44efbccb7 18-Dec-2015 Brandon Maxwell <maxwelb@google.com> Backporting Select sim dialog icons

The getIcon method doesn't exist prior to M and was causing crashes on
multi-sim devices.

Bug=25776171
Change-Id: I2072bbe99e617fbe8387e5220f437c144bd592a4
honeAccountCompat.java
911ad45d50cd0cdcc8a11b94edf1e13788be9820 18-Dec-2015 Wenyi Wang <wenyiw@google.com> Ignore class TtsSpan on pre-L SDKs

Null will be returned on pre-L when a TtsSpan instance should be returned.

Bug: 25629359
Change-Id: I947bae2e24aa340c89298dc59e2d752abddb7ebc
honeNumberUtilsCompat.java
e31b0ea8b61d5744921ff7491d5dbe1a8273c05f 18-Dec-2015 Tyler Gunn <tgunn@google.com> Use carrier presence when showing the video call icon.

- Removed some unused video assets.
- Added carrier_presence to the ContactLoader queries (this supports
load in the quick contacts view, as well as in the dialer search results).
- In search results (ContactListItemView), moved label before phone
number (per UX).

Bug: 20257833
Change-Id: I838dbf6c58939faab6d36f4afa70587b07f85f63
ompatUtils.java
d8c7e3d3d996c573c441c73e9742f5e092736f33 18-Dec-2015 Brandon Maxwell <maxwelb@google.com> Merge "Adding method to check if the version is L Mr1" into ub-contactsdialer-b-dev
ce99e1979e16dc2986c6ab01a34a507f043486ea 18-Dec-2015 Brandon Maxwell <maxwelb@google.com> Adding method to check if the version is L Mr1

Change-Id: I2d8d3de445b6782350714721a94cf5e5e9a7b895
ompatUtils.java
e0bb103a1403d3657cafb27cda6dc6b5fb1d5462 16-Dec-2015 Wenyi Wang <wenyiw@google.com> Backport setter methods

The following methids were added in API level 21 and we have to ignore
them on older SDKs:
1. setOutlineProvider
2. setTranslationZ
3. setElegantTextHeight
4. setOverlay

View.setTranslationZ could be replaced with ViewCompat.setTranslationZ,
but that method basically ignores the attribute on older SDKs, which is
equivalent to our approach here.

In addition, we backport setImageTintList by applying tint to a drawable
and setting the drawble to ImageView.

Bug: 25629359
Change-Id: I3c5f7fe972cc0a5f7c8ab67581b0e68c3cdad35b
ompatUtils.java
9264eaecf70946a4df118cc2a1240aa1006c9019 16-Dec-2015 Brandon Maxwell <maxwelb@google.com> Added utility method to check for classes at runtime

Bug: 25776171
Change-Id: I2e1e062442a4cfc8e4d6df2494c0ccc6ffde574c
ompatUtils.java
f4cbd358e34edaaa0aeb21d441107fb6efcc46be 15-Dec-2015 Nancy Chen <nancychen@google.com> Add a general isMarshmallowCompatible method.

Bug: 25776171
Change-Id: I5632f9156a553f00da1220f58d4f059bf94d396d
ompatUtils.java
65fd25e73aa3757b7cef4a3563b8bd13fb159f98 11-Dec-2015 Nancy Chen <nancychen@google.com> Merge "Check for compatibilty with call subject and video call features." into ub-contactsdialer-b-dev
47700e718b4a210f70aca746ea8454c94e37fad5 09-Dec-2015 Ricky Wai <rickywai@google.com> Merge "Add work contacts search and directory in ContactsCommon" into ub-contactsdialer-b-dev
cd0b29ddbf3648e48f048196c62245d545bc6122 08-Dec-2015 Ricky Wai <rickywai@google.com> Add work contacts search and directory in ContactsCommon

Add CallableCompat, ContactsCompat, PhoneCompat to simplify the logic in code

Bug: 25836833
Change-Id: I2cdb3bc32ab069f2bb81f41c08cef852f8526d52
allableCompat.java
ontactsCompat.java
irectoryCompat.java
honeCompat.java
3b3e33f2fec2b02fecadbebbe6cb484b71e332fb 09-Dec-2015 Nancy Chen <nancychen@google.com> Check for compatibilty with call subject and video call features.

Bug: 25776171
Change-Id: I473bfd43bc903dbdf6821dd03db8855ae38c417b
ompatUtils.java
d2a690e0269d4c3a59f63fc1bb1f6f75d6431e77 07-Dec-2015 Wenyi Wang <wenyiw@google.com> Backport isInsert() using wrapper class for ContentProviderOperation (2/2)

Our strategy is to create a wrapper class around each instance of a
ContentProviderOperation and include the type of ContentProviderOperation
in wrapper. Since ContentProviderOperation is usually created by Builder
and we don’t have access to the type via Builder, so we need to create
a wrapper class for Builder first and include type.

Call stack: ContactSaveService --> RawContactDeltaList -->
RawContactDelta --> ValuesDelta

Bug: 25629359
Change-Id: Ib1c0c6e7d780564ca2ab837b0d73dcf2accc7a3a
ompatUtils.java
e1206ee3eb0d1015d693588ce91da374a817b1c9 05-Dec-2015 Brandon Maxwell <maxwelb@google.com> Using Compat code for createTtsSpannable

Bug:25776171
Change-Id: I04f9f08a5e032751c35a9a8c0e0d4b390d3843c3
honeNumberUtilsCompat.java
1b1d6fb3aab10f22fe6306712bfbd07fed4e23e1 04-Dec-2015 Wenyi Wang <wenyiw@google.com> Merge "Backport Telephony.Threads to enable SMS interaction (1/2)" into ub-contactsdialer-b-dev
913480ca5235a0f3c98a602553d41471dfc0f987 03-Dec-2015 Wenyi Wang <wenyiw@google.com> Backport Telephony.Threads to enable SMS interaction (1/2)

Also refactored private methods in PhoneNumberUtilsCompat.

Bug: 25629359

Change-Id: I9ac27050e35860ab2b35cc02faad23a88191457e
honeNumberUtilsCompat.java
elephonyThreadsCompat.java
2fe227039251a6094de79876109fc09af4851a81 26-Nov-2015 Nancy Chen <nancychen@google.com> Add CompatUtils class for compat common to Dialer and Contacts.

So far, we're just adding a method to determine whether the version is
multi-SIM compatible or not.

Bug: 25776171
Change-Id: If1edda1a157f35bf74dddbef8b9aaa49538c606f
ompatUtils.java
80cb953e4d94ec2997619fcdca39ed4f54bb2968 25-Nov-2015 Wenyi Wang <wenyiw@google.com> Avoid using prioritized mimetype on pre-M SDKs

Bug: 25629359
Change-Id: Id6f960fc5d39e3d3d1133d812ca273aaa48d312d
ompatUtils.java
3abf10065b24373b3d6e46ed3c7f34af2b4639fb 18-Nov-2015 Wenyi Wang <wenyiw@google.com> Copy TTS code for backporting (1/2)

Bug: 25629359
Change-Id: Ic70bd512cfbe7bdf8af21295ee7433749b7fc458
honeNumberUtilsCompat.java
3181b8ffaa6af370268acee97903e98a6b94138f 20-Nov-2015 Wenyi Wang <wenyiw@google.com> Use ContextCompat to handle getColor (1/2)

Bug: 25629359
Change-Id: I38192f608728fbd338a572295ad85b0fba0e892d
ompatUtils.java
8967b1c37b27a57967f10bed85c5cf0bb5d7ad84 18-Nov-2015 Wenyi Wang <wenyiw@google.com> Fix usage of getColor() on pre-M SDKs (1/2)

Bug: 25629359
Change-Id: I10e35d117ce9087e3031d2b90e41f0ce9a59ee81
ompatUtils.java
7b1efb983b331e29a4542f311c4442822f68ec0d 18-Nov-2015 Brandon Maxwell <maxwelb@google.com> Added class used to override the sdk version

Change-Id: I3d493cc73af8f0821a64b64ef3d2a497e6a41261
dkVersionOverride.java