Electronic control device for vehicles and control method for vehicles