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

Commit a36fc56e authored by paulhu's avatar paulhu
Browse files

Replace ConnectivityManager hidden symbols on Telephony

Connectivity is becoming a mainline module in S, so
ConnectivityManager hidden symbols can not be used for outside
components. Besides, most Tethering relevant methods or variables
on CM are migrated to TetheringManager. So replace all these
methods or variables from ConnectivityManager to TetheringManager
on Telephony.

Bug: 180693313
Test: atest FrameworksTelephonyTests:DeviceStateMonitorTest
Change-Id: I0a7dccbea1295cbb665106ee9a2a8705ee2c7ba7
parent 4d04d3f1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -290,7 +290,7 @@ public class DeviceStateMonitor extends Handler {
        filter.addAction(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED);
        filter.addAction(BatteryManager.ACTION_CHARGING);
        filter.addAction(BatteryManager.ACTION_DISCHARGING);
        filter.addAction(ConnectivityManager.ACTION_TETHER_STATE_CHANGED);
        filter.addAction(TetheringManager.ACTION_TETHER_STATE_CHANGED);
        mPhone.getContext().registerReceiver(mBroadcastReceiver, filter, null, mPhone);

        mPhone.mCi.registerForRilConnected(this, EVENT_RIL_CONNECTED, null);
+2 −1
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import android.content.Context;
import android.content.Intent;
import android.hardware.radio.V1_5.IndicationFilter;
import android.net.ConnectivityManager;
import android.net.TetheringManager;
import android.os.BatteryManager;
import android.os.Message;
import android.test.suitebuilder.annotation.MediumTest;
@@ -250,7 +251,7 @@ public class DeviceStateMonitorTest extends TelephonyTest {
    @Test
    public void testTethering() {
        // Turn tethering on
        Intent intent = new Intent(ConnectivityManager.ACTION_TETHER_STATE_CHANGED);
        Intent intent = new Intent(TetheringManager.ACTION_TETHER_STATE_CHANGED);
        intent.putExtra(ConnectivityManager.EXTRA_ACTIVE_TETHER, new ArrayList<>(asList("abc")));
        mContext.sendBroadcast(intent);
        processAllMessages();