From e5abe5dc9181b8b95717ba0c659810a11009a5af Mon Sep 17 00:00:00 2001 From: lasanthaDLPDS Date: Mon, 25 Nov 2019 11:28:24 +0530 Subject: [PATCH] Remove unused AndroidDeviceManagementService class --- .../android/util/AndroidEnterpriseUtils.java | 2 - .../impl/AndroidDeviceManagementService.java | 151 ------------------ 2 files changed, 153 deletions(-) delete mode 100644 components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/src/main/java/org/wso2/carbon/device/mgt/mobile/android/impl/AndroidDeviceManagementService.java diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidEnterpriseUtils.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidEnterpriseUtils.java index c2bd0f4d32..6bd4e0be89 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidEnterpriseUtils.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidEnterpriseUtils.java @@ -30,7 +30,6 @@ import com.google.api.services.androidenterprise.model.ProductPolicy; import com.google.api.services.androidenterprise.model.ProductsListResponse; import com.google.api.services.androidenterprise.model.VariableSet; -import com.google.common.collect.ImmutableList; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; @@ -39,7 +38,6 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.device.application.mgt.common.ApplicationArtifact; -import org.wso2.carbon.device.application.mgt.common.Filter; import org.wso2.carbon.device.application.mgt.common.LifecycleChanger; import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException; import org.wso2.carbon.device.application.mgt.common.response.Application; diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/src/main/java/org/wso2/carbon/device/mgt/mobile/android/impl/AndroidDeviceManagementService.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/src/main/java/org/wso2/carbon/device/mgt/mobile/android/impl/AndroidDeviceManagementService.java deleted file mode 100644 index bccceedbb5..0000000000 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/src/main/java/org/wso2/carbon/device/mgt/mobile/android/impl/AndroidDeviceManagementService.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you 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. - * - * Copyright (c) 2019, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. - * - * Entgra (Pvt) Ltd. licenses this file to you 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 org.wso2.carbon.device.mgt.mobile.android.impl; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.wso2.carbon.device.mgt.common.DeviceManager; -import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig; -import org.wso2.carbon.device.mgt.common.ProvisioningConfig; -import org.wso2.carbon.device.mgt.common.InitialOperationConfig; -import org.wso2.carbon.device.mgt.common.DeviceStatusTaskPluginConfig; -import org.wso2.carbon.device.mgt.common.StartupOperationConfig; -import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManager; -import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry; -import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; -import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException; -import org.wso2.carbon.device.mgt.common.general.GeneralConfig; -import org.wso2.carbon.device.mgt.common.policy.mgt.PolicyMonitoringManager; -import org.wso2.carbon.device.mgt.common.pull.notification.PullNotificationSubscriber; -import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig; -import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; -import org.wso2.carbon.device.mgt.common.type.mgt.DeviceTypePlatformDetails; -import org.wso2.carbon.device.mgt.mobile.android.impl.util.AndroidPluginConstants; -import org.wso2.carbon.device.mgt.mobile.android.internal.AndroidDeviceManagementDataHolder; - -import java.util.HashMap; -import java.util.List; - -/** - * This represents the Android implementation of DeviceManagerService. - */ -public class AndroidDeviceManagementService implements DeviceManagementService { - - private static final Log log = LogFactory.getLog(AndroidDeviceManagementService.class); - private DeviceManager deviceManager; - public static final String DEVICE_TYPE_ANDROID = "android"; - private static final String SUPER_TENANT_DOMAIN = "carbon.super"; - private static final String NOTIFIER_PROPERTY = "notifierType"; - private static final String FCM_API_KEY = "fcmAPIKey"; - private static final String FCM_SENDER_ID = "fcmSenderId"; - private PolicyMonitoringManager policyMonitoringManager; - - @Override - public String getType() { - return AndroidDeviceManagementService.DEVICE_TYPE_ANDROID; - } - - @Override - public OperationMonitoringTaskConfig getOperationMonitoringConfig() { - return null; - } - - @Override - public void init() throws DeviceManagementException { - - } - - @Override - public DeviceManager getDeviceManager() { - return deviceManager; - } - - @Override - public ApplicationManager getApplicationManager() { - return null; - } - - @Override - public ProvisioningConfig getProvisioningConfig() { - return new ProvisioningConfig(SUPER_TENANT_DOMAIN, true); - } - - @Override - public PushNotificationConfig getPushNotificationConfig() { - return null; - } - - @Override - public PolicyMonitoringManager getPolicyMonitoringManager() { - return policyMonitoringManager; - } - - @Override - public InitialOperationConfig getInitialOperationConfig() { - return null; - } - - @Override - public StartupOperationConfig getStartupOperationConfig() { - return null; - } - - @Override - public PullNotificationSubscriber getPullNotificationSubscriber() { - return null; - } - - @Override - public DeviceStatusTaskPluginConfig getDeviceStatusTaskPluginConfig() { - return null; - } - - @Override - public GeneralConfig getGeneralConfig() { - return null; - } - - @Override - public DeviceTypePlatformDetails getDeviceTypePlatformDetails() { return null; } - - private String getConfigProperty(List configs, String propertyName) { - for (ConfigurationEntry entry : configs) { - if (propertyName.equals(entry.getName())) { - return entry.getValue().toString(); - } - } - return null; - } -}