Replace the hidden API to public API or other alternatives

Some of connectivity related files are going to be a part of
mainline module, so the external callers cannot call its hidden
API.
Replace the hidden API to public API or other alternatives from
the callers side.

Bug: 182859030
Test: 1. Remove "framework-connectivity.impl"
      2. atest SettingsUnitTests:InternetUpdaterTest
      3. atest SettingsUnitTests:ProviderModelSliceHelperTest
      4. atest SettingsUnitTests:MobileNetworkUtilsTest
      5. make RunSettingsRoboTests \
         ROBOTEST_FILTER=AppDataUsagePreferenceControllerTest
      6. make RunSettingsRoboTests \
         ROBOTEST_FILTER=TetherPreferenceControllerTest
      7. make RunSettingsRoboTests \
         ROBOTEST_FILTER=WifiDetailPreferenceController2Test
      8. make RunSettingsRoboTests \
         ROBOTEST_FILTER=ContextualWifiSliceTest
Change-Id: Idd1ca57d8f2790070e9c401936c5af2a05bcfe9d
This commit is contained in:
lucaslin
2021-04-14 16:50:53 +08:00
committed by Lucas Lin
parent 4400038635
commit 09bbb51d29
7 changed files with 50 additions and 41 deletions

View File

@@ -32,7 +32,6 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.database.ContentObserver;
import android.net.ConnectivityManager;
import android.net.TetheringManager;
import android.provider.Settings;
@@ -198,7 +197,7 @@ public class TetherPreferenceControllerTest {
ReflectionHelpers.setField(mController, "mContext", context);
mController.onResume();
context.sendBroadcast(new Intent(ConnectivityManager.ACTION_TETHER_STATE_CHANGED));
context.sendBroadcast(new Intent(TetheringManager.ACTION_TETHER_STATE_CHANGED));
verify(mController).updateSummary();
}