/* * Copyright (C) 2014 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.commands.telecom; import android.content.ComponentName; import android.content.Context; import android.net.Uri; import android.os.IUserManager; import android.os.Process; import android.os.RemoteException; import android.os.ServiceManager; import android.os.UserHandle; import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; import com.android.internal.os.BaseCommand; import com.android.internal.telecom.ITelecomService; import java.io.PrintStream; public final class Telecom extends BaseCommand { /** * Command-line entry point. * * @param args The command-line arguments */ public static void main(String[] args) { (new Telecom()).run(args); } private static final String COMMAND_SET_PHONE_ACCOUNT_ENABLED = "set-phone-account-enabled"; private static final String COMMAND_SET_PHONE_ACCOUNT_DISABLED = "set-phone-account-disabled"; private static final String COMMAND_REGISTER_PHONE_ACCOUNT = "register-phone-account"; private static final String COMMAND_REGISTER_SIM_PHONE_ACCOUNT = "register-sim-phone-account"; private static final String COMMAND_UNREGISTER_PHONE_ACCOUNT = "unregister-phone-account"; private static final String COMMAND_SET_DEFAULT_DIALER = "set-default-dialer"; private static final String COMMAND_GET_DEFAULT_DIALER = "get-default-dialer"; private static final String COMMAND_GET_SYSTEM_DIALER = "get-system-dialer"; private ComponentName mComponent; private String mAccountId; private ITelecomService mTelecomService; private IUserManager mUserManager; @Override public void onShowUsage(PrintStream out) { out.println( "usage: telecom [subcommand] [options]\n" + "usage: telecom set-phone-account-enabled \n" + "usage: telecom set-phone-account-disabled \n" + "usage: telecom register-phone-account