- public GetSource(Activity activity, String userAgent) {
- // Populate the weak reference to the calling activity.
+ public GetSource(Context context, Activity activity, String userAgent) {
+ // Populate the weak references to the calling context and activity.
+ contextWeakReference = new WeakReference<>(context);