-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modified files: - GenerateNotification.java - OneSignalPackagePrivateHelper.java Created file: - ShadowResources.java Added 4 unit tests for accent colors in GenerateNotificationRunner.java: - shouldUseDarkIconAccentColorInDarkMode_hasMetaData - shouldUseDayIconAccentColorInDayMode - shouldUseManifestIconAccentColor - shouldUseBgacAccentColor_hasMetaData Added resources to unittest app
- Loading branch information
Showing
6 changed files
with
97 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<resources> | ||
<string name="onesignal_notification_accent_color">FFFF0000</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<resources> | ||
<string name="onesignal_notification_accent_color">FF00FF00</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
OneSignalSDK/unittest/src/test/java/com/onesignal/ShadowResources.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.onesignal; | ||
|
||
import org.robolectric.annotation.Implementation; | ||
import org.robolectric.annotation.Implements; | ||
|
||
@Implements(value = android.content.res.Resources.class) | ||
public class ShadowResources { | ||
|
||
// Returns 0 to mimic no resources found | ||
@Implementation | ||
public int getIdentifier(String name, String defType, String defPackage) { | ||
return 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters