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

Commit 41fb0a68 authored by Ats Jenk's avatar Ats Jenk Committed by Automerger Merge Worker
Browse files

Merge "Use empty string instead of nullable for leak report email" into...

Merge "Use empty string instead of nullable for leak report email" into udc-dev am: 3b0d3685 am: 38d9276e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23067598



Change-Id: Ifa521a3f7aa87207192b8dd9c1856c01a337ae61
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 4c5e0eb5 38d9276e
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -320,7 +320,6 @@ public class Dependency {
    @Inject @Main Lazy<Looper> mMainLooper;
    @Inject @Main Lazy<Looper> mMainLooper;
    @Inject @Main Lazy<Handler> mMainHandler;
    @Inject @Main Lazy<Handler> mMainHandler;
    @Inject @Named(TIME_TICK_HANDLER_NAME) Lazy<Handler> mTimeTickHandler;
    @Inject @Named(TIME_TICK_HANDLER_NAME) Lazy<Handler> mTimeTickHandler;
    @Nullable
    @Inject @Named(LEAK_REPORT_EMAIL_NAME) Lazy<String> mLeakReportEmail;
    @Inject @Named(LEAK_REPORT_EMAIL_NAME) Lazy<String> mLeakReportEmail;
    @Inject @Main Lazy<Executor> mMainExecutor;
    @Inject @Main Lazy<Executor> mMainExecutor;
    @Inject @Background Lazy<Executor> mBackgroundExecutor;
    @Inject @Background Lazy<Executor> mBackgroundExecutor;
+3 −6
Original line number Original line Diff line number Diff line
@@ -23,8 +23,6 @@ import android.content.Context;
import android.hardware.SensorPrivacyManager;
import android.hardware.SensorPrivacyManager;
import android.os.Handler;
import android.os.Handler;


import androidx.annotation.Nullable;

import com.android.internal.logging.UiEventLogger;
import com.android.internal.logging.UiEventLogger;
import com.android.keyguard.KeyguardViewController;
import com.android.keyguard.KeyguardViewController;
import com.android.systemui.battery.BatterySaverModule;
import com.android.systemui.battery.BatterySaverModule;
@@ -74,12 +72,12 @@ import com.android.systemui.statusbar.policy.SensorPrivacyController;
import com.android.systemui.statusbar.policy.SensorPrivacyControllerImpl;
import com.android.systemui.statusbar.policy.SensorPrivacyControllerImpl;
import com.android.systemui.volume.dagger.VolumeModule;
import com.android.systemui.volume.dagger.VolumeModule;


import javax.inject.Named;

import dagger.Binds;
import dagger.Binds;
import dagger.Module;
import dagger.Module;
import dagger.Provides;
import dagger.Provides;


import javax.inject.Named;

/**
/**
 * A dagger module for injecting default implementations of components of System UI.
 * A dagger module for injecting default implementations of components of System UI.
 *
 *
@@ -115,9 +113,8 @@ public abstract class ReferenceSystemUIModule {
    @SysUISingleton
    @SysUISingleton
    @Provides
    @Provides
    @Named(LEAK_REPORT_EMAIL_NAME)
    @Named(LEAK_REPORT_EMAIL_NAME)
    @Nullable
    static String provideLeakReportEmail() {
    static String provideLeakReportEmail() {
        return null;
        return "";
    }
    }


    @Binds
    @Binds
+3 −6
Original line number Original line Diff line number Diff line
@@ -23,8 +23,6 @@ import android.content.Context;
import android.hardware.SensorPrivacyManager;
import android.hardware.SensorPrivacyManager;
import android.os.Handler;
import android.os.Handler;


import androidx.annotation.Nullable;

import com.android.internal.logging.UiEventLogger;
import com.android.internal.logging.UiEventLogger;
import com.android.keyguard.KeyguardViewController;
import com.android.keyguard.KeyguardViewController;
import com.android.systemui.dagger.ReferenceSystemUIModule;
import com.android.systemui.dagger.ReferenceSystemUIModule;
@@ -75,13 +73,13 @@ import com.android.systemui.statusbar.policy.SensorPrivacyControllerImpl;
import com.android.systemui.statusbar.tv.notifications.TvNotificationHandler;
import com.android.systemui.statusbar.tv.notifications.TvNotificationHandler;
import com.android.systemui.volume.dagger.VolumeModule;
import com.android.systemui.volume.dagger.VolumeModule;


import javax.inject.Named;

import dagger.Binds;
import dagger.Binds;
import dagger.Module;
import dagger.Module;
import dagger.Provides;
import dagger.Provides;
import dagger.multibindings.IntoSet;
import dagger.multibindings.IntoSet;


import javax.inject.Named;

/**
/**
 * A TV specific version of {@link ReferenceSystemUIModule}.
 * A TV specific version of {@link ReferenceSystemUIModule}.
 *
 *
@@ -105,9 +103,8 @@ public abstract class TvSystemUIModule {
    @SysUISingleton
    @SysUISingleton
    @Provides
    @Provides
    @Named(LEAK_REPORT_EMAIL_NAME)
    @Named(LEAK_REPORT_EMAIL_NAME)
    @Nullable
    static String provideLeakReportEmail() {
    static String provideLeakReportEmail() {
        return null;
        return "";
    }
    }


    @Binds
    @Binds
+4 −5
Original line number Original line Diff line number Diff line
@@ -18,7 +18,6 @@ package com.android.systemui.util.leak;


import static com.android.systemui.Dependency.LEAK_REPORT_EMAIL_NAME;
import static com.android.systemui.Dependency.LEAK_REPORT_EMAIL_NAME;


import android.annotation.Nullable;
import android.app.Notification;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.NotificationManager;
@@ -29,6 +28,7 @@ import android.content.Intent;
import android.net.Uri;
import android.net.Uri;
import android.os.Debug;
import android.os.Debug;
import android.os.SystemProperties;
import android.os.SystemProperties;
import android.text.TextUtils;
import android.util.Log;
import android.util.Log;


import androidx.core.content.FileProvider;
import androidx.core.content.FileProvider;
@@ -68,7 +68,7 @@ public class LeakReporter {


    @Inject
    @Inject
    public LeakReporter(Context context, UserTracker userTracker, LeakDetector leakDetector,
    public LeakReporter(Context context, UserTracker userTracker, LeakDetector leakDetector,
            @Nullable @Named(LEAK_REPORT_EMAIL_NAME) String leakReportEmail) {
            @Named(LEAK_REPORT_EMAIL_NAME) String leakReportEmail) {
        mContext = context;
        mContext = context;
        mUserTracker = userTracker;
        mUserTracker = userTracker;
        mLeakDetector = leakDetector;
        mLeakDetector = leakDetector;
@@ -150,9 +150,8 @@ public class LeakReporter {
        intent.setClipData(clipData);
        intent.setClipData(clipData);
        intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, attachments);
        intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, attachments);


        String leakReportEmail = mLeakReportEmail;
        if (!TextUtils.isEmpty(mLeakReportEmail)) {
        if (leakReportEmail != null) {
            intent.putExtra(Intent.EXTRA_EMAIL, new String[] { mLeakReportEmail });
            intent.putExtra(Intent.EXTRA_EMAIL, new String[] { leakReportEmail });
        }
        }


        return intent;
        return intent;