179525d024526e0f26b9dff40162b91f7c53f17a6yaolu/* 279525d024526e0f26b9dff40162b91f7c53f17a6yaolu * Copyright (C) 2016 The Android Open Source Project 379525d024526e0f26b9dff40162b91f7c53f17a6yaolu * 479525d024526e0f26b9dff40162b91f7c53f17a6yaolu * Licensed under the Apache License, Version 2.0 (the "License"); 579525d024526e0f26b9dff40162b91f7c53f17a6yaolu * you may not use this file except in compliance with the License. 679525d024526e0f26b9dff40162b91f7c53f17a6yaolu * You may obtain a copy of the License at 779525d024526e0f26b9dff40162b91f7c53f17a6yaolu * 879525d024526e0f26b9dff40162b91f7c53f17a6yaolu * http://www.apache.org/licenses/LICENSE-2.0 979525d024526e0f26b9dff40162b91f7c53f17a6yaolu * 1079525d024526e0f26b9dff40162b91f7c53f17a6yaolu * Unless required by applicable law or agreed to in writing, software 1179525d024526e0f26b9dff40162b91f7c53f17a6yaolu * distributed under the License is distributed on an "AS IS" BASIS, 1279525d024526e0f26b9dff40162b91f7c53f17a6yaolu * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1379525d024526e0f26b9dff40162b91f7c53f17a6yaolu * See the License for the specific language governing permissions and 1479525d024526e0f26b9dff40162b91f7c53f17a6yaolu * limitations under the License. 1579525d024526e0f26b9dff40162b91f7c53f17a6yaolu */ 1669c182afb0e6d82a341a28b4317aa703af768906Gary Maipackage com.android.contacts.logging; 1779525d024526e0f26b9dff40162b91f7c53f17a6yaolu 181a9b44e3fde8e30a3a0f9429bf2f727a89691947Walter Jangimport com.google.common.base.MoreObjects; 1979525d024526e0f26b9dff40162b91f7c53f17a6yaolu 2079525d024526e0f26b9dff40162b91f7c53f17a6yaolu/** 2179525d024526e0f26b9dff40162b91f7c53f17a6yaolu * Describes how user views and takes action in Quick contact 2279525d024526e0f26b9dff40162b91f7c53f17a6yaolu */ 2379525d024526e0f26b9dff40162b91f7c53f17a6yaolupublic final class QuickContactEvent { 2479525d024526e0f26b9dff40162b91f7c53f17a6yaolu 2579525d024526e0f26b9dff40162b91f7c53f17a6yaolu /** The package name that QuickContact is launched from. **/ 2679525d024526e0f26b9dff40162b91f7c53f17a6yaolu public String referrer; 2779525d024526e0f26b9dff40162b91f7c53f17a6yaolu 2879525d024526e0f26b9dff40162b91f7c53f17a6yaolu /** The type of the contact displayed in QuickContact. **/ 2979525d024526e0f26b9dff40162b91f7c53f17a6yaolu public int contactType; 3079525d024526e0f26b9dff40162b91f7c53f17a6yaolu 3179525d024526e0f26b9dff40162b91f7c53f17a6yaolu /** The type of the card displayed in QuickContact. **/ 3279525d024526e0f26b9dff40162b91f7c53f17a6yaolu public int cardType; 3379525d024526e0f26b9dff40162b91f7c53f17a6yaolu 3479525d024526e0f26b9dff40162b91f7c53f17a6yaolu /** The type of the user action in QuickContact. **/ 3579525d024526e0f26b9dff40162b91f7c53f17a6yaolu public int actionType; 3679525d024526e0f26b9dff40162b91f7c53f17a6yaolu 3779525d024526e0f26b9dff40162b91f7c53f17a6yaolu /** The third party action that a user takes. **/ 3879525d024526e0f26b9dff40162b91f7c53f17a6yaolu public String thirdPartyAction; 3979525d024526e0f26b9dff40162b91f7c53f17a6yaolu 4079525d024526e0f26b9dff40162b91f7c53f17a6yaolu // Should match ContactsExtension.QuickContactEvent values in 4179525d024526e0f26b9dff40162b91f7c53f17a6yaolu // http://cs/google3/logs/proto/wireless/android/contacts/contacts_extensions.proto 4279525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final class ContactType { 4379525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int UNKNOWN_TYPE = 0; 4479525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int EDITABLE = 1; 4579525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int INVISIBLE_AND_ADDABLE = 2; 4679525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int DIRECTORY = 3; 4779525d024526e0f26b9dff40162b91f7c53f17a6yaolu } 4879525d024526e0f26b9dff40162b91f7c53f17a6yaolu 4979525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final class CardType { 5079525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int UNKNOWN_CARD = 0; 5179525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int NO_CONTACT = 1; 5279525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int CONTACT = 2; 5379525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int RECENT = 3; 5479525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int ABOUT = 4; 5579525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int PERMISSION = 5; 5679525d024526e0f26b9dff40162b91f7c53f17a6yaolu } 5779525d024526e0f26b9dff40162b91f7c53f17a6yaolu 5879525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final class ActionType { 5979525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int UNKNOWN_ACTION = 0; 6079525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int START = 1; 6179525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int STAR = 2; 6279525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int UNSTAR = 3; 6379525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int EDIT = 4; 6479525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int ADD = 5; 657a09c70af86b9f3bae52c102ebfb6a32b99e7409yaolu public static final int REMOVE = 6; 6679525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int SHARE = 7; 6779525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int SHORTCUT = 8; 6879525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int HELP = 9; 6979525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int CALL = 10; 7079525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int SMS = 11; 7179525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int VIDEOCALL = 12; 7279525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int EMAIL = 13; 7379525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int SIPCALL = 14; 747a09c70af86b9f3bae52c102ebfb6a32b99e7409yaolu public static final int ADDRESS = 15; 7579525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int DIRECTIONS = 16; 7679525d024526e0f26b9dff40162b91f7c53f17a6yaolu public static final int THIRD_PARTY = 17; 7779525d024526e0f26b9dff40162b91f7c53f17a6yaolu } 7879525d024526e0f26b9dff40162b91f7c53f17a6yaolu 7979525d024526e0f26b9dff40162b91f7c53f17a6yaolu @Override 8079525d024526e0f26b9dff40162b91f7c53f17a6yaolu public String toString() { 811a9b44e3fde8e30a3a0f9429bf2f727a89691947Walter Jang return MoreObjects.toStringHelper(this) 8279525d024526e0f26b9dff40162b91f7c53f17a6yaolu .add("referrer", referrer) 8379525d024526e0f26b9dff40162b91f7c53f17a6yaolu .add("contactType", contactType) 8479525d024526e0f26b9dff40162b91f7c53f17a6yaolu .add("cardType", cardType) 8579525d024526e0f26b9dff40162b91f7c53f17a6yaolu .add("actionType", actionType) 8679525d024526e0f26b9dff40162b91f7c53f17a6yaolu .add("thirdPartyAction", thirdPartyAction) 8779525d024526e0f26b9dff40162b91f7c53f17a6yaolu .toString(); 8879525d024526e0f26b9dff40162b91f7c53f17a6yaolu } 8979525d024526e0f26b9dff40162b91f7c53f17a6yaolu} 90