I had a problem with my App owner device: before Android 5.1, it worked fine, but now, after upgrading to Android 5.1, installing the device owner app disables the backup service.
Now, being in the device settings, when switching to the "Backup" and "
I could find this source in google git repository ... The code is not very long and clear, they use android.app.backup.IBackupManager to disable the service ... But it is easier to comment on the comment:
Backup Manager service when setting the device owner
Here is what they do:
import android.app.backup.IBackupManager; // Shutting down backup manager service permanently. long ident = Binder.clearCallingIdentity(); try { IBackupManager ibm = IBackupManager.Stub.asInterface( ServiceManager.getService(Context.BACKUP_SERVICE)); ibm.setBackupServiceActive(UserHandle.USER_OWNER, false); } catch (RemoteException e) { throw new IllegalStateException("Failed deactivating backup service.", e); } finally { Binder.restoreCallingIdentity(ident); }
Wow ... this makes a serious mistake for my project! Do not joke: now it is really impossible for the user to have backup copies of data when the device ownerβs application is installed?
So, hope someone here can have information or experience about this? Unfortunately, I am not familiar with this, but perhaps with a reflection that can be corrected after that?
Thanks for reading!
android android-backup-service device-owner
Jba
source share