Search in sources :

Example 1 with AbstractAppLock

use of org.wordpress.passcodelock.AbstractAppLock in project WordPress-Android by wordpress-mobile.

the class WordPress method onAccountChanged.

@SuppressWarnings("unused")
@Subscribe(threadMode = ThreadMode.MAIN)
public void onAccountChanged(OnAccountChanged event) {
    if (!FluxCUtils.isSignedInWPComOrHasWPOrgSite(mAccountStore, mSiteStore)) {
        flushHttpCache();
        // Analytics resets
        AnalyticsTracker.endSession(false);
        AnalyticsTracker.clearAllData();
        // disable passcode lock
        AbstractAppLock appLock = AppLockManager.getInstance().getAppLock();
        if (appLock != null) {
            appLock.setPassword(null);
        }
    }
}
Also used : AbstractAppLock(org.wordpress.passcodelock.AbstractAppLock) Subscribe(org.greenrobot.eventbus.Subscribe)

Aggregations

Subscribe (org.greenrobot.eventbus.Subscribe)1 AbstractAppLock (org.wordpress.passcodelock.AbstractAppLock)1