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

Commit 30e9551e authored by Evan Severson's avatar Evan Severson
Browse files

Move all resources for PermissionController

Test: Looked at various permission interfaces
Change-Id: I3b9a807dab9f3bf1937e8d3c275c2846465d4a65
parent 22b99b47
Loading
Loading
Loading
Loading
+0 −24
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2018 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.
  -->

<!-- Landscape dimensions for the permission grant dialog. -->
<resources>
    <!-- Assuming the dimension of a sailfish, this yields 95% width in splitscreen and 65% in
         landscape -->
    <dimen name="permissionGrantDialogWeight">8.6</dimen>
    <dimen name="permissionGrantDialogWidth">334dp</dimen>
</resources>
+0 −32
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2018 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.
  -->

<!-- themes for the permission grant dialog. -->
<resources>
    <style name="Theme.DeviceDefault.PermissionGrantApp"
           parent="@style/Theme.DeviceDefault.Panel">
        <item name="windowIsFloating">false</item>
        <item name="windowTranslucentStatus">true</item>
        <item name="backgroundDimEnabled">true</item>
        <item name="windowAnimationStyle">@style/Animation.Material.Dialog</item>
    </style>

    <style name="Theme.DeviceDefault.PermissionGrant"
           parent="@style/Theme.DeviceDefault.Dialog">
        <item name="titleTextStyle">@style/PermissionGrantTitleMessage</item>
    </style>
</resources>
+0 −23
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2018 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.
  -->

<!-- portrait dimensions for the permission grant dialog. -->
<resources>
    <!-- This yields 95% width -->
    <dimen name="permissionGrantDialogWeight">380</dimen>
    <dimen name="permissionGrantDialogWidth">0dp</dimen>
</resources>
+0 −98
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2018 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.
  -->

<resources>
    <!-- styles for the permission grant dialog. -->
    <style name="PermissionGrantDialog">
        <item name="background">?attr/windowBackground</item>
        <item name="elevation">?attr/windowElevation</item>
        <item name="layout_weight">@dimen/permissionGrantDialogWeight</item>
        <item name="layout_width">@dimen/permissionGrantDialogWidth</item>
    </style>

    <style name="PermissionGrantTitleIcon">
        <item name="layout_width">24dp</item>
        <item name="layout_height">24dp</item>
        <item name="layout_marginBottom">12dp</item>
        <item name="tint">?attr/colorAccent</item>
        <item name="scaleType">fitCenter</item>
    </style>

    <style name="PermissionGrantTitleMessage"
           parent="@style/TextAppearance.DeviceDefault">
        <item name="gravity">center</item>
        <item name="textSize">20sp</item>
        <item name="textColor">?attr/textColorPrimary</item>
    </style>

    <style name="PermissionGrantIndex"
           parent="@style/TextAppearance.DeviceDefault">
        <item name="paddingEnd">12dp</item>
        <item name="singleLine">true</item>
        <item name="textColor">?attr/textColorSecondary</item>
    </style>

    <style name="PermissionGrantDescription">
        <item name="layout_marginStart">24dp</item>
        <item name="layout_marginEnd">24dp</item>
    </style>

    <style name="PermissionGrantContent">
        <item name="layout_marginStart">24dp</item>
        <item name="layout_marginEnd">24dp</item>
    </style>

    <style name="PermissionGrantDetailMessage"
           parent="@style/TextAppearance.DeviceDefault">
        <item name="layout_marginTop">18dp</item>
        <item name="textColor">?attr/textColorPrimary</item>
        <item name="textSize">16sp</item>
    </style>

    <!-- styles for the permission review screen. -->
    <style name="PermissionReviewDescription">
        <item name="layout_marginTop">20dp</item>
        <item name="layout_marginStart">24dp</item>
        <item name="layout_marginBottom">16dp</item>
        <item name="layout_marginEnd">24dp</item>
    </style>

    <style name="PermissionReviewTitleIcon">
        <item name="layout_marginTop">4dp</item>
        <item name="layout_width">36dp</item>
        <item name="layout_height">36dp</item>
        <item name="scaleType">fitCenter</item>
    </style>

    <style name="PermissionReviewTitleMessage"
           parent="@style/TextAppearance.DeviceDefault">
        <item name="paddingStart">22dp</item>
        <item name="textSize">20sp</item>
        <item name="textColor">?attr/textColorPrimary</item>
    </style>

    <style name="PermissionReviewSettings">
        <item name="layout_marginStart">8dp</item>
        <item name="layout_marginEnd">8dp</item>
    </style>

    <style name="PermissionReviewButtonBar">
        <item name="layout_marginStart">24dp</item>
        <item name="layout_marginEnd">16dp</item>
        <item name="layout_marginBottom">4dp</item>
    </style>
</resources>
+0 −40
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2018 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.
  -->

<resources>
    <!-- themes for the permission grant dialog. -->
    <style name="Theme.DeviceDefault.PermissionGrantApp"
           parent="@style/Theme.DeviceDefault.Light.Panel">
        <item name="windowIsFloating">false</item>
        <item name="windowTranslucentStatus">true</item>
        <item name="backgroundDimEnabled">true</item>
        <item name="windowAnimationStyle">@style/Animation.Material.Dialog</item>
    </style>

    <style name="Theme.DeviceDefault.PermissionGrant"
           parent="@style/Theme.DeviceDefault.Light.Dialog">
        <item name="titleTextStyle">@style/PermissionGrantTitleMessage</item>
    </style>

    <!-- themes for the permission review dialog. -->
    <style name="Theme.DeviceDefault.PermissionReviewApp"
           parent="@style/Theme.DeviceDefault.Settings">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
        <item name="titleTextStyle">@style/PermissionReviewTitleMessage</item>
    </style>
</resources>