Apply suggestions from code review

Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
This commit is contained in:
Tony Torralba
2021-11-04 10:08:53 +01:00
committed by GitHub
parent a5749a5eb1
commit fd92c4e435
2 changed files with 4 additions and 3 deletions

View File

@@ -13,6 +13,6 @@ if (destinationComponent.getPackageName().equals("safe.package") &&
// GOOD: The component that sent the Intent is checked before launching the destination component
Intent forwardIntent = (Intent) getIntent().getParcelableExtra("forward_intent");
ComponentName originComponent = getCallingActivity();
if (originComponent.getPackageName().equals("trusted.package") && originComponent.getClassName("TrustedClass")) {
if (originComponent.getPackageName().equals("trusted.package") && originComponent.getClassName().equals("TrustedClass")) {
startActivity(forwardIntent);
}