Commit e77b1b13 authored by Tanmoy Mollik's avatar Tanmoy Mollik Committed by Commit Bot

[Android] Create preference for "Sign out and turn off sync" button in ManageSyncSettings

This cl creates the preference and layout for creating a button in
ManageSyncSettings that will be used to sign the user out using
SignOutDialogFragment

Screenshot: https://crbug.com/1092410#c1

Bug: 1092410
Change-Id: If66793a3c7f2a965c68b441a32d47718bd943c86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2264338
Commit-Queue: Tanmoy Mollik <triploblastic@chromium.org>
Reviewed-by: default avatarBoris Sazonov <bsazonov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790320}
parent 7169639e
......@@ -990,6 +990,7 @@ chrome_java_resources = [
"java/res/layout/photo_picker_toolbar.xml",
"java/res/layout/powered_by_chrome_footer.xml",
"java/res/layout/preference_text_scale.xml",
"java/res/layout/preference_turn_off_sync.xml",
"java/res/layout/radio_button_group_homepage_preference.xml",
"java/res/layout/radio_button_group_theme_preference.xml",
"java/res/layout/recent_tabs_group_item.xml",
......
......@@ -1484,6 +1484,7 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/sync/settings/ManageSyncSettings.java",
"java/src/org/chromium/chrome/browser/sync/settings/SignInPreference.java",
"java/src/org/chromium/chrome/browser/sync/settings/SyncAndServicesSettings.java",
"java/src/org/chromium/chrome/browser/sync/settings/SyncOffPreference.java",
"java/src/org/chromium/chrome/browser/sync/settings/SyncSettingsUtils.java",
"java/src/org/chromium/chrome/browser/sync/ui/PassphraseActivity.java",
"java/src/org/chromium/chrome/browser/sync/ui/PassphraseCreationDialogFragment.java",
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2020 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/PreferenceLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center">
<TextView
android:id="@+id/turn_off_sync"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/turn_off_sync"
android:textAppearance="@style/TextAppearance.TextMediumThick.Blue"
android:gravity="center"/>
</LinearLayout>
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.sync.settings;
import android.content.Context;
import android.util.AttributeSet;
import androidx.preference.DialogPreference;
import org.chromium.chrome.R;
/**
* A preference that displays "Sign out and turn off sync" button in {@link ManageSyncSettings}.
*/
public class SyncOffPreference extends DialogPreference {
public SyncOffPreference(Context context, AttributeSet attrs) {
super(context, attrs);
setLayoutResource(R.layout.preference_turn_off_sync);
}
}
......@@ -1438,6 +1438,9 @@ Your Google account may have other forms of browsing history like searches and a
<message name="IDS_SYNC_SETTINGS" desc="Title for preference which enables sync'ing of settings. [CHAR-LIMT=32]">
Settings
</message>
<message name="IDS_TURN_OFF_SYNC" desc="Button that user can press to turn off sync and sign out. [CHAR-LIMT=32]">
Sign out and turn off sync
</message>
<message name="IDS_SYNC_PAYMENTS_INTEGRATION" desc="Title for preference which enables import of Google Pay data for Autofill. 'Google Pay' should not be translated as it is the product name.">
Credit cards and addresses using Google Pay
</message>
......
635b9fa291786e0e5ac3ce2d5ac2a0022f42aed1
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment