Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Replaced the instanceOf check and cast with instanceof Id id
Browse files Browse the repository at this point in the history
  • Loading branch information
HarshvardhanR authored Oct 15, 2023
1 parent 8f3ea87 commit b56ac6d
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,13 @@ protected void onCreate(Bundle bundle) {
super.onCreate(bundle);

Object bundleMarkerId = getIntent().getExtras().get(EXTRA_MARKER_ID);
Marker.Id markerId = (bundleMarkerId instanceof Marker.Id markerId) ? (Marker.Id) bundleMarkerId : null;
Id markerId = null;
if(bundleMarkerId instanceof Id){
markerId = (Id) bundleMarkerId
}
if (bundleMarkerId instanceof Long) {
//Incoming Intent via Dashboard API.
markerId = new Marker.Id((Long) bundleMarkerId);
markerId = new Id((Long) bundleMarkerId);
}
if (markerId == null) {
Log.d(TAG, "invalid marker id");
Expand Down

0 comments on commit b56ac6d

Please sign in to comment.