Log: increase visibility of Log.TerribleFailure
The Log.setWtfHandler() provides a way to override the default TerribleFailureHandler, so that we can test that a piece of code reports as terrible failure as expected. Unfortunately, we can't actual use setWtfHandler() at the moment. The problem is as follows: 1. The Log.setWtfHandler() method requires a Log.TerribleFailureHandler instance. 2. The Log.TerribleFailureHandler interface requires subclasses to implement a onTerribleFailure() method. The method requires a Log.TerribleFailure argument. 3. Log.TerribleFailure is a private inner class. Given the above, classes outside of Log can't create an appropriate argument to pass to Log.setWtfHandler(). To resolve this, we update the visibility of Log.TerribleFailure to be the same as that of Log.setWtfHandler(), and Log.TerribleFailureHandler. Test: m -j32 Bug: 37425059 Change-Id: Ie646b931869582398d61495e367e0d36e767a3e3
Loading
Please register or sign in to comment