C. Modifying Class Hierarchy to Inject Wedge Classes
After we have created our wedge classes, we identify classes in the app code that extend from the parents of our wedge classes. In each of these classes, we modify the class to extend our wedge class instead of the original class in the Android platform. We also modify all method invocation calls in these app classes to point to our wedge class instead of the original parent class. In this way, the rewritten developer’s class cannot call the methods in the Android platform classes without passing through the methods we have added to catch intercept calls.