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

Commit 577dacd8 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6398428 from 4a2e1fd8 to rvc-release

Change-Id: Ieec2455e7193b2a958c0bda8fbd6f07bec8d979f
parents d81292ba 4a2e1fd8
Loading
Loading
Loading
Loading
+12 −9
Original line number Original line Diff line number Diff line
@@ -228,13 +228,6 @@ public class AppPermissionFragment extends SettingsWithLargeHeader
        footer2Link.setText(context.getString(R.string.app_permission_footer_permission_apps_link));
        footer2Link.setText(context.getString(R.string.app_permission_footer_permission_apps_link));
        setBottomLinkState(footer2Link, caller, Intent.ACTION_MANAGE_PERMISSION_APPS);
        setBottomLinkState(footer2Link, caller, Intent.ACTION_MANAGE_PERMISSION_APPS);


        if (mViewModel.getFullStorageStateLiveData().isInitialized() && mIsStorageGroup) {
            setSpecialStorageState(mViewModel.getFullStorageStateLiveData().getValue(), root);
        } else {
            TextView storageFooter = root.requireViewById(R.id.footer_storage_special_app_access);
            storageFooter.setVisibility(View.GONE);
        }

        mAllowButton = root.requireViewById(R.id.allow_radio_button);
        mAllowButton = root.requireViewById(R.id.allow_radio_button);
        mAllowAlwaysButton = root.requireViewById(R.id.allow_always_radio_button);
        mAllowAlwaysButton = root.requireViewById(R.id.allow_always_radio_button);
        mAllowForegroundButton = root.requireViewById(R.id.allow_foreground_only_radio_button);
        mAllowForegroundButton = root.requireViewById(R.id.allow_foreground_only_radio_button);
@@ -260,6 +253,13 @@ public class AppPermissionFragment extends SettingsWithLargeHeader
            mDenyForegroundButton.setVisibility(View.GONE);
            mDenyForegroundButton.setVisibility(View.GONE);
        }
        }


        if (mViewModel.getFullStorageStateLiveData().isInitialized() && mIsStorageGroup) {
            setSpecialStorageState(mViewModel.getFullStorageStateLiveData().getValue(), root);
        } else {
            TextView storageFooter = root.requireViewById(R.id.footer_storage_special_app_access);
            storageFooter.setVisibility(View.GONE);
        }

        getActivity().setTitle(
        getActivity().setTitle(
                getPreferenceManager().getContext().getString(R.string.app_permission_title,
                getPreferenceManager().getContext().getString(R.string.app_permission_title,
                        mPermGroupLabel));
                        mPermGroupLabel));
@@ -392,9 +392,12 @@ public class AppPermissionFragment extends SettingsWithLargeHeader
    }
    }


    private void setSpecialStorageState(FullStoragePackageState storageState, View v) {
    private void setSpecialStorageState(FullStoragePackageState storageState, View v) {
        TextView textView = v.requireViewById(R.id.footer_storage_special_app_access);
        if (v == null) {
            return;
        }


        if (v == null || mAllowButton == null || !mIsStorageGroup) {
        TextView textView = v.requireViewById(R.id.footer_storage_special_app_access);
        if (mAllowButton == null || !mIsStorageGroup) {
            textView.setVisibility(View.GONE);
            textView.setVisibility(View.GONE);
            return;
            return;
        }
        }