feat: can set app icon of apk building

This commit is contained in:
hyb1996
2017-12-08 20:08:28 +08:00
parent fbc567355e
commit e8179cae94
17 changed files with 173 additions and 31 deletions

View File

@@ -4,6 +4,7 @@ import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Build;
import com.stardust.BuildConfig;
import com.stardust.pio.UncheckedIOException;
import com.stardust.util.DeveloperUtils;
@@ -25,6 +26,9 @@ public class ApkBuilderPluginHelper {
public static InputStream openTemplateApk(Context context) {
try {
if (BuildConfig.DEBUG) {
return context.getAssets().open(TEMPLATE_APK_PATH);
}
return context.getPackageManager().getResourcesForApplication(PLUGIN_PACKAGE_NAME)
.getAssets().open(TEMPLATE_APK_PATH);
} catch (IOException e) {