1 package com.xtremelabs.robolectric.shadows; 2 3 import android.app.Activity; 4 import android.app.ActivityGroup; 5 import com.xtremelabs.robolectric.internal.Implementation; 6 import com.xtremelabs.robolectric.internal.Implements; 7 8 @Implements(ActivityGroup.class) 9 public class ShadowActivityGroup extends ShadowActivity { 10 private Activity currentActivity; 11 12 @Implementation getCurrentActivity()13 public android.app.Activity getCurrentActivity() { 14 return currentActivity; 15 } 16 17 /** 18 * Non-Android accessor Sets the current {@code Activity} for this {@code ActivityGroup} 19 * 20 * @param activity 21 */ setCurrentActivity(Activity activity)22 public void setCurrentActivity(Activity activity) { 23 currentActivity = activity; 24 } 25 } 26