Files
frameworks_base/packages/SystemUI/res/layout/controls_dialog.xml
Fabian Kozynski 04e7bdef04 Add dialog for recommended controls
The dialog can only be requested if the package of the controls provider is
currently in the foreground.

This is accomplished by querying Activity Manager about the
UidImportance of that package. Added
android.permission.PACKAGE_USAGE_STATS to SystemUI for this.

Test: atest
Test: manual
Fixes: 149410221

Change-Id: Ifdf479d8dbc70502da95d362e3bfd60ad3c561fb
2020-03-06 12:55:35 -05:00

34 lines
1.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2020 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.
-->
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/controls_dialog_padding"
android:layout_margin="@dimen/controls_dialog_padding"
>
<include
android:id="@+id/control"
layout="@layout/controls_base_item"
android:layout_width="@dimen/controls_dialog_control_width"
android:layout_height="@dimen/control_height"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/controls_dialog_padding"
android:layout_marginBottom="@dimen/controls_dialog_padding"
/>
</FrameLayout>