Skip to content

Modernisation#11

Open
utopalex wants to merge 13 commits into
johncarpenter:masterfrom
utopalex:master
Open

Modernisation#11
utopalex wants to merge 13 commits into
johncarpenter:masterfrom
utopalex:master

Conversation

@utopalex
Copy link
Copy Markdown

Adds support for starting mocking by intent, fixes issues with parsing certain files, support for altitude, heading and speed.

Comment thread android/build.gradle Outdated
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.1'
classpath 'com.android.tools.build:gradle:4.1.0'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to put the gradle update in a separate commit.

MainActivity.this,
permission)
== PackageManager.PERMISSION_DENIED) {
ActivityCompat
Copy link
Copy Markdown

@janevert janevert Jun 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This really is quite ugly formatting of code. There is no reason for it.
Is your editor perhaps inserting tab instead of space?

}
}
case MY_PERMISSIONS_REQUEST_STORAGE: {
Log.d("Main", "Location permitted");
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Storage permitted instead of location permitted.

Settings.Secure.ALLOW_MOCK_LOCATION).equals("0")
}
} catch (e: Exception) {
Log.d(TAG, "Mock location is not enabled.")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to make this a Log.w. It is a quite important log!
I do expect that this is only logged once when the app starts?

} catch (e: ParseException) {
val gpsDate = LESS_LONG_DATE_FORMAT.parse(item.time)
gpsPointTime = gpsDate.time
for (i in 0..1) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose in kotlin there is also something like DATE_FORMATTERS.length ?

try {
val gpsDate = DATE_FORMATTERS[i].parse(item.time)
gpsPointTime = gpsDate.time
parsed = true
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps add a break statement after this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants