File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 2222import android .content .Context ;
2323import android .content .Intent ;
2424import android .content .IntentSender ;
25+ import android .content .pm .ApplicationInfo ;
26+ import android .content .pm .PackageManager ;
2527import android .content .pm .PackageManager .NameNotFoundException ;
2628import android .content .res .Configuration ;
2729import android .graphics .Bitmap ;
2830import android .graphics .PorterDuff ;
2931import android .graphics .Rect ;
3032import android .graphics .drawable .Drawable ;
3133import android .net .Uri ;
34+ import android .os .Build ;
3235import android .os .Bundle ;
3336import android .os .Parcel ;
3437import android .os .Parcelable ;
@@ -490,7 +493,14 @@ public void apply(View root, ViewGroup rootParent) {
490493 if (mIsWidgetCollectionChild ) {
491494 Log .e ("RemoteViews" , "Cannot setOnClickPendingIntent for collection item " +
492495 "(id: " + viewId + ")" );
493- // TODO: return; We'll let this slide until apps are up to date.
496+ ApplicationInfo appInfo = root .getContext ().getApplicationInfo ();
497+
498+ // We let this slide for HC and ICS so as to not break compatibility. It should have
499+ // been disabled from the outset, but was left open by accident.
500+ if (appInfo != null &&
501+ appInfo .targetSdkVersion >= Build .VERSION_CODES .JELLY_BEAN ) {
502+ return ;
503+ }
494504 }
495505
496506 if (target != null ) {
You can’t perform that action at this time.
0 commit comments