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

Commit 6308b5e2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Guard Context Hub Service on Context Hub feature"

parents 1ac48fd8 c88b3ce7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ import android.annotation.CallbackExecutor;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresFeature;
import android.annotation.RequiresPermission;
import android.annotation.SuppressLint;
import android.annotation.SystemApi;
@@ -26,6 +27,7 @@ import android.annotation.SystemService;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Handler;
import android.os.HandlerExecutor;
import android.os.Looper;
@@ -52,6 +54,7 @@ import java.util.concurrent.Executor;
 */
@SystemApi
@SystemService(Context.CONTEXTHUB_SERVICE)
@RequiresFeature(PackageManager.FEATURE_CONTEXTHUB)
public final class ContextHubManager {
    private static final String TAG = "ContextHubManager";

+5 −3
Original line number Diff line number Diff line
@@ -1724,9 +1724,11 @@ public final class SystemServer {
            mSystemServiceManager.startService(SensorNotificationService.class);
            t.traceEnd();

            if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_CONTEXTHUB)) {
                t.traceBegin("StartContextHubSystemService");
                mSystemServiceManager.startService(ContextHubSystemService.class);
                t.traceEnd();
            }

            t.traceBegin("StartDiskStatsService");
            try {