Skip to content

Commit 7664264

Browse files
rpdomeCopilot
andcommitted
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent a6d2373 commit 7664264

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

testapps/testapp/src/main/java/com/microsoft/identity/client/testapp/SilentAuthReceiver.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ public void onReceive(final Context context, final Intent intent) {
6969

7070
Log.w(TAG, "Scopes: " + scopeString);
7171

72-
// Use goAsync() to extend the receiver's lifecycle beyond the 10s limit
72+
// Use goAsync() so work can continue after onReceive() returns.
73+
// The broadcast still has a finite system time budget, so
74+
// PendingResult.finish() must be called promptly.
7375
final PendingResult pendingResult = goAsync();
7476

7577
// Create PCA with default config (uses broker)
@@ -143,6 +145,10 @@ public void onError(MsalException exception) {
143145
pendingResult.finish();
144146
}
145147
});
148+
} else {
149+
Log.e(TAG, "Unexpected app type: " + app.getClass().getName()
150+
+ " — neither single nor multiple account mode.");
151+
pendingResult.finish();
146152
}
147153
}
148154

0 commit comments

Comments
 (0)