Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_frameworks_base-old
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Farzin Kazemzadeh
platform_frameworks_base-old
Commits
a0e44e73
Commit
a0e44e73
authored
7 years ago
by
Winson Chung
Committed by
Android (Google) Code Review
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Removing legacy default thumbnail logic." into oc-dev
parents
3eae564f
75ef9b26
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoader.java
+5
-17
5 additions, 17 deletions
...com/android/systemui/recents/model/RecentsTaskLoader.java
with
5 additions
and
17 deletions
packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoader.java
+
5
−
17
View file @
a0e44e73
...
...
@@ -100,7 +100,6 @@ class BackgroundTaskLoader implements Runnable {
TaskResourceLoadQueue
mLoadQueue
;
TaskKeyLruCache
<
Drawable
>
mIconCache
;
Bitmap
mDefaultThumbnail
;
BitmapDrawable
mDefaultIcon
;
boolean
mStarted
;
...
...
@@ -111,11 +110,10 @@ class BackgroundTaskLoader implements Runnable {
/** Constructor, creates a new loading thread that loads task resources in the background */
public
BackgroundTaskLoader
(
TaskResourceLoadQueue
loadQueue
,
TaskKeyLruCache
<
Drawable
>
iconCache
,
Bitmap
defaultThumbnail
,
BitmapDrawable
defaultIcon
,
OnIdleChangedListener
onIdleChangedListener
)
{
TaskKeyLruCache
<
Drawable
>
iconCache
,
Bitmap
Drawable
defaultIcon
,
OnIdleChangedListener
onIdleChangedListener
)
{
mLoadQueue
=
loadQueue
;
mIconCache
=
iconCache
;
mDefaultThumbnail
=
defaultThumbnail
;
mDefaultIcon
=
defaultIcon
;
mMainThreadHandler
=
new
Handler
();
mOnIdleChangedListener
=
onIdleChangedListener
;
...
...
@@ -230,18 +228,14 @@ class BackgroundTaskLoader implements Runnable {
}
if
(
DEBUG
)
Log
.
d
(
TAG
,
"Loading thumbnail: "
+
t
.
key
);
final
ThumbnailData
cachedT
humbnailData
=
ssp
.
getTaskThumbnail
(
t
.
key
.
id
,
final
ThumbnailData
t
humbnailData
=
ssp
.
getTaskThumbnail
(
t
.
key
.
id
,
true
/* reducedResolution */
);
if
(
cachedThumbnailData
.
thumbnail
==
null
)
{
cachedThumbnailData
.
thumbnail
=
mDefaultThumbnail
;
}
if
(!
mCancelled
)
{
// Notify that the task data has changed
final
Drawable
finalIcon
=
cachedIcon
;
mMainThreadHandler
.
post
(
()
->
t
.
notifyTaskDataLoaded
(
cachedT
humbnailData
,
finalIcon
));
()
->
t
.
notifyTaskDataLoaded
(
t
humbnailData
,
finalIcon
));
}
}
}
...
...
@@ -282,7 +276,6 @@ public class RecentsTaskLoader {
int
mDefaultTaskBarBackgroundColor
;
int
mDefaultTaskViewBackgroundColor
;
BitmapDrawable
mDefaultIcon
;
Bitmap
mDefaultThumbnail
;
private
TaskKeyLruCache
.
EvictionCallback
mClearActivityInfoOnEviction
=
new
TaskKeyLruCache
.
EvictionCallback
()
{
...
...
@@ -304,15 +297,10 @@ public class RecentsTaskLoader {
mMaxIconCacheSize
=
res
.
getInteger
(
R
.
integer
.
config_recents_max_icon_count
);
int
iconCacheSize
=
RecentsDebugFlags
.
Static
.
DisableBackgroundCache
?
1
:
mMaxIconCacheSize
;
int
thumbnailCacheSize
=
RecentsDebugFlags
.
Static
.
DisableBackgroundCache
?
1
:
mMaxThumbnailCacheSize
;
// Create the default assets
Bitmap
icon
=
Bitmap
.
createBitmap
(
1
,
1
,
Bitmap
.
Config
.
ALPHA_8
);
icon
.
eraseColor
(
0
);
mDefaultThumbnail
=
Bitmap
.
createBitmap
(
1
,
1
,
Bitmap
.
Config
.
ARGB_8888
);
mDefaultThumbnail
.
setHasAlpha
(
false
);
mDefaultThumbnail
.
eraseColor
(
0xFFffffff
);
mDefaultIcon
=
new
BitmapDrawable
(
context
.
getResources
(),
icon
);
// Initialize the proxy, cache and loaders
...
...
@@ -325,7 +313,7 @@ public class RecentsTaskLoader {
mContentDescriptionCache
=
new
TaskKeyLruCache
<>(
numRecentTasks
,
mClearActivityInfoOnEviction
);
mActivityInfoCache
=
new
LruCache
(
numRecentTasks
);
mLoader
=
new
BackgroundTaskLoader
(
mLoadQueue
,
mIconCache
,
mDefaultThumbnail
,
mDefaultIcon
,
mLoader
=
new
BackgroundTaskLoader
(
mLoadQueue
,
mIconCache
,
mDefaultIcon
,
mHighResThumbnailLoader:
:
setTaskLoadQueueIdle
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment