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

Commit 27c4329d authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6656546 from 81d4133d to rvc-qpr1-release

Change-Id: I76caef718a57d7b2f9b3da85677cb5dad1785508
parents 4d03bff1 81d4133d
Loading
Loading
Loading
Loading
+21 −5
Original line number Diff line number Diff line
@@ -265,9 +265,13 @@ public class QSSecurityFooter implements OnClickListener, DialogInterface.OnClic

    private void createDialog() {
        final boolean isDeviceManaged = mSecurityController.isDeviceManaged();
        boolean isProfileOwnerOfOrganizationOwnedDevice =
                mSecurityController.isProfileOwnerOfOrganizationOwnedDevice();
        final boolean hasWorkProfile = mSecurityController.hasWorkProfile();
        final CharSequence deviceOwnerOrganization =
                mSecurityController.getDeviceOwnerOrganizationName();
        final CharSequence workProfileOrganizationName =
                mSecurityController.getWorkProfileOrganizationName();
        final boolean hasCACerts = mSecurityController.hasCACertInCurrentUser();
        final boolean hasCACertsInWorkProfile = mSecurityController.hasCACertInWorkProfile();
        final boolean isNetworkLoggingEnabled = mSecurityController.isNetworkLoggingEnabled();
@@ -284,7 +288,8 @@ public class QSSecurityFooter implements OnClickListener, DialogInterface.OnClic

        // device management section
        CharSequence managementMessage = getManagementMessage(isDeviceManaged,
                deviceOwnerOrganization);
                deviceOwnerOrganization, isProfileOwnerOfOrganizationOwnedDevice,
                workProfileOrganizationName);
        if (managementMessage == null) {
            dialogView.findViewById(R.id.device_management_disclosures).setVisibility(View.GONE);
        } else {
@@ -292,8 +297,12 @@ public class QSSecurityFooter implements OnClickListener, DialogInterface.OnClic
            TextView deviceManagementWarning =
                    (TextView) dialogView.findViewById(R.id.device_management_warning);
            deviceManagementWarning.setText(managementMessage);
            // Don't show the policies button for profile owner of org owned device, because there
            // is no policies settings screen for it
            if (!isProfileOwnerOfOrganizationOwnedDevice) {
                mDialog.setButton(DialogInterface.BUTTON_NEGATIVE, getSettingsButton(), this);
            }
        }

        // ca certificate section
        CharSequence caCertsMessage = getCaCertsMessage(isDeviceManaged, hasCACerts,
@@ -382,11 +391,18 @@ public class QSSecurityFooter implements OnClickListener, DialogInterface.OnClic
    }

    protected CharSequence getManagementMessage(boolean isDeviceManaged,
            CharSequence organizationName) {
        if (!isDeviceManaged) return null;
        if (organizationName != null)
            CharSequence organizationName, boolean isProfileOwnerOfOrganizationOwnedDevice,
            CharSequence workProfileOrganizationName) {
        if (!isDeviceManaged && !isProfileOwnerOfOrganizationOwnedDevice) {
            return null;
        }
        if (isDeviceManaged && organizationName != null) {
            return mContext.getString(
                    R.string.monitoring_description_named_management, organizationName);
        } else if (isProfileOwnerOfOrganizationOwnedDevice && workProfileOrganizationName != null) {
            return mContext.getString(
                    R.string.monitoring_description_named_management, workProfileOrganizationName);
        }
        return mContext.getString(R.string.monitoring_description_management);
    }

+218 −227

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ public class TakeScreenshotService extends Service {

            switch (msg.what) {
                case WindowManager.TAKE_SCREENSHOT_FULLSCREEN:
                    mScreenshot.takeScreenshot(uriConsumer, onComplete);
                    mScreenshot.takeScreenshotFullscreen(uriConsumer, onComplete);
                    break;
                case WindowManager.TAKE_SCREENSHOT_SELECTED_REGION:
                    mScreenshot.takeScreenshotPartial(uriConsumer, onComplete);
+37 −4

File changed.

Preview size limit exceeded, changes collapsed.

+25 −13

File changed.

Preview size limit exceeded, changes collapsed.

Loading