History log of /frameworks/support/compat/src/main/java/androidx/core/app/NotificationCompat.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
90e1e74c555822ef7489396f8c69c39c03820a48 25-Apr-2018 Kodlee Yin <kodlee@google.com> Convert MessagingStyle constructor to use Person.

Replaces the CharSequence constructor with a Person constructor and
removes the mUserDisplayName with just mUser instead. This allows the
benefits of Person (ie. adding an avatar) within MessagingStyle. This CL
also fixes rendering of compat-built MessagingStyle notifications. It
seems like frameworks depends on an extra that was previously set which
was no longer set by an update. The following are screenshots on various
configurations.

API 23:
no title, group: https://screenshot.googleplex.com/cbJSN3h5HxW.png
no title, no group: https://screenshot.googleplex.com/5LHHss1GPhB.png
title, group: https://screenshot.googleplex.com/PXPpcd8jFi2.png
title, no group: https://screenshot.googleplex.com/u2XuOQfyn2w.png

API 27:
no title, group: https://screenshot.googleplex.com/RNNzy7Ei6v7.png
no title, no group: https://screenshot.googleplex.com/VpCq7yJMQ9x.png
title, group: https://screenshot.googleplex.com/VWjxV6o2ht0.png
title, no group: https://screenshot.googleplex.com/KAp6QL3nLhe.png

On another note. This CL cleans up a bunch of deprecated calls to
Message#getSenderName for #getPerson.

Also cleans up some scope issues for fields and methods.

Test: ./gradlew core:connectedCheck
Change-Id: I3ef2519e297664d170383e35e0bef722246c4312
Fixes: 78310130
Fixes: 78598160
/frameworks/support/compat/src/main/java/androidx/core/app/NotificationCompat.java
b113caafd3650a7f7a15753968ee203a6a63a4e3 25-Apr-2018 Kodlee Yin <kodlee@google.com> Fix legacy MessagingStyle Title behavior.

A P change allows apps to set MessagingStyle conversation title and
group conversation status independently. Legacy Android versions,
however, don't know about this. Thus, this CL changes #apply to also
conform to the MessagingStyle title changes by not applying the title on
< P devices, and instead, using the Notification#setContentTitle
instead. A NotificationCompat#getContentTitle method is then also added
in order to fetch this title.

Test: ./gradlew core:connectedCheck
Change-Id: Id35ec08f2eeff532caf51691178b51487cf1c25c
Fixes: 78540470
/frameworks/support/compat/src/main/java/androidx/core/app/NotificationCompat.java
0b5dc6c0dd19370d5a90177ebf53bc965f6fa2b0 24-Apr-2018 Kodlee Yin <kodlee@google.com> Fix #getMessageFromBundle from throwing NPE.

It's possible that an app using an old version of the compat library
doesn't encode a KEY_SENDER extra when writing MessagingStyle.Message
bundle. If a listener running the current compat version attempts to
#getMessageFromBundle, it will throw an NPE due to the legacy null
case. The fix is simply to pass along the null to Message where the
encoded Person should, correctly, be null.

Test: ./gradlew core:connectedCheck
Fixes: 78484177
Change-Id: I8ec2302aa46069bd1fa26589fefcd27960a42803
/frameworks/support/compat/src/main/java/androidx/core/app/NotificationCompat.java
4a9831d3250e46cb73ce57292523449841a28d9c 13-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Rename two icon dimens to make clashes less likely" into pi-dev
330e75fe3f3d7def16d01ce10f45a9a71fadbe63 12-Apr-2018 Robin Lee <rgl@google.com> Rename two icon dimens to make clashes less likely

Apps will sometimes have their own idea of what a notification icon is
and how large it should be. We shouldn't be making that decision for
them if they happen to declare a dimen with the same name.

Follow-up to Ib1228cee0d368472a97c210b6d90007c953e2fbc

Bug: 77963298
Test: ./gradlew build
Change-Id: I7ddfe39efce8d5bfc64bc09dec441b2c3342a838
/frameworks/support/compat/src/main/java/androidx/core/app/NotificationCompat.java
cb47e8e6830d389ba8da72de02749b7612cdedb0 03-Apr-2018 Kodlee Yin <kodlee@google.com> Merge "Convert MessagingStyle to use Person." into pi-preview1-androidx-dev
am: cc4408f801

Change-Id: Icb32da71ca210aa81c838af17ace6d366799206f
0d4c676a0020e6e9790a5d63acc703ae485a8fd2 29-Mar-2018 Kodlee Yin <kodlee@google.com> Convert MessagingStyle to use Person.

