1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.mail.drawer; 18 19 import com.android.mail.R; 20 import com.android.mail.analytics.Analytics; 21 import com.android.mail.providers.Account; 22 import com.android.mail.ui.ControllableActivity; 23 import com.android.mail.ui.FolderListFragment; 24 import com.android.mail.ui.ViewMode; 25 import com.android.mail.utils.FolderUri; 26 27 class HelpItem extends FooterItem { HelpItem(ControllableActivity activity, Account account, FolderListFragment.DrawerStateListener drawerListener)28 HelpItem(ControllableActivity activity, Account account, 29 FolderListFragment.DrawerStateListener drawerListener) { 30 super(activity, account, drawerListener, 31 R.drawable.ic_drawer_help_24dp, R.string.help_and_feedback); 32 } 33 34 @Override onFooterClicked()35 public void onFooterClicked() { 36 Analytics.getInstance().sendMenuItemEvent(Analytics.EVENT_CATEGORY_MENU_ITEM, 37 R.id.help_info_menu_item, getEventLabel(), 0); 38 mActivity.showHelp(mAccount, ViewMode.CONVERSATION_LIST); 39 } 40 41 @Override getType()42 public int getType() { 43 return VIEW_FOOTER_HELP; 44 } 45 46 @Override toString()47 public String toString() { 48 return "[FooterItem VIEW_HELP_ITEM]"; 49 } 50 51 @Override isItemEnabled()52 public boolean isItemEnabled() { 53 return false; 54 } 55 56 @Override isHighlighted(FolderUri currentFolder, int currentType)57 public boolean isHighlighted(FolderUri currentFolder, int currentType) { 58 return false; 59 } 60 } 61