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

Commit b7bb3b3d authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Fix bug in reporting a processes's dependent component.

Also add new action to show an app's details.

Change-Id: I6ad3b3ac8462f5acf726ce76130882a262adff92
parent 7a68d368
Loading
Loading
Loading
Loading
+33 −0
Original line number Diff line number Diff line
@@ -26404,6 +26404,17 @@
<parameter name="parcel" type="android.os.Parcel">
</parameter>
</constructor>
<method name="clone"
 return="android.app.Notification"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="describeContents"
 return="int"
 abstract="false"
@@ -138893,6 +138904,17 @@
 visibility="public"
>
</field>
<field name="ACTION_APPLICATION_DETAILS_SETTINGS"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;android.settings.APPLICATION_DETAILS_SETTINGS&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="ACTION_APPLICATION_DEVELOPMENT_SETTINGS"
 type="java.lang.String"
 transient="false"
@@ -211379,6 +211401,17 @@
<parameter name="parent" type="android.view.ViewGroup">
</parameter>
</method>
<method name="clone"
 return="android.widget.RemoteViews"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="describeContents"
 return="int"
 abstract="false"
+15 −0
Original line number Diff line number Diff line
@@ -354,6 +354,21 @@ public final class Settings {
    public static final String ACTION_MANAGE_APPLICATIONS_SETTINGS =
            "android.settings.MANAGE_APPLICATIONS_SETTINGS";

    /**
     * Activity Action: Show screen of details about a particular application.
     * <p>
     * In some cases, a matching Activity may not exist, so ensure you
     * safeguard against this.
     * <p>
     * Input: The Intent's data URI specifies the application package name
     * to be shown, with the "package" scheme.  That is "package:com.my.app".
     * <p>
     * Output: Nothing.
     */
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    public static final String ACTION_APPLICATION_DETAILS_SETTINGS =
            "android.settings.APPLICATION_DETAILS_SETTINGS";

    /**
     * Activity Action: Show settings for system update functionality.
     * <p>
+4 −4
Original line number Diff line number Diff line
@@ -14188,7 +14188,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
                                app.adjTypeCode = ActivityManager.RunningAppProcessInfo
                                        .REASON_SERVICE_IN_USE;
                                app.adjSource = cr.binding.client;
                                app.adjTarget = s.serviceInfo.name;
                                app.adjTarget = s.name;
                            }
                            if ((cr.flags&Context.BIND_NOT_FOREGROUND) == 0) {
                                if (client.curSchedGroup == Process.THREAD_GROUP_DEFAULT) {
@@ -14210,7 +14210,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
                            app.adjTypeCode = ActivityManager.RunningAppProcessInfo
                                    .REASON_SERVICE_IN_USE;
                            app.adjSource = a;
                            app.adjTarget = s.serviceInfo.name;
                            app.adjTarget = s.name;
                        }
                    }
                }
@@ -14262,7 +14262,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
                            app.adjTypeCode = ActivityManager.RunningAppProcessInfo
                                    .REASON_PROVIDER_IN_USE;
                            app.adjSource = client;
                            app.adjTarget = cpr.info.name;
                            app.adjTarget = cpr.name;
                        }
                        if (client.curSchedGroup == Process.THREAD_GROUP_DEFAULT) {
                            schedGroup = Process.THREAD_GROUP_DEFAULT;
@@ -14278,7 +14278,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
                        schedGroup = Process.THREAD_GROUP_DEFAULT;
                        app.hidden = false;
                        app.adjType = "provider";
                        app.adjTarget = cpr.info.name;
                        app.adjTarget = cpr.name;
                    }
                }
            }
+4 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.server.am;

import android.app.IActivityManager.ContentProviderHolder;
import android.content.ComponentName;
import android.content.pm.ApplicationInfo;
import android.content.pm.ProviderInfo;
import android.os.Process;
@@ -29,6 +30,7 @@ class ContentProviderRecord extends ContentProviderHolder {
    final HashSet<ProcessRecord> clients = new HashSet<ProcessRecord>();
    final int uid;
    final ApplicationInfo appInfo;
    final ComponentName name;
    int externals;     // number of non-framework processes supported by this provider
    ProcessRecord app; // if non-null, hosting application
    ProcessRecord launchingApp; // if non-null, waiting for this app to be launched.
@@ -38,6 +40,7 @@ class ContentProviderRecord extends ContentProviderHolder {
        super(_info);
        uid = ai.uid;
        appInfo = ai;
        name = new ComponentName(_info.packageName, _info.name);
        noReleaseNeeded = uid == 0 || uid == Process.SYSTEM_UID;
    }

@@ -45,6 +48,7 @@ class ContentProviderRecord extends ContentProviderHolder {
        super(cpr.info);
        uid = cpr.uid;
        appInfo = cpr.appInfo;
        name = cpr.name;
        noReleaseNeeded = cpr.noReleaseNeeded;
    }