Add a new system service for blob store management.
This change adds a bare-bones system service, implementation will follow
later.
Bug: 143559646
Test: atest cts/tests/BlobStore/src/com/android/cts/blob/BlobStoreManagerTest.java
Change-Id: Idf21dfcd11dd32a42b62c6ad965d6f5ad7eed1b4
diff --git a/apex/blobstore/service/Android.bp b/apex/blobstore/service/Android.bp
new file mode 100644
index 0000000..019f989
--- /dev/null
+++ b/apex/blobstore/service/Android.bp
@@ -0,0 +1,27 @@
+// Copyright (C) 2019 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+java_library {
+ name: "blobstore-service",
+ installable: true,
+
+ srcs: [
+ "java/**/*.java",
+ ],
+
+ libs: [
+ "framework",
+ "services.core",
+ ],
+}
\ No newline at end of file
diff --git a/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java b/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java
new file mode 100644
index 0000000..d7cab59
--- /dev/null
+++ b/apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.server.blob;
+
+import android.app.blob.IBlobStoreManager;
+import android.content.Context;
+
+import com.android.server.SystemService;
+
+/**
+ * Service responsible for maintaining and facilitating access to data blobs published by apps.
+ */
+public class BlobStoreManagerService extends SystemService {
+
+ public BlobStoreManagerService(Context context) {
+ super(context);
+ }
+
+ @Override
+ public void onStart() {
+ publishBinderService(Context.BLOB_STORE_SERVICE, new Stub());
+ }
+
+ private class Stub extends IBlobStoreManager.Stub {
+ }
+}