Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e768d60 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 4521654 from 67aa5151 to pi-release

Change-Id: I7f33a77d51638f459be460e48ab163c521405ba8
parents f1b7acd3 67aa5151
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
    <!-- Title of the Files application [CHAR LIMIT=32] -->
    <string name="files_label">Files</string>

    <!-- Title of the Downloads application, which sometimes Files is known as [CHAR LIMIT=32] -->
    <!-- Title of the Downloads application, which sometimes Files is known as [CHAR LIMIT=16] -->
    <string name="downloads_label">Downloads</string>

    <!-- Title of the documents application [CHAR LIMIT=32] -->
+12 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -54,9 +55,20 @@ public class PrefsBackupHelperTest {
    public void setUp() {
        mDefaultPrefs = InstrumentationRegistry.getContext().getSharedPreferences("prefs1", 0);
        mBackupPrefs = InstrumentationRegistry.getContext().getSharedPreferences("prefs2", 0);
        clearSharedPrefs();
        mPrefsBackupHelper = new PrefsBackupHelper(mDefaultPrefs);
    }

    @After
    public void tearDown() {
        clearSharedPrefs();
    }

    private void clearSharedPrefs() {
        mDefaultPrefs.edit().clear().commit();
        mBackupPrefs.edit().clear().commit();
    }

    @Test
    public void testPrepareBackupFile_BackupLocalPreferences() {
        mDefaultPrefs.edit().putInt(LOCAL_PREFERENCE_1, 1).commit();