MCPcopy Create free account
hub / github.com/Odoo-mobile/framework / setAutoSync

Method setAutoSync

src/com/odoo/MainActivity.java:546–556  ·  view source on GitHub ↗

Sets the auto sync. @param authority the authority @param isON the is on

(String authority, boolean isON)

Source from the content-addressed store, hash-verified

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.

Callers 2

setSyncPeriodicMethod · 0.95
onOptionsItemSelectedMethod · 0.80

Calls 3

getAccountMethod · 0.95
currentMethod · 0.95
getAndroidNameMethod · 0.80

Tested by

no test coverage detected