Sets the auto sync. @param authority the authority @param isON the is on
(String authority, boolean isON)
| 544 | * the is on |
| 545 | */ |
| 546 | public void setAutoSync(String authority, boolean isON) { |
| 547 | try { |
| 548 | Account account = OdooAccountManager.getAccount(this, OEUser |
| 549 | .current(mContext).getAndroidName()); |
| 550 | if (!ContentResolver.isSyncActive(account, authority)) { |
| 551 | ContentResolver.setSyncAutomatically(account, authority, isON); |
| 552 | } |
| 553 | } catch (NullPointerException eNull) { |
| 554 | |
| 555 | } |
| 556 | } |
| 557 | |
| 558 | /** |
| 559 | * Request sync. |
no test coverage detected