1811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler/* 2811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler * Copyright (C) 2014 The Android Open Source Project 3811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler * 4811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler * Licensed under the Apache License, Version 2.0 (the "License"); 5811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler * you may not use this file except in compliance with the License. 6811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler * You may obtain a copy of the License at 7811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler * 8811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler * http://www.apache.org/licenses/LICENSE-2.0 9811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler * 10811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler * Unless required by applicable law or agreed to in writing, software 11811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler * distributed under the License is distributed on an "AS IS" BASIS, 12811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler * See the License for the specific language governing permissions and 14811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler * limitations under the License. 15811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler */ 16811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler 17811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantlerpackage com.android.mail.drawer; 18811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler 19811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantlerimport com.android.mail.R; 20811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantlerimport com.android.mail.analytics.Analytics; 21811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantlerimport com.android.mail.providers.Account; 22811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantlerimport com.android.mail.ui.ControllableActivity; 23811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantlerimport com.android.mail.ui.FolderListFragment; 24811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantlerimport com.android.mail.ui.ViewMode; 25811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantlerimport com.android.mail.utils.FolderUri; 26811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler 27811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantlerclass HelpItem extends FooterItem { 28811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler HelpItem(ControllableActivity activity, Account account, 29811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler FolderListFragment.DrawerStateListener drawerListener) { 30811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler super(activity, account, drawerListener, 31811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler R.drawable.ic_drawer_help_24dp, R.string.help_and_feedback); 32811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler } 33811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler 34811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler @Override 35811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler public void onFooterClicked() { 36811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler Analytics.getInstance().sendMenuItemEvent(Analytics.EVENT_CATEGORY_MENU_ITEM, 37811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler R.id.help_info_menu_item, getEventLabel(), 0); 38811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler mActivity.showHelp(mAccount, ViewMode.CONVERSATION_LIST); 39811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler } 40811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler 41811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler @Override 42811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler public int getType() { 43811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler return VIEW_FOOTER_HELP; 44811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler } 45811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler 46811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler @Override 47811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler public String toString() { 48811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler return "[FooterItem VIEW_HELP_ITEM]"; 49811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler } 50811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler 51811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler @Override 52811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler public boolean isItemEnabled() { 53811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler return false; 54811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler } 55811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler 56811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler @Override 57811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler public boolean isHighlighted(FolderUri currentFolder, int currentType) { 58811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler return false; 59811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler } 60811c704ddcf180c4fd4ac0e2800ea8eea34af3e9Tony Mantler} 61