diff options
author | Tor Norbye <tnorbye@google.com> | 2012-04-06 10:48:10 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-04-06 10:48:10 -0700 |
commit | 2281b808ca352c406a3655c17ab5a7f82f4978de (patch) | |
tree | 26269179900cddd12d8a0dd9f45dceb32422da1a /ddms | |
parent | e0f2a78624e5030c2b74f4207eb271cdcf0e4989 (diff) | |
parent | 7312c89ade9495d42132ec7fdf7db8142da5fa8a (diff) | |
download | sdk-2281b808ca352c406a3655c17ab5a7f82f4978de.zip sdk-2281b808ca352c406a3655c17ab5a7f82f4978de.tar.gz sdk-2281b808ca352c406a3655c17ab5a7f82f4978de.tar.bz2 |
am 7312c89a: Merge "Ensure screenshots saved through DDMS end with .png."
* commit '7312c89ade9495d42132ec7fdf7db8142da5fa8a':
Ensure screenshots saved through DDMS end with .png.
Diffstat (limited to 'ddms')
-rw-r--r-- | ddms/libs/ddmuilib/src/com/android/ddmuilib/ScreenShotDialog.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/ScreenShotDialog.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/ScreenShotDialog.java index d0c8a2f..b0f885a 100644 --- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/ScreenShotDialog.java +++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/ScreenShotDialog.java @@ -321,6 +321,10 @@ public class ScreenShotDialog extends Dialog { // the value the dialog was initialized with. It does however return // the full path as its return value, so just pick the path from // there. + if (!fileName.endsWith(".png")) { + fileName = fileName + ".png"; + } + String saveDir = new File(fileName).getParent(); if (saveDir != null) { DdmUiPreferences.getStore().setValue("lastImageSaveDir", saveDir); |