1#!/system/bin/sh 2 3# BetterBug required fields 4am='am start -a com.google.android.apps.betterbug.intent.FILE_BUG_DEEPLINK --ez EXTRA_DEEPLINK true ' 5issueTitle=' --es EXTRA_ISSUE_TITLE ' 6additionalComment=' --es EXTRA_ADDITIONAL_COMMENT ' 7componentId=' --el EXTRA_COMPONENT_ID ' 8requireBugReport=' --ez EXTRA_REQUIRE_BUGREPORT ' 9bugAssign=' --es EXTRA_BUG_ASSIGNEE ' 10ccGroup=' --es EXTRA_CC ' 11 12# BetterBug title 13kAuthTitle="UDFPS Fingerprint authentication has high failed rate" 14kLockoutTitle="UDFPS Fingerprint has too many lockout counts" 15kLatencyTitle="UDFPS Fingerprint took long to unlock device" 16 17# BetterBug context comment 18kAuthComment="This bug is auto created by fingerprint HAL to track fingerprint authentication" 19kLockoutComment="This bug is auto created by fingerprint HAL to track fingerprint lockout" 20kLatencyComment="This bug is auto created by fingerprint HAL to track fingerprint latency" 21 22# BetterBug assign & CC owner 23kBugAssign='udfps_data_study@google.com' 24kCcGroup='eddielan@google.com' 25kComponentId='817555' 26 27# Command to send intent to BetterBug 28commonCommand="$componentId ${kComponentId//\ /\\ } 29 $requireBugReport true 30 $bugAssign ${kBugAssign//\ /\\ } 31 $ccGroup ${kCcGroup//\ /\\ }" 32authCommand="$am $issueTitle ${kAuthTitle//\ /\\ } 33 $additionalComment ${kAuthComment//\ /\\ }" 34lockoutCommand="$am $issueTitle ${kLockoutTitle//\ /\\ } 35 $additionalComment ${kLockoutComment//\ /\\ }" 36latencyCommand="$am $issueTitle ${kLatencyTitle//\ /\\ } 37 $additionalComment ${kLatencyComment//\ /\\ }" 38 39# Type of bug being triggered 40# 1. Latency 41# 2. Lockout 42# 3. Finerprint authentication(FRR) 43bug_type="$1" 44 45send=1 46if [ "$bug_type" == "latency" ]; then 47 intentCommand="$latencyCommand $commonCommand" 48elif [ "$bug_type" == "lockout" ]; then 49 intentCommand="$lockoutCommand $commonCommand" 50elif [ "$bug_type" == "auth" ]; then 51 intentCommand="$authCommand $commonCommand" 52else 53 send=0 54 echo "Unknown bug_type $bug_type" 55fi 56 57if [ $send -eq 1 ] 58then 59 eval $intentCommand 60fi 61 62# Exit 63exit 0 64