History log of /packages/apps/CertInstaller/src/com/android/certinstaller/WiFiInstaller.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
881958d4b9d28e8723c70a51bec3b9f1544d8e77 12-Oct-2017 mukesh agrawal <quiche@google.com> WiFiInstaller: catch exceptions on both delete paths

WiFiInstaller provides the ability to automatically
install a Passpoint configuration, if that configuration
is served using the 'application/x-wifi-config' MIME type.

Before installing the configuration, WiFiInstaller
reads the configuration data into memory, and then
attempts to delete the file.

If the file was provided using the DocumentsContract
API, then a failure to delete will be caught and logged.
The installation of the configuration can still succeed.

If, however, the file was provided using a ContentResolver,
then a deletion failure causes the install process to
fail.

When Chrome is used to download a Passpoint configuration
from a Passpoint provider, we see that the install reliably
fails. The failure occurs because the config file is
a) not provided using a DocumentsContract, and
b) can not be deleted.

To resolve the failure, we handle a failure to delete
a ContentResovler-provided config the same way that we
handle a failure to delete a DocumentsContract-provided
config. Namely: catch the exception, log the failure, and
continue to install the config.

We will work separately to determine why this problem is
only now surfacing. (We suspect some change in the way
that Chrome provides the file to WiFiInstaller.)

BUG: 66971720
Test: manual

Manual test
-----------
1. flash build with changes onto device
2. open passpoint.boingo.com in chrome
3. scroll to bottom of page
4. tap 'Create Profile'
5. enter username and password from bug
6. tap 'Download Profile'
7. see 'Chrome needs storage access...' prompt
8. tap 'CONTINUE'
9. see 'Allow Chrome...' prompt
10. tap 'ALLOW'
11. see 'Install Wi-Fi credentials' prompt
12. tap 'INSTALL'
13. see 'Credentials installed' dialog
14. adb logcat -d | grep 'could not delete'
10-12 17:23:23.759 17030 17030 E WifiInstaller: could not delete document content://com.android.chrome.FileProvider/downloads/BoingoPasspointProfile

(last step confirms that this patch was necessary)

Change-Id: I5cc4ac9cec8d6942f64ede696ccac3a6d9204922
/packages/apps/CertInstaller/src/com/android/certinstaller/WiFiInstaller.java
12e6eea983e5b077b28a67b421327335324aee39 13-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WiFiInstaller: update usage of WifiManager#addOrUpdatePasspointConfiguration"
839309913316a9a768f51700d662bb232e9acf90 09-Mar-2017 Ben Lin <linben@google.com> Update DocumentsContract call to ensure thrown Exceptions are handled.

Test: Build compiles properly.
Bug: 36023174
Change-Id: I3dcb3def5877d4a4c5ba4d12ec60ccb4b77426ea
/packages/apps/CertInstaller/src/com/android/certinstaller/WiFiInstaller.java
b421a4a14c2f7b72b47b2e8c30999c8a8805fa07 06-Mar-2017 Peter Qiu <zqiu@google.com> WiFiInstaller: update usage of WifiManager#addOrUpdatePasspointConfiguration

WifiManager#addOrUpdatePasspointConfiguration is updated to return
void and throw exception on failure instead of a boolean, so update
the callsite accordingly.

Bug: 35856174
Test: make -j32
Change-Id: Id56ee82916397a26432a22addfb59ffddddefe79
/packages/apps/CertInstaller/src/com/android/certinstaller/WiFiInstaller.java
ce31c594ff0e3a82923d719a03940293422ac02b 02-Feb-2017 Peter Qiu <zqiu@google.com> WiFiInstaller: Passpoint API rename update

ConfigBuilder has been renamed to ConfigParser to avoid confusions
with the builder pattern used in the Framework API. So update the
callsite accordingly.

Bug: 34862444
Test: None
Change-Id: I71d61a7e6c0a44b7004ca83f927eda008d02cb25
/packages/apps/CertInstaller/src/com/android/certinstaller/WiFiInstaller.java
15eb8cad9a117e7e3d2bf37d44bc721df3c56019 25-Jan-2017 Peter Qiu <zqiu@google.com> WifiInstaller: use updated PasspointConfiguration APIs

PasspointConfiguration APIs are updated to use private
variables with public accessor methods instead of public variables.
So update the code to use the accessor methods instead of using
variables directly.

Bug: 34627062
Test: make -j32
Change-Id: I96e06a16440eba02ea2d39db1ef5a0e5016e0f7a
/packages/apps/CertInstaller/src/com/android/certinstaller/WiFiInstaller.java
a88d7852fdca57f52cd91b912be445f042ef4901 16-Dec-2016 Peter Qiu <zqiu@google.com> WifiInstaller: Passpoint configuration API update

WifiManager#addPasspointConfiguration is renamed to
WifiManager#addOrUpdatePasspointConfiguration. So update the
callsite accordingly.

Bug: 33587910
Test: make -j32
Change-Id: I29c64ee5ee68db5449d0e46c90436e8555e672e4
/packages/apps/CertInstaller/src/com/android/certinstaller/WiFiInstaller.java
54a13951da47e32f10e6f108f311f4f3d542eb63 25-Oct-2016 Peter Qiu <zqiu@google.com> WifiInstaller: use new Passpoint API

