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

Commit a3232bf4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "No need for lazy_static as Mutex::new is now const." am: a236a2c1 am:...

Merge "No need for lazy_static as Mutex::new is now const." am: a236a2c1 am: 6854c535 am: ce673ae8

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2193646



Change-Id: I595fcb5575d4aff84c217ef724a6317ab6308636
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 82251b19 ce673ae8
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ rust_library {
    rustlibs: [
        "libbinder_ndk_sys",
        "libdowncast_rs",
        "liblazy_static",
        "liblibc",
    ],
    host_supported: true,
@@ -160,7 +159,6 @@ rust_test {
    rustlibs: [
        "libbinder_ndk_sys",
        "libdowncast_rs",
        "liblazy_static",
        "liblibc",
    ],
}
+2 −5
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ use crate::parcel::{BorrowedParcel, Serialize};
use crate::proxy::SpIBinder;
use crate::sys;

use lazy_static::lazy_static;
use std::convert::TryFrom;
use std::ffi::{c_void, CStr, CString};
use std::fs::File;
@@ -508,10 +507,8 @@ pub struct LazyServiceGuard {
    _private: (),
}

lazy_static! {
// Count of how many LazyServiceGuard objects are in existence.
    static ref GUARD_COUNT: Mutex<u64> = Mutex::new(0);
}
static GUARD_COUNT: Mutex<u64> = Mutex::new(0);

impl LazyServiceGuard {
    /// Create a new LazyServiceGuard to prevent the service manager prematurely killing this