Consolidate all wrappers used for testing.
- Add the wrapper package and move all wrappers to the wrapper package. - Get rid of some wrapper interface/impl implementation and have a wrapper class directly. Bug: 65634579 Test: make RunSettingsRoboTests Change-Id: Ic757d8f7bacfa7a034c7e692205bc1dc4b0e1de1
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package com.android.settings.wrapper;
|
||||
|
||||
import android.content.Context;
|
||||
import com.android.settingslib.RestrictedLockUtils;
|
||||
|
||||
/**
|
||||
* Wrapper class needed to be able to test classes which use RestrictedLockUtils methods.
|
||||
* Unfortunately there is no way to deal with this until robolectric is updated due to the fact
|
||||
* that it is a static method and it uses new API's.
|
||||
*/
|
||||
public class RestrictedLockUtilsWrapper {
|
||||
public boolean hasBaseUserRestriction(Context context, String userRestriction, int userId) {
|
||||
return RestrictedLockUtils.hasBaseUserRestriction(context, userRestriction, userId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user