New API is added to WifiManager for provisioning Passpoint
configurations, so use that API instead of using the API
for adding Wifi networks.

Additional changes:
- Remove the restriction on only allowing the installation when
WiFi is enabled, since the new APIs have no such limitation and
the installation of a configuration should not depend on the state
of the WiFi.
- Previously, the configuration file deletion was done by the parser
(in WifiService). This doesn't make sense since the configuration
data file is owned by the app not the parser. So instead, the file
will be deleted by the app (WifiInstaller).

Bug: 32282288
Test: Download and install a Boingo profile

Change-Id: I4af737f25cbe2e5c815a9abe83f98cc13970a2cc
/packages/apps/CertInstaller/src/com/android/certinstaller/WiFiInstaller.java
aff933748edf3d4e9ea0a5ed6adc03fdbb748207 12-Jan-2016 Jan Nordqvist <jannq@google.com> Drop checks for locked WiFi key store when installing keys/certs.

The security provided by the PIN lock is not considered to provide
any added value over disk encryption for the protection of the WiFi
key store.
In addition the PIN lock is major hurdle for onboarding 802.1X users
who do need a trust cert installed.

BUG=25887356

Change-Id: Ifb8004679ab6b1f155751ff18e29be27e4dce65f
/packages/apps/CertInstaller/src/com/android/certinstaller/WiFiInstaller.java
909641b23712b9066b514442b236dfc47c1e3279 05-Aug-2015 Sanket Padawe <sanketpadawe@google.com> Offload time consuming task to background while installing HS profile.

+ Avoid Wifi api calls when wifi is disabled.

Bug: 22921398
Change-Id: I21b0db5b2926c4bbd5473d84855ec1ef2e83734b
/packages/apps/CertInstaller/src/com/android/certinstaller/WiFiInstaller.java
fb90c6fc3726b1bcfdbb2bd3db03c731a5316790 01-Aug-2015 Jan Nordqvist <jannq@google.com> Added logging in a few error paths for wifi config installation.

Bug: 22790527
Change-Id: I8f4bb40a572ae4e7f855e4bf4b028f9b889c5af1
/packages/apps/CertInstaller/src/com/android/certinstaller/WiFiInstaller.java
580c5f5ab98c391d113db67c6a304e4dd179f508 09-Jul-2015 Jan Nordqvist <jannq@google.com> Allowing rewrite of Passpoint credential.

Bug: 21779835
Change-Id: I5b551f332f6d487896359147137cb1fc605b109a
/packages/apps/CertInstaller/src/com/android/certinstaller/WiFiInstaller.java
e44e990b25d2d29062c9cb9cd160a6361f71e6fe 23-Jun-2015 Jan Nordqvist <jannq@google.com> Fixed missing white-space.

Change-Id: Ie2a5eb7367b79d6c38a2af7bddd82fbc5bee3a26
/packages/apps/CertInstaller/src/com/android/certinstaller/WiFiInstaller.java
477d2ea4810dea406ffb285f778186e40e871018 23-Jun-2015 Sanket Padawe <sanketpadawe@google.com> Merge "Add dialog when installing HS 2.0 credentials while wifi is off." into mnc-dev
66177c3dfd449df65b3fdafdd2921c38c6385db4 23-Jun-2015 Sanket Padawe <sanketpadawe@google.com> Add dialog when installing HS 2.0 credentials while wifi is off.

Bug: 22010833
Change-Id: Ic59fbf7ec197bc4431508c7d1d495c047c0e20cc
/packages/apps/CertInstaller/src/com/android/certinstaller/WiFiInstaller.java
0694d5c4498466208bb21df6197787a6c12c7fba 23-Jun-2015 Jan Nordqvist <jannq@google.com> Catching runtime exception in WifiInstaller.

Bug: 21958895
Change-Id: Ia483c9307e653e88d7d6050ef70963093f1b5f2b
/packages/apps/CertInstaller/src/com/android/certinstaller/WiFiInstaller.java
122def31973a25d878f33ce59288792aea27a32d 14-May-2015 Sanket Padawe <sanketpadawe@google.com> Hotspot 2.0 credential UI code

Bug: 20182930
Change-Id: Iaac91833555f399acf8746ba11dd3007022205bd
/packages/apps/CertInstaller/src/com/android/certinstaller/WiFiInstaller.java
7c543b71d8b60d2e2885c361ef73481c8f1eb27f 17-Apr-2015 Jan Nordqvist <jannq@google.com> Changed logging tag.

Change-Id: Ibdfeed92805bde4cd7ac0a7ffdd239cb467cbbfd
/packages/apps/CertInstaller/src/com/android/certinstaller/WiFiInstaller.java
8eca13babaafda875ad715c716371513002ed31e 16-Apr-2015 Jan Nordqvist <jannq@google.com> Launching PIN entry dialog if keystore access is required and the keystore is locked.

Change-Id: I723f741176fb776e8791bd4f838140d109139493
/packages/apps/CertInstaller/src/com/android/certinstaller/WiFiInstaller.java
994932f1949316fe5520d6c690e6bd9b49b88ba6 26-Mar-2015 Jan Nordqvist <jannq@google.com> Basic WiFi config installer app.

Change-Id: I12e26955f4057db7a1772eacfec6ce9fa58f4437
/packages/apps/CertInstaller/src/com/android/certinstaller/WiFiInstaller.java