OSDN Git Service

OPP: Initialize OPP FileProvider after user unlock
authorJack He <siyuanh@google.com>
Sat, 15 Apr 2017 00:06:16 +0000 (17:06 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Tue, 18 Apr 2017 00:41:32 +0000 (00:41 +0000)
commitdf2c7df9eb3df62cf13e9d2e82fc1c156c71f280
treec599afa30395e56a77c94c6c6350ff15791c2b12
parent660795625e08dadf12906f6bb8187c19ae535f22
OPP: Initialize OPP FileProvider after user unlock

* The FileProvider used by Bluetooth OPP profile used to be initialized
  before user unlock, resulting in file system access errors since
  credential encrypted volumes are not mounted and unlocked yet
* Incomplete initialization also leads to NPE when getUriForFile is
  called
* This change adds BluetoothOppProvider that only initializes after user
  unlocks the device

Bug: 36274847
Test: make, Opp regression test
Change-Id: I323b9084de1ff72922c4dd9866c36dd172696a8f
(cherry picked from commit a19f73959d7e054b206633aa1592a874d0d623f2)
AndroidManifest.xml
src/com/android/bluetooth/opp/BluetoothOppFileProvider.java [new file with mode: 0644]
src/com/android/bluetooth/opp/BluetoothOppUtility.java