commit | e6cdfd3bd73d5dcec06c9f140359db18b53dcf9a | [log] [tgz] |
---|---|---|
author | Martijn Coenen <maco@google.com> | Mon Nov 13 14:03:05 2017 +0100 |
committer | Martijn Coenen <maco@google.com> | Mon Nov 13 15:41:01 2017 +0100 |
tree | 4b1c57687b627153e4fec697a90cd76622e8ea89 | |
parent | e32af4419e187215fd71b486e0b6c3ee9e464038 [diff] |
Don't pass sp<this> in constructor. Another good reason for not doing this is that if the function you pass the sp<> into doesn't keep the strong reference, the object will get destructed while it's still being constructed! In this particular case, this could happen if servicemanager->registerForNotification() calls fail. Test: no crash when servicemanager call fails. Change-Id: I36f52ecf95688aacac4722158746d118d27f99d7