| Index: web_apks/minting_example/src/org/chromium/minting/MintingServiceFactory.java
|
| diff --git a/web_apks/minting_example/src/org/chromium/minting/MintingServiceFactory.java b/web_apks/minting_example/src/org/chromium/minting/MintingServiceFactory.java
|
| index 3bd06219f7d6ffa85b0acd2bee8c638999ef2451..e7820da396c9e461f4ebdd3b6efde33a6c8c9d80 100644
|
| --- a/web_apks/minting_example/src/org/chromium/minting/MintingServiceFactory.java
|
| +++ b/web_apks/minting_example/src/org/chromium/minting/MintingServiceFactory.java
|
| @@ -10,6 +10,8 @@ import android.content.Intent;
|
| import android.os.IBinder;
|
| import android.util.Log;
|
|
|
| +import org.chromium.minting.lib.common.WebAPKUtils;
|
| +
|
| import java.io.File;
|
| import java.lang.reflect.Constructor;
|
|
|
| @@ -36,11 +38,7 @@ public class MintingServiceFactory extends Service {
|
| @Override
|
| public IBinder onBind(Intent intent) {
|
| if (sClassLoader == null) {
|
| - String remotePackageName =
|
| - getSharedPreferences(MintingApplication.MINT_PREFS, MODE_PRIVATE)
|
| - .getString(MintingApplication.HOST_PACKAGE_PREF,
|
| - MintingApplication.DEFAULT_CHROME_PACKAGE_NAME);
|
| - Context remoteContext = DexLoader.getRemoteContext(this, remotePackageName);
|
| + Context remoteContext = WebAPKUtils.getHostBrowserContext(this);
|
| if (remoteContext == null) {
|
| Log.w(TAG, "Failed to get remote context.");
|
| return null;
|
| @@ -60,7 +58,7 @@ public class MintingServiceFactory extends Service {
|
| try {
|
| Class<?> mintedServiceImplClass =
|
| sClassLoader.loadClass(MINTED_SERVICE_IMPL_CLASS_NAME);
|
| - Constructor mintedServiceImplConstructor =
|
| + Constructor<?> mintedServiceImplConstructor =
|
| mintedServiceImplClass.getConstructor(Context.class, int.class);
|
| return (IBinder) mintedServiceImplConstructor.newInstance(new Object[] {this,
|
| R.drawable.app_icon});
|
|
|