标签:mtk
[DESCRIPTION]
设置默认存储路径为内部存储,截屏图片保存在外置SD卡中。
[SOLUTION]
修改GlobalScreenshot.java的saveImageInBackgroundTask方法:
String imageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getAbsolutePath();
1、JB2修改为:
String imageDir = StorageManager.getDefaultPath() + ‘/‘ +Environment.DIRECTORY_PICTURES ;
2、JB3.TDD修改为:同时需要导入 import com.mediatek.storage.StorageManagerEx;
String imageDir = StorageManagerEx.getDefaultPath() + ‘/‘ +Environment.DIRECTORY_PICTURES ;
3、KK上修改为:
(1) import import com.mediatek.storage.StorageManagerEx;
(2) mScreenshotDir = new File(StorageManagerEx.getDefaultPath() + "/" +Environment.DIRECTORY_PICTURES , SCREENSHOTS_DIR_NAME) ;
(3) 在frameworks/ base/packages/SystemUI/AndroidManifest.xml添加如下code:
<uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE" />
标签:mtk
原文地址:http://132588761.blog.51cto.com/13248876/1967229