-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
P2p merge #59
Conversation
- Disconnect from wifi-direct when closing the activity - Disconnect from wifi-direct before starting searching if the devices is already in a wifi-direct group
Fix display of cancel connection dialog
- Allow for 3 retries of client-server socket connections after 5 seconds
- Allow restarting the activity after an unrecoverable exception
…trategy-failures' into p2p-merge
…trategy-failures' into p2p-merge
…trategy-failures' into p2p-merge
@Rkareko Kindly test the socket closing and disconnection after an exception. I tend to get a p2p BUSY error or an |
show device image background in initials stages of sending / receiving data
@@ -372,14 +378,15 @@ class WifiDirectDataSharingStrategyTest : RobolectricTest() { | |||
|
|||
actionListenerSlot.captured.onSuccess() | |||
|
|||
Assert.assertTrue(ReflectionHelpers.getField(wifiDirectDataSharingStrategy, "paired")) | |||
// TODO verify what happens on successPairingListener | |||
/* Assert.assertTrue(ReflectionHelpers.getField(wifiDirectDataSharingStrategy, "paired")) | |||
val actualCurrentDevice = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this for later and can we @ignore this with an issue to fix this later on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documented on this issue
@@ -52,9 +60,15 @@ constructor( | |||
var lastUpdatedAt = | |||
P2PLibrary.getInstance().getReceiverTransferDao().receiveJson(currentManifest.dataType, data) | |||
|
|||
totalSentRecordCount += data!!.length() | |||
totalReceivedRecordCount += data!!.length() | |||
Timber.e( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change these 2 lines to debug or verbose
override fun onStop() { | ||
super.onStop() | ||
|
||
dataSharingStrategy.onStop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's probably move this before super.onStop()
@@ -128,6 +135,7 @@ class P2PReceiverViewModel( | |||
// Listen for incoming manifest | |||
val receivedManifest = | |||
dataSharingStrategy.receiveManifest( | |||
// TODO: Fix this is null for some weird issue causing an NPE | |||
device = dataSharingStrategy.getCurrentDevice()!!, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can remove this
} | ||
} | ||
) | ||
} | ||
|
||
fun processIncomingManifest() { | ||
Timber.e("processIncomingManifest() started") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's remove this or change to info
} | ||
|
||
@Ignore("Fix mocks not working in lazy function") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can create an issue for this and any other technical debt. It can be a candidate for CHT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documented on #67
} | ||
|
||
@Ignore("Fix mocks not working in lazy function") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can create an issue for this and any other technical debt. It can be a candidate for CHT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documented on #67
fun `closeP2PScreen() calls view#finish()`() { | ||
fun `closeP2PScreen() calls view#finish() when dataSharingStrategy#getCurrentDevice() is null`() { | ||
every { dataSharingStrategy.getCurrentDevice() } returns null | ||
p2PViewModel.closeP2PScreen() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not seem to be complete. I don't seem to see any verification after the call to closeP2PScreen()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
} | ||
|
||
@Test | ||
fun `closeP2PScreen() calls view#finish() dataSharingStrategy#disconnect() is successful`() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test name is ambiguous or missing a conjunction
between view#finish()
and dataSharingStrategy#disconnect()
} | ||
|
||
@Test | ||
fun `closeP2PScreen() calls view#finish() dataSharingStrategy#disconnect() fails`() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test name is ambiguous or missing a conjunction
between view#finish()
and dataSharingStrategy#disconnect()
code cleanup
|
IMPORTANT: Where possible all PRs must be linked to a Github issue
Fixes #30
Type
Choose one: (Bug fix | Feature | Documentation | Testing | Code health | Release | Other)
Checklist
strings.xml
file./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the project's style guide