Skip to content

Commit

Permalink
Ignore lint error in file_actions_menu
Browse files Browse the repository at this point in the history
  • Loading branch information
abelgardep committed Dec 18, 2019
1 parent abdc2bf commit 0cc020f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,37 +180,6 @@ public boolean isSharedSupported() {
return false;
}

/**
* Helper method to remove an existing share, no matter if public or private.
* Starts a request to do it in {@link OperationsService}
*
* @param share The {@link OCShare} to remove (unshare).
*/
public void removeShare(OCShare share) {
Intent unshareService = new Intent(mFileActivity, OperationsService.class);
unshareService.setAction(OperationsService.ACTION_UNSHARE);
unshareService.putExtra(OperationsService.EXTRA_SHARE_ID, share.getId());
unshareService.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());

queueShareIntent(unshareService);
}

private void queueShareIntent(Intent shareIntent) {
if (isSharedSupported()) {
// Unshare the file
mWaitingForOpId = mFileActivity.getOperationsServiceBinder().
queueNewOperation(shareIntent);

mFileActivity.showLoadingDialog(R.string.wait_a_moment);

} else {
// Show a Message
mFileActivity.showSnackMessage(
mFileActivity.getString(R.string.share_link_no_support_share_api)
);
}
}

/**
* Show an instance of {@link com.owncloud.android.domain.sharing.shares.model.ShareType} for sharing or unsharing
* the {@link OCFile} received as parameter.
Expand Down
9 changes: 6 additions & 3 deletions owncloudApp/src/main/res/menu/file_actions_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,22 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android"
<menu xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">

<item
android:id="@+id/file_action_select_all"
android:title="@string/actionbar_select_all"
app:showAsAction="never" />
android:showAsAction="never"
tools:ignore="AppCompatResource" />

<item
android:id="@+id/action_select_inverse"
android:title="@string/actionbar_select_inverse"
android:visible="true"
app:showAsAction="never" />
android:showAsAction="never"
tools:ignore="AppCompatResource" />

<item
android:id="@+id/action_share_file"
Expand Down

0 comments on commit 0cc020f

Please sign in to comment.