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

Commit 6f8f504d authored by Stephen Bird's avatar Stephen Bird
Browse files

Ensure we have permissions before rebuilding database

Change-Id: I8640a1976ac47a9abcef5dd1192de1b63520bcdd
Ticket: CD-680
parent 5287347e
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -594,7 +594,11 @@ public class DialerDatabaseHelper extends SQLiteOpenHelper {
    /**
     * Deletes all smart dial data and recreates it from contacts
     */
    public void recreateSmartDialDatabaseInBackground() { new SmartDialRecreateAsyncTask().execute(); }
    public void recreateSmartDialDatabaseInBackground() {
        if (PermissionsUtil.hasContactsPermissions(mContext)) {
            new SmartDialRecreateAsyncTask().execute();
        }
    }

    private class SmartDialRecreateAsyncTask extends AsyncTask {
        @Override