X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fconnectivity%2Fsamples%2Fandroid%2Fsample_service%2Fsrc%2Forg%2Fiotivity%2Fca%2FCaIpInterface.java;h=901520b0d24719ea8331d97eafbfe7332f4f176a;hb=8c01dff2c5bc5496f7dc1632c498943ec6ecb015;hp=43d0ace5015ba36744b354b0543cbe8de88a84c1;hpb=935fdb9b67b6c10d007e652e9e2e028fd6ccfe09;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/connectivity/samples/android/sample_service/src/org/iotivity/ca/CaIpInterface.java b/resource/csdk/connectivity/samples/android/sample_service/src/org/iotivity/ca/CaIpInterface.java index 43d0ace..901520b 100644 --- a/resource/csdk/connectivity/samples/android/sample_service/src/org/iotivity/ca/CaIpInterface.java +++ b/resource/csdk/connectivity/samples/android/sample_service/src/org/iotivity/ca/CaIpInterface.java @@ -1,24 +1,22 @@ -/* - * //****************************************************************** - * // - * // Copyright 2015 Intel Corporation. - * // - * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - * // - * // 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. - * // - * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - */ +/****************************************************************** + * + * Copyright 2014 Samsung Electronics All Rights Reserved. + * + * + * + * 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 org.iotivity.ca; @@ -50,21 +48,21 @@ public class CaIpInterface { @Override public void onReceive(Context context, Intent intent) { if (intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE, - WifiManager.WIFI_STATE_UNKNOWN) == WifiManager.WIFI_STATE_DISABLED) { - stateDisabled(); + WifiManager.WIFI_STATE_UNKNOWN) == WifiManager.WIFI_STATE_DISABLED) { + caIpStateDisabled(); } else if (intent.getAction().equals(ConnectivityManager.CONNECTIVITY_ACTION)) { ConnectivityManager manager = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo nwInfo = manager.getNetworkInfo(ConnectivityManager.TYPE_WIFI); if(nwInfo.isConnected()) { - stateEnabled(); + caIpStateEnabled(); } } } }; - private native static void stateEnabled(); + private native static void caIpStateEnabled(); - private native static void stateDisabled(); + private native static void caIpStateDisabled(); } \ No newline at end of file