am 274ad982
: Merge "Just disable widgets that come from apps on sd cards, because they don\'t work anyway." into gingerbread
Merge commit '274ad9824a20b61dfbb785621567fd0414a965a4' into gingerbread-plus-aosp * commit '274ad9824a20b61dfbb785621567fd0414a965a4': Just disable widgets that come from apps on sd cards, because they don't work anyway.
This commit is contained in:
@ -26,6 +26,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.ResolveInfo;
|
||||
@ -1160,7 +1161,9 @@ class AppWidgetService extends IAppWidgetService.Stub
|
||||
for (int i=0; i<N; i++) {
|
||||
ResolveInfo ri = broadcastReceivers.get(i);
|
||||
ActivityInfo ai = ri.activityInfo;
|
||||
|
||||
if ((ai.applicationInfo.flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) != 0) {
|
||||
continue;
|
||||
}
|
||||
if (pkgName.equals(ai.packageName)) {
|
||||
addProviderLocked(ri);
|
||||
}
|
||||
@ -1179,6 +1182,9 @@ class AppWidgetService extends IAppWidgetService.Stub
|
||||
for (int i=0; i<N; i++) {
|
||||
ResolveInfo ri = broadcastReceivers.get(i);
|
||||
ActivityInfo ai = ri.activityInfo;
|
||||
if ((ai.applicationInfo.flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) != 0) {
|
||||
continue;
|
||||
}
|
||||
if (pkgName.equals(ai.packageName)) {
|
||||
ComponentName component = new ComponentName(ai.packageName, ai.name);
|
||||
Provider p = lookupProviderLocked(component);
|
||||
|
Reference in New Issue
Block a user