Home | History | Annotate | Download | only in analytics
      1 /*******************************************************************************
      2  *      Copyright (C) 2013 Google Inc.
      3  *      Licensed to The Android Open Source Project.
      4  *
      5  *      Licensed under the Apache License, Version 2.0 (the "License");
      6  *      you may not use this file except in compliance with the License.
      7  *      You may obtain a copy of the License at
      8  *
      9  *           http://www.apache.org/licenses/LICENSE-2.0
     10  *
     11  *      Unless required by applicable law or agreed to in writing, software
     12  *      distributed under the License is distributed on an "AS IS" BASIS,
     13  *      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  *      See the License for the specific language governing permissions and
     15  *      limitations under the License.
     16  *******************************************************************************/
     17 
     18 package com.android.mail.analytics;
     19 
     20 import com.android.mail.R;
     21 
     22 public class AnalyticsUtils {
     23     // individual apps should chain this method call with their own lookup tables if they have
     24     // app-specific menu items
     25     public static String getMenuItemString(int id) {
     26         final String s;
     27         if (id == R.id.archive) {
     28             s = "archive";
     29         } else if (id == R.id.remove_folder) {
     30             s = "remove_folder";
     31         } else if (id == R.id.delete) {
     32             s = "delete";
     33         } else if (id == R.id.discard_drafts) {
     34             s = "discard_drafts";
     35         } else if (id == R.id.discard_outbox) {
     36             s = "discard_outbox";
     37         } else if (id == R.id.mark_important) {
     38             s = "mark important";
     39         } else if (id == R.id.mark_not_important) {
     40             s = "mark not important";
     41         } else if (id == R.id.mute) {
     42             s = "mute";
     43         } else if (id == R.id.report_phishing) {
     44             s = "report_phishing";
     45         } else if (id == R.id.report_spam) {
     46             s = "report_spam";
     47         } else if (id == R.id.mark_not_spam) {
     48             s = "mark_not_spam";
     49         } else if (id == R.id.compose) {
     50             s = "compose";
     51         } else if (id == R.id.refresh) {
     52             s = "refresh";
     53         } else if (id == R.id.toggle_drawer) {
     54             s = "toggle_drawer";
     55         } else if (id == R.id.settings) {
     56             s = "settings";
     57         } else if (id == R.id.help_info_menu_item) {
     58             s = "help";
     59         } else if (id == R.id.feedback_menu_item) {
     60             s = "feedback";
     61         } else if (id == R.id.move_to) {
     62             s = "move_to";
     63         } else if (id == R.id.change_folders) {
     64             s = "change_folders";
     65         } else if (id == R.id.move_to_inbox) {
     66             s = "move_to_inbox";
     67         } else if (id == R.id.empty_trash) {
     68             s = "empty_trash";
     69         } else if (id == R.id.empty_spam) {
     70             s = "empty_spam";
     71         } else if (id == android.R.id.home) {
     72             s = "home";
     73         } else if (id == R.id.inside_conversation_unread) {
     74             s = "inside_conversation_unread";
     75         } else if (id == R.id.read) {
     76             s = "mark_read";
     77         } else if (id == R.id.unread) {
     78             s = "mark_unread";
     79         } else if (id == R.id.toggle_read_unread) {
     80             s = "toggle_read_unread";
     81         } else if (id == R.id.show_original) {
     82             s = "show_original";
     83         } else if (id == R.id.add_file_attachment) {
     84             s = "add_file_attachment";
     85         } else if (id == R.id.add_photo_attachment) {
     86             s = "add_photo_attachment";
     87         } else if (id == R.id.add_cc_bcc) {
     88             s = "add_cc_bcc";
     89         } else if (id == R.id.save) {
     90             s = "save_draft";
     91         } else if (id == R.id.send) {
     92             s = "send_message";
     93         } else if (id == R.id.discard) {
     94             s = "compose_discard_draft";
     95         } else if (id == R.id.search) {
     96             s = "search";
     97         } else if (id == R.id.print_all) {
     98             s = "print_all";
     99         } else if (id == R.id.print_message) {
    100             s = "print_message";
    101         } else if (id == R.id.star) {
    102             s = "star";
    103         } else if (id == R.id.remove_star) {
    104             s = "unstar";
    105         } else if (id == R.id.reply) {
    106             s = "reply";
    107         } else if (id == R.id.reply_all) {
    108             s = "reply_all";
    109         } else if (id == R.id.forward) {
    110             s = "forward";
    111         } else if (id == R.id.edit_draft) {
    112             s = "edit_draft";
    113         } else if (id == R.id.send_date) {
    114             s = "expand_message_details";
    115         } else if (id == R.id.details_expanded_content || id == R.id.hide_details) {
    116             s = "collapse_message_details";
    117         } else if (id == R.id.upper_header) {
    118             s = "message_upper_header";
    119         } else if (id == R.id.download_again || id == R.id.menu_download_again) {
    120             s = "download_again";
    121         } else if (id == R.id.menu_save) {
    122             s = "photo_save";
    123         } else if (id == R.id.menu_save_all) {
    124             s = "photo_save_all";
    125         } else if (id == R.id.menu_share) {
    126             s = "photo_share";
    127         } else if (id == R.id.menu_share_all) {
    128             s = "photo_share_all";
    129         } else if (id == R.id.show_pictures_text) {
    130             s = "show_pictures";
    131         } else {
    132             s = null;
    133         }
    134         return s;
    135     }
    136 }
    137