1
0
Fork 0

Move settings classes to packages

master
Tiger Oakes 2019-09-13 21:29:11 -07:00 committed by Emily Kager
parent 699eacab39
commit 6c30a94081
32 changed files with 65 additions and 63 deletions

View File

@ -30,7 +30,7 @@ import org.mozilla.fenix.ext.nav
import org.mozilla.fenix.ext.toTab import org.mozilla.fenix.ext.toTab
import org.mozilla.fenix.lib.Do import org.mozilla.fenix.lib.Do
import org.mozilla.fenix.quickactionsheet.QuickActionSheetBehavior import org.mozilla.fenix.quickactionsheet.QuickActionSheetBehavior
import org.mozilla.fenix.utils.deleteAndQuit import org.mozilla.fenix.settings.deletebrowsingdata.deleteAndQuit
/** /**
* An interface that handles the view manipulation of the BrowserToolbar, triggered by the Interactor * An interface that handles the view manipulation of the BrowserToolbar, triggered by the Interactor

View File

@ -64,6 +64,8 @@ import org.mozilla.fenix.ext.getPreferenceKey
import org.mozilla.fenix.ext.metrics import org.mozilla.fenix.ext.metrics
import org.mozilla.fenix.ext.requireComponents import org.mozilla.fenix.ext.requireComponents
import org.mozilla.fenix.ext.settings import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.settings.account.AccountAuthErrorPreference
import org.mozilla.fenix.settings.account.AccountPreference
import org.mozilla.fenix.utils.ItsNotBrokenSnack import org.mozilla.fenix.utils.ItsNotBrokenSnack
@SuppressWarnings("TooManyFunctions", "LargeClass") @SuppressWarnings("TooManyFunctions", "LargeClass")

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings package org.mozilla.fenix.settings.account
import android.content.Context import android.content.Context
import android.util.AttributeSet import android.util.AttributeSet

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings package org.mozilla.fenix.settings.account
import android.content.Context import android.content.Context
import android.util.AttributeSet import android.util.AttributeSet

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings package org.mozilla.fenix.settings.account
import android.os.Bundle import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings package org.mozilla.fenix.settings.account
import android.app.Dialog import android.app.Dialog
import android.os.Bundle import android.os.Bundle

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings package org.mozilla.fenix.settings.account
import android.os.Bundle import android.os.Bundle
import android.view.LayoutInflater import android.view.LayoutInflater

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.utils package org.mozilla.fenix.settings.deletebrowsingdata
import android.app.Activity import android.app.Activity
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
@ -11,9 +11,6 @@ import kotlinx.coroutines.joinAll
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext import kotlinx.coroutines.withContext
import org.mozilla.fenix.ext.settings import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.settings.DefaultDeleteBrowsingDataController
import org.mozilla.fenix.settings.DeleteBrowsingDataController
import org.mozilla.fenix.settings.DeleteBrowsingDataOnQuitType
/** /**
* Deletes selected browsing data and finishes the activity. * Deletes selected browsing data and finishes the activity.

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings package org.mozilla.fenix.settings.deletebrowsingdata
import android.content.Context import android.content.Context
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings package org.mozilla.fenix.settings.deletebrowsingdata
import android.content.DialogInterface import android.content.DialogInterface
import android.os.Bundle import android.os.Bundle
@ -44,7 +44,7 @@ class DeleteBrowsingDataFragment : Fragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
controller = DefaultDeleteBrowsingDataController(context!!) controller = DefaultDeleteBrowsingDataController(requireContext())
sessionObserver = object : SessionManager.Observer { sessionObserver = object : SessionManager.Observer {
override fun onSessionAdded(session: Session) = updateTabCount() override fun onSessionAdded(session: Session) = updateTabCount()

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings package org.mozilla.fenix.settings.deletebrowsingdata
import android.content.Context import android.content.Context
import android.util.AttributeSet import android.util.AttributeSet

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings package org.mozilla.fenix.settings.deletebrowsingdata
import android.os.Bundle import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
@ -13,6 +13,7 @@ import androidx.preference.SwitchPreference
import org.mozilla.fenix.R import org.mozilla.fenix.R
import org.mozilla.fenix.ext.getPreferenceKey import org.mozilla.fenix.ext.getPreferenceKey
import org.mozilla.fenix.ext.settings import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.settings.SharedPreferenceUpdater
class DeleteBrowsingDataOnQuitFragment : PreferenceFragmentCompat() { class DeleteBrowsingDataOnQuitFragment : PreferenceFragmentCompat() {

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings package org.mozilla.fenix.settings.deletebrowsingdata
import android.content.Context import android.content.Context
import androidx.annotation.StringRes import androidx.annotation.StringRes

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings package org.mozilla.fenix.settings.search
import android.content.Context import android.content.Context
import android.util.AttributeSet import android.util.AttributeSet

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings package org.mozilla.fenix.settings.search
import android.os.Bundle import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
@ -11,6 +11,7 @@ import androidx.preference.SwitchPreference
import org.mozilla.fenix.R import org.mozilla.fenix.R
import org.mozilla.fenix.ext.getPreferenceKey import org.mozilla.fenix.ext.getPreferenceKey
import org.mozilla.fenix.ext.settings import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.settings.SharedPreferenceUpdater
class SearchEngineFragment : PreferenceFragmentCompat() { class SearchEngineFragment : PreferenceFragmentCompat() {

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings package org.mozilla.fenix.settings.search
import android.content.Context import android.content.Context
import android.content.res.Resources import android.content.res.Resources

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings package org.mozilla.fenix.settings.sitepermissions
import android.os.Bundle import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
@ -20,6 +20,7 @@ import org.jetbrains.anko.yesButton
import org.mozilla.fenix.R import org.mozilla.fenix.R
import org.mozilla.fenix.ext.components import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.getPreferenceKey import org.mozilla.fenix.ext.getPreferenceKey
import org.mozilla.fenix.settings.PhoneFeature
import org.mozilla.fenix.settings.PhoneFeature.CAMERA import org.mozilla.fenix.settings.PhoneFeature.CAMERA
import org.mozilla.fenix.settings.PhoneFeature.LOCATION import org.mozilla.fenix.settings.PhoneFeature.LOCATION
import org.mozilla.fenix.settings.PhoneFeature.MICROPHONE import org.mozilla.fenix.settings.PhoneFeature.MICROPHONE

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings package org.mozilla.fenix.settings.sitepermissions
import android.os.Bundle import android.os.Bundle
import android.view.LayoutInflater import android.view.LayoutInflater

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings package org.mozilla.fenix.settings.sitepermissions
import android.os.Bundle import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
@ -13,6 +13,7 @@ import androidx.preference.PreferenceFragmentCompat
import org.mozilla.fenix.R import org.mozilla.fenix.R
import org.mozilla.fenix.ext.getPreferenceKey import org.mozilla.fenix.ext.getPreferenceKey
import org.mozilla.fenix.ext.settings import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.settings.PhoneFeature
@SuppressWarnings("TooManyFunctions") @SuppressWarnings("TooManyFunctions")
class SitePermissionsFragment : PreferenceFragmentCompat() { class SitePermissionsFragment : PreferenceFragmentCompat() {
@ -69,7 +70,8 @@ class SitePermissionsFragment : PreferenceFragmentCompat() {
} }
private fun navigateToPhoneFeature(phoneFeature: PhoneFeature) { private fun navigateToPhoneFeature(phoneFeature: PhoneFeature) {
val directions = SitePermissionsFragmentDirections.actionSitePermissionsToManagePhoneFeatures(phoneFeature.id) val directions = SitePermissionsFragmentDirections
.actionSitePermissionsToManagePhoneFeatures(phoneFeature.id)
Navigation.findNavController(view!!).navigate(directions) Navigation.findNavController(view!!).navigate(directions)
} }
} }

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings package org.mozilla.fenix.settings.sitepermissions
import android.content.Intent import android.content.Intent
import android.net.Uri import android.net.Uri
@ -27,6 +27,9 @@ import org.jetbrains.anko.yesButton
import org.mozilla.fenix.R import org.mozilla.fenix.R
import org.mozilla.fenix.ext.requireComponents import org.mozilla.fenix.ext.requireComponents
import org.mozilla.fenix.ext.settings import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.settings.PhoneFeature
import org.mozilla.fenix.settings.initBlockedByAndroidView
import org.mozilla.fenix.settings.setStartCheckedIndicator
@SuppressWarnings("TooManyFunctions") @SuppressWarnings("TooManyFunctions")
class SitePermissionsManageExceptionsPhoneFeatureFragment : Fragment() { class SitePermissionsManageExceptionsPhoneFeatureFragment : Fragment() {

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings package org.mozilla.fenix.settings.sitepermissions
import android.content.Intent import android.content.Intent
import android.graphics.Color import android.graphics.Color
@ -27,6 +27,9 @@ import mozilla.components.feature.sitepermissions.SitePermissionsRules.Action.BL
import org.mozilla.fenix.R import org.mozilla.fenix.R
import org.mozilla.fenix.ext.requireComponents import org.mozilla.fenix.ext.requireComponents
import org.mozilla.fenix.ext.settings import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.settings.PhoneFeature
import org.mozilla.fenix.settings.initBlockedByAndroidView
import org.mozilla.fenix.settings.setStartCheckedIndicator
import org.mozilla.fenix.utils.Settings import org.mozilla.fenix.utils.Settings
@SuppressWarnings("TooManyFunctions") @SuppressWarnings("TooManyFunctions")

View File

@ -22,7 +22,7 @@ import org.mozilla.fenix.Config
import org.mozilla.fenix.R import org.mozilla.fenix.R
import org.mozilla.fenix.components.metrics.MozillaProductDetector import org.mozilla.fenix.components.metrics.MozillaProductDetector
import org.mozilla.fenix.ext.getPreferenceKey import org.mozilla.fenix.ext.getPreferenceKey
import org.mozilla.fenix.settings.DeleteBrowsingDataOnQuitType import org.mozilla.fenix.settings.deletebrowsingdata.DeleteBrowsingDataOnQuitType
import org.mozilla.fenix.settings.PhoneFeature import org.mozilla.fenix.settings.PhoneFeature
import java.security.InvalidParameterException import java.security.InvalidParameterException

View File

@ -29,7 +29,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<org.mozilla.fenix.settings.DeleteBrowsingDataItem <org.mozilla.fenix.settings.deletebrowsingdata.DeleteBrowsingDataItem
android:id="@+id/open_tabs_item" android:id="@+id/open_tabs_item"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -40,7 +40,7 @@
android:focusable="true" android:focusable="true"
app:deleteBrowsingDataItemTitle="@string/preferences_delete_browsing_data_tabs_title" app:deleteBrowsingDataItemTitle="@string/preferences_delete_browsing_data_tabs_title"
app:deleteBrowsingDataItemSubtitle="@string/preferences_delete_browsing_data_tabs_subtitle" /> app:deleteBrowsingDataItemSubtitle="@string/preferences_delete_browsing_data_tabs_subtitle" />
<org.mozilla.fenix.settings.DeleteBrowsingDataItem <org.mozilla.fenix.settings.deletebrowsingdata.DeleteBrowsingDataItem
android:id="@+id/browsing_data_item" android:id="@+id/browsing_data_item"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -51,7 +51,7 @@
android:focusable="true" android:focusable="true"
app:deleteBrowsingDataItemTitle="@string/preferences_delete_browsing_data_browsing_data_title" app:deleteBrowsingDataItemTitle="@string/preferences_delete_browsing_data_browsing_data_title"
app:deleteBrowsingDataItemSubtitle="@string/preferences_delete_browsing_data_browsing_data_subtitle" /> app:deleteBrowsingDataItemSubtitle="@string/preferences_delete_browsing_data_browsing_data_subtitle" />
<org.mozilla.fenix.settings.DeleteBrowsingDataItem <org.mozilla.fenix.settings.deletebrowsingdata.DeleteBrowsingDataItem
android:id="@+id/collections_item" android:id="@+id/collections_item"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -62,7 +62,7 @@
android:focusable="true" android:focusable="true"
app:deleteBrowsingDataItemTitle="@string/preferences_delete_browsing_data_collections_title" app:deleteBrowsingDataItemTitle="@string/preferences_delete_browsing_data_collections_title"
app:deleteBrowsingDataItemSubtitle="@string/preferences_delete_browsing_data_collections_subtitle" /> app:deleteBrowsingDataItemSubtitle="@string/preferences_delete_browsing_data_collections_subtitle" />
<org.mozilla.fenix.settings.DeleteBrowsingDataItem <org.mozilla.fenix.settings.deletebrowsingdata.DeleteBrowsingDataItem
android:id="@+id/cookies_item" android:id="@+id/cookies_item"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -74,7 +74,7 @@
android:visibility="gone" android:visibility="gone"
app:deleteBrowsingDataItemTitle="@string/preferences_delete_browsing_data_cookies" app:deleteBrowsingDataItemTitle="@string/preferences_delete_browsing_data_cookies"
app:deleteBrowsingDataItemSubtitle="@string/preferences_delete_browsing_data_cookies_subtitle" /> app:deleteBrowsingDataItemSubtitle="@string/preferences_delete_browsing_data_cookies_subtitle" />
<org.mozilla.fenix.settings.DeleteBrowsingDataItem <org.mozilla.fenix.settings.deletebrowsingdata.DeleteBrowsingDataItem
android:id="@+id/cached_files_item" android:id="@+id/cached_files_item"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -86,7 +86,7 @@
android:visibility="gone" android:visibility="gone"
app:deleteBrowsingDataItemTitle="@string/preferences_delete_browsing_data_cached_files" app:deleteBrowsingDataItemTitle="@string/preferences_delete_browsing_data_cached_files"
app:deleteBrowsingDataItemSubtitle="@string/preferences_delete_browsing_data_cached_files_subtitle" /> app:deleteBrowsingDataItemSubtitle="@string/preferences_delete_browsing_data_cached_files_subtitle" />
<org.mozilla.fenix.settings.DeleteBrowsingDataItem <org.mozilla.fenix.settings.deletebrowsingdata.DeleteBrowsingDataItem
android:id="@+id/site_permissions_item" android:id="@+id/site_permissions_item"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@ -115,7 +115,7 @@
<fragment <fragment
android:id="@+id/SitePermissionsManagePhoneFeature" android:id="@+id/SitePermissionsManagePhoneFeature"
android:name="org.mozilla.fenix.settings.SitePermissionsManagePhoneFeatureFragment" android:name="org.mozilla.fenix.settings.sitepermissions.SitePermissionsManagePhoneFeatureFragment"
tools:layout="@layout/fragment_manage_site_permissions_feature_phone"> tools:layout="@layout/fragment_manage_site_permissions_feature_phone">
<argument <argument
android:name="permission" android:name="permission"
@ -124,7 +124,7 @@
<fragment <fragment
android:id="@+id/sitePermissionsExceptionsFragment" android:id="@+id/sitePermissionsExceptionsFragment"
android:name="org.mozilla.fenix.settings.SitePermissionsExceptionsFragment" android:name="org.mozilla.fenix.settings.sitepermissions.SitePermissionsExceptionsFragment"
android:label="@string/preference_exceptions" android:label="@string/preference_exceptions"
tools:layout="@layout/fragment_site_permissions_exceptions"> tools:layout="@layout/fragment_site_permissions_exceptions">
<action <action
@ -135,7 +135,7 @@
<fragment <fragment
android:id="@+id/sitePermissionsDetailsExceptionsFragment" android:id="@+id/sitePermissionsDetailsExceptionsFragment"
android:name="org.mozilla.fenix.settings.SitePermissionsDetailsExceptionsFragment" android:name="org.mozilla.fenix.settings.sitepermissions.SitePermissionsDetailsExceptionsFragment"
tools:layout="@xml/site_permissions_details_exceptions_preferences"> tools:layout="@xml/site_permissions_details_exceptions_preferences">
<action <action
android:id="@+id/action_site_permissions_to_exceptions_to_manage_phone_feature" android:id="@+id/action_site_permissions_to_exceptions_to_manage_phone_feature"
@ -148,7 +148,7 @@
<fragment <fragment
android:id="@+id/sitePermissionsManageExceptionsPhoneFeatureFragment" android:id="@+id/sitePermissionsManageExceptionsPhoneFeatureFragment"
android:name="org.mozilla.fenix.settings.SitePermissionsManageExceptionsPhoneFeatureFragment" android:name="org.mozilla.fenix.settings.sitepermissions.SitePermissionsManageExceptionsPhoneFeatureFragment"
tools:layout="@layout/fragment_manage_site_permissions_feature_phone"> tools:layout="@layout/fragment_manage_site_permissions_feature_phone">
<argument <argument
android:name="phoneFeatureId" android:name="phoneFeatureId"
@ -372,7 +372,7 @@
android:label="@string/preferences_data_choices" /> android:label="@string/preferences_data_choices" />
<fragment <fragment
android:id="@+id/sitePermissionsFragment" android:id="@+id/sitePermissionsFragment"
android:name="org.mozilla.fenix.settings.SitePermissionsFragment" android:name="org.mozilla.fenix.settings.sitepermissions.SitePermissionsFragment"
android:label="@string/preferences_site_permissions"> android:label="@string/preferences_site_permissions">
<action <action
android:id="@+id/action_site_permissions_to_manage_phone_features" android:id="@+id/action_site_permissions_to_manage_phone_features"
@ -398,12 +398,12 @@
</fragment> </fragment>
<fragment <fragment
android:id="@+id/searchEngineFragment" android:id="@+id/searchEngineFragment"
android:name="org.mozilla.fenix.settings.SearchEngineFragment" android:name="org.mozilla.fenix.settings.search.SearchEngineFragment"
android:label="@string/preferences_search" /> android:label="@string/preferences_search" />
<fragment <fragment
android:id="@+id/turnOnSyncFragment" android:id="@+id/turnOnSyncFragment"
android:name="org.mozilla.fenix.settings.TurnOnSyncFragment" android:name="org.mozilla.fenix.settings.account.TurnOnSyncFragment"
android:label="@string/preferences_sync"> android:label="@string/preferences_sync">
<action <action
android:id="@+id/action_turnOnSyncFragment_to_pairFragment" android:id="@+id/action_turnOnSyncFragment_to_pairFragment"
@ -455,7 +455,7 @@
</fragment> </fragment>
<fragment <fragment
android:id="@+id/deleteBrowsingDataFragment" android:id="@+id/deleteBrowsingDataFragment"
android:name="org.mozilla.fenix.settings.DeleteBrowsingDataFragment" android:name="org.mozilla.fenix.settings.deletebrowsingdata.DeleteBrowsingDataFragment"
android:label="@string/preferences_delete_browsing_data" /> android:label="@string/preferences_delete_browsing_data" />
<fragment <fragment
android:id="@+id/exceptionsFragment" android:id="@+id/exceptionsFragment"
@ -540,14 +540,14 @@
</dialog> </dialog>
<fragment <fragment
android:id="@+id/accountProblemFragment" android:id="@+id/accountProblemFragment"
android:name="org.mozilla.fenix.settings.AccountProblemFragment"> android:name="org.mozilla.fenix.settings.account.AccountProblemFragment">
<action <action
android:id="@+id/action_accountProblemFragment_to_signOutFragment" android:id="@+id/action_accountProblemFragment_to_signOutFragment"
app:destination="@id/signOutFragment" /> app:destination="@id/signOutFragment" />
</fragment> </fragment>
<dialog <dialog
android:id="@+id/signOutFragment" android:id="@+id/signOutFragment"
android:name="org.mozilla.fenix.settings.SignOutFragment" /> android:name="org.mozilla.fenix.settings.account.SignOutFragment" />
<action <action
android:id="@+id/action_global_shareFragment" android:id="@+id/action_global_shareFragment"
app:destination="@id/shareFragment" /> app:destination="@id/shareFragment" />
@ -582,7 +582,7 @@
</fragment> </fragment>
<fragment <fragment
android:id="@+id/deleteBrowsingDataOnQuitFragment" android:id="@+id/deleteBrowsingDataOnQuitFragment"
android:name="org.mozilla.fenix.settings.DeleteBrowsingDataOnQuitFragment" android:name="org.mozilla.fenix.settings.deletebrowsingdata.DeleteBrowsingDataOnQuitFragment"
android:label="DeleteBrowsingDataOnQuitFragment" /> android:label="DeleteBrowsingDataOnQuitFragment" />
<fragment <fragment

View File

@ -19,11 +19,11 @@
app:iconSpaceReserved="false" app:iconSpaceReserved="false"
app:isPreferenceVisible="false"> app:isPreferenceVisible="false">
<org.mozilla.fenix.settings.AccountPreference <org.mozilla.fenix.settings.account.AccountPreference
android:icon="@drawable/ic_account" android:icon="@drawable/ic_account"
android:key="@string/pref_key_account" /> android:key="@string/pref_key_account" />
<org.mozilla.fenix.settings.AccountAuthErrorPreference <org.mozilla.fenix.settings.account.AccountAuthErrorPreference
android:icon="@drawable/ic_account_warning" android:icon="@drawable/ic_account_warning"
android:key="@string/pref_key_account_auth_error"/> android:key="@string/pref_key_account_auth_error"/>
</androidx.preference.PreferenceCategory> </androidx.preference.PreferenceCategory>
@ -120,4 +120,4 @@
android:key="@string/pref_key_about" android:key="@string/pref_key_about"
android:title="@string/preferences_about" /> android:title="@string/preferences_about" />
</androidx.preference.PreferenceCategory> </androidx.preference.PreferenceCategory>
</androidx.preference.PreferenceScreen> </androidx.preference.PreferenceScreen>

View File

@ -9,7 +9,7 @@
android:title="@string/preferences_default_search_engine" android:title="@string/preferences_default_search_engine"
android:selectable="false" android:selectable="false"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
<org.mozilla.fenix.settings.RadioSearchEngineListPreference <org.mozilla.fenix.settings.search.RadioSearchEngineListPreference
android:selectable="false"/> android:selectable="false"/>
<SwitchPreference <SwitchPreference
android:defaultValue="true" android:defaultValue="true"

View File

@ -47,7 +47,7 @@ import org.mozilla.fenix.ext.toTab
import org.mozilla.fenix.home.sessioncontrol.Tab import org.mozilla.fenix.home.sessioncontrol.Tab
import org.mozilla.fenix.home.sessioncontrol.TabCollection import org.mozilla.fenix.home.sessioncontrol.TabCollection
import org.mozilla.fenix.quickactionsheet.QuickActionSheetBehavior import org.mozilla.fenix.quickactionsheet.QuickActionSheetBehavior
import org.mozilla.fenix.utils.deleteAndQuit import org.mozilla.fenix.settings.deletebrowsingdata.deleteAndQuit
@ExperimentalCoroutinesApi @ExperimentalCoroutinesApi
@ObsoleteCoroutinesApi @ObsoleteCoroutinesApi
@ -98,7 +98,7 @@ class DefaultBrowserToolbarControllerTest {
every { any<Session>().toTab(any()) } returns currentSessionAsTab every { any<Session>().toTab(any()) } returns currentSessionAsTab
mockkStatic( mockkStatic(
"org.mozilla.fenix.utils.DeleteAndQuitKt" "org.mozilla.fenix.settings.deletebrowsingdata.DeleteAndQuitKt"
) )
every { deleteAndQuit(any(), any()) } just Runs every { deleteAndQuit(any(), any()) } just Runs

View File

@ -2,16 +2,12 @@
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/. */ file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings package org.mozilla.fenix.settings.account
import kotlinx.coroutines.runBlocking import kotlinx.coroutines.runBlocking
import org.junit.Assert.assertEquals import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotSame import org.junit.Assert.assertNotSame
import org.junit.Test import org.junit.Test
import org.mozilla.fenix.settings.account.AccountSettingsFragmentAction
import org.mozilla.fenix.settings.account.AccountSettingsFragmentState
import org.mozilla.fenix.settings.account.AccountSettingsFragmentStore
import org.mozilla.fenix.settings.account.LastSyncTime
class AccountSettingsFragmentStoreTest { class AccountSettingsFragmentStoreTest {

View File

@ -2,7 +2,7 @@
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/. */ file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings package org.mozilla.fenix.settings.account
import androidx.navigation.NavController import androidx.navigation.NavController
import androidx.navigation.NavDestination import androidx.navigation.NavDestination
@ -12,10 +12,6 @@ import io.mockk.verify
import org.junit.Assert.assertEquals import org.junit.Assert.assertEquals
import org.junit.Test import org.junit.Test
import org.mozilla.fenix.R import org.mozilla.fenix.R
import org.mozilla.fenix.settings.account.AccountSettingsFragmentAction
import org.mozilla.fenix.settings.account.AccountSettingsFragmentDirections
import org.mozilla.fenix.settings.account.AccountSettingsInteractor
import org.mozilla.fenix.settings.account.AccountSettingsFragmentStore
class AccountSettingsInteractorTest { class AccountSettingsInteractorTest {

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings package org.mozilla.fenix.settings.deletebrowsingdata
import android.content.Context import android.content.Context
import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.ext.junit.runners.AndroidJUnit4

View File

@ -4,7 +4,7 @@
@file:Suppress("DEPRECATION") @file:Suppress("DEPRECATION")
package org.mozilla.fenix.utils package org.mozilla.fenix.settings.deletebrowsingdata
import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.ext.junit.runners.AndroidJUnit4
import io.mockk.every import io.mockk.every
@ -30,7 +30,7 @@ import org.mozilla.fenix.TestApplication
import org.mozilla.fenix.components.PermissionStorage import org.mozilla.fenix.components.PermissionStorage
import org.mozilla.fenix.ext.clearAndCommit import org.mozilla.fenix.ext.clearAndCommit
import org.mozilla.fenix.ext.components import org.mozilla.fenix.ext.components
import org.mozilla.fenix.settings.DeleteBrowsingDataOnQuitType import org.mozilla.fenix.utils.Settings
import org.robolectric.annotation.Config import org.robolectric.annotation.Config
@ObsoleteCoroutinesApi @ObsoleteCoroutinesApi

View File

@ -19,7 +19,7 @@ import org.junit.runner.RunWith
import org.mozilla.fenix.TestApplication import org.mozilla.fenix.TestApplication
import org.mozilla.fenix.ext.clearAndCommit import org.mozilla.fenix.ext.clearAndCommit
import org.mozilla.fenix.ext.settings import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.settings.DeleteBrowsingDataOnQuitType import org.mozilla.fenix.settings.deletebrowsingdata.DeleteBrowsingDataOnQuitType
import org.mozilla.fenix.settings.PhoneFeature import org.mozilla.fenix.settings.PhoneFeature
import org.robolectric.annotation.Config import org.robolectric.annotation.Config