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

Commit e33c3c81 authored by Shreyas Basarge's avatar Shreyas Basarge
Browse files

Fix requiresCharging false value ignored issue

If a SyncRequest builder is used to create a sync
request and setRequiresCharging(bool) is used,
the sync request requires charging irrespective of
the boolean value provided. This cl fixes the issue.

Bug: 35027396

Test: Tested manually by looking for the charging bit in jobscheduler
dumpsys.

Change-Id: I8f642597a64b8964665f41f5ce9ca71529634069
(cherry picked from commit 3a147230)
parent a09e108f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -351,7 +351,7 @@ public class SyncRequest implements Parcelable {
         * @param requiresCharging true if sync requires the phone to be plugged in. Default false.
         */
        public Builder setRequiresCharging(boolean requiresCharging) {
            mRequiresCharging = true;
            mRequiresCharging = requiresCharging;
            return this;
        }