Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c522e5ab authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by android-build-merger
Browse files

Merge "Add missing mApps synchronization"

am: 63149c18

Change-Id: Ic6f1c7f7828bb6ea9a0448f600b927974ec10925
parents e5bffd23 63149c18
Loading
Loading
Loading
Loading
+18 −12
Original line number Diff line number Diff line
@@ -244,11 +244,13 @@ import com.android.bluetooth.btservice.BluetoothProto;
     * Get an application context by ID.
     */
    App getById(int id) {
        synchronized (mApps) {
            Iterator<App> i = mApps.iterator();
            while (i.hasNext()) {
                App entry = i.next();
                if (entry.id == id) return entry;
            }
        }
        Log.e(TAG, "Context not found for ID " + id);
        return null;
    }
@@ -257,11 +259,13 @@ import com.android.bluetooth.btservice.BluetoothProto;
     * Get an application context by UUID.
     */
    App getByUuid(UUID uuid) {
        synchronized (mApps) {
            Iterator<App> i = mApps.iterator();
            while (i.hasNext()) {
                App entry = i.next();
                if (entry.uuid.equals(uuid)) return entry;
            }
        }
        Log.e(TAG, "Context not found for UUID " + uuid);
        return null;
    }
@@ -270,11 +274,13 @@ import com.android.bluetooth.btservice.BluetoothProto;
     * Get an application context by the calling Apps name.
     */
    App getByName(String name) {
        synchronized (mApps) {
            Iterator<App> i = mApps.iterator();
            while (i.hasNext()) {
                App entry = i.next();
                if (entry.name.equals(name)) return entry;
            }
        }
        Log.e(TAG, "Context not found for name " + name);
        return null;
    }