Loading packages/MtpDocumentsProvider/tests/src/com/android/mtp/MtpDocumentsProviderTest.java +1 −14 Original line number Diff line number Diff line Loading @@ -16,9 +16,6 @@ package com.android.mtp; import android.content.res.Configuration; import android.content.res.Resources; import android.content.res.Resources.NotFoundException; import android.database.Cursor; import android.mtp.MtpConstants; import android.mtp.MtpObjectInfo; Loading @@ -26,7 +23,6 @@ import android.net.Uri; import android.provider.DocumentsContract.Root; import android.provider.DocumentsContract; import android.test.AndroidTestCase; import android.test.mock.MockResources; import android.test.suitebuilder.annotation.SmallTest; import java.io.FileNotFoundException; Loading @@ -39,16 +35,7 @@ public class MtpDocumentsProviderTest extends AndroidTestCase { private TestContentResolver mResolver; private MtpDocumentsProvider mProvider; private TestMtpManager mMtpManager; private final MockResources mResources = new MockResources() { @Override public String getString(int id) throws NotFoundException { switch (id) { case R.string.root_name: return "%1$s %2$s"; } throw new NotFoundException(); } }; private final TestResources mResources = new TestResources(); @Override public void setUp() throws IOException { Loading packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestResources.java 0 → 100644 +30 −0 Original line number Diff line number Diff line /* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.mtp; import android.test.mock.MockResources; class TestResources extends MockResources { @Override public String getString(int id) throws NotFoundException { switch (id) { case R.string.root_name: return "%1$s %2$s"; } throw new NotFoundException(); } } Loading
packages/MtpDocumentsProvider/tests/src/com/android/mtp/MtpDocumentsProviderTest.java +1 −14 Original line number Diff line number Diff line Loading @@ -16,9 +16,6 @@ package com.android.mtp; import android.content.res.Configuration; import android.content.res.Resources; import android.content.res.Resources.NotFoundException; import android.database.Cursor; import android.mtp.MtpConstants; import android.mtp.MtpObjectInfo; Loading @@ -26,7 +23,6 @@ import android.net.Uri; import android.provider.DocumentsContract.Root; import android.provider.DocumentsContract; import android.test.AndroidTestCase; import android.test.mock.MockResources; import android.test.suitebuilder.annotation.SmallTest; import java.io.FileNotFoundException; Loading @@ -39,16 +35,7 @@ public class MtpDocumentsProviderTest extends AndroidTestCase { private TestContentResolver mResolver; private MtpDocumentsProvider mProvider; private TestMtpManager mMtpManager; private final MockResources mResources = new MockResources() { @Override public String getString(int id) throws NotFoundException { switch (id) { case R.string.root_name: return "%1$s %2$s"; } throw new NotFoundException(); } }; private final TestResources mResources = new TestResources(); @Override public void setUp() throws IOException { Loading
packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestResources.java 0 → 100644 +30 −0 Original line number Diff line number Diff line /* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.mtp; import android.test.mock.MockResources; class TestResources extends MockResources { @Override public String getString(int id) throws NotFoundException { switch (id) { case R.string.root_name: return "%1$s %2$s"; } throw new NotFoundException(); } }