Skip to content

Commit e45ae87

Browse files
committed
Improve dynamic colors receiver
1 parent 1e55104 commit e45ae87

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dynamic-support/src/main/java/com/pranavpandey/android/dynamic/support/theme/receiver/DynamicColorsReceiver.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ public class DynamicColorsReceiver extends BroadcastReceiver {
3535

3636
@Override
3737
public void onReceive(@NonNull Context context, @Nullable Intent intent) {
38-
if (intent != null && Intent.ACTION_WALLPAPER_CHANGED.equals(intent.getAction())) {
38+
if (intent == null || intent.getAction() == null) {
39+
return;
40+
}
41+
42+
if (Intent.ACTION_WALLPAPER_CHANGED.equals(intent.getAction())) {
3943
try {
4044
DynamicTheme.getInstance().onAutoThemeChanged(false);
4145
} catch (Exception ignored) {

0 commit comments

Comments
 (0)