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:
Doris Ling
2017-08-31 16:17:30 -07:00
parent fe18f8e876
commit dee1a22c45
138 changed files with 421 additions and 1010 deletions

View File

@@ -31,6 +31,7 @@ import android.util.SparseArray;
import com.android.settingslib.applications.ApplicationsState;
import com.android.settingslib.applications.ApplicationsState.AppEntry;
import com.android.settings.wrapper.IPackageManagerWrapper;
import java.util.Arrays;
import java.util.Collection;
@@ -57,7 +58,7 @@ public abstract class AppStateAppOpsBridge extends AppStateBaseBridge {
public AppStateAppOpsBridge(Context context, ApplicationsState appState, Callback callback,
int appOpsOpCode, String[] permissions) {
this(context, appState, callback, appOpsOpCode, permissions,
new IPackageManagerWrapperImpl(AppGlobals.getPackageManager()));
new IPackageManagerWrapper(AppGlobals.getPackageManager()));
}
@VisibleForTesting(otherwise = VisibleForTesting.NONE)