Fix compatibility in MessagingStyle.

The changes introduced to add MessagingStyle#isGroupConversation had
an implementation bug wherein an application that targets SDK < P
can set a non-null MessagingStyle#setConversationTitle which, in that
SDK version, would also denote it being a group conversation. A
listener targetting SDK >= P would be able able to capture this
notification, but incorrectly be given false when calling
MessagingStyle#isGroupConversation. This CL adds back legacy
functionality to #isGroupConversation by checking the
application's SDK version when they call #setConversationTitle
and interally set #isGroupConversation to true.

Test: runtest -x
core/tests/coretests/src/android/app/NotificationTest.java
Bug: 67717177

Change-Id: I2233e3d0b6d4fcf9823e50cd7aa31b76bbaddaed
2 files changed