Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_packages_apps_Messaging
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LMODroid
platform_packages_apps_Messaging
Commits
09d58ef1
Verified
Commit
09d58ef1
authored
5 years ago
by
Han Wang
Committed by
Erfan Abdi
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Messaging: Show quick reply choices only on wearable devices
Change-Id: I4b81643c051a9b1377f2046c1aa0515c590736fc
parent
0a891721
Branches
staging/twelve
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/com/android/messaging/datamodel/BugleNotifications.java
+14
-8
14 additions, 8 deletions
src/com/android/messaging/datamodel/BugleNotifications.java
with
14 additions
and
8 deletions
src/com/android/messaging/datamodel/BugleNotifications.java
+
14
−
8
View file @
09d58ef1
...
...
@@ -788,7 +788,7 @@ public class BugleNotifications {
maybeAddWearableConversationLog
(
wearableExtender
,
(
MultiMessageNotificationState
)
notificationState
);
addDownloadMmsAction
(
notifBuilder
,
wearableExtender
,
notificationState
);
addWearableVoiceReplyAction
(
wearableExtender
,
notificationState
);
addWearableVoiceReplyAction
(
notifBuilder
,
wearableExtender
,
notificationState
);
}
// Apply the wearable options and build & post the notification
...
...
@@ -830,7 +830,7 @@ public class BugleNotifications {
}
}
private
static
void
addWearableVoiceReplyAction
(
private
static
void
addWearableVoiceReplyAction
(
final
NotificationCompat
.
Builder
notifBuilder
,
final
WearableExtender
wearableExtender
,
final
NotificationState
notificationState
)
{
if
(!(
notificationState
instanceof
MultiMessageNotificationState
))
{
return
;
...
...
@@ -860,14 +860,20 @@ public class BugleNotifications {
final
NotificationCompat
.
Action
.
Builder
actionBuilder
=
new
NotificationCompat
.
Action
.
Builder
(
R
.
drawable
.
ic_wear_reply
,
context
.
getString
(
replyLabelRes
),
replyPendingIntent
);
final
RemoteInput
.
Builder
remoteInputBuilder
=
new
RemoteInput
.
Builder
(
Intent
.
EXTRA_TEXT
);
remoteInputBuilder
.
setLabel
(
context
.
getString
(
R
.
string
.
notification_reply_prompt
));
actionBuilder
.
addRemoteInput
(
remoteInputBuilder
.
build
());
notifBuilder
.
addAction
(
actionBuilder
.
build
());
// Support the action on a wearable device
final
NotificationCompat
.
Action
.
Builder
wearActionBuilder
=
new
NotificationCompat
.
Action
.
Builder
(
R
.
drawable
.
ic_wear_reply
,
context
.
getString
(
replyLabelRes
),
replyPendingIntent
);
final
String
[]
choices
=
context
.
getResources
().
getStringArray
(
R
.
array
.
notification_reply_choices
);
final
RemoteInput
remoteInput
=
new
RemoteInput
.
Builder
(
Intent
.
EXTRA_TEXT
).
setLabel
(
context
.
getString
(
R
.
string
.
notification_reply_prompt
)).
setChoices
(
choices
)
.
build
();
actionBuilder
.
addRemoteInput
(
remoteInput
);
wearableExtender
.
addAction
(
actionBuilder
.
build
());
remoteInputBuilder
.
setChoices
(
choices
);
wearActionBuilder
.
addRemoteInput
(
remoteInputBuilder
.
build
());
wearableExtender
.
addAction
(
wearActionBuilder
.
build
());
}
private
static
void
addDownloadMmsAction
(
final
NotificationCompat
.
Builder
notifBuilder
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment