File tree 2 files changed +10
-3
lines changed
library/src/main/java/com/bumptech/glide
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -126,12 +126,17 @@ public static HardwareConfigState getInstance() {
126
126
}
127
127
}
128
128
129
- public synchronized void blockHardwareBitmaps () {
129
+ public boolean areHardwareBitmapsBlocked () {
130
+ Util .assertMainThread ();
131
+ return !isHardwareConfigAllowedByAppState .get ();
132
+ }
133
+
134
+ public void blockHardwareBitmaps () {
130
135
Util .assertMainThread ();
131
136
isHardwareConfigAllowedByAppState .set (false );
132
137
}
133
138
134
- public synchronized void unblockHardwareBitmaps () {
139
+ public void unblockHardwareBitmaps () {
135
140
Util .assertMainThread ();
136
141
isHardwareConfigAllowedByAppState .set (true );
137
142
}
Original file line number Diff line number Diff line change @@ -20,5 +20,7 @@ public void onTrimMemory(int level) {}
20
20
public void onConfigurationChanged (@ NonNull Configuration newConfig ) {}
21
21
22
22
@ Override
23
- public void onLowMemory () {}
23
+ public void onLowMemory () {
24
+ onTrimMemory (TRIM_MEMORY_UI_HIDDEN );
25
+ }
24
26
}
You can’t perform that action at this time.
0 commit comments