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

Commit dc14eb70 authored by Kenny Root's avatar Kenny Root
Browse files

Add empty AdbManagerInternal for system server

This will allow the call of internal-only AdbService functions from within
the system server.

Bug: 63820489
Test: make
Change-Id: Ic761b513a8c10ce0173ddb6bc761a6372799f15c
parent f74bfdee
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2018 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 android.debug;

/**
 * This class allows the control of ADB-related functions that should only be called from the system
 * server.
 *
 * @hide Only should be called from the system server.
 */
public abstract class AdbManagerInternal {
}
+7 −0
Original line number Diff line number Diff line
@@ -16,11 +16,13 @@
package com.android.server.adb;

import android.content.Context;
import android.debug.AdbManagerInternal;
import android.debug.IAdbManager;
import android.os.Binder;

import com.android.internal.util.DumpUtils;
import com.android.internal.util.IndentingPrintWriter;
import com.android.server.LocalServices;
import com.android.server.SystemService;

import java.io.FileDescriptor;
@@ -48,12 +50,17 @@ public class AdbService extends IAdbManager.Stub {
        }
    }

    private class AdbManagerInternalImpl extends AdbManagerInternal {
    }

    private static final String TAG = "AdbService";

    private final Context mContext;

    private AdbService(Context context) {
        mContext = context;

        LocalServices.addService(AdbManagerInternal.class, new AdbManagerInternalImpl());
    }

    @Override