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

Proposed by Chunsang Jeong
Status: Approved
Approved by: Pat McGowan
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) Approve
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.
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :
review: Approve
Revision history for this message
Chunsang Jeong (chunsang) wrote :

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

Unmerged revisions

359. By Chunsang Jeong

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
=== modified file 'phablet-screenshot'
--- phablet-screenshot 2014-06-07 08:31:32 +0000
+++ phablet-screenshot 2016-06-02 05:57:59 +0000
@@ -84,18 +84,6 @@
84 fi84 fi
85}85}
8686
87sf_is_running() {
88 # Return 0 if surface flinger is running then we'll use screencap
89 # instead
90 sf=$(adb shell pidof surfaceflinger)
91 if [ -z "$sf" ]; then
92 return 1
93 else
94 echo "I: surfaceflinger detected"
95 return 0
96 fi
97}
98
99screenshot_mir() {87screenshot_mir() {
100 # Dump framebuffer to capture Mir screenshot88 # Dump framebuffer to capture Mir screenshot
101 #89 #
@@ -130,17 +118,6 @@
130 echo "$device"|tr -d '\r'118 echo "$device"|tr -d '\r'
131}119}
132120
133screenshot_sf() {
134 # Use screencap if surfaceflinger is running
135 echo "I: Capturing screenshot with screencap ..."
136 capfile=screencap.png
137 adb shell /system/bin/screencap /tmp/$capfile
138 adb pull /tmp/$capfile ${PICDIR}/$capfile
139
140 [ ! -e "${PICDIR}/${capfile}" ] && echo "E: Capture failed!" && return
141 convert $CONVERTOPTS ${PICDIR}/$capfile "$DST"
142}
143
144SHORTOPTS="hdr:s:z:"121SHORTOPTS="hdr:s:z:"
145LONGOPTS="help,debug,resolution:,serial:,resize:"122LONGOPTS="help,debug,resolution:,serial:,resize:"
146123
@@ -184,19 +161,15 @@
184161
185check_devices162check_devices
186163
187if sf_is_running; then164# Dump the framebuffer
188 # Use screencap for surfaceflinger165# Set resolution and depth for device
189 screenshot_sf166depth=8
190else167size="$(adb shell fbset|sed -n -e's/^mode.*\"\([0-9]\+x[0-9]\+\)[-\"].*$/\1/p')"
191 # Otherwise just dump the framebuffer168device="$(get_device)"
192 # Set resolution and depth for device169if [ -z "$size" ]; then
193 depth=8170 echo "E: Resolution not found. Device is not supported."
194 size="$(adb shell fbset|sed -n -e's/^mode.*\"\([0-9]\+x[0-9]\+\)[-\"].*$/\1/p')"171 exit 1
195 device="$(get_device)"
196 if [ -z "$size" ]; then
197 echo "E: Resolution not found. Device is not supported."
198 exit 1
199 fi
200 screenshot_mir "$size" "$depth" "$device"
201fi172fi
173screenshot_mir "$size" "$depth" "$device"
174
202echo "I: Done"175echo "I: Done"

Subscribers

People subscribed via source and target branches