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 3a147230a4)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user