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

Commit f85a248a authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Don't report suspicious periodic sync removal for gone users

Bug: 64536115
Test: Manual: Create secondary user, add a google account, remove the
user -> no wtf shown.
Test: Manual: Add a google account on user 0, remove it ->
no wtf shown.
Test: Manual: Add a google account, remove gmail-ls sync with
"requestsync remove-periodic" -> wtf shown

Change-Id: I136c605612337a681ccb3305d2352769167e159b
parent dd09e994
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -3780,6 +3780,16 @@ public class SyncManager {
        if (!op.isPeriodic){
            return false;
        }
        boolean found = false;
        for (UserInfo user : UserManager.get(mContext).getUsers(/*excludeDying=*/ true)) {
            if (op.target.userId == user.id) {
                found = true;
                break;
            }
        }
        if (!found) {
            return false; // User is being removed, okay.
        }
        switch (op.target.provider) {
            case "gmail-ls":
            case "com.android.contacts.metadata":