@@ -486,6 +486,47 @@ function _makeDefaultAppDoc() {
486
486
local mdfile="${DOCDIR}/defaultApps.md"
487
487
echo -e "$(heading 2 "Default Apps on ${DEVICE_NAME}" "defaultApps")\n" >> "${mdfile}"
488
488
_makeWebviewDetails
489
+ _mkStandardApps
490
+ }
491
+
492
+ #
493
+ # Standard Apps
494
+ # (called from _makeDefaultAppDoc())
495
+ # needs to be disabled for Dummies due to a bunch of separate calls
496
+ #
497
+ function _mkStandardApps() {
498
+ [[ -n "${DUMMYDIR}" ]] && {
499
+ doProgress "! skipping StandardApps for dummy device"
500
+ return
501
+ }
502
+
503
+ local pkgname
504
+
505
+ echo "$(tab_classopen 'block')" >> "${mdfile}"
506
+ echo "$(trth2 'Standard Apps')" >> "${mdfile}"
507
+ pkgname="$(trim "$(adb $ADBOPTS shell cmd package resolve-activity tel://123456 |grep packageName|head -n 1)")"
508
+ _defAppLine "Dialer" "${pkgname}"
509
+ pkgname="$(trim "$(adb $ADBOPTS shell cmd package resolve-activity mailto:
[email protected] |grep packageName|head -n 1)")"
510
+ _defAppLine "Mail" "${pkgname}"
511
+ pkgname="$(trim "$(adb $ADBOPTS shell cmd package resolve-activity http://www.example.com/ |grep packageName|head -n 1)")"
512
+ _defAppLine "Browser" "${pkgname}"
513
+ pkgname="$(trim "$(adb $ADBOPTS shell cmd package resolve-activity sms://123456 |grep packageName|head -n 1)")"
514
+ _defAppLine "Messenging" "${pkgname}"
515
+ pkgname="$(trim "$(adb $ADBOPTS shell cmd package resolve-activity -c android.intent.category.HOME -a android.intent.action.MAIN |grep packageName|head -n 1)")"
516
+ _defAppLine "Homescreen" "${pkgname}"
517
+
518
+ echo -e "$(tab_close)\n" >> "${mdfile}"
519
+ }
520
+ function _defAppLine() {
521
+ local app=$1
522
+ local pkgname=$2
523
+ [[ -n "${pkgname}" ]] && {
524
+ if [[ "${pkgname#packageName=*}" = "android" ]]; then
525
+ echo "$(trthtd "$app" 'unknown')" >> "${mdfile}"
526
+ else
527
+ echo "$(trthtd "$app" "$(_mkAppLink "${pkgname#packageName=*}" "$(_getSysAppName "${pkgname#packageName=*}")")")" >> "${mdfile}"
528
+ fi
529
+ }
489
530
}
490
531
491
532
#
@@ -541,7 +582,7 @@ function _makeWebviewDetails() {
541
582
done < "${tmp}"
542
583
543
584
# generate document
544
- echo "$(tab_classopen 'apps ')" >> "${mdfile}"
585
+ echo "$(tab_classopen 'block ')" >> "${mdfile}"
545
586
echo "$(trth2 'WebViews')" >> "${mdfile}"
546
587
[[ -n "${WEBVIEW['installed']}" ]] && echo "$(trthtd 'Any WebView package installed' "${WEBVIEW['installed']}")" >> "${mdfile}"
547
588
[[ -n "${WEBVIEW['dirty']}" ]] && echo "$(trthtd 'WebView package dirty' "${WEBVIEW['dirty']}")" >> "${mdfile}"
@@ -572,7 +613,7 @@ function _makeWebviewDetails() {
572
613
573
614
#
574
615
# Get app name from appcache
575
- # (used by _makeWebviewDetails())
616
+ # (used by _makeWebviewDetails() & _mkStandardApps() )
576
617
# param: pkgname
577
618
function _getSysAppName() {
578
619
local pkgname=$1
@@ -589,7 +630,7 @@ function _getSysAppName() {
589
630
590
631
#
591
632
# Create app link depending on whether name and URL are available
592
- # (used by _makeWebviewDetails())
633
+ # (used by _makeWebviewDetails() & _mkStandardApps() )
593
634
# params: pkgname, appname
594
635
function _mkAppLink() {
595
636
local pkgname=$1
0 commit comments