Search code examples
androidandroid-syncadapterandroid-accountandroid-update-app

Android account sync disabled after application update


I've noticed that when my application gets updated from some version A to version B, sync checkbox next to my account (in Accounts system settings) gets disabled.

A and B are subsequent commits, and the problem does not occur when updating from versions before A to A, nor from B to versions after B. So, the problem has to be caused by some change in commit B, but I can't see any modifications related to accounts and/or sync. I don't change these settings anywhere in my code, so it's probably a side effect of some innocent-looking change.

The problem is that commit B has changed a lot of files, so I cannot check them one by one.

Till now I've checked:

  • target SDK - is the same in both versions (23)
  • application and sync content provider java package change - it has no impact
  • AndroidManifest.xml and build.gradle do not have any suspicious changes
  • different versionCode/versionName have no impact

Any ideas what can cause this behaviour?


Solution

  • It seems that problem was caused by change of sync content provider authority.

    The tricky part was that the problem will not occur if new version of the app has the same version code.