Initialize the Browsable Player list at user unlock instead of boot complete
Bug: 34471252
Test: Code compiles and the browsable player list is built earlier in the boot process
Change-Id: I664e0dbaecade43df58ce464a634306db2910f5b
diff --git a/android/app/src/com/android/bluetooth/avrcp/Avrcp.java b/android/app/src/com/android/bluetooth/avrcp/Avrcp.java
index 4aa56a0..ec6fd52 100644
--- a/android/app/src/com/android/bluetooth/avrcp/Avrcp.java
+++ b/android/app/src/com/android/bluetooth/avrcp/Avrcp.java
@@ -291,7 +291,7 @@
context.registerReceiver(mAvrcpReceiver, pkgFilter);
IntentFilter bootFilter = new IntentFilter();
- bootFilter.addAction(Intent.ACTION_BOOT_COMPLETED);
+ bootFilter.addAction(Intent.ACTION_USER_UNLOCKED);
context.registerReceiver(mBootReceiver, bootFilter);
}
@@ -1414,8 +1414,8 @@
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
- if (action.equals(Intent.ACTION_BOOT_COMPLETED)) {
- if (DEBUG) Log.d(TAG, "Boot completed, initializing player lists");
+ if (action.equals(Intent.ACTION_USER_UNLOCKED)) {
+ if (DEBUG) Log.d(TAG, "User unlocked, initializing player lists");
/* initializing media player's list */
buildBrowsablePlayerList();
}