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

Side by Side Diff: chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkUtils.java

Issue 2009423002: Upstream: Version WebAPK runtime library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.webapk.lib.common; 5 package org.chromium.webapk.lib.common;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.content.pm.ApplicationInfo; 8 import android.content.pm.ApplicationInfo;
9 import android.content.pm.PackageManager; 9 import android.content.pm.PackageManager;
10 import android.content.pm.PackageManager.NameNotFoundException; 10 import android.content.pm.PackageManager.NameNotFoundException;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 context.getPackageName(), PackageManager.GET_META_DATA); 51 context.getPackageName(), PackageManager.GET_META_DATA);
52 Bundle bundle = ai.metaData; 52 Bundle bundle = ai.metaData;
53 hostPackage = bundle.getString("runtimeHost"); 53 hostPackage = bundle.getString("runtimeHost");
54 } catch (NameNotFoundException e) { 54 } catch (NameNotFoundException e) {
55 e.printStackTrace(); 55 e.printStackTrace();
56 } 56 }
57 // Set {@link sHostPackage} to a non-null value so that the value is com puted only once. 57 // Set {@link sHostPackage} to a non-null value so that the value is com puted only once.
58 sHostPackage = hostPackage != null ? hostPackage : ""; 58 sHostPackage = hostPackage != null ? hostPackage : "";
59 return sHostPackage; 59 return sHostPackage;
60 } 60 }
61
62 /**
63 * Returns name of "Runtime Dex" asset in Chrome APK based on version.
64 * @param version
65 * @return Dex asset name.
66 */
67 public static String getRuntimeDexName(int version) {
68 return "webapk" + version + ".dex";
69 }
61 } 70 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698