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

Commit 0de137f6 authored by Evan Chen's avatar Evan Chen Committed by Android (Google) Code Review
Browse files

Merge "Add dialog for COMPUTER profile"

parents 629f6632 07b45b85
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -58,6 +58,14 @@
    <!-- Description of the privileges the application will get if associated with the companion device of AUTOMOTIVE_PROJECTION profile (type) [CHAR LIMIT=NONE] -->
    <string name="summary_automotive_projection"></string>

    <!-- ================= DEVICE_PROFILE_COMPUTER ================= -->

    <!-- Confirmation for associating an application with a companion device of COMPUTER profile (type) [CHAR LIMIT=NONE] -->
    <string name="title_computer">Allow &lt;strong&gt;<xliff:g id="app_name" example="GMS">%1$s</xliff:g>&lt;/strong&gt; to access this information from your phone</string>

    <!-- Description of the privileges the application will get if associated with the companion device of COMPUTER profile (type) [CHAR LIMIT=NONE] -->
    <string name="summary_computer"></string>

    <!-- ================= null profile ================= -->

    <!-- A noun for a companion device with unspecified profile (type) [CHAR LIMIT=30] -->
+7 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.companiondevicemanager;

import static android.companion.AssociationRequest.DEVICE_PROFILE_APP_STREAMING;
import static android.companion.AssociationRequest.DEVICE_PROFILE_AUTOMOTIVE_PROJECTION;
import static android.companion.AssociationRequest.DEVICE_PROFILE_COMPUTER;
import static android.companion.AssociationRequest.DEVICE_PROFILE_WATCH;
import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;

@@ -317,6 +318,12 @@ public class CompanionDeviceActivity extends Activity {
                        this, R.string.summary_automotive_projection, appLabel, deviceName);
                break;

            case DEVICE_PROFILE_COMPUTER:
                title = getHtmlFromResources(this, R.string.title_computer, appLabel);
                summary = getHtmlFromResources(
                        this, R.string.summary_computer, appLabel, deviceName);
                break;

            default:
                throw new RuntimeException("Unsupported profile " + deviceProfile);
        }