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

Commit 43c69785 authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Move Account & sync settings into Settings app.

Fragmentized some of the activities and moved buttons into the menu area.

Bug: 3148844
parent f3c32f49
Loading
Loading
Loading
Loading
+59 −1
Original line number Diff line number Diff line
@@ -41,6 +41,13 @@
    <uses-permission android:name="com.android.launcher.permission.READ_SETTINGS" />
    <uses-permission android:name="com.android.launcher.permission.WRITE_SETTINGS" />
    <uses-permission android:name="android.permission.MOVE_PACKAGE" />
    <uses-permission android:name="android.permission.USE_CREDENTIALS" />
    <uses-permission android:name="android.permission.BACKUP" />
    <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.READ_SYNC_STATS" />
    <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />

    <application android:label="@string/settings_label"
            android:icon="@mipmap/ic_launcher_settings"
@@ -942,11 +949,62 @@
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.ManageAccountsSettings" />
                android:value="com.android.settings.accounts.ManageAccountsSettings" />
            <meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
                android:resource="@id/sync_settings" />
        </activity>

        <activity android:name="Settings$AccountSyncSettingsActivity"
            android:label="@string/account_sync_settings_title"
            android:theme="@android:style/Theme.Holo">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <action android:name="android.settings.ACCOUNT_SYNC_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.accounts.AccountSyncSettings" />
            <meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
                android:resource="@id/sync_settings" />
        </activity>

        <activity android:name="Settings$AccountSyncSettingsInAddAccountActivity"
            android:label="@string/account_sync_settings_title"
            android:theme="@android:style/Theme.Holo">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <action android:name="android.settings.ACCOUNT_SYNC_SETTINGS_ADD_ACCOUNT" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.accounts.AccountSyncSettingsInAddAccount" />
            <meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
                android:resource="@id/sync_settings" />
        </activity>

        <activity android:name="com.android.settings.accounts.AddAccountSettings"
            android:theme="@android:style/Theme.Translucent.NoTitleBar"
            android:label="@string/header_add_an_account">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <action android:name="android.settings.ADD_ACCOUNT_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <activity android:name="com.android.settings.accounts.ChooseAccountActivity"
            android:label="@string/header_add_an_account"
            android:theme="@android:style/Theme.Holo.DialogWhenLarge"/>

        <activity android:name="com.android.settings.accounts.SyncActivityTooManyDeletes"
                  android:theme="@android:style/Theme.Holo.Dialog"
                  android:label="@string/sync_too_many_deletes">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <receiver android:name=".widget.SettingsAppWidgetProvider"
                android:label="@string/gadget_title" android:exported="false">
            <intent-filter>
+1 −0
Original line number Diff line number Diff line
@@ -9,4 +9,5 @@
-keep class com.android.settings.inputmethod.*
-keep class com.android.settings.MasterClear
-keep class com.android.settings.MasterClearConfirm
-keep class com.android.settings.accounts.*
+86 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2006, 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.
*/
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <include layout="@layout/title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

    <ListView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/list"
        android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_weight="1"
        android:drawSelectorOnTop="false"
        android:scrollbarAlwaysDrawVerticalTrack="true"
    />

    <TextView android:id="@+id/sync_settings_error_info"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/sync_is_failing" />

    <!--
    <LinearLayout android:id="@+id/remove_account_area"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:background="@android:drawable/bottom_bar">

        <View
            android:layout_width="0dip"
            android:layout_height="match_parent"
            android:layout_weight="1"/>

        <Button android:id="@+id/remove_account_button"
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_weight="2"
            android:layout_marginTop="5dip"
            android:text="@string/remove_account_label" />

        <View
            android:layout_width="0dip"
            android:layout_height="match_parent"
            android:layout_weight="1"/>
    </LinearLayout>
    -->

    <RelativeLayout android:id="@+id/finish_button_area"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:background="@android:drawable/bottom_bar"
        android:visibility="gone">
        
        <Button android:id="@+id/finish_button"
            android:layout_width="150dip"
            android:layout_height="wrap_content"
            android:layout_margin="5dip"
            android:layout_alignParentRight="true"
            android:drawableRight="@drawable/ic_btn_next"
            android:drawablePadding="3dip"
            android:text="@string/finish_button_label"
        />
        
    </RelativeLayout>

</LinearLayout>
+33 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/* //device/apps/common/assets/res/layout/list_content.xml
**
** Copyright 2006, 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.
*/
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <ListView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/list"
        android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_weight="1"
        android:drawSelectorOnTop="false"
        android:scrollbarAlwaysDrawVerticalTrack="true"
    />

</LinearLayout>
+57 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2006 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.
-->

<!-- Layout used by SyncStateCheckBoxPreference. This is inflated
     inside android.R.layout.preference. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center_vertical|right"
    android:gravity="center_vertical|right">

    <ImageView
        android:id="@+android:id/sync_failed"
        android:src="@drawable/ic_list_syncerror"
        android:layout_width="wrap_content"
        android:layout_marginLeft="6sp"
        android:layout_marginBottom="2sp"
        android:layout_height="wrap_content" />

    <ImageView
        android:id="@+android:id/sync_active"
        android:src="@drawable/ic_list_sync_anim"
        android:layout_width="wrap_content"
        android:layout_marginLeft="6sp"
        android:layout_marginBottom="2sp"
        android:layout_height="wrap_content" />

    <ImageView
        android:id="@+android:id/sync_pending"
        android:src="@drawable/ic_list_sync_anim0"
        android:layout_width="wrap_content"
        android:layout_marginLeft="6sp"
        android:layout_marginBottom="2sp"
        android:layout_height="wrap_content" />

    <CheckBox xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+android:id/checkbox"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginRight="4sp"
        android:layout_gravity="center_vertical"
        android:focusable="false"
        android:clickable="false" />
</LinearLayout>
Loading