Merge pull request #1676 from nextcloud/200wn

Delete accounts only on first start
This commit is contained in:
Andy Scherzinger 2017-10-19 19:35:14 +02:00 committed by GitHub
commit eb8e0b1565
2 changed files with 6 additions and 4 deletions

View file

@ -1,2 +1,2 @@
DO NOT TOUCH; GENERATED BY DRONE
<span class="mdl-layout-title">Lint Report: 1 error and 515 warnings</span>
<span class="mdl-layout-title">Lint Report: 511 warnings</span>

View file

@ -83,10 +83,12 @@ public class WhatsNewActivity extends FragmentActivity implements ViewPager.OnPa
String[] urls = getResources().getStringArray(R.array.whatsnew_urls);
// Sometimes, accounts are not deleted when you uninstall the application so we'll do it now
if (isFirstRun()) {
AccountManager am = (AccountManager) getSystemService(ACCOUNT_SERVICE);
for (Account account : AccountUtils.getAccounts(this)) {
am.removeAccount(account, null, null);
}
}
boolean showWebView = urls.length > 0;