- 浏览: 1055579 次
- 性别:
- 来自: 南昌
文章分类
- 全部博客 (276)
- 生活 (1)
- 代码之美 (22)
- Media (7)
- Android Widget (3)
- Android Intent (1)
- Android Activity (4)
- UI event handle--UI事件处理机制 (2)
- Java基础知识 (12)
- android Databases (5)
- Android 系统知识 (70)
- 平常遇到的问题与解决方法 (38)
- Android TextView/EditView (2)
- Thinking Java (1)
- android webkit (6)
- JSON (1)
- XML (4)
- HTTP (1)
- Google Weather API (1)
- android 2.3 NFC (10)
- android app (20)
- android framework (7)
- C++ (2)
- android System (5)
- Pthread (1)
- Wifi (8)
- Unix/Linux C (8)
- Android 4.0 (1)
- Mail (1)
- Smack 源码学习 (4)
- iOS (4)
- Android (1)
- git (1)
- Gallery3d (2)
- React-Natice (1)
最新评论
-
dd18349182956:
你是用的smack哪个版本?我用的smack4.1.3和sma ...
关于socket长连接的心跳包 -
xukaiyin:
全英文
getApplicationContext()与this,getBaseContext() -
裂风矢:
...
<category android:name="android.intent.category.DEFAULT" /> 惹的祸 -
xanthodont:
mark一下
XMPP——Smack -
Evilover3:
mark一下,学习了
XMPP——Smack
今天客户提了一个bug说在短信添加附件,界面无法显示缩略图。接到这个bug我第一反应是缩略图生成失败了。
1.复现问题
1)在自己手上的版本无法复现该问题,再详细确认客户所处的分支,发现客户的分支与自己的不一致。
2)找与客户对应的分支的测试机器,复现只有当在Recent最近这个页面不能显示缩略图,其他页面都可以正常显示
2.通过Monitor—Hierarchy View工具查看Recent页面找到显示图片的icon的id为:icon_mime_lg.在DocumentUI搜索icon_mime_lg,定位到代码GridDocumentHolder.java
icon加载图片的调用是mIconHelper.load
3.查看IconHelper中load的方法
在如上方法加入debug信息,发现不管是在Recent页面还是其他页面都会走loadThumbnail,只有在Recent页面时showThumbnail为false,在其他页面为true.说明缩略图加载的,只是显示和不显示的问题,进一步分析发现在Recent页面时mThumbnailsEnabled未false,而在其他页面为true.而该值是通过public void setThumbnailsEnabled(boolean enabled)设置的
4,通过搜索setThumbnailsEnabled得知是在DirectoryFragment.java调用
5,查看ActivityManager中的
6.通过adb shell getprop ro.config.low_ram 返回true.
7,结论当设备配置ro.config.low_ram为true时,并且处于Recent页面,则不显示icon.App可以通过ActivityManager的isLowRamDevice API来判断当前设备是否是low ram。
1.复现问题
1)在自己手上的版本无法复现该问题,再详细确认客户所处的分支,发现客户的分支与自己的不一致。
2)找与客户对应的分支的测试机器,复现只有当在Recent最近这个页面不能显示缩略图,其他页面都可以正常显示
2.通过Monitor—Hierarchy View工具查看Recent页面找到显示图片的icon的id为:icon_mime_lg.在DocumentUI搜索icon_mime_lg,定位到代码GridDocumentHolder.java
@Override public void bind(Cursor cursor, String modelId) { assert(cursor != null); mModelId = modelId; mDoc.updateFromCursor(cursor, getCursorString(cursor, RootCursorWrapper.COLUMN_AUTHORITY)); mIconHelper.stopLoading(mIconThumb); mIconMimeLg.animate().cancel(); mIconMimeLg.setAlpha(1f); mIconThumb.animate().cancel(); mIconThumb.setAlpha(0f); mIconHelper.load(mDoc, mIconThumb, mIconMimeLg, mIconMimeSm);
icon加载图片的调用是mIconHelper.load
3.查看IconHelper中load的方法
public void load(Uri uri, String mimeType, int docFlags, int docIcon, long docLastModified, ImageView iconThumb, ImageView iconMime, @Nullable ImageView subIconMime) { boolean loadedThumbnail = false; final String docAuthority = uri.getAuthority(); final boolean supportsThumbnail = (docFlags & Document.FLAG_SUPPORTS_THUMBNAIL) != 0; final boolean allowThumbnail = (mMode == MODE_GRID) || MimeTypes.mimeMatches(MimeTypes.VISUAL_MIMES, mimeType); final boolean showThumbnail = supportsThumbnail && allowThumbnail && mThumbnailsEnabled; if (showThumbnail) { loadedThumbnail = loadThumbnail(uri, docAuthority, docLastModified, iconThumb, iconMime); } final Drawable mimeIcon = getDocumentIcon(mContext, docAuthority, DocumentsContract.getDocumentId(uri), mimeType, docIcon); if (subIconMime != null) { setMimeIcon(subIconMime, mimeIcon); } if (loadedThumbnail) { hideImageView(iconMime); } else { // Add a mime icon if the thumbnail is not shown. setMimeIcon(iconMime, mimeIcon); hideImageView(iconThumb); } }
在如上方法加入debug信息,发现不管是在Recent页面还是其他页面都会走loadThumbnail,只有在Recent页面时showThumbnail为false,在其他页面为true.说明缩略图加载的,只是显示和不显示的问题,进一步分析发现在Recent页面时mThumbnailsEnabled未false,而在其他页面为true.而该值是通过public void setThumbnailsEnabled(boolean enabled)设置的
4,通过搜索setThumbnailsEnabled得知是在DirectoryFragment.java调用
boolean svelte = am.isLowRamDevice() && (mState.stack.isRecents()); mIconHelper.setThumbnailsEnabled(!svelte);
5,查看ActivityManager中的
/** * Returns true if this is a low-RAM device. Exactly whether a device is low-RAM * is ultimately up to the device configuration, but currently it generally means * something in the class of a 512MB device with about a 800x480 or less screen. * This is mostly intended to be used by apps to determine whether they should turn * off certain features that require more RAM. */ public boolean isLowRamDevice() { return isLowRamDeviceStatic(); }
/** @hide */ public static boolean isLowRamDeviceStatic() { return RoSystemProperties.CONFIG_LOW_RAM || (Build.IS_DEBUGGABLE && DEVELOPMENT_FORCE_LOW_RAM); }
6.通过adb shell getprop ro.config.low_ram 返回true.
7,结论当设备配置ro.config.low_ram为true时,并且处于Recent页面,则不显示icon.App可以通过ActivityManager的isLowRamDevice API来判断当前设备是否是low ram。
发表评论
-
Android Webview加载www.youtube.com的问题
2019-04-25 10:36 955Android Webview加载www.youtube.co ... -
EditText键盘删除字符的原理
2018-10-29 19:21 1197转https://blog.csdn.net/tankai19 ... -
Background execution not allowed
2018-10-22 19:02 326911-05 10:08:18.058 673 736 ... -
failed to set system property
2018-10-17 09:21 4154在App的mk文件设置了LOCAL_CERTIFICATE : ... -
CtsDeqpTestCases fail
2018-07-27 09:44 2908Suite / Plan:VTS / cts-on-gsi ... -
在任务栏中清除掉播放器的进程,状态栏仍有音乐播放器状态,且音乐仍在后台播放
2018-06-05 11:28 1544在任务栏中清除掉播放器的进程,状态栏仍有音乐播放器状态,且音乐 ... -
junit.framework.AssertionFailedError: Failed to get achievable frame rates for O
2018-05-25 15:41 2244之前对于CTS测试的失败case接触不多,组长突然转了这样一个 ... -
Android 模拟各种事件的方法
2018-05-17 16:30 1486有时候没有对应的硬件设备,那我们就得通过某种方式来模拟。比如模 ... -
Android Email 新建邮件时一直显示“waiting for sync”
2018-02-28 15:48 960当用户在Setting中清除了Email的data,再返回到E ... -
javax.net.ssl.SSLHandshakeException: Unacceptable certificate: CN=GeoTrust SSL C
2018-01-30 16:48 3633最近从Android N升级到Android O,发现163的 ... -
Email中附件名称中包含中文字符显示乱码
2017-11-28 17:09 1572Email中附件名称中包含中文字符显示乱码是因为附件虽包含了中 ... -
不能再通过createPackageContext来访问另外一个应用的资源(Sharepreference)
2017-11-14 17:22 1432以前我们可以通过createPackageContext来访问 ... -
当Email未设置账户时,通过ACTION_SENDTO启动会报ActivityNotFoundException
2017-09-27 18:15 503当Email未设置账户时,通过ACTION_SENDTO启动会 ... -
java.lang.SecurityException: Permission Denial: reading...requires android.permi
2016-05-12 11:12 2294一直在忙于Gallery,最近遇到了这样的bug,在Setti ... -
android.database.sqlite.SQLiteReadOnlyDatabaseException: attempt to write a read
2015-11-27 14:50 2909android.database.sqlite.SQLiteR ... -
AsyncTask
2015-08-21 17:43 382转自http://blog.csdn.net/hitlion2 ... -
解决IllegalStateException: Can not perform this action after onSaveInstanceState
2015-08-07 18:07 1046转自http://www.cnblogs.com/zgz345 ... -
Android setTag方法的key问题
2015-08-03 19:22 1027转自http://www.cnblogs.com/whitew ... -
ActivityGroup对子Activity的管理
2013-06-27 17:41 2069转自http://eyeandroid.diandian.co ... -
listview在activitygroup切换后无法点击的问题
2013-05-14 10:14 1466转自:http://blog.csdn.net/daguaio ...
相关推荐
•调用日志内容中的图片,显示日志缩略图,缩略图链接指向原日志或者原大图。 •随机缩略图:调用随机日志的缩略图,全站任意位置显示。 •最新缩略图:调用最新日志的缩略图,全站任意位置显示。 •相关缩略图:...
如何使用安装插件并访问“小部件”屏幕查找小部件“最近帖子的NC缩略图” 将小部件添加到区域填写小部件的可选标题设置要显示的帖子数选择要显示的帖子类型(默认为“帖子”) 选择是否显示日期选择是否在每个条目...
WordPress最近留言插件,可以提供一个高度定制的差距,用来显示您的访客在侧栏的最近评论,输出的样式完全可以根据你自己喜欢的样式进行自定义。 Recent Comments插件的特点: •widget样式:可以定义每个边栏放置...
资源主要是结合博客文章:...在运行(Ctrl+R)输入recent能显示最近浏览文件记录,该过程采用VS2012 C#开发,向下不兼容.是很好的基础性文章,希望结合博客阅读.免费资源,仅供大家学习.希望对大家有所帮助.
VB RecentFiles Editor,你的VB工程最新列表里是否有一大堆的工程显示?有很多都过时了或不想显示了但又没有办法清除?用这个可以将VB工程中最新列表里的工程列表进行删除操作
插件recent_contacts 使用 jQueryUI ( BETA ) 在邮件撰写中显示最近的联系人安装 : 在圆形立方体安装的插件文件夹中下载插件。 将“recent_contacts”(如果尚未定义,则为+“jqueryui”)添加到cfg 文件中的$...
git-recent, 查看最新的本地git分支,格式化的真正 fancy 最新 git键入 git recent 以查看最新的本地git分支用法 git recent 在使用 Windows 时,你需要使用或者类似的,以便有效地使用这个实用程序。安装你可以将 ...
C# 清理 Recent 文件.txtC# 清理 Recent 文件.txt
computed tomography principles design artifacts and recent advances 下载
Recent Advances in Networking,网络研究进展 ,来自ACM SIGCOMM,2013,回顾了网络领域的最新研究进展. 包括以下内容 1. Internet Topology Research Redux 2. Recent Advances in Reliable Transport Protocols 3...
显示最近CircleCI版本的交互式CLI工具。 产品特点 最新版本将每5秒钟加载一次以更新UI。 估计的完成时间基于上一次成功构建。 颜色表示构建的结果。 CLI适应控制台窗口的宽度和高度。 安装 $ npm install -g ...
Recent Advances in Face Detection 作者:Ming-Hsuan Yang
Recent Developments in Real and Harmonic Analysis:In Honor of Carlos Segovia springer
Idea Group - Recent Developments in Biologically Inspired Computing
人工智能领域—计算机视觉最新文章观察,2019《A Survey of the Recent Architectures of Deep Convolutional Neural Networks》67页pdf原文
This source demonstrate how to remember the recent doc
Recent progress of integrated circuits.pdf
we survey the recent advances in face detection for the past decade. The seminal Viola-Jones face detector is first re- viewed. We then survey the various techniques according to how they extract ...
activity 中评论#3 :red_exclamation_mark: 已关闭自述文件工作流/最近活动中的问题#4 :flexed_biceps: 在Readme-Workflows/recent-activity 中打开 PR #6 特征 支持多种活动我们支持的活动: CommitCommentEvent - ...
输入触发关键字后,您可以输入要清除其最近文件列表的应用程序名称,或者如果候选列表中显示的第一项与您的目标匹配,则按SPACE键。 3.选择要清除的项目。 最后一步很简单。 您只需选择要删除的项目。 或者,如果...