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

Commit 9257ec05 authored by Alon Albert's avatar Alon Albert
Browse files

Move handing of a "cancel" inside try-finally block

Bug: 3417906
Change-Id: I87e41c0cdad74e2ba72a7b4d1f059e72d106e105
parent d4a3d032
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -191,13 +191,12 @@ public abstract class AbstractThreadedSyncAdapter {
        public void run() {
            Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);

            if (isCanceled()) {
                return;
            }

            SyncResult syncResult = new SyncResult();
            ContentProviderClient provider = null;
            try {
                if (isCanceled()) {
                    return;
                }
                provider = mContext.getContentResolver().acquireContentProviderClient(mAuthority);
                if (provider != null) {
                    AbstractThreadedSyncAdapter.this.onPerformSync(mAccount, mExtras,