Merge "Add VisibleForTesting to create TelephonyRegistryTest."
am: fb96aac216
Change-Id: Ib18e4d3a2caf16f5523ec7413e892cdce18e6a06
This commit is contained in:
@@ -50,6 +50,7 @@ import android.telephony.TelephonyManager;
|
|||||||
import android.telephony.VoLteServiceState;
|
import android.telephony.VoLteServiceState;
|
||||||
import android.util.LocalLog;
|
import android.util.LocalLog;
|
||||||
|
|
||||||
|
import com.android.internal.annotations.VisibleForTesting;
|
||||||
import com.android.internal.app.IBatteryStats;
|
import com.android.internal.app.IBatteryStats;
|
||||||
import com.android.internal.telephony.IOnSubscriptionsChangedListener;
|
import com.android.internal.telephony.IOnSubscriptionsChangedListener;
|
||||||
import com.android.internal.telephony.IPhoneStateListener;
|
import com.android.internal.telephony.IPhoneStateListener;
|
||||||
@@ -82,7 +83,8 @@ import java.util.NoSuchElementException;
|
|||||||
* Eventually we may want to remove the notion of dummy value but for now this
|
* Eventually we may want to remove the notion of dummy value but for now this
|
||||||
* looks like the best approach.
|
* looks like the best approach.
|
||||||
*/
|
*/
|
||||||
class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
@VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE)
|
||||||
|
public class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
||||||
private static final String TAG = "TelephonyRegistry";
|
private static final String TAG = "TelephonyRegistry";
|
||||||
private static final boolean DBG = false; // STOPSHIP if true
|
private static final boolean DBG = false; // STOPSHIP if true
|
||||||
private static final boolean DBG_LOC = false; // STOPSHIP if true
|
private static final boolean DBG_LOC = false; // STOPSHIP if true
|
||||||
@@ -324,7 +326,8 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
// calls go through a oneway interface and local calls going through a
|
// calls go through a oneway interface and local calls going through a
|
||||||
// handler before they get to app code.
|
// handler before they get to app code.
|
||||||
|
|
||||||
TelephonyRegistry(Context context) {
|
@VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE)
|
||||||
|
public TelephonyRegistry(Context context) {
|
||||||
CellLocation location = CellLocation.getEmpty();
|
CellLocation location = CellLocation.getEmpty();
|
||||||
|
|
||||||
mContext = context;
|
mContext = context;
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import android.os.Handler;
|
|||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
|
|
||||||
|
import com.android.internal.annotations.VisibleForTesting;
|
||||||
import com.android.internal.telephony.IPhoneStateListener;
|
import com.android.internal.telephony.IPhoneStateListener;
|
||||||
|
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
@@ -778,8 +779,12 @@ public class PhoneStateListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
@VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE)
|
||||||
@UnsupportedAppUsage
|
@UnsupportedAppUsage
|
||||||
IPhoneStateListener callback = new IPhoneStateListenerStub(this);
|
public final IPhoneStateListener callback = new IPhoneStateListenerStub(this);
|
||||||
|
|
||||||
private void log(String s) {
|
private void log(String s) {
|
||||||
Rlog.d(LOG_TAG, s);
|
Rlog.d(LOG_TAG, s);
|
||||||
|
|||||||
Reference in New Issue
Block a user