Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/WebApkServiceFactory.java

Issue 2014303002: Upstream: Pass Bundle to WebApkServiceImpl constructor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/android/webapk/libs/runtime_library/src/org/chromium/webapk/lib/runtime_library/WebApkServiceImpl.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/WebApkServiceFactory.java
diff --git a/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/WebApkServiceFactory.java b/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/WebApkServiceFactory.java
index 6513050c52d7f1be52d5745053118c90ea2a41fe..d977edbab65e3f1f13d11a26ef47fe2b94dd8f4a 100644
--- a/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/WebApkServiceFactory.java
+++ b/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/WebApkServiceFactory.java
@@ -7,6 +7,7 @@ package org.chromium.webapk.shell_apk;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
+import android.os.Bundle;
import android.os.IBinder;
import android.util.Log;
@@ -28,6 +29,8 @@ public class WebApkServiceFactory extends Service {
private static final String WEBAPK_SERVICE_IMPL_CLASS_NAME =
"org.chromium.webapk.lib.runtime_library.WebApkServiceImpl";
+ private static final String KEY_SMALL_ICON_ID = "small_icon_id";
+
/*
* ClassLoader for loading {@link WEBAPK_SERVICE_IMPL_CLASS_NAME}. Static so that all
* {@link WebApkServiceFactory} service instatiations use the same ClassLoader during the app's
@@ -47,9 +50,10 @@ public class WebApkServiceFactory extends Service {
Class<?> webApkServiceImplClass =
webApkClassLoader.loadClass(WEBAPK_SERVICE_IMPL_CLASS_NAME);
Constructor<?> webApkServiceImplConstructor =
- webApkServiceImplClass.getConstructor(Context.class, int.class);
- return (IBinder) webApkServiceImplConstructor.newInstance(
- new Object[] {this, R.drawable.app_icon});
+ webApkServiceImplClass.getConstructor(Context.class, Bundle.class);
+ Bundle bundle = new Bundle();
+ bundle.putInt(KEY_SMALL_ICON_ID, R.drawable.app_icon);
+ return (IBinder) webApkServiceImplConstructor.newInstance(new Object[] {this, bundle});
} catch (Exception e) {
Log.w(TAG, "Unable to create WebApkServiceImpl.");
e.printStackTrace();
« no previous file with comments | « chrome/android/webapk/libs/runtime_library/src/org/chromium/webapk/lib/runtime_library/WebApkServiceImpl.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698