Unifying various model update callbacks into one
Making the BubbleTextView.applyItem stateless so that it does not depend on the order of events
Bug: 390572144
Flag: EXEMPT refactor
Test: atest LauncherBindableItemsContainerTest
atest BubbleTextViewTest
Change-Id: Ib9c0ac6c330d6f4e08c3db5772d35787fa056b65
This commit is contained in:
1 parent
1809cb6ff3
commit
36c3112abf
19 files changed
+442
-370
No files matched your search
@@ -28,6 +28,7 @@ import android.content.pm.LauncherActivityInfo;
|
||||
import android.content.pm.ShortcutInfo;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Process;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
import android.util.ArrayMap;
|
||||
@@ -120,6 +121,21 @@ public class ApiWrapper {
|
||||
* Activity).
|
||||
*/
|
||||
public Intent getAppMarketActivityIntent(String packageName, UserHandle user) {
|
||||
return createMarketIntent(packageName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an intent which can be used to start a search for a package on app market
|
||||
*/
|
||||
public Intent getMarketSearchIntent(String packageName, UserHandle user) {
|
||||
// If we are search for the current user, just launch the market directly as the
|
||||
// system won't have the installer details either
|
||||
return (Process.myUserHandle().equals(user))
|
||||
? createMarketIntent(packageName)
|
||||
: getAppMarketActivityIntent(packageName, user);
|
||||
}
|
||||
|
||||
private static Intent createMarketIntent(String packageName) {
|
||||
return new Intent(Intent.ACTION_VIEW)
|
||||
.setData(new Uri.Builder()
|
||||
.scheme("market")
|
||||
|
||||
Reference in new issue
Block a user