@@ -0,0 +1,1802 @@
+package org.ccci.gto.android.common.accounts;%0A%0Aimport android.accounts.Account;%0Aimport android.accounts.AccountManager;%0Aimport android.annotation.TargetApi;%0Aimport android.os.Build;%0Aimport android.support.annotation.NonNull;%0Aimport android.support.annotation.RequiresPermission;%0A%0Apublic class AccountManagerCompat %7B%0A    private static final Compat COMPAT;%0A    static %7B%0A        if (Build.VERSION.SDK_INT %3E= Build.VERSION_CODES.LOLLIPOP_MR1) %7B%0A            COMPAT = new LollipopMR1Compat();%0A        %7D else %7B%0A            COMPAT = new GingerbreadCompat();%0A        %7D%0A    %7D%0A%0A    @RequiresPermission(allOf = %7B%0A            %22android.permission.AUTHENTICATE_ACCOUNTS%22,%0A            %22android.permission.MANAGE_ACCOUNTS%22%0A    %7D, conditional = true)%0A    public static void removeAccountExplicitly(@NonNull final AccountManager manager, @NonNull final Account account) %7B%0A        COMPAT.removeAccountExplicitly(manager, account);%0A    %7D%0A%0A    interface Compat %7B%0A        void removeAccountExplicitly(@NonNull AccountManager manager, @NonNull Account account);%0A    %7D%0A%0A    static class GingerbreadCompat implements Compat %7B%0A        @Override%0A        @RequiresPermission(value = %22android.permission.MANAGE_ACCOUNTS%22)%0A        public void removeAccountExplicitly(@NonNull final AccountManager manager, @NonNull final Account account) %7B%0A            manager.removeAccount(account, null, null);%0A        %7D%0A    %7D%0A%0A    @TargetApi(Build.VERSION_CODES.LOLLIPOP_MR1)%0A    static class LollipopMR1Compat extends GingerbreadCompat %7B%0A        @Override%0A        @RequiresPermission(value = %22android.permission.AUTHENTICATE_ACCOUNTS%22, conditional = true)%0A        public void removeAccountExplicitly(@NonNull final AccountManager manager, @NonNull final Account account) %7B%0A            manager.removeAccountExplicitly(account);%0A        %7D%0A    %7D%0A%7D%0A

create an AccountManagerCompat library