Merge "ProfcollectForwardingService: Pass usage setting when reporting" into udc-dev am: 57145b116b am: 0587a9e009
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23181876 Change-Id: Ied2b0523bedcfd88d9d76a07188c0ae2d6aeaab9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
<!-- Will display the bouncer on one side of the display, and the current user icon and
|
||||
user switcher on the other side -->
|
||||
<bool name="config_enableBouncerUserSwitcher">false</bool>
|
||||
<!-- Will enable custom clocks on the lockscreen -->
|
||||
<bool name="config_enableLockScreenCustomClocks">true</bool>
|
||||
<!-- Time to be considered a consecutive fingerprint failure in ms -->
|
||||
<integer name="fp_consecutive_failure_time_ms">3500</integer>
|
||||
</resources>
|
||||
|
||||
@@ -120,7 +120,12 @@ object Flags {
|
||||
resourceBooleanFlag(204, R.bool.config_enableBouncerUserSwitcher, "bouncer_user_switcher")
|
||||
|
||||
// TODO(b/254512676): Tracking Bug
|
||||
@JvmField val LOCKSCREEN_CUSTOM_CLOCKS = releasedFlag(207, "lockscreen_custom_clocks")
|
||||
@JvmField
|
||||
val LOCKSCREEN_CUSTOM_CLOCKS = resourceBooleanFlag(
|
||||
207,
|
||||
R.bool.config_enableLockScreenCustomClocks,
|
||||
"lockscreen_custom_clocks"
|
||||
)
|
||||
|
||||
// TODO(b/275694445): Tracking Bug
|
||||
@JvmField
|
||||
|
||||
@@ -418,7 +418,7 @@ JTvInputHal::TvInputCallback::TvInputCallback(JTvInputHal* hal) {
|
||||
::ndk::ScopedAStatus JTvInputHal::TvInputCallback::notifyTvMessageEvent(
|
||||
const AidlTvMessageEvent& event) {
|
||||
const std::string DEVICE_ID_SUBTYPE = "device_id";
|
||||
if (sizeof(event.messages) > 0 && event.messages[0].subType == DEVICE_ID_SUBTYPE) {
|
||||
if (event.messages.size() > 1 && event.messages[0].subType == DEVICE_ID_SUBTYPE) {
|
||||
mHal->mLooper
|
||||
->sendMessage(new NotifyTvMessageHandler(mHal,
|
||||
TvMessageEventWrapper::createEventWrapper(
|
||||
|
||||
@@ -34,6 +34,8 @@ import android.os.SystemProperties;
|
||||
import android.os.UpdateEngine;
|
||||
import android.os.UpdateEngineCallback;
|
||||
import android.provider.DeviceConfig;
|
||||
import android.provider.Settings;
|
||||
import android.provider.Settings.SettingNotFoundException;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.internal.R;
|
||||
@@ -332,8 +334,17 @@ public final class ProfcollectForwardingService extends SystemService {
|
||||
Context context = getContext();
|
||||
BackgroundThread.get().getThreadHandler().post(() -> {
|
||||
try {
|
||||
int usageSetting = -1;
|
||||
try {
|
||||
// Get "Usage & diagnostics" checkbox status. 1 is for enabled, 0 is for
|
||||
// disabled.
|
||||
usageSetting = Settings.Global.getInt(context.getContentResolver(), "multi_cb");
|
||||
} catch (SettingNotFoundException e) {
|
||||
Log.i(LOG_TAG, "Usage setting not found: " + e.getMessage());
|
||||
}
|
||||
|
||||
// Prepare profile report
|
||||
String reportName = mIProfcollect.report() + ".zip";
|
||||
String reportName = mIProfcollect.report(usageSetting) + ".zip";
|
||||
|
||||
if (!context.getResources().getBoolean(
|
||||
R.bool.config_profcollectReportUploaderEnabled)) {
|
||||
|
||||
@@ -2539,10 +2539,14 @@ public class UsageStatsService extends SystemService implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reportChooserSelection(String packageName, int userId, String contentType,
|
||||
String[] annotations, String action) {
|
||||
public void reportChooserSelection(@NonNull String packageName, int userId,
|
||||
String contentType, String[] annotations, String action) {
|
||||
if (packageName == null) {
|
||||
Slog.w(TAG, "Event report user selecting a null package");
|
||||
throw new IllegalArgumentException("Package selection must not be null.");
|
||||
}
|
||||
// Verify if this package exists before reporting an event for it.
|
||||
if (mPackageManagerInternal.getPackageUid(packageName, 0, userId) < 0) {
|
||||
Slog.w(TAG, "Event report user selecting an invalid package");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user