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:
@@ -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 {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user