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

Commit b0886f3f authored by Kweku Adams's avatar Kweku Adams
Browse files

incidentd: Updating Settings Provider proto dump.

Handling potential null cases, adding comments, logging new settings,
and dumping historical operations.

Bug: 65750829
Test: flash device and check incident.proto output
Change-Id: I66fe324a91fba136e73761cfb74f3527de75d3ad
parent 2dd2cbcb
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -2113,6 +2113,9 @@ public final class Settings {
     * functions for accessing individual settings entries.
     */
    public static final class System extends NameValueTable {
        // NOTE: If you add new settings here, be sure to add them to
        // com.android.providers.settings.SettingsProtoDumpUtil#dumpProtoSystemSettingsLocked.

        private static final float DEFAULT_FONT_SCALE = 1.0f;

        /** @hide */
@@ -4562,6 +4565,9 @@ public final class Settings {
     * APIs for those values, not modified directly by applications.
     */
    public static final class Secure extends NameValueTable {
        // NOTE: If you add new settings here, be sure to add them to
        // com.android.providers.settings.SettingsProtoDumpUtil#dumpProtoSecureSettingsLocked.

        /**
         * The content:// style URL for this table
         */
@@ -7564,6 +7570,9 @@ public final class Settings {
     * explicitly modify through the system UI or specialized APIs for those values.
     */
    public static final class Global extends NameValueTable {
        // NOTE: If you add new settings here, be sure to add them to
        // com.android.providers.settings.SettingsProtoDumpUtil#dumpProtoGlobalSettingsLocked.

        /**
         * The content:// style URL for global secure settings items.  Not public.
         */
@@ -10875,7 +10884,7 @@ public final class Settings {

        /** User preferred subscriptions setting.
          * This holds the details of the user selected subscription from the card and
          * the activation status. Each settings string have the coma separated values
          * the activation status. Each settings string have the comma separated values
          * iccId,appType,appId,activationStatus,3gppIndex,3gpp2Index
          * @hide
         */
+6 −2
Original line number Diff line number Diff line
@@ -20,12 +20,12 @@ option java_outer_classname = "IncidentProtoMetadata";

import "frameworks/base/libs/incident/proto/android/privacy.proto";
import "frameworks/base/libs/incident/proto/android/section.proto";
import "frameworks/base/core/proto/android/providers/settings.proto";
import "frameworks/base/core/proto/android/os/cpuinfo.proto";
import "frameworks/base/core/proto/android/os/incidentheader.proto";
import "frameworks/base/core/proto/android/os/kernelwake.proto";
import "frameworks/base/core/proto/android/os/pagetypeinfo.proto";
import "frameworks/base/core/proto/android/os/procrank.proto";
import "frameworks/base/core/proto/android/providers/settings.proto";
import "frameworks/base/core/proto/android/server/activitymanagerservice.proto";
import "frameworks/base/core/proto/android/server/alarmmanagerservice.proto";
import "frameworks/base/core/proto/android/server/windowmanagerservice.proto";
@@ -86,7 +86,11 @@ message IncidentProto {
        (section).args = "netstats --proto"
    ];

    optional android.providers.settings.SettingsServiceDumpProto settings = 3002;
    optional android.providers.settings.SettingsServiceDumpProto settings = 3002 [
        (section).type = SECTION_DUMPSYS,
        (section).args = "settings --proto"
    ];

    optional android.service.appwidget.AppWidgetServiceDumpProto appwidget = 3003;
    optional android.service.notification.NotificationServiceDumpProto notification = 3004 [
        (section).type = SECTION_DUMPSYS,
+111 −13

File changed.

Preview size limit exceeded, changes collapsed.

+364 −14

File changed.

Preview size limit exceeded, changes collapsed.

+3 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.providers.settings;

import android.Manifest;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.ActivityManager;
import android.app.AppGlobals;
import android.app.backup.BackupManager;
@@ -657,7 +658,6 @@ public class SettingsProvider extends ContentProvider {

        synchronized (mLock) {
            SettingsProtoDumpUtil.dumpProtoLocked(mSettingsRegistry, proto);

        }

        proto.flush();
@@ -2284,6 +2284,7 @@ public class SettingsProvider extends ContentProvider {
            return users;
        }

        @Nullable
        public SettingsState getSettingsLocked(int type, int userId) {
            final int key = makeKey(type, userId);
            return peekSettingsStateLocked(key);
@@ -2578,6 +2579,7 @@ public class SettingsProvider extends ContentProvider {
            ssaidSettings.deleteSettingLocked(Integer.toString(uid));
        }

        @Nullable
        private SettingsState peekSettingsStateLocked(int key) {
            SettingsState settingsState = mSettingsStates.get(key);
            if (settingsState != null) {
Loading