private final Context mContext;
+ private final ITelecomService mTelecomServiceOverride;
+
/**
* @hide
*/
* @hide
*/
public TelecomManager(Context context) {
+ this(context, null);
+ }
+
+ /**
+ * @hide
+ */
+ public TelecomManager(Context context, ITelecomService telecomServiceImpl) {
Context appContext = context.getApplicationContext();
if (appContext != null) {
mContext = appContext;
} else {
mContext = context;
}
+ mTelecomServiceOverride = telecomServiceImpl;
}
/**
}
private ITelecomService getTelecomService() {
+ if (mTelecomServiceOverride != null) {
+ return mTelecomServiceOverride;
+ }
return ITelecomService.Stub.asInterface(ServiceManager.getService(Context.TELECOM_SERVICE));
}