Skip to content

Commit

Permalink
Specify inferred types to get backwards compatibility up to speed, ch…
Browse files Browse the repository at this point in the history
…ange to getActivity() so older cordova builds (#257)
  • Loading branch information
chrisweight authored and rlepinski committed Oct 5, 2018
1 parent 80d7349 commit d582725
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/android/ConfigUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static String parseSender(String value) {
* @param context The application context.
*/
public static Map<String, String> parseConfigXml(Context context) {
Map<String, String> config = new HashMap<>();
Map<String, String> config = new HashMap<String, String>();
int id = context.getResources().getIdentifier("config", "xml", context.getPackageName());
if (id == 0) {
return config;
Expand Down
2 changes: 1 addition & 1 deletion src/android/PluginManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public interface Listener {
private NotificationOpenedEvent notificationOpenedEvent;
private DeepLinkEvent deepLinkEvent = null;
private Listener listener = null;
private List<Event> pendingEvents = new ArrayList<>();
private List<Event> pendingEvents = new ArrayList<Event>();

private final SharedPreferences sharedPreferences;
private final Map<String, String> defaultConfigValues;
Expand Down
2 changes: 1 addition & 1 deletion src/android/UAirshipPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void initialize(CordovaInterface cordova, CordovaWebView webView) {
super.initialize(cordova, webView);
Logger.info("Initializing Urban Airship cordova plugin.");

context = cordova.getContext().getApplicationContext();
context = cordova.getActivity().getApplicationContext();
pluginManager = PluginManager.shared(context);
}

Expand Down

0 comments on commit d582725

Please sign in to comment.