Clear calling identity when performing phone factory reset.

Now that we have app ops we are checking whether the package making
the call is in a given UID and has its app op enabled. Hence, if
a process A calls in B, B verifies that A has a permission to ask A
to do something, and B calls API that it has permissions/app ops to
perform, then B has to clear the IPC calling identity since even if
A has permission to do the operation which B is performing on its
behalf, the app op package name of the operation will not be in A's
UID resulting in an error.

bug:21073493

Change-Id: If3d8aaeb6ad672b33d241289900d9c89b3bfbd03
1 file changed