fix uri format error that was causing install to fail

This commit is contained in:
Eric House 2012-11-27 18:48:05 -08:00
parent 7c5a59beb3
commit 3cc92e99ca

View file

@ -425,7 +425,8 @@ public class Utils {
public static Intent makeInstallIntent( File file ) public static Intent makeInstallIntent( File file )
{ {
Uri uri = Uri.parse( "file:/" + file.getPath() ); String withScheme = "file://" + file.getPath();
Uri uri = Uri.parse( withScheme );
Intent intent = new Intent( Intent.ACTION_VIEW ); Intent intent = new Intent( Intent.ACTION_VIEW );
intent.setDataAndType( uri, XWConstants.APK_TYPE ); intent.setDataAndType( uri, XWConstants.APK_TYPE );
intent.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK ); intent.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );