Merge lp:~chunsang/phablet-tools/phablet-tools into lp:phablet-tools

Proposed by Chunsang Jeong on 2016-06-02
Status: Approved
Approved by: Pat McGowan on 2016-06-30
Approved revision: 359
Proposed branch: lp:~chunsang/phablet-tools/phablet-tools
Merge into: lp:phablet-tools
Diff against target: 70 lines (+10/-37)
1 file modified
phablet-screenshot (+10/-37)
To merge this branch: bzr merge lp:~chunsang/phablet-tools/phablet-tools
Reviewer Review Type Date Requested Status
Pat McGowan (community) 2016-06-02 Approve on 2016-06-02
Review via email: mp+296284@code.launchpad.net

Description of the change

Remove screenshot_sf not to check if sf is running on device, which still used out of dated screencap and made screenshot fail onto certain devices where sf is running to use android specified codecs.

Fix for https://bugs.launchpad.net/avila-private/+bug/1555678

To post a comment you must log in.
Pat McGowan (pat-mcgowan) wrote :
review: Approve
Chunsang Jeong (chunsang) wrote :

Any chance to be merged soon? or need more review?

Unmerged revisions

359. By Chunsang Jeong on 2016-06-02

Remove screenshot_sf not to check if sf is running on device, which still used out of dated screencap and made screenshot fail onto certain devices where sf is running to use android specified codecs. Fix for https://bugs.launchpad.net/avila-private/+bug/1555678

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'phablet-screenshot'
2--- phablet-screenshot 2014-06-07 08:31:32 +0000
3+++ phablet-screenshot 2016-06-02 05:57:59 +0000
4@@ -84,18 +84,6 @@
5 fi
6 }
7
8-sf_is_running() {
9- # Return 0 if surface flinger is running then we'll use screencap
10- # instead
11- sf=$(adb shell pidof surfaceflinger)
12- if [ -z "$sf" ]; then
13- return 1
14- else
15- echo "I: surfaceflinger detected"
16- return 0
17- fi
18-}
19-
20 screenshot_mir() {
21 # Dump framebuffer to capture Mir screenshot
22 #
23@@ -130,17 +118,6 @@
24 echo "$device"|tr -d '\r'
25 }
26
27-screenshot_sf() {
28- # Use screencap if surfaceflinger is running
29- echo "I: Capturing screenshot with screencap ..."
30- capfile=screencap.png
31- adb shell /system/bin/screencap /tmp/$capfile
32- adb pull /tmp/$capfile ${PICDIR}/$capfile
33-
34- [ ! -e "${PICDIR}/${capfile}" ] && echo "E: Capture failed!" && return
35- convert $CONVERTOPTS ${PICDIR}/$capfile "$DST"
36-}
37-
38 SHORTOPTS="hdr:s:z:"
39 LONGOPTS="help,debug,resolution:,serial:,resize:"
40
41@@ -184,19 +161,15 @@
42
43 check_devices
44
45-if sf_is_running; then
46- # Use screencap for surfaceflinger
47- screenshot_sf
48-else
49- # Otherwise just dump the framebuffer
50- # Set resolution and depth for device
51- depth=8
52- size="$(adb shell fbset|sed -n -e's/^mode.*\"\([0-9]\+x[0-9]\+\)[-\"].*$/\1/p')"
53- device="$(get_device)"
54- if [ -z "$size" ]; then
55- echo "E: Resolution not found. Device is not supported."
56- exit 1
57- fi
58- screenshot_mir "$size" "$depth" "$device"
59+# Dump the framebuffer
60+# Set resolution and depth for device
61+depth=8
62+size="$(adb shell fbset|sed -n -e's/^mode.*\"\([0-9]\+x[0-9]\+\)[-\"].*$/\1/p')"
63+device="$(get_device)"
64+if [ -z "$size" ]; then
65+ echo "E: Resolution not found. Device is not supported."
66+ exit 1
67 fi
68+screenshot_mir "$size" "$depth" "$device"
69+
70 echo "I: Done"

Subscribers

People subscribed via source and target branches