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

Commit b0171715 authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Three kinds of owner info - owner, user and profile

Bug: 8736733

Put the summary "Restricted profile" under the user name in app restrictions panel.
Bug: 8736734

Change-Id: I6b724bd10a9246eb57831bffb737a48c01e0c285
parent c5b03657
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -72,11 +72,11 @@
                android:layout_below="@android:id/title"
                android:layout_alignStart="@android:id/title"
                android:paddingBottom="3dip"
                android:visibility="gone"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:textSize="13sp"
                android:textColor="?android:attr/textColorSecondary"
                android:focusable="false"
                android:text="@string/user_summary_restricted_profile"
                android:maxLines="4" />
        </RelativeLayout>
    </LinearLayout>
+4 −0
Original line number Diff line number Diff line
@@ -679,6 +679,10 @@
    <string name="show_user_info_on_lockscreen_label">Show user info on lock screen</string>
    <!-- Text shown for title of user info setting [CHAR LIMIT=20]-->
    <string name="user_info_settings_title">User info</string>
    <!-- Text shown next to checkbox for showing profile info on LockScreen [CHAR LIMIT=50]-->
    <string name="show_profile_info_on_lockscreen_label">Show profile info on lock screen</string>
    <!-- Text shown for title of profile info setting [CHAR LIMIT=20]-->
    <string name="profile_info_settings_title">Profile info</string>
    <!-- Main Settings screen setting option title for the item to take you to the location screen -->
    <string name="location_settings_title">Location access</string>
    <!-- Main Settings screen setting option title for the item to take you to the security screen -->
+5 −1
Original line number Diff line number Diff line
@@ -81,8 +81,12 @@ public class OwnerInfoSettings extends Fragment {
        }
        mCheckbox.setChecked(enabled);
        if (UserHandle.myUserId() != UserHandle.USER_OWNER) {
            if (UserManager.get(getActivity()).isLinkedUser()) {
                mCheckbox.setText(R.string.show_profile_info_on_lockscreen_label);
            } else {
                mCheckbox.setText(R.string.show_user_info_on_lockscreen_label);
            }
        }
        mCheckbox.setOnCheckedChangeListener(new OnCheckedChangeListener() {
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                mLockPatternUtils.setOwnerInfoEnabled(isChecked);
+5 −1
Original line number Diff line number Diff line
@@ -168,9 +168,13 @@ public class SecuritySettings extends SettingsPreferenceFragment
            // Rename owner info settings
            Preference ownerInfoPref = findPreference(KEY_OWNER_INFO_SETTINGS);
            if (ownerInfoPref != null) {
                if (UserManager.get(getActivity()).isLinkedUser()) {
                    ownerInfoPref.setTitle(R.string.profile_info_settings_title);
                } else {
                    ownerInfoPref.setTitle(R.string.user_info_settings_title);
                }
            }
        }

        if (mIsPrimary) {
            switch (dpm.getStorageEncryptionStatus()) {
+5 −1
Original line number Diff line number Diff line
@@ -763,8 +763,12 @@ public class Settings extends PreferenceActivity
            titleRes = R.string.wallpaper_settings_fragment_title;
        } else if (pref.getFragment().equals(OwnerInfoSettings.class.getName())
                && UserHandle.myUserId() != UserHandle.USER_OWNER) {
            if (UserManager.get(this).isLinkedUser()) {
                titleRes = R.string.profile_info_settings_title;
            } else {
                titleRes = R.string.user_info_settings_title;
            }
        }
        startPreferencePanel(pref.getFragment(), pref.getExtras(), titleRes, pref.getTitle(),
                null, 0);
        return true;
Loading