mirror of https://github.com/rusefi/rusefi.git
more logging
This commit is contained in:
parent
d79743de90
commit
c062b86dcf
|
@ -69,12 +69,7 @@ public class rusEFI extends Activity {
|
||||||
private final static Logging log = Logging.getLogging(rusEFI.class);
|
private final static Logging log = Logging.getLogging(rusEFI.class);
|
||||||
private static final String ACTION_USB_PERMISSION = "com.android.example.USB_PERMISSION";
|
private static final String ACTION_USB_PERMISSION = "com.android.example.USB_PERMISSION";
|
||||||
|
|
||||||
// private static final byte REQUEST_TYPE_CLASS = 32;
|
private static final String VERSION = "rusEFI app v0.20230316\n";
|
||||||
// private static final byte RECIPIENT_INTERFACE = 0x01;
|
|
||||||
//
|
|
||||||
// protected static final int DFU_DETACH_TIMEOUT = 1000;
|
|
||||||
|
|
||||||
private static final String VERSION = "rusEFI app v0.20220524\n";
|
|
||||||
|
|
||||||
private static final int LOCAL_PORT = 29001;
|
private static final int LOCAL_PORT = 29001;
|
||||||
|
|
||||||
|
@ -150,7 +145,7 @@ public class rusEFI extends Activity {
|
||||||
Linkify.addLinks(authStatusClickableUrl, Linkify.WEB_URLS);
|
Linkify.addLinks(authStatusClickableUrl, Linkify.WEB_URLS);
|
||||||
|
|
||||||
IntentFilter filter = new IntentFilter(ACTION_USB_PERMISSION);
|
IntentFilter filter = new IntentFilter(ACTION_USB_PERMISSION);
|
||||||
registerReceiver(mUsbReceiver, filter);
|
registerReceiver(usbCallback, filter);
|
||||||
|
|
||||||
visibleLogAppend(VERSION);
|
visibleLogAppend(VERSION);
|
||||||
|
|
||||||
|
@ -177,12 +172,13 @@ public class rusEFI extends Activity {
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
unregisterReceiver(mUsbReceiver);
|
unregisterReceiver(usbCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final BroadcastReceiver mUsbReceiver = new BroadcastReceiver() {
|
private final BroadcastReceiver usbCallback = new BroadcastReceiver() {
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
String action = intent.getAction();
|
String action = intent.getAction();
|
||||||
|
visibleLogAppend("usbCallback " + action + "\n");
|
||||||
if (ACTION_USB_PERMISSION.equals(action)) {
|
if (ACTION_USB_PERMISSION.equals(action)) {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
if (intent.getBooleanExtra(UsbManager.EXTRA_PERMISSION_GRANTED, false)) {
|
if (intent.getBooleanExtra(UsbManager.EXTRA_PERMISSION_GRANTED, false)) {
|
||||||
|
@ -259,6 +255,7 @@ public class rusEFI extends Activity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onConnectButton(View view) {
|
public void onConnectButton(View view) {
|
||||||
|
visibleLogAppend("onConnectButton\n");
|
||||||
connectDashboard();
|
connectDashboard();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue