Computing conditional probability with uniform distribution

Suppose that parameter $$theta$$ characterizes the probability that an individual takes an action. In the population, $$thetasim U(0,1)$$. Individual i has probability $$pi(theta_i)$$ of taking the action. Suppose further that

$$begin{equation} pi(theta_i)=begin{cases} pi_1 & if & thetaleq c\ pi_2 & if & else end{cases} end{equation}$$

What is the correct formula for the average probability? Is it
$$begin{eqnarray} pi&=&int pi_i di\ &=&int_{0}^c pi_1 di +int_{c}^1 pi_2 di end{eqnarray}$$

or is it

$$begin{eqnarray} pi&=&int pi_i di\ &=&Prob(thetaleq c)int_{0}^1 pi_1 di +Prob(thetageq c)int_{c}^1 pi_2 di end{eqnarray}$$