package shell

func (d DeviceShell) am(args ...string) ([]byte, error) {
	return d.RunSync("am", args...)
}

// ForceStopPackage executes force stop the package
func (d DeviceShell) ForceStopPackage(pkgName string) ([]byte, error) {
	return d.am("force-stop", pkgName)
}

// InstrumentClassMethod executes instrumentation test with class#method where e is testPkg.class#method
// and runner is testPkg/androidx.test.runner.AndroidJUnitRunner
func (d DeviceShell) InstrumentClassMethod(classMethod string, runner string) ([]byte, error) {
	return d.am("instrument", "-w", "-e", "class", classMethod, runner)
}
