Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a27b97d5 authored by Svetoslav's avatar Svetoslav Committed by Abhisek Devkota
Browse files

DO NOT MERGE Don't take flags when creating app widget config activity.

bug:19618745

Change-Id: Ib0e421454d343e6db55d5538f1d55ac22a3dd722
parent 90c7f467
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -221,10 +221,10 @@ public class AppWidgetHost {
            int appWidgetId, int intentFlags, int requestCode, @Nullable Bundle options) {
        try {
            IntentSender intentSender = sService.createAppWidgetConfigIntentSender(
                    mContext.getOpPackageName(), appWidgetId, intentFlags);
                    mContext.getOpPackageName(), appWidgetId);
            if (intentSender != null) {
                activity.startIntentSenderForResult(intentSender, requestCode, null, 0, 0, 0,
                        options);
                activity.startIntentSenderForResult(intentSender, requestCode, null, 0,
                        intentFlags, intentFlags, options);
            } else {
                throw new ActivityNotFoundException();
            }
+1 −2
Original line number Diff line number Diff line
@@ -41,8 +41,7 @@ interface IAppWidgetService {
    void deleteAllHosts();
    RemoteViews getAppWidgetViews(String callingPackage, int appWidgetId);
    int[] getAppWidgetIdsForHost(String callingPackage, int hostId);
    IntentSender createAppWidgetConfigIntentSender(String callingPackage, int appWidgetId,
            int intentFlags);
    IntentSender createAppWidgetConfigIntentSender(String callingPackage, int appWidgetId);

    //
    // for AppWidgetManager
+1 −3
Original line number Diff line number Diff line
@@ -673,8 +673,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
    }

    @Override
    public IntentSender createAppWidgetConfigIntentSender(String callingPackage, int appWidgetId,
            int intentFlags) {
    public IntentSender createAppWidgetConfigIntentSender(String callingPackage, int appWidgetId) {
        final int userId = UserHandle.getCallingUserId();

        if (DEBUG) {
@@ -704,7 +703,6 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
            Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_CONFIGURE);
            intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
            intent.setComponent(provider.info.configure);
            intent.setFlags(intentFlags);

            // All right, create the sender.
            final long identity = Binder.clearCallingIdentity();