Reputation: 179
are these 2 lines equivalent? They behave differently in my application.
locationManager = (LocationManager) context.getSystemService(LOCATION_SERVICE);
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
Thanks
Upvotes: 2
Views: 4243
Reputation: 73753
yes they are the same, the first would be from anything other than an Activity
or a Service
while the other would be from one of those 2.
Upvotes: 2