|
38 | 38 | import android.view.inputmethod.InputMethodManager; |
39 | 39 | import android.widget.Toast; |
40 | 40 |
|
| 41 | +import androidx.annotation.NonNull; |
| 42 | +import androidx.core.app.ActivityCompat; |
| 43 | +import androidx.core.content.ContextCompat; |
| 44 | +import androidx.core.content.FileProvider; |
| 45 | + |
41 | 46 | import java.io.BufferedOutputStream; |
42 | 47 | import java.io.BufferedReader; |
43 | 48 | import java.io.BufferedWriter; |
|
63 | 68 | import java.net.Socket; |
64 | 69 | import java.net.SocketException; |
65 | 70 | import java.net.URLDecoder; |
66 | | -import java.nio.file.Files; |
67 | | -import java.nio.file.Path; |
68 | 71 | import java.util.Date; |
69 | 72 | import java.util.Enumeration; |
70 | 73 | import java.util.HashMap; |
|
78 | 81 | import java.util.concurrent.Semaphore; |
79 | 82 | import java.util.zip.GZIPInputStream; |
80 | 83 |
|
81 | | -import androidx.annotation.NonNull; |
82 | | -import androidx.core.app.ActivityCompat; |
83 | | -import androidx.core.content.ContextCompat; |
84 | | -import androidx.core.content.FileProvider; |
85 | 84 | import dalvik.system.BaseDexClassLoader; |
86 | 85 |
|
87 | 86 | /** |
@@ -471,7 +470,8 @@ public boolean removeLocationUpdates() { |
471 | 470 | if (_locationAdapter != null) { |
472 | 471 | LocationManager locationService = (LocationManager) getSystemService(Context.LOCATION_SERVICE); |
473 | 472 | if (locationService != null) { |
474 | | - locationService.removeUpdates(_locationAdapter); |
| 473 | + // requires coarse location permission |
| 474 | + //locationService.removeUpdates(_locationAdapter); |
475 | 475 | _locationAdapter = null; |
476 | 476 | result = true; |
477 | 477 | } |
@@ -603,14 +603,7 @@ public void run() { |
603 | 603 | InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); |
604 | 604 | if (imm != null) { |
605 | 605 | if (show) { |
606 | | - String id = Settings.Secure.getString(activity.getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD); |
607 | | - if (id != null && id.toLowerCase().contains("samsung")) { |
608 | | - imm.showInputMethodPicker(); |
609 | | - String message = getResources().getString(R.string.samsung_keyboard); |
610 | | - Toast.makeText(activity, message, Toast.LENGTH_LONG).show(); |
611 | | - } else { |
612 | | - imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); |
613 | | - } |
| 606 | + imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); |
614 | 607 | } else { |
615 | 608 | imm.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); |
616 | 609 | } |
|
0 commit comments