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

Commit a2fc5a63 authored by TYM Tsai's avatar TYM Tsai Committed by Android (Google) Code Review
Browse files

Merge changes Ibc462722,I042456e5 into main

* changes:
  Control PackageMonitor not register receivers by flag
  Add flag for the PackageMonitor
parents fe636863 aa7f67ce
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -248,3 +248,11 @@ flag {
    bug: "316916801"
    is_fixed_read_only: true
}

flag {
    name: "package_restart_query_disabled_by_default"
    namespace: "package_manager_service"
    description: "Feature flag to register broadcast receiver only support package restart query."
    bug: "300309050"
    is_fixed_read_only: true
}
+3 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.compat.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.Flags;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
@@ -68,7 +69,8 @@ public abstract class PackageMonitor extends android.content.BroadcastReceiver {

    @UnsupportedAppUsage
    public PackageMonitor() {
        this(true);
        // If the feature flag is enabled, set mSupportsPackageRestartQuery to false by default
        this(!Flags.packageRestartQueryDisabledByDefault());
    }

    /**