[Libreoffice-commits] online.git: android/app
Jan Holesovsky (via logerrit)
logerrit at kemper.freedesktop.org
Sat Feb 29 10:03:32 UTC 2020
android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java | 20 ----------
1 file changed, 20 deletions(-)
New commits:
commit a5410a126f283f28b583ef7916e8d55cc077101b
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Feb 28 15:45:34 2020 +0100
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Sat Feb 29 11:03:14 2020 +0100
android: No need for a USB device attached/detached receiver any more.
This was needed before we switched to using the Content provider
framework.
Change-Id: I3906069ad3dc04a957f768b9ed02463aeaa4470f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89732
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java b/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
index 4651a85bb..10652f005 100644
--- a/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
+++ b/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
@@ -164,12 +164,6 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
SettingsListenerModel.getInstance().setListener(this);
- // Registering the USB detect broadcast receiver
- IntentFilter filter = new IntentFilter();
- filter.addAction(UsbManager.ACTION_USB_DEVICE_ATTACHED);
- filter.addAction(UsbManager.ACTION_USB_DEVICE_DETACHED);
- registerReceiver(mUSBReceiver, filter);
-
// Register the LOActivity events broadcast receiver
LocalBroadcastManager.getInstance(this).registerReceiver(mLOActivityReceiver,
new IntentFilter(LOActivity.LO_ACTIVITY_BROADCAST));
@@ -820,19 +814,6 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
//Log.d(LOGTAG, currentDirectory.toString() + Integer.toString(filterMode));
}
- private final BroadcastReceiver mUSBReceiver = new BroadcastReceiver() {
- public void onReceive(Context context, Intent intent) {
- String action = intent.getAction();
- if (UsbManager.ACTION_USB_DEVICE_ATTACHED.equals(action)) {
- Toast.makeText(context, R.string.usb_connected_configure, Toast.LENGTH_SHORT).show();
- //startActivity(new Intent(context, DocumentProviderSettingsActivity.class));
- Log.d(LOGTAG, "USB device attached");
- } else if (UsbManager.ACTION_USB_DEVICE_DETACHED.equals(action)) {
- Log.d(LOGTAG, "USB device detached");
- }
- }
- };
-
/** Receiver for receiving messages from LOActivity - like that Save was performed and similar. */
private final BroadcastReceiver mLOActivityReceiver = new BroadcastReceiver() {
@Override
@@ -925,7 +906,6 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
@Override
protected void onDestroy() {
super.onDestroy();
- unregisterReceiver(mUSBReceiver);
LocalBroadcastManager.getInstance(this).unregisterReceiver(mLOActivityReceiver);
Log.d(LOGTAG, "onDestroy");
}
More information about the Libreoffice-commits
mailing list