Commit 7c1d1d17 authored by Tobias Thierer's avatar Tobias Thierer
Browse files

Prepare ForwardingOs for publication as @CorePlatformApi.

Tweak the class to better conform to standard idioms for forwarding classes.

- Make the constructor protected (there shouldn't be a need to instantiate
  the class  without overriding at least one method).
- Disallow null value for the delegate.
- Make the delegate accessible via a protected delegate() getter,
  rather than as a field.
- Override toString().

This CL updates the BlockGuardOs implementation accordingly, since it
can no longer access the superclass's "os" field (now private).

Test: Treehugger
Test: ForwardingOsTest
Bug: 115503977

Change-Id: I25f92879edd4de83ebff47b73c5194587cd53179
parent 6bc41514
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment