()
| 190 | func SetDeviceModel(model string) { deviceModelAtomic.Store(model) } |
| 191 | |
| 192 | func deviceModelCached() string { |
| 193 | if v, _ := deviceModelAtomic.Load().(string); v != "" { |
| 194 | return v |
| 195 | } |
| 196 | if deviceModel == nil { |
| 197 | return "" |
| 198 | } |
| 199 | v := deviceModel() |
| 200 | if v != "" { |
| 201 | deviceModelAtomic.Store(v) |
| 202 | } |
| 203 | return v |
| 204 | } |
| 205 | |
| 206 | // SetOSVersion sets the OS version. |
| 207 | func SetOSVersion(v string) { osVersionAtomic.Store(v) } |