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

Commit 8e2a1d25 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "AppOps: fix deadlock issue when showing dialog"

parents 56c6d5d2 d065b95f
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1393,16 +1393,19 @@ public class AppOpsService extends IAppOpsService.Stub {

        @Override
        public void run() {
            PermissionDialog permDialog = null;
            synchronized (AppOpsService.this) {
                Log.e(TAG, "Creating dialog box");
                op.dialogReqQueue.register(request);
                if (op.dialogReqQueue.getDialog() == null) {
                    Dialog d = new PermissionDialog(mContext,
                    permDialog = new PermissionDialog(mContext,
                            AppOpsService.this, code, uid, packageName);
                    op.dialogReqQueue.setDialog((PermissionDialog)d);
                    d.show();
                    op.dialogReqQueue.setDialog(permDialog);
                }
            }
            if (permDialog != null) {
                permDialog.show();
            }
        }
    }