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

Commit ff5581d4 authored by Howard Ro's avatar Howard Ro Committed by Android (Google) Code Review
Browse files

Merge "Migrate Statsd to the apex"

parents 23605f21 89e09b58
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -22,13 +22,13 @@ apex_defaults {
    native_shared_libs: [
        "libstats_jni",
    ],
    // binaries: ["vold"],
    binaries: ["statsd"],
    java_libs: [
        "framework-statsd",
        "service-statsd",
    ],
    compile_multilib: "both",
    // prebuilts: ["my_prebuilt"],
    prebuilts: ["com.android.os.statsd.init.rc"],
    name: "com.android.os.statsd-defaults",
    key: "com.android.os.statsd.key",
    certificate: ":com.android.os.statsd.certificate",
@@ -47,6 +47,12 @@ android_app_certificate {
    certificate: "com.android.os.statsd",
}

prebuilt_etc {
    name: "com.android.os.statsd.init.rc",
    src: "statsd.rc",
    filename: "init.rc",
    installable: false,
}

// JNI library for StatsLog.write
cc_library_shared {
+1 −11
Original line number Diff line number Diff line
@@ -12,19 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

service statsd /system/bin/statsd
service statsd /apex/com.android.os.statsd/bin/statsd
    class main
    socket statsdw dgram+passcred 0222 statsd statsd
    user statsd
    group statsd log
    writepid /dev/cpuset/system-background/tasks

on property:ro.statsd.enable=false
    stop statsd

on post-fs-data
    # Create directory for statsd
    mkdir /data/misc/stats-data/ 0770 statsd system
    mkdir /data/misc/stats-service/ 0770 statsd system
    mkdir /data/misc/stats-active-metric/ 0770 statsd system
    mkdir /data/misc/train-info/ 0770 statsd system
+4 −1
Original line number Diff line number Diff line
@@ -217,7 +217,10 @@ cc_binary {

    shared_libs: ["libgtest_prod"],

    init_rc: ["statsd.rc"],
    apex_available: [
        "com.android.os.statsd",
        "test_com.android.os.statsd",
    ],
}

// ==============
+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ public class Watchdog extends Thread {
        "media.codec", // vendor/bin/hw/android.hardware.media.omx@1.0-service
        "media.swcodec", // /apex/com.android.media.swcodec/bin/mediaswcodec
        "com.android.bluetooth",  // Bluetooth service
        "/system/bin/statsd",  // Stats daemon
        "/apex/com.android.os.statsd/bin/statsd",  // Stats daemon
    };

    public static final List<String> HAL_INTERFACES_OF_INTEREST = Arrays.asList(