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

Commit d59d17d7 authored by Robert Horvath's avatar Robert Horvath Committed by Android (Google) Code Review
Browse files

Merge changes from topic "privacy-type-media-projection" into tm-dev

* changes:
  Add MediaProjection privacy item type
  Extract privacy item monitoring interface, add AppOpsPrivacyItemMonitor
parents c17eae26 a7b00c57
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -157,6 +157,12 @@ public final class SystemUiDeviceConfigFlags {
     */
    public static final String PROPERTY_LOCATION_INDICATORS_ENABLED = "location_indicators_enabled";

    /**
     * Whether to show privacy chip for media projection.
     */
    public static final String PROPERTY_MEDIA_PROJECTION_INDICATORS_ENABLED =
            "media_projection_indicators_enabled";

    /**
     * Whether to show old location indicator on all location accesses.
     */
+36 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2022 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.
  -->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@id/background"
          android:gravity="center"
          >
        <shape android:shape="oval">
            <size
                android:height="@dimen/ongoing_appops_dialog_circle_size"
                android:width="@dimen/ongoing_appops_dialog_circle_size"
            />
            <solid android:color="@color/privacy_chip_background" />
        </shape>
    </item>
    <item android:id="@id/icon"
          android:gravity="center"
          android:width="@dimen/ongoing_appops_dialog_icon_size"
          android:height="@dimen/ongoing_appops_dialog_icon_size"
          android:drawable="@drawable/stat_sys_cast"
    />
</layer-list>
 No newline at end of file
+3 −0
Original line number Diff line number Diff line
@@ -2046,6 +2046,9 @@
    <!-- Text for microphone app op [CHAR LIMIT=20]-->
    <string name="privacy_type_microphone">microphone</string>

    <!-- Text for media projection privacy type [CHAR LIMIT=20]-->
    <string name="privacy_type_media_projection">screen recording</string>

    <!-- What to show on the ambient display player when song doesn't have a title. [CHAR LIMIT=20] -->
    <string name="music_controls_no_title">No title</string>

+6 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ import android.hardware.fingerprint.FingerprintManager;
import android.media.AudioManager;
import android.media.IAudioService;
import android.media.MediaRouter2Manager;
import android.media.projection.MediaProjectionManager;
import android.media.session.MediaSessionManager;
import android.net.ConnectivityManager;
import android.net.NetworkScoreManager;
@@ -320,6 +321,11 @@ public class FrameworkServicesModule {
        return LayoutInflater.from(context);
    }

    @Provides
    static MediaProjectionManager provideMediaProjectionManager(Context context) {
        return context.getSystemService(MediaProjectionManager.class);
    }

    @Provides
    static MediaRouter2Manager provideMediaRouter2Manager(Context context) {
        return MediaRouter2Manager.getInstance(context);
+2 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ import com.android.systemui.lowlightclock.LowLightClockController;
import com.android.systemui.model.SysUiState;
import com.android.systemui.navigationbar.NavigationBarComponent;
import com.android.systemui.plugins.BcSmartspaceDataPlugin;
import com.android.systemui.privacy.PrivacyModule;
import com.android.systemui.recents.Recents;
import com.android.systemui.screenshot.dagger.ScreenshotModule;
import com.android.systemui.settings.dagger.SettingsModule;
@@ -122,6 +123,7 @@ import dagger.Provides;
            LogModule.class,
            PeopleHubModule.class,
            PluginModule.class,
            PrivacyModule.class,
            QsFrameTranslateModule.class,
            ScreenshotModule.class,
            SensorModule.class,
Loading