sim.android.app.Activity Maven / Gradle / Ivy
package sim.android.app;
import sim.android.hardware.SensorManager;
public class Activity extends android.app.Activity {
@Override
public Object getSystemService(String name) {
if (getBaseContext() == null) {
throw new IllegalStateException(
"System services not available to Activities before onCreate()");
}
if(name.equals(SENSOR_SERVICE)) {
return new SensorManager();
}
return super.getSystemService(name);
}
}