Skip to content
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

Add ru lang to android app, fix disconnect in android app #169

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

mksmbrtsh
Copy link

  • fix bug with system vpn dialog (click to disconnect, not full stop android app)
  • fix not full stop android app if android device unplug USB
  • remove disconnect notify in android app
  • add translate to ru to android app

 * fix bug with system vpn dialog (click to disconnect, not full stop android app)
 * fix not full stop android app if android device unplug USB
 - remove disconnect notify in android app
 + add translate to ru to android app
Copy link
Collaborator

@rom1v rom1v left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution.

Could you provide 1 commit per change (even 1 PR per change if possible, so they can be merged independently), please?

Log.w(TAG, "Cannot close VPN file descriptor", e);
}
stopSelf();
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wouldn't it be possible to just call close()?

Copy link
Author

Choose a reason for hiding this comment

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

stopSelf() - method from android api, iron destroy service.
I put close() method, service not stop immedly.

@@ -1,6 +1,5 @@
<resources>
<string name="app_name" translatable="false">Gnirehtet</string>
<string name="relay_connected">Reverse tethering enabled</string>
<string name="relay_disconnected">Disconnected from the relay server</string>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would like the close-on-disconnect behavior in addition to the current behavior (via a command-line option). See #51

Copy link
Author

Choose a reason for hiding this comment

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

Oh, dude dont find this thread. Think, when device disconnected from relay server, out service and notif only angry users (my users). Notif can not close.

Sorry my english, bro, i from russian,

Copy link
Collaborator

Choose a reason for hiding this comment

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

A -k option to keep the current behavior would be perfect :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I can work on this option when I have some time, if you prefer.

@@ -63,6 +63,13 @@ public void onReceive(Context context, Intent intent) {
startGnirehtet(context, config);
} else if (ACTION_GNIREHTET_STOP.equals(action)) {
stopGnirehtet(context);
} else if ("android.hardware.usb.action.USB_STATE".equals(action)){
Copy link
Collaborator

Choose a reason for hiding this comment

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

IMO, it should rely on whether the socket is connected or not, whatever the USB state is (the socket can be disconnected while the USB cable is still connected).

Copy link
Author

Choose a reason for hiding this comment

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

Oh, i not replace intent "ACTION_GNIREHTET_STOP"("socket can be disconnected while the USB cable is still connected"), i add intent USB_STATE with disconnected (if cabel unplug, then socket dont work too).

Copy link
Collaborator

Choose a reason for hiding this comment

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

It should not rely on USB state, but on the socket connection state.

@mksmbrtsh
Copy link
Author

You right, but add ru lang only 3 strings, i think this very small change.

@rom1v
Copy link
Collaborator

rom1v commented Feb 17, 2019

You right, but add ru lang only 3 strings, i think this very small change.

Each independent change should be in separate commit, so that they can be merged, rebased, reverted, bisected… independently. 😉

@ars2005tron
Copy link

Hello, enjoyed your program version of the 2.1 ! the program has changed in Android Studio! added activiti with input fields IP and DNS, the Program worked badly, constantly stops. My change works well! IP which I enter the interface on Android as a result of check of WebRTC show the IP necessary to me. Please add a menu to gnirehtet.APK-enter the IP address of the interface to connect and preferably enter DNS! Thanks.

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