Fix widget update issue
This fixes an issue where widgets weren't being updated. It was caused by creating widgets with the wrong package id. Keyguard used to be identified with package "android" when it was running in the system proces. Now that it's separate, we need to explicitly pass in the package name for keyguard ("com.android.keyguard") when we allocate app widget ids. Change-Id: I4911be8533ea4d24c64669fe98d03f39a684f55a
This commit is contained in:
@@ -517,8 +517,8 @@ public class KeyguardAppWidgetPickActivity extends Activity
|
||||
// Found in KeyguardHostView.java
|
||||
final int KEYGUARD_HOST_ID = 0x4B455947;
|
||||
int userId = ActivityManager.getCurrentUser();
|
||||
mAppWidgetId = AppWidgetHost.allocateAppWidgetIdForSystem(KEYGUARD_HOST_ID,
|
||||
userId);
|
||||
mAppWidgetId = AppWidgetHost.allocateAppWidgetIdForPackage(KEYGUARD_HOST_ID,
|
||||
userId, "com.android.keyguard");
|
||||
}
|
||||
mAppWidgetManager.bindAppWidgetId(
|
||||
mAppWidgetId, intent.getComponent(), mExtraConfigureOptions);
|
||||
|
Reference in New Issue
Block a user