This change replaces the MessagingStyle.Message#mSender field with
#mPerson as the backing field. This change also deprecates the
references to mSender (#getSender). This change takes into account the
possibility of an app using an older version of support, encoding the
sender into the Message bundle instead of Person and a newer versioned
app reading that bundle. We handle this by watching for the legacy
field and handle accordingly.

Test: ./gradlew core:connectedCheck
Bug: 72057404
Change-Id: I3cf1ecd57c59954bc775b63457110293adaed92b
/frameworks/support/compat/src/main/java/androidx/core/app/NotificationCompat.java
ea6ca4ac66f30cdf4c766616b4b7743df500355c 29-Mar-2018 Jake Wharton <jakew@google.com> Merge changes I16af40f6,If6280b7b into pi-preview1-androidx-dev
am: 9cd60f3feb

Change-Id: I707c4fea7bfdd3e2758a524af709c9fa56c6683e
9cd60f3feb3bdf001c19bbb2040ce8d53d5ba9a8 29-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes I16af40f6,If6280b7b into pi-preview1-androidx-dev

* changes:
Mark erroneously public constructors as depreacted.
Add private constructors to slice utility types.
e9d7c5190bf07121f579f813a02abecd99bbf027 29-Mar-2018 Kodlee Yin <kodlee@google.com> Merge "Fix MessagingStyle test and MessagingStyle." into pi-preview1-androidx-dev
am: a0c5f3d0df

Change-Id: I723707b524a1c16012a7d44311cada2470103798
4cb917b2456bbde8b5842f80ccaeeaddd80acfb3 29-Mar-2018 Kodlee Yin <kodlee@google.com> Fix MessagingStyle test and MessagingStyle.

By fixing the tests I found a bug when building and extracting
MessagingStyle from to/from a notification. This change both fixes the
test and fixes the bug that was uncovered.

Test: ./gradlew core:connectedCheck
Bug: 77246897
Change-Id: I1465e5421d564671ba2ae235f853a66c3306873b
/frameworks/support/compat/src/main/java/androidx/core/app/NotificationCompat.java
7990e32e46445f21282e4059b3937b44927af426 28-Mar-2018 Jake Wharton <jakew@google.com> Mark erroneously public constructors as depreacted.

These types contain only static utility methods and should never be instantiated.

Bug: 37063037
Test: ./gradlew aEP (with PrivateConstructorForUtilityClass enabled)
Change-Id: I16af40f6bac74cc14841850f2894d45470198475
/frameworks/support/compat/src/main/java/androidx/core/app/NotificationCompat.java
24ea12581f0294f24e0afff39bc625f83dd5f6fc 25-Mar-2018 Sergey Vasilinets <sergeyv@google.com> Merge "Eliminate synthetic accessors in 'core' library." into pi-preview1-androidx-dev
am: 30fa986764

Change-Id: I0e5ec83c3bb7e45855e225798193a6f0ae02870a
8eeb6c6cdd4bdcb6807cd8152e1e36b4883a8fa5 24-Mar-2018 Jake Wharton <jakew@google.com> Eliminate synthetic accessors in 'core' library.

Bug: 76228530
Test: ./gradlew :core:assemble and then manually dump methods
Change-Id: Ie6b363a951ee55eb040f7d7e7588144bf79149c6
/frameworks/support/compat/src/main/java/androidx/core/app/NotificationCompat.java
ff4c72ecdfb540de2884d4a01ccd233c82f73830 05-Jan-2018 Robin Lee <rgl@google.com> Copy notification icon resizing from API 27+

This is helpful on older devices too. In particular, TV notifications
can be very large.

Bug: 74515725
Test: ./gradlew build
Change-Id: Ib1228cee0d368472a97c210b6d90007c953e2fbc
/frameworks/support/compat/src/main/java/androidx/core/app/NotificationCompat.java
75e9393724a7ce6b2363de9bfced93a0a13a96c0 15-Mar-2018 Kodlee Yin <kodlee@google.com> Add backwards support for MS#setGroupConversation

The original implementation for
NotificationCompat.MessagingStyle#setGroupConversation disregarded
backwards support in favor of applying legacy logic in order to
maintain backwards compatability on pre-P devices. This change adds in
backwards support for the method while maintaining backwards
compatability.

Pre-P, setting a conversation title would make #isGroupConversation
return true. Post-P conversation title and group conversation boolean
are two independent settings. We then have the following cases:

1. < P target app sets conversation title, implying group conversation
(legacy behavior)
2. < P target app sets conversation title and sets false on
#setGroupConversation (backwards support for new feature)
3. >= P target app sets conversation title (new feature)

All use cases are supported with this new change where previously, case
2 was unsupported.

Test: ./gradlew core:connectedCheck
Bug: 74567256
Change-Id: I4c2b5558abcd7ef38797c67d813d9a2bdf0a2d70
/frameworks/support/compat/src/main/java/androidx/core/app/NotificationCompat.java
9dede51868bbbe16aadcd65e04860bea8ea50e05 13-Mar-2018 Aurimas Liutikas <aurimas@google.com> Fix imports for compat code.

A follow up after factor to make it so androidx imports go in the
correct order.

Test: ./gradlew buildOnServer
Change-Id: I40987329adbe8ade68beef6bdc83ae890311b4b8
/frameworks/support/compat/src/main/java/androidx/core/app/NotificationCompat.java
ac5fe7c617c66850fff75a9fce9979c6e5674b0f 06-Mar-2018 Aurimas Liutikas <aurimas@google.com> Refactor support library

Test: None
Change-Id: I92e450c739fc9d77e8f8840bed4165ab88247fd6
/frameworks/support/compat/src/main/java/androidx/core/app/NotificationCompat.java
f27b1ffc67228d73326ec3426fef4c9db75cd6fd 06-Mar-2018 Aurimas Liutikas <aurimas@google.com> Revert "Refactor support library."

This reverts commit b31c3281d870e9abb673db239234d580dcc4feff.

Change-Id: Icfa5b9af633739ad2c857dff22a2181bac6661ef
/frameworks/support/compat/src/main/java/androidx/core/app/NotificationCompat.java
b31c3281d870e9abb673db239234d580dcc4feff 20-Feb-2018 Aurimas Liutikas <aurimas@google.com> Refactor support library.

Test: None
Change-Id: I11a047324832801555673dac45ec1d6590a6338b
/frameworks/support/compat/src/main/java/androidx/core/app/NotificationCompat.java