1 package com.xtremelabs.robolectric.shadows; 2 3 import com.xtremelabs.robolectric.internal.Implementation; 4 import com.xtremelabs.robolectric.internal.Implements; 5 6 @Implements(android.os.Process.class) 7 public class ShadowProcess { 8 9 private static Integer pid; 10 11 @Implementation myPid()12 public static final int myPid() { 13 if (pid != null) { 14 return pid; 15 } 16 return 0; 17 } 18 setPid(int pid)19 public static void setPid(int pid) { 20 ShadowProcess.pid = pid; 21 } 22 reset()23 public static void reset() { 24 ShadowProcess.pid = null; 25 } 26 } 27