Refactoring some loadWorkspace logic in a separate class

Bug: 34112546
Change-Id: I8a43ed1646056aa1957ac3d6ea82018691df6386
This commit is contained in:
Sunny Goyal
2017-01-05 21:50:27 -08:00
parent e09bacc1ef
commit aaf86fe9a0
10 changed files with 851 additions and 580 deletions

View File

@@ -23,6 +23,7 @@ import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.os.Build;
import android.text.TextUtils;
@@ -124,4 +125,13 @@ public class PackageManagerHelper {
return false;
}
public static Intent getMarketIntent(String packageName) {
return new Intent(Intent.ACTION_VIEW)
.setData(new Uri.Builder()
.scheme("market")
.authority("details")
.appendQueryParameter("id", packageName)
.build());
}
}