Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBroadcastService.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBroadcastService.java b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBroadcastService.java |
| index 0943ed7d5310a794f2e05e0d482ac8e208085877..f466c08597fc07a1144c9964753996bb4b3a928b 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBroadcastService.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBroadcastService.java |
| @@ -79,6 +79,18 @@ public class PhysicalWebBroadcastService extends Service { |
| } |
| }; |
| + /** |
| + * Starts the PhysicalWebBroadcastService. |
| + * Static so it can be called from multiple places in Chrome and reduce code |
|
Ted C
2017/03/21 16:05:12
This comment seems to describe all static function
iankc
2017/03/21 18:43:25
Done.
|
| + * redudancy. |
| + */ |
| + public static void startBroadcastService(String url) { |
| + Context context = ContextUtils.getApplicationContext(); |
| + Intent intent = new Intent(context, PhysicalWebBroadcastService.class); |
| + intent.putExtra(DISPLAY_URL_KEY, url); |
| + context.startService(intent); |
| + } |
| + |
| @Override |
| public int onStartCommand(Intent intent, int flags, int startId) { |
| String displayUrl = fetchDisplayUrl(intent); |