diff --git a/play-services-core/src/main/AndroidManifest.xml b/play-services-core/src/main/AndroidManifest.xml
index d44418360..6387adea5 100644
--- a/play-services-core/src/main/AndroidManifest.xml
+++ b/play-services-core/src/main/AndroidManifest.xml
@@ -121,6 +121,11 @@
android:permissionGroup="com.google.android.gms.permission.CAR_INFORMATION"
android:protectionLevel="dangerous" />
+
+
+
diff --git a/play-services-core/src/main/java/org/microg/gms/auth/login/LoginActivity.java b/play-services-core/src/main/java/org/microg/gms/auth/login/LoginActivity.java
index 5d31983e1..1af77abff 100644
--- a/play-services-core/src/main/java/org/microg/gms/auth/login/LoginActivity.java
+++ b/play-services-core/src/main/java/org/microg/gms/auth/login/LoginActivity.java
@@ -94,6 +94,7 @@ public class LoginActivity extends AssistantActivity {
private static final String MAGIC_USER_AGENT = " MinuteMaid";
private static final String COOKIE_OAUTH_TOKEN = "oauth_token";
private static final String ACTION_UPDATE_ACCOUNT = "com.google.android.gms.auth.GOOGLE_ACCOUNT_CHANGE";
+ private static final String PERMISSION_UPDATE_ACCOUNT = "com.google.android.gms.auth.permission.GOOGLE_ACCOUNT_CHANGE";
private final FidoHandler fidoHandler = new FidoHandler(this);
private final DroidGuardHandler dgHandler = new DroidGuardHandler(this);
@@ -363,7 +364,7 @@ private void returnSuccessResponse(Account account){
Intent intent = new Intent(ACTION_UPDATE_ACCOUNT);
intent.setPackage(VENDING_PACKAGE_NAME);
intent.putExtra(AccountManager.KEY_ACCOUNT_NAME, account.name);
- sendBroadcast(intent);
+ sendBroadcast(intent, PERMISSION_UPDATE_ACCOUNT);
}
private void retrieveGmsToken(final Account account) {
final AuthManager authManager = new AuthManager(this, account.name, GMS_PACKAGE_NAME, "ac2dm");
diff --git a/vending-app/src/main/AndroidManifest.xml b/vending-app/src/main/AndroidManifest.xml
index c81e72f18..a8b462ccc 100644
--- a/vending-app/src/main/AndroidManifest.xml
+++ b/vending-app/src/main/AndroidManifest.xml
@@ -19,6 +19,7 @@
+
diff --git a/vending-app/src/main/kotlin/com/google/android/finsky/accounts/impl/AccountsChangedReceiver.kt b/vending-app/src/main/kotlin/com/google/android/finsky/accounts/impl/AccountsChangedReceiver.kt
index 4e40509fd..2c9b52e60 100644
--- a/vending-app/src/main/kotlin/com/google/android/finsky/accounts/impl/AccountsChangedReceiver.kt
+++ b/vending-app/src/main/kotlin/com/google/android/finsky/accounts/impl/AccountsChangedReceiver.kt
@@ -35,6 +35,7 @@ class AccountsChangedReceiver : BroadcastReceiver() {
Log.d(TAG, "onReceive: intent-> $intent")
var accountName: String? = null
if (intent?.let { accountName = it.getStringExtra(AccountManager.KEY_ACCOUNT_NAME) } == null) {
+ Log.d(TAG, "onReceive: accountName is empty")
return
}
GlobalScope.launch(Dispatchers.IO) {