Jason Monk | 8a452e9 | 2017-10-31 19:21:47 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package com.example.androidx.slice.demos; |
| 18 | |
Mady Mellor | db8aa8c | 2017-11-08 14:26:17 -0800 | [diff] [blame] | 19 | import android.app.PendingIntent; |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 20 | import android.content.ContentResolver; |
Mady Mellor | db8aa8c | 2017-11-08 14:26:17 -0800 | [diff] [blame] | 21 | import android.content.Context; |
| 22 | import android.content.Intent; |
Jason Monk | 8a452e9 | 2017-10-31 19:21:47 -0400 | [diff] [blame] | 23 | import android.graphics.drawable.Icon; |
| 24 | import android.net.Uri; |
Mady Mellor | db8aa8c | 2017-11-08 14:26:17 -0800 | [diff] [blame] | 25 | import android.net.wifi.WifiManager; |
| 26 | import android.provider.Settings; |
Jason Monk | ed97495 | 2017-11-27 13:48:04 -0500 | [diff] [blame] | 27 | import android.support.annotation.NonNull; |
Jason Monk | 8a452e9 | 2017-10-31 19:21:47 -0400 | [diff] [blame] | 28 | import android.text.format.DateUtils; |
| 29 | |
Jason Monk | dcb5e2f | 2017-11-15 20:19:43 -0500 | [diff] [blame] | 30 | import androidx.app.slice.Slice; |
| 31 | import androidx.app.slice.SliceProvider; |
Mady Mellor | db971ff | 2017-11-20 11:03:43 -0800 | [diff] [blame] | 32 | import androidx.app.slice.builders.GridBuilder; |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 33 | import androidx.app.slice.builders.ListBuilder; |
Jason Monk | 8a452e9 | 2017-10-31 19:21:47 -0400 | [diff] [blame] | 34 | import androidx.app.slice.builders.MessagingSliceBuilder; |
| 35 | |
| 36 | /** |
| 37 | * Examples of using slice template builders. |
| 38 | */ |
Jason Monk | 8a452e9 | 2017-10-31 19:21:47 -0400 | [diff] [blame] | 39 | public class SampleSliceProvider extends SliceProvider { |
Mady Mellor | db8aa8c | 2017-11-08 14:26:17 -0800 | [diff] [blame] | 40 | |
| 41 | public static final String ACTION_WIFI_CHANGED = |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 42 | "com.example.androidx.slice.action.WIFI_CHANGED"; |
| 43 | public static final String ACTION_TOAST = |
| 44 | "com.example.androidx.slice.action.TOAST"; |
| 45 | public static final String EXTRA_TOAST_MESSAGE = "com.example.androidx.extra.TOAST_MESSAGE"; |
| 46 | |
Mady Mellor | db971ff | 2017-11-20 11:03:43 -0800 | [diff] [blame] | 47 | public static final String[] URI_PATHS = {"message", "wifi", "note", "ride", "toggle", |
Amin Shaikh | bfeddba | 2018-01-10 14:51:13 -0500 | [diff] [blame] | 48 | "toggle2", "contact", "gallery", "weather"}; |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 49 | |
| 50 | /** |
| 51 | * @return Uri with the provided path |
| 52 | */ |
| 53 | public static Uri getUri(String path, Context context) { |
| 54 | return new Uri.Builder() |
| 55 | .scheme(ContentResolver.SCHEME_CONTENT) |
| 56 | .authority(context.getPackageName()) |
| 57 | .appendPath(path) |
| 58 | .build(); |
| 59 | } |
Jason Monk | 8a452e9 | 2017-10-31 19:21:47 -0400 | [diff] [blame] | 60 | |
| 61 | @Override |
Jason Monk | dcb5e2f | 2017-11-15 20:19:43 -0500 | [diff] [blame] | 62 | public boolean onCreateSliceProvider() { |
Jason Monk | 8a452e9 | 2017-10-31 19:21:47 -0400 | [diff] [blame] | 63 | return true; |
| 64 | } |
| 65 | |
Jason Monk | ed97495 | 2017-11-27 13:48:04 -0500 | [diff] [blame] | 66 | @NonNull |
| 67 | @Override |
| 68 | public Uri onMapIntentToUri(Intent intent) { |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 69 | return getUri("wifi", getContext()); |
Jason Monk | ed97495 | 2017-11-27 13:48:04 -0500 | [diff] [blame] | 70 | } |
| 71 | |
Jason Monk | 8a452e9 | 2017-10-31 19:21:47 -0400 | [diff] [blame] | 72 | @Override |
| 73 | public Slice onBindSlice(Uri sliceUri) { |
| 74 | String path = sliceUri.getPath(); |
| 75 | switch (path) { |
| 76 | case "/message": |
| 77 | return createMessagingSlice(sliceUri); |
Mady Mellor | db8aa8c | 2017-11-08 14:26:17 -0800 | [diff] [blame] | 78 | case "/wifi": |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 79 | return createWifiSlice(sliceUri); |
| 80 | case "/note": |
| 81 | return createNoteSlice(sliceUri); |
| 82 | case "/ride": |
| 83 | return createRideSlice(sliceUri); |
| 84 | case "/toggle": |
| 85 | return createCustomToggleSlice(sliceUri); |
Amin Shaikh | bfeddba | 2018-01-10 14:51:13 -0500 | [diff] [blame] | 86 | case "/toggle2": |
| 87 | return createTwoCustomToggleSlices(sliceUri); |
Mady Mellor | db971ff | 2017-11-20 11:03:43 -0800 | [diff] [blame] | 88 | case "/contact": |
| 89 | return createContact(sliceUri); |
| 90 | case "/gallery": |
| 91 | return createGallery(sliceUri); |
| 92 | case "/weather": |
| 93 | return createWeather(sliceUri); |
Jason Monk | 8a452e9 | 2017-10-31 19:21:47 -0400 | [diff] [blame] | 94 | } |
| 95 | throw new IllegalArgumentException("Unknown uri " + sliceUri); |
| 96 | } |
| 97 | |
Mady Mellor | db971ff | 2017-11-20 11:03:43 -0800 | [diff] [blame] | 98 | private Slice createWeather(Uri sliceUri) { |
Jason Monk | a09cb67 | 2018-01-08 13:17:36 -0500 | [diff] [blame] | 99 | return new GridBuilder(getContext(), sliceUri) |
Mady Mellor | db971ff | 2017-11-20 11:03:43 -0800 | [diff] [blame] | 100 | .addCell(cb -> cb |
| 101 | .addLargeImage(Icon.createWithResource(getContext(), R.drawable.weather_1)) |
| 102 | .addText("MON") |
| 103 | .addTitleText("69\u00B0")) |
| 104 | .addCell(cb -> cb |
| 105 | .addLargeImage(Icon.createWithResource(getContext(), R.drawable.weather_2)) |
| 106 | .addText("TUE") |
| 107 | .addTitleText("71\u00B0")) |
| 108 | .addCell(cb -> cb |
| 109 | .addLargeImage(Icon.createWithResource(getContext(), R.drawable.weather_3)) |
| 110 | .addText("WED") |
| 111 | .addTitleText("76\u00B0")) |
| 112 | .addCell(cb -> cb |
| 113 | .addLargeImage(Icon.createWithResource(getContext(), R.drawable.weather_4)) |
| 114 | .addText("THU") |
| 115 | .addTitleText("72\u00B0")) |
| 116 | .addCell(cb -> cb |
| 117 | .addLargeImage(Icon.createWithResource(getContext(), R.drawable.weather_1)) |
| 118 | .addText("FRI") |
| 119 | .addTitleText("68\u00B0")) |
| 120 | .build(); |
| 121 | } |
| 122 | |
| 123 | private Slice createGallery(Uri sliceUri) { |
Jason Monk | a09cb67 | 2018-01-08 13:17:36 -0500 | [diff] [blame] | 124 | return new GridBuilder(getContext(), sliceUri) |
Mady Mellor | db971ff | 2017-11-20 11:03:43 -0800 | [diff] [blame] | 125 | .addCell(cb -> cb |
| 126 | .addLargeImage(Icon.createWithResource(getContext(), R.drawable.slices_1))) |
| 127 | .addCell(cb -> cb |
| 128 | .addLargeImage(Icon.createWithResource(getContext(), R.drawable.slices_2))) |
| 129 | .addCell(cb -> cb |
| 130 | .addLargeImage(Icon.createWithResource(getContext(), R.drawable.slices_3))) |
| 131 | .addCell(cb -> cb |
| 132 | .addLargeImage(Icon.createWithResource(getContext(), R.drawable.slices_4))) |
| 133 | .build(); |
| 134 | } |
| 135 | |
| 136 | private Slice createContact(Uri sliceUri) { |
Jason Monk | a09cb67 | 2018-01-08 13:17:36 -0500 | [diff] [blame] | 137 | return new ListBuilder(getContext(), sliceUri) |
Mady Mellor | db971ff | 2017-11-20 11:03:43 -0800 | [diff] [blame] | 138 | .setColor(0xff3949ab) |
| 139 | .addRow(b -> b |
| 140 | .setTitle("Mady Pitza") |
| 141 | .setSubtitle("Frequently contacted contact") |
| 142 | .setIsHeader(true) |
| 143 | .addEndItem(Icon.createWithResource(getContext(), R.drawable.mady))) |
| 144 | .addGrid(b -> b |
| 145 | .addCell(cb -> cb |
| 146 | .addImage(Icon.createWithResource(getContext(), R.drawable.ic_call)) |
| 147 | .addText("Call") |
| 148 | .setContentIntent(getBroadcastIntent(ACTION_TOAST, "call"))) |
| 149 | .addCell(cb -> cb |
| 150 | .addImage(Icon.createWithResource(getContext(), R.drawable.ic_text)) |
| 151 | .addText("Text") |
| 152 | .setContentIntent(getBroadcastIntent(ACTION_TOAST, "text"))) |
| 153 | .addCell(cb ->cb |
| 154 | .addImage(Icon.createWithResource(getContext(), R.drawable.ic_video)) |
| 155 | .setContentIntent(getBroadcastIntent(ACTION_TOAST, "video")) |
| 156 | .addText("Video")) |
| 157 | .addCell(cb -> cb |
| 158 | .addImage(Icon.createWithResource(getContext(), R.drawable.ic_email)) |
| 159 | .addText("Email") |
| 160 | .setContentIntent(getBroadcastIntent(ACTION_TOAST, "email")))) |
| 161 | .build(); |
| 162 | } |
| 163 | |
Jason Monk | 8a452e9 | 2017-10-31 19:21:47 -0400 | [diff] [blame] | 164 | private Slice createMessagingSlice(Uri sliceUri) { |
| 165 | // TODO: Remote input. |
Jason Monk | a09cb67 | 2018-01-08 13:17:36 -0500 | [diff] [blame] | 166 | return new MessagingSliceBuilder(getContext(), sliceUri) |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 167 | .add(b -> b |
Jason Monk | 8a452e9 | 2017-10-31 19:21:47 -0400 | [diff] [blame] | 168 | .addText("yo home \uD83C\uDF55, I emailed you the info") |
| 169 | .addTimestamp(System.currentTimeMillis() - 20 * DateUtils.MINUTE_IN_MILLIS) |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 170 | .addSource(Icon.createWithResource(getContext(), R.drawable.mady))) |
| 171 | .add(b -> b |
Jason Monk | 8a452e9 | 2017-10-31 19:21:47 -0400 | [diff] [blame] | 172 | .addText("just bought my tickets") |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 173 | .addTimestamp(System.currentTimeMillis() - 10 * DateUtils.MINUTE_IN_MILLIS)) |
| 174 | .add(b -> b |
Jason Monk | 8a452e9 | 2017-10-31 19:21:47 -0400 | [diff] [blame] | 175 | .addText("yay! can't wait for getContext() weekend!\n" |
| 176 | + "\uD83D\uDE00") |
| 177 | .addTimestamp(System.currentTimeMillis() - 5 * DateUtils.MINUTE_IN_MILLIS) |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 178 | .addSource(Icon.createWithResource(getContext(), R.drawable.mady))) |
Jason Monk | 8a452e9 | 2017-10-31 19:21:47 -0400 | [diff] [blame] | 179 | .build(); |
| 180 | |
| 181 | } |
Mady Mellor | db8aa8c | 2017-11-08 14:26:17 -0800 | [diff] [blame] | 182 | |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 183 | private Slice createNoteSlice(Uri sliceUri) { |
Mady Mellor | db971ff | 2017-11-20 11:03:43 -0800 | [diff] [blame] | 184 | // TODO: Remote input. |
Jason Monk | a09cb67 | 2018-01-08 13:17:36 -0500 | [diff] [blame] | 185 | return new ListBuilder(getContext(), sliceUri) |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 186 | .setColor(0xfff4b400) |
Mady Mellor | db971ff | 2017-11-20 11:03:43 -0800 | [diff] [blame] | 187 | .addRow(b -> b |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 188 | .setTitle("Create new note") |
| 189 | .setSubtitle("with this note taking app") |
Mady Mellor | db971ff | 2017-11-20 11:03:43 -0800 | [diff] [blame] | 190 | .addEndItem(Icon.createWithResource(getContext(), R.drawable.ic_create), |
| 191 | getBroadcastIntent(ACTION_TOAST, "create note")) |
| 192 | .addEndItem(Icon.createWithResource(getContext(), R.drawable.ic_voice), |
| 193 | getBroadcastIntent(ACTION_TOAST, "voice note")) |
| 194 | .addEndItem(Icon.createWithResource(getContext(), R.drawable.ic_camera), |
| 195 | getIntent("android.media.action.IMAGE_CAPTURE"))) |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 196 | .build(); |
| 197 | } |
| 198 | |
| 199 | private Slice createRideSlice(Uri sliceUri) { |
Jason Monk | a09cb67 | 2018-01-08 13:17:36 -0500 | [diff] [blame] | 200 | return new ListBuilder(getContext(), sliceUri) |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 201 | .setColor(0xff1b5e20) |
Mady Mellor | 49a1b3e | 2017-12-11 14:15:14 -0800 | [diff] [blame] | 202 | .addSummaryRow(b -> b |
| 203 | .setTitle("Get ride") |
| 204 | .setSubtitle("Multiple cars 4 minutes away") |
Mady Mellor | db971ff | 2017-11-20 11:03:43 -0800 | [diff] [blame] | 205 | .addEndItem(Icon.createWithResource(getContext(), R.drawable.ic_home), |
| 206 | getBroadcastIntent(ACTION_TOAST, "home")) |
| 207 | .addEndItem(Icon.createWithResource(getContext(), R.drawable.ic_work), |
| 208 | getBroadcastIntent(ACTION_TOAST, "work"))) |
| 209 | .addRow(b -> b |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 210 | .setContentIntent(getBroadcastIntent(ACTION_TOAST, "work")) |
| 211 | .setTitle("Work") |
| 212 | .setSubtitle("2 min") |
| 213 | .addEndItem(Icon.createWithResource(getContext(), R.drawable.ic_work))) |
Mady Mellor | db971ff | 2017-11-20 11:03:43 -0800 | [diff] [blame] | 214 | .addRow(b -> b |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 215 | .setContentIntent(getBroadcastIntent(ACTION_TOAST, "home")) |
| 216 | .setTitle("Home") |
| 217 | .setSubtitle("2 hours 33 min via 101") |
Mady Mellor | 49a1b3e | 2017-12-11 14:15:14 -0800 | [diff] [blame] | 218 | .addEndItem(Icon.createWithResource(getContext(), R.drawable.ic_home))) |
Mady Mellor | db971ff | 2017-11-20 11:03:43 -0800 | [diff] [blame] | 219 | .addRow(b -> b |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 220 | .setContentIntent(getBroadcastIntent(ACTION_TOAST, "book ride")) |
| 221 | .setTitle("Book ride") |
| 222 | .addEndItem(Icon.createWithResource(getContext(), R.drawable.ic_car))) |
| 223 | .build(); |
| 224 | } |
| 225 | |
| 226 | private Slice createCustomToggleSlice(Uri sliceUri) { |
Jason Monk | a09cb67 | 2018-01-08 13:17:36 -0500 | [diff] [blame] | 227 | return new ListBuilder(getContext(), sliceUri) |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 228 | .setColor(0xffff4081) |
Mady Mellor | db971ff | 2017-11-20 11:03:43 -0800 | [diff] [blame] | 229 | .addRow(b -> b |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 230 | .setTitle("Custom toggle") |
| 231 | .setSubtitle("It can support two states") |
Amin Shaikh | d264a86 | 2018-01-08 15:26:17 -0500 | [diff] [blame] | 232 | .addToggle(getBroadcastIntent(ACTION_TOAST, "star toggled"), |
Mady Mellor | db971ff | 2017-11-20 11:03:43 -0800 | [diff] [blame] | 233 | true /* isChecked */, |
| 234 | Icon.createWithResource(getContext(), R.drawable.toggle_star))) |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 235 | .build(); |
| 236 | } |
| 237 | |
Amin Shaikh | bfeddba | 2018-01-10 14:51:13 -0500 | [diff] [blame] | 238 | private Slice createTwoCustomToggleSlices(Uri sliceUri) { |
| 239 | return new ListBuilder(getContext(), sliceUri) |
| 240 | .setColor(0xffff4081) |
| 241 | .addRow(b -> b |
| 242 | .setTitle("2 toggles") |
| 243 | .setSubtitle("each supports two states") |
| 244 | .addToggle(getBroadcastIntent(ACTION_TOAST, "first star toggled"), |
| 245 | true /* isChecked */, |
| 246 | Icon.createWithResource(getContext(), R.drawable.toggle_star)) |
| 247 | .addToggle(getBroadcastIntent(ACTION_TOAST, "second star toggled"), |
| 248 | false /* isChecked */, |
| 249 | Icon.createWithResource(getContext(), R.drawable.toggle_star))) |
| 250 | .build(); |
| 251 | } |
| 252 | |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 253 | private Slice createWifiSlice(Uri sliceUri) { |
Mady Mellor | db8aa8c | 2017-11-08 14:26:17 -0800 | [diff] [blame] | 254 | // Get wifi state |
Mady Mellor | db8aa8c | 2017-11-08 14:26:17 -0800 | [diff] [blame] | 255 | WifiManager wifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE); |
| 256 | int wifiState = wifiManager.getWifiState(); |
| 257 | boolean wifiEnabled = false; |
| 258 | String state; |
| 259 | switch (wifiState) { |
| 260 | case WifiManager.WIFI_STATE_DISABLED: |
| 261 | case WifiManager.WIFI_STATE_DISABLING: |
| 262 | state = "disconnected"; |
| 263 | break; |
| 264 | case WifiManager.WIFI_STATE_ENABLED: |
| 265 | case WifiManager.WIFI_STATE_ENABLING: |
| 266 | state = wifiManager.getConnectionInfo().getSSID(); |
| 267 | wifiEnabled = true; |
| 268 | break; |
| 269 | case WifiManager.WIFI_STATE_UNKNOWN: |
| 270 | default: |
| 271 | state = ""; // just don't show anything? |
| 272 | break; |
| 273 | } |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 274 | boolean finalWifiEnabled = wifiEnabled; |
Jason Monk | a09cb67 | 2018-01-08 13:17:36 -0500 | [diff] [blame] | 275 | return new ListBuilder(getContext(), sliceUri) |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 276 | .setColor(0xff4285f4) |
Mady Mellor | db971ff | 2017-11-20 11:03:43 -0800 | [diff] [blame] | 277 | .addRow(b -> b |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 278 | .setTitle("Wi-fi") |
| 279 | .setTitleItem(Icon.createWithResource(getContext(), R.drawable.ic_wifi)) |
| 280 | .setSubtitle(state) |
| 281 | .addToggle(getBroadcastIntent(ACTION_WIFI_CHANGED, null), finalWifiEnabled) |
| 282 | .setContentIntent(getIntent(Settings.ACTION_WIFI_SETTINGS))) |
| 283 | .build(); |
Mady Mellor | db8aa8c | 2017-11-08 14:26:17 -0800 | [diff] [blame] | 284 | } |
| 285 | |
| 286 | private PendingIntent getIntent(String action) { |
| 287 | Intent intent = new Intent(action); |
| 288 | PendingIntent pi = PendingIntent.getActivity(getContext(), 0, intent, 0); |
| 289 | return pi; |
| 290 | } |
| 291 | |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 292 | private PendingIntent getBroadcastIntent(String action, String message) { |
Mady Mellor | db8aa8c | 2017-11-08 14:26:17 -0800 | [diff] [blame] | 293 | Intent intent = new Intent(action); |
Amin Shaikh | 3831ee6 | 2018-01-09 13:02:21 -0500 | [diff] [blame] | 294 | intent.setClass(getContext(), SliceBroadcastReceiver.class); |
| 295 | // Ensure a new PendingIntent is created for each message. |
| 296 | int requestCode = 0; |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 297 | if (message != null) { |
| 298 | intent.putExtra(EXTRA_TOAST_MESSAGE, message); |
Amin Shaikh | 3831ee6 | 2018-01-09 13:02:21 -0500 | [diff] [blame] | 299 | requestCode = message.hashCode(); |
Mady Mellor | c133418 | 2017-11-10 15:50:35 -0800 | [diff] [blame] | 300 | } |
Amin Shaikh | 3831ee6 | 2018-01-09 13:02:21 -0500 | [diff] [blame] | 301 | return PendingIntent.getBroadcast(getContext(), requestCode, intent, |
| 302 | PendingIntent.FLAG_UPDATE_CURRENT); |
Mady Mellor | db8aa8c | 2017-11-08 14:26:17 -0800 | [diff] [blame] | 303 | } |
Jason Monk | 8a452e9 | 2017-10-31 19:21:47 -0400 | [diff] [blame] | 304 | } |