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

Commit 602d851b authored by Brint E. Kriebel's avatar Brint E. Kriebel
Browse files

Merge branch 'cm-11.0' into stable/cm-11.0

Conflicts:
	core/res/AndroidManifest.xml
	packages/SystemUI/res/values/cm_strings.xml
	packages/SystemUI/src/com/android/systemui/quicksettings/QuickSettingsTile.java
	packages/WallpaperCropper/src/com/android/wallpapercropper/LockWallpaperPickerActivity.java
	services/java/com/android/server/ThemeService.java
	services/java/com/android/server/pm/PackageManagerService.java

Change-Id: I5643d408f8f241a1cdc12617b0071adfc377ef70
parents 568942ef d852faf4
Loading
Loading
Loading
Loading
+29 −1
Original line number Diff line number Diff line
@@ -286,9 +286,10 @@ LOCAL_SRC_FILES += \
	telephony/java/com/android/internal/telephony/msim/IPhoneSubInfoMSim.aidl \
	telephony/java/com/android/internal/telephony/ITelephony.aidl \
	telephony/java/com/android/internal/telephony/msim/ITelephonyMSim.aidl \
	telephony/java/com/android/internal/telephony/ISms.aidl \
	telephony/java/com/android/internal/telephony/ITelephonyListener.aidl \
	telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl \
	telephony/java/com/android/internal/telephony/ITelephonyRegistryMSim.aidl \
	telephony/java/com/android/internal/telephony/ISms.aidl \
	telephony/java/com/android/internal/telephony/IWapPushManager.aidl \
	wifi/java/android/net/wifi/IWifiManager.aidl \
	wifi/java/android/net/wifi/p2p/IWifiP2pManager.aidl \
@@ -371,6 +372,7 @@ aidl_files := \
	frameworks/base/core/java/android/accounts/IAccountManagerResponse.aidl \
	frameworks/base/core/java/android/accounts/IAccountAuthenticator.aidl \
	frameworks/base/core/java/android/accounts/IAccountAuthenticatorResponse.aidl \
	frameworks/base/core/java/android/app/ComposedIconInfo.aidl \
	frameworks/base/core/java/android/app/Notification.aidl \
	frameworks/base/core/java/android/app/NotificationGroup.aidl \
	frameworks/base/core/java/android/app/Profile.aidl \
@@ -783,6 +785,32 @@ $(full_target): $(framework_built) $(gen)
$(INTERNAL_PLATFORM_API_FILE): $(full_target)
$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE))

# ====  the private api stubs ===================================
include $(CLEAR_VARS)

LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)

LOCAL_MODULE := private-api-stubs

LOCAL_DROIDDOC_OPTIONS:=\
		$(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
		-stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_private_stubs_current_intermediates/src \
        -showAnnotation android.annotation.PrivateApi \
		-nodocs

LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk

LOCAL_UNINSTALLABLE_MODULE := true

include $(BUILD_DROIDDOC)

# ====  check javadoc comments but don't generate docs ========
include $(CLEAR_VARS)

+31 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2008 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.annotation;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * Indicates an API is exposed for use by bundled applications.
 * <p>
 * These APIs are not guaranteed to remain consistent release-to-release,
 * and are not for use by apps linking against the SDK.
 * @hide
 */
@Retention(RetentionPolicy.SOURCE)
public @interface PrivateApi {
}
+27 −30
Original line number Diff line number Diff line
@@ -1545,6 +1545,15 @@ public final class ActivityThread {
                overrideConfiguration, pkgInfo.getCompatibilityInfo(), null, context);
    }

    /**
     * Creates the top level resources for the given package.
     */
    Resources getTopLevelThemedResources(String resDir, int displayId, LoadedApk pkgInfo,
                                         String pkgName, String themePkgName) {
        return mResourcesManager.getTopLevelThemedResources(resDir, displayId, pkgName,
                themePkgName, pkgInfo.getCompatibilityInfo(), null);
    }

    final Handler getHandler() {
        return mH;
    }
@@ -1647,15 +1656,14 @@ public final class ActivityThread {
                ref = mResourcePackages.get(aInfo.packageName);
            }
            LoadedApk packageInfo = ref != null ? ref.get() : null;
            if (packageInfo == null || (packageInfo.mResources != null
                    && !packageInfo.mResources.getAssets().isUpToDate())) {
            if (packageInfo == null) {
                if (localLOGV) Slog.v(TAG, (includeCode ? "Loading code package "
                        : "Loading resource-only package ") + aInfo.packageName
                        + " (in " + (mBoundApplication != null
                                ? mBoundApplication.processName : null)
                        + ")");
                packageInfo =
                    new LoadedApk(this, aInfo, compatInfo, this, baseLoader,
                    new LoadedApk(this, aInfo, compatInfo, baseLoader,
                            securityViolation, includeCode &&
                            (aInfo.flags&ApplicationInfo.FLAG_HAS_CODE) != 0);
                if (includeCode) {
@@ -1666,6 +1674,11 @@ public final class ActivityThread {
                            new WeakReference<LoadedApk>(packageInfo));
                }
            }
            if (packageInfo.mResources == null
                    || !packageInfo.mResources.getAssets().isUpToDate()) {
                packageInfo.mResources = null;
                packageInfo.getResources(this);
            }
            return packageInfo;
        }
    }
@@ -1708,26 +1721,15 @@ public final class ActivityThread {
    public ContextImpl getSystemContext() {
        synchronized (this) {
            if (mSystemContext == null) {
                ContextImpl context =
                    ContextImpl.createSystemContext(this);
                LoadedApk info = new LoadedApk(this, "android", context, null,
                        CompatibilityInfo.DEFAULT_COMPATIBILITY_INFO);
                context.init(info, null, this);
                context.getResources().updateConfiguration(mResourcesManager.getConfiguration(),
                        mResourcesManager.getDisplayMetricsLocked(Display.DEFAULT_DISPLAY));
                mSystemContext = context;
                //Slog.i(TAG, "Created system resources " + context.getResources()
                //        + ": " + context.getResources().getConfiguration());
            }
                mSystemContext = ContextImpl.createSystemContext(this);
            }
            return mSystemContext;
        }
    }

    public void installSystemApplicationInfo(ApplicationInfo info) {
        synchronized (this) {
            ContextImpl context = getSystemContext();
            context.init(new LoadedApk(this, "android", context, info,
                    CompatibilityInfo.DEFAULT_COMPATIBILITY_INFO), null, this);
            getSystemContext().installSystemApplicationInfo(info);

            // give ourselves a default profiler
            mProfiler = new Profiler();
@@ -2223,8 +2225,7 @@ public final class ActivityThread {

    private Context createBaseContextForActivity(ActivityClientRecord r,
            final Activity activity) {
        ContextImpl appContext = new ContextImpl();
        appContext.init(r.packageInfo, r.token, this);
        ContextImpl appContext = ContextImpl.createActivityContext(this, r.packageInfo, r.token);
        appContext.setOuterContext(activity);

        // For debugging purposes, if the activity's package name contains the value of
@@ -2509,8 +2510,7 @@ public final class ActivityThread {
                agent = (BackupAgent) cl.loadClass(classname).newInstance();

                // set up the agent's context
                ContextImpl context = new ContextImpl();
                context.init(packageInfo, null, this);
                ContextImpl context = ContextImpl.createAppContext(this, packageInfo);
                context.setOuterContext(agent);
                agent.attach(context);

@@ -2582,11 +2582,10 @@ public final class ActivityThread {
        try {
            if (localLOGV) Slog.v(TAG, "Creating service " + data.info.name);

            ContextImpl context = new ContextImpl();
            context.init(packageInfo, null, this);
            ContextImpl context = ContextImpl.createAppContext(this, packageInfo);
            context.setOuterContext(service);

            Application app = packageInfo.makeApplication(false, mInstrumentation);
            context.setOuterContext(service);
            service.attach(context, this, data.info.name, data.token, app,
                    ActivityManagerNative.getDefault());
            service.onCreate();
@@ -4289,8 +4288,7 @@ public final class ActivityThread {
        }
        updateDefaultDensity();

        final ContextImpl appContext = new ContextImpl();
        appContext.init(data.info, null, this);
        final ContextImpl appContext = ContextImpl.createAppContext(this, data.info);
        if (!Process.isIsolated()) {
            final File cacheDir = appContext.getCacheDir();

@@ -4401,8 +4399,7 @@ public final class ActivityThread {
            instrApp.nativeLibraryDir = ii.nativeLibraryDir;
            LoadedApk pi = getPackageInfo(instrApp, data.compatInfo,
                    appContext.getClassLoader(), false, true);
            ContextImpl instrContext = new ContextImpl();
            instrContext.init(pi, null, this);
            ContextImpl instrContext = ContextImpl.createAppContext(this, pi);

            try {
                java.lang.ClassLoader cl = instrContext.getClassLoader();
@@ -5017,8 +5014,8 @@ public final class ActivityThread {
                                                    UserHandle.myUserId());
            try {
                mInstrumentation = new Instrumentation();
                ContextImpl context = new ContextImpl();
                context.init(getSystemContext().mPackageInfo, null, this);
                ContextImpl context = ContextImpl.createAppContext(
                        this, getSystemContext().mPackageInfo);
                Application app = Instrumentation.newApplication(Application.class, context);
                mAllApplications.add(app);
                mInitialApplication = app;
+1 −1
Original line number Diff line number Diff line
@@ -419,8 +419,8 @@ public class AppOpsManager {
            android.Manifest.permission.WRITE_CALL_LOG,
            android.Manifest.permission.READ_CALENDAR,
            android.Manifest.permission.WRITE_CALENDAR,
            null, // no permission required for notifications
            android.Manifest.permission.ACCESS_WIFI_STATE,
            null, // no permission required for notifications
            null, // neighboring cells shares the coarse location perm
            android.Manifest.permission.CALL_PHONE,
            android.Manifest.permission.READ_SMS,
+32 −0
Original line number Diff line number Diff line
@@ -788,6 +788,29 @@ final class ApplicationPackageManager extends PackageManager {
            getApplicationInfo(appPackageName, 0));
    }

    /** @hide */
    @Override public Resources getThemedResourcesForApplication(
            ApplicationInfo app, String themePkgName) throws NameNotFoundException {
        if (app.packageName.equals("system")) {
            return mContext.mMainThread.getSystemContext().getResources();
        }

        Resources r = mContext.mMainThread.getTopLevelThemedResources(
                app.uid == Process.myUid() ? app.sourceDir : app.publicSourceDir,
                Display.DEFAULT_DISPLAY, mContext.mPackageInfo, app.packageName, themePkgName);
        if (r != null) {
            return r;
        }
        throw new NameNotFoundException("Unable to open " + app.publicSourceDir);
    }

    /** @hide */
    @Override public Resources getThemedResourcesForApplication(
            String appPackageName, String themePkgName) throws NameNotFoundException {
        return getThemedResourcesForApplication(
                getApplicationInfo(appPackageName, 0), themePkgName);
    }

    /** @hide */
    @Override
    public Resources getResourcesForApplicationAsUser(String appPackageName, int userId)
@@ -1373,4 +1396,13 @@ final class ApplicationPackageManager extends PackageManager {
            Log.e(TAG, "Failed to update icon maps", re);
        }
    }

    @Override
    public void setComponentProtectedSetting(ComponentName componentName, boolean newState) {
        try {
            mPM.setComponentProtectedSetting(componentName, newState, mContext.getUserId());
        } catch (RemoteException re) {
            Log.e(TAG, "Failed to set component protected setting", re);
        }
    }
}
Loading