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

Commit 583c4505 authored by TYM Tsai's avatar TYM Tsai
Browse files

Move interfaces of component of service to internal

Move interfaces of component to internal.
To make codebase build pass,
1. Remove makeAppDetailsActivity of ParsedActivity, make
ParsedActivityImpl.makeAppDetailsActivity to be public and use it instead.
2. Change all imports that used those interfaces.
To fix tests failed with ClassNotFoundException
1. PackageImpl: get class loader from ParsedProcessImpl instead of
ParsedProcess.
2. ParsedPermissionImpl: get class loader from ParsedPermissionGroupImpl
instead of ParsedPermissionGroup.

Bug: 309596860
Test: build pass
Test: atest PackageManagerServiceTests
Test: atest PackageManagerComponentOverrideTests
Test: atest PermissionServiceMockingTests
Test: atest PackageManagerServiceUnitTests
Change-Id: Ic0ca6a07904bbc91f066c4a15f25546c301ab530
parent 7a0ccd8b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -249,6 +249,7 @@ java_library {
        "android.se.omapi-V1-java",
        "android.system.suspend.control.internal-java",
        "devicepolicyprotosnano",
        "ImmutabilityAnnotation",

        "com.android.sysprop.init",
        "com.android.sysprop.localization",
+1 −14
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

package com.android.server.pm.pkg.component;
package com.android.internal.pm.pkg.component;

import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -26,19 +26,6 @@ import java.util.Set;
//@SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
public interface ParsedActivity extends ParsedMainComponent {

    /**
     * Generate activity object that forwards user to App Details page automatically.
     * This activity should be invisible to user and user should not know or see it.
     * @hide
     */
    @NonNull
    static ParsedActivity makeAppDetailsActivity(String packageName, String processName,
            int uiOptions, String taskAffinity, boolean hardwareAccelerated) {
        // Proxy method since ParsedActivityImpl is supposed to be package visibility
        return ParsedActivityImpl.makeAppDetailsActivity(packageName, processName, uiOptions,
                taskAffinity, hardwareAccelerated);
    }

    int getColorMode();

    int getConfigChanges();
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

package com.android.server.pm.pkg.component;
package com.android.internal.pm.pkg.component;

import android.annotation.NonNull;
import android.annotation.Nullable;
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

package com.android.server.pm.pkg.component;
package com.android.internal.pm.pkg.component;

import android.annotation.NonNull;
import android.annotation.StringRes;
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

package com.android.server.pm.pkg.component;
package com.android.internal.pm.pkg.component;

import android.annotation.NonNull;
import android.annotation.Nullable;
Loading