diff options
author | Daniel Nishi <dhnishi@google.com> | 2017-02-21 16:04:20 -0800 |
---|---|---|
committer | Daniel Nishi <dhnishi@google.com> | 2017-02-22 01:14:35 +0000 |
commit | d54f3a487bba1dc5008e2e1482ef451a59500752 (patch) | |
tree | 1231efcf7fd43a6b409748e039c1a4dc4a669778 /tools/aapt2/diff/Diff.cpp | |
parent | 1ddddee33f51551c9ddf0a94be8e7734b4643ff6 (diff) |
Don't crash when primary volume is null in AppCollector.
getPrimaryStorageCurrentVolume() may return a null value. I did
not plan for this case in the AppCollector. This case occurs when
the primary storage is not mounted when the function is called.
By adding in a null check after getPrimaryStorageCurrentVolume()
and adding in preconditions to verify the non-nullness of the
volume as it propagates through the AppCollector, we ensure that
there should be no more NPE crashes for this reason.
Bug: 35636901
Test: FrameworkServicesTests
Change-Id: I4009e55502f71b8f14dd917ddd00caef3551aafd
Diffstat (limited to 'tools/aapt2/diff/Diff.cpp')
0 files changed, 0 insertions, 0 deletions