Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ internal class MethodCallHandlerImpl(
build["manufacturer"] = Build.MANUFACTURER
build["model"] = Build.MODEL
build["product"] = Build.PRODUCT
build["time"] = Build.TIME

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) {
build["name"] = Settings.Global.getString(contentResolver, Settings.Global.DEVICE_NAME) ?: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ void main() {
expect(androidInfo.supportedAbis, isNotNull);

expect(androidInfo.tags, isNotNull);
expect(androidInfo.time, isNotNull);
expect(androidInfo.type, isNotNull);
expect(androidInfo.isPhysicalDevice, isNotNull);
expect(androidInfo.systemFeatures, isNotNull);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ class _MyAppState extends State<MyApp> {
'supported64BitAbis': build.supported64BitAbis,
'supportedAbis': build.supportedAbis,
'tags': build.tags,
'time': build.time,
'type': build.type,
'isPhysicalDevice': build.isPhysicalDevice,
'freeDiskSize': build.freeDiskSize,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class AndroidDeviceInfo extends BaseDeviceInfo {
required List<String> supported64BitAbis,
required List<String> supportedAbis,
required this.tags,
required this.time,
required this.type,
required this.isPhysicalDevice,
required this.freeDiskSize,
Expand Down Expand Up @@ -117,6 +118,11 @@ class AndroidDeviceInfo extends BaseDeviceInfo {
/// https://developer.android.com/reference/android/os/Build#TAGS
final String tags;

/// The time at which the build was produced, given in milliseconds since the
/// UNIX epoch.
/// https://developer.android.com/reference/android/os/Build#TIME
final int time;

/// The type of build, like "user" or "eng".
/// https://developer.android.com/reference/android/os/Build#TYPE
final String type;
Expand Down Expand Up @@ -187,6 +193,7 @@ class AndroidDeviceInfo extends BaseDeviceInfo {
supported64BitAbis: _fromList(map['supported64BitAbis'] ?? <String>[]),
supportedAbis: _fromList(map['supportedAbis'] ?? []),
tags: map['tags'],
time: map['time'],
type: map['type'],
isPhysicalDevice: map['isPhysicalDevice'],
freeDiskSize: map['freeDiskSize'],
Expand Down Expand Up @@ -219,6 +226,7 @@ class AndroidDeviceInfo extends BaseDeviceInfo {
required List<String> supported64BitAbis,
required List<String> supportedAbis,
required String tags,
required int time,
required String type,
required bool isPhysicalDevice,
required int freeDiskSize,
Expand Down Expand Up @@ -255,6 +263,7 @@ class AndroidDeviceInfo extends BaseDeviceInfo {
'supported64BitAbis': supported64BitAbis,
'supportedAbis': supportedAbis,
'tags': tags,
'time': time,
'type': type,
'isPhysicalDevice': isPhysicalDevice,
'freeDiskSize': freeDiskSize,
Expand Down Expand Up @@ -285,6 +294,7 @@ class AndroidDeviceInfo extends BaseDeviceInfo {
supported64BitAbis: _fromList(supported64BitAbis),
supportedAbis: _fromList(supportedAbis),
tags: tags,
time: time,
type: type,
isPhysicalDevice: isPhysicalDevice,
freeDiskSize: freeDiskSize,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const _fakeAndroidDeviceInfo = <String, dynamic>{
'id': 'id',
'host': 'host',
'tags': 'tags',
'time': 1788562900,
'type': 'type',
'model': 'model',
'board': 'board',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ void main() {
expect(androidDeviceInfo.id, 'id');
expect(androidDeviceInfo.host, 'host');
expect(androidDeviceInfo.tags, 'tags');
expect(androidDeviceInfo.time, 1788562900);
expect(androidDeviceInfo.type, 'type');
expect(androidDeviceInfo.model, 'model');
expect(androidDeviceInfo.board, 'board');
Expand Down
Loading