Temporary remove account visibility support pushapiauthenticator.

Refactor push api test apps to have more similar code and use another
manifest entry.

Bug: https://b.corp.google.com/issues/33046496
Test: none

Change-Id: I2c87ccae0e73892eb15fb3e6f98bbb7372e0a24a
This commit is contained in:
Dmitry Dementyev
2016-12-02 14:09:27 -08:00
parent 47fde50bf6
commit d9fc9adf22
9 changed files with 88 additions and 93 deletions

View File

@@ -72,7 +72,7 @@ public class MainActivity extends Activity {
ApplicationInfo ai = getPackageManager().getApplicationInfo(getPackageName(),
PackageManager.GET_META_DATA);
Bundle bundle = ai.metaData;
supportedPackages = bundle.getString("android.accounts.SupportedLoginTypes");
supportedPackages = bundle.getString("android.accounts.SupportedAccountTypes");
} catch (PackageManager.NameNotFoundException e) {
Log.e("PushApiTestAppOne", "Failed to load meta-data, NameNotFound: "
+ e.getMessage());
@@ -109,4 +109,4 @@ public class MainActivity extends Activity {
}
});
}
}
}

View File

@@ -14,18 +14,21 @@
* limitations under the License.
*/
package com.example.android.pushapithirdpartyone;
package com.example.android.pushapithirdpartytwo;
import android.accounts.Account;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.Toast;
public class MessageReceiver extends BroadcastReceiver{
private static final String TAG = "PushApiTestAppOne";
public void onReceive(Context context, Intent intent) {
Account account = (Account) intent.getParcelableExtra("android.accounts.KEY_ACCOUNT");
Toast.makeText(context, "Account " + account.name + " received by Test App 1",
Toast.makeText(context, " android.accounts.VISIBLE_ACCOUNTS_CHANGED Broadcast received",
Toast.LENGTH_LONG).show();
Log.i(TAG, "android.accounts.VISIBLE_ACCOUNTS_CHANGED Broadcast received");
}
}
}