Bug 123152 - [Regression] USB dialog pops up every time I do something with usb, please don't
Summary: [Regression] USB dialog pops up every time I do something with usb, please don't
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Android Viewer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All Android
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-03 21:18 UTC by [REDACTED]
Modified: 2021-04-07 09:01 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description [REDACTED] 2019-02-03 21:18:56 UTC
Description:
On the latest nightly, an USB dialog pops up every time. Unless that is an unintended bug, please rethink this feature. It's incredibly annoying since 90% of the time even for USEFUL devices (like an usb stick) I probably don't want to use office but just normally copy whatever files. Even worse, the dialog also pops up with USB *headphones* where it's utterly useless and even more annoying.

Just do a notification instead that can be ignored, and which brings it up when pressed

Steps to Reproduce:
1. Plug in USB audio device

Actual Results:
LibreOffice takes over with some dialog I haven't asked for (I haven't even been in the viewer!)

Expected Results:
No dialog please


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Xisco Faulí 2019-10-21 11:43:03 UTC
Thank you for reporting the bug.
Could you please try to reproduce it with a master build from http://dev-builds.libreoffice.org/daily/master/ ?
You can install it alongside the standard version.
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the master build
Comment 2 [REDACTED] 2019-10-25 18:27:31 UTC
still broken, says "USB connected, please configure device" and forces me into a "Storage provider settings" dialog. Even if this wasn't completely misplaced with this being an usb AUDIO adapter, this would still be misguided (if intentional) for these two reasons:

1. People do other things on Android with storage than just using it for LibreOffice. There would be total chaos if any productivity app with storage settings prompted them when the user plugs storage in at the same time, so why would it be a good idea for libreoffice alone? What makes libreoffice more important to justify this?

2. The dialog is very unclear for new users. What is its purpose? This dialog doesn't even say it's from libreoffice, let alone what it's for since it doesn't explain what a storage provider even is, or how libreoffice would use it

Therefore I suggest if this automatic prompt is meant to be a "feature" to just remove it entirely, in all situations other than the user manually opening this dialog.
Comment 3 QA Administrators 2019-10-27 03:39:02 UTC Comment hidden (obsolete)
Comment 4 Michael Weghorn 2021-04-07 09:01:04 UTC
This should no longer be a problem, since custom USB device handling has been removed in this commit:

commit a23bd42e9b2f6401c710ac95afcc3aa8f360d65c
Author: Michael Weghorn <m.weghorn@posteo.de>
Date:   Tue Apr 6 14:26:06 2021 +0200

    android: Drop custom file abstraction + UI
    
    Android Viewer had its own file abstraction layer.
    
    From the (now deleted) IFile.java:
    
    > An abstraction of the File class, intended to be implemented by different
    > Document Providers.
    >
    > It represents a file or a directory in the context of a certain Document
    > Provider. It wraps the file-related operations and provides access to the
    > final document as a local File, downloading it if necessary.
    
    However, Android already provides such an abstraction by
    what is called "documents provider" there as well, s. [1].
    Android Viewer has previously been adapted to
    support and make use of that.
    Therefore, drop the custom implementation to avoid
    duplication and having to reimplement functionality
    already provided otherwise.
    
    Also, drop the custom UI elements to display and
    select files implemented on top of the custom
    file abstraction. Support for using the system file
    picker (via the corresponding Intents) has been added
    earlier and is now the only available option to open
    files from within the app.
    
    [1] https://developer.android.com/training/data-storage/shared/documents-files
    
    Change-Id: Ide529e836a32fd7e880e5a72d971af9f9c7e74bf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113667
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>

Please add more details in case there is still any issue with a daily build from tomorrow or newer.