When I use GPS code to get the current location with time. Is the given time taken from the Internet, or the device’s time, or the GPS itself?
Bearing in mind that I used the GNSS library cf your code sample looks like it refers to the deprecated GPS library...
I found that Location.Time is NOT from the device, and thus
presumably is from the GNSS system (but: which one? my phone reports 8 GPS and 7 Glonass satellites).
I tested this by disabling the automatic-time-update options and setting the phone time back a few hours so that it is obviously different to both local time and UTC time.
Bonus confirmation of the change is that when I ran the GNSS test program after changing the phone time, it took longer than usual to find the satellites.
I'll have a bit more of a play, eg compare it to UTC, see if the GNSS times really are precisely on-the-second ie millisecond component of Location.Time is always .000