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

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

Merge "Add missing mApps synchronization" am: 63149c18

am: c522e5ab

Change-Id: Ib4f7d301f25ec708e37ff07330b29555888b5e5d
parents 4d3f5d0e c522e5ab
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;
    }