...
 
Commits (648)

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -556,6 +556,8 @@ LOCAL_SRC_FILES += \
packages/services/Proxy/com/android/net/IProxyPortListener.aidl \
core/java/android/service/quicksettings/IQSService.aidl \
core/java/android/service/quicksettings/IQSTileService.aidl \
telephony/java/com/android/internal/telephony/ISmsSecurityService.aidl \
telephony/java/com/android/internal/telephony/ISmsSecurityAgent.aidl \
# The following are native binders that need to go with the native component
# at system/update_engine/binder_bindings/. Use relative path to refer to them.
......@@ -794,6 +796,7 @@ aidl_files := \
frameworks/base/core/java/android/app/usage/UsageEvents.aidl \
frameworks/base/core/java/android/app/Notification.aidl \
frameworks/base/core/java/android/app/NotificationManager.aidl \
frameworks/base/core/java/android/app/NotificationGroup.aidl \
frameworks/base/core/java/android/app/WallpaperInfo.aidl \
frameworks/base/core/java/android/app/AppOpsManager.aidl \
frameworks/base/core/java/android/app/ActivityManager.aidl \
......
......@@ -35,23 +35,23 @@ interface IAccessibilityServiceConnection {
void setServiceInfo(in AccessibilityServiceInfo info);
boolean findAccessibilityNodeInfoByAccessibilityId(int accessibilityWindowId,
String[] findAccessibilityNodeInfoByAccessibilityId(int accessibilityWindowId,
long accessibilityNodeId, int interactionId,
IAccessibilityInteractionConnectionCallback callback, int flags, long threadId,
in Bundle arguments);
boolean findAccessibilityNodeInfosByText(int accessibilityWindowId, long accessibilityNodeId,
String[] findAccessibilityNodeInfosByText(int accessibilityWindowId, long accessibilityNodeId,
String text, int interactionId, IAccessibilityInteractionConnectionCallback callback,
long threadId);
boolean findAccessibilityNodeInfosByViewId(int accessibilityWindowId,
String[] findAccessibilityNodeInfosByViewId(int accessibilityWindowId,
long accessibilityNodeId, String viewId, int interactionId,
IAccessibilityInteractionConnectionCallback callback, long threadId);
boolean findFocus(int accessibilityWindowId, long accessibilityNodeId, int focusType,
String[] findFocus(int accessibilityWindowId, long accessibilityNodeId, int focusType,
int interactionId, IAccessibilityInteractionConnectionCallback callback, long threadId);
boolean focusSearch(int accessibilityWindowId, long accessibilityNodeId, int direction,
String[] focusSearch(int accessibilityWindowId, long accessibilityNodeId, int direction,
int interactionId, IAccessibilityInteractionConnectionCallback callback, long threadId);
boolean performAccessibilityAction(int accessibilityWindowId, long accessibilityNodeId,
......
......@@ -16,8 +16,6 @@
package android.app;
import static android.os.Build.VERSION_CODES.O_MR1;
import static java.lang.Character.MIN_VALUE;
import android.annotation.CallSuper;
......@@ -990,18 +988,6 @@ public class Activity extends ContextThemeWrapper
@CallSuper
protected void onCreate(@Nullable Bundle savedInstanceState) {
if (DEBUG_LIFECYCLE) Slog.v(TAG, "onCreate " + this + ": " + savedInstanceState);
if (getApplicationInfo().targetSdkVersion >= O_MR1 && mActivityInfo.isFixedOrientation()) {
final TypedArray ta = obtainStyledAttributes(com.android.internal.R.styleable.Window);
final boolean isTranslucentOrFloating = ActivityInfo.isTranslucentOrFloating(ta);
ta.recycle();
if (isTranslucentOrFloating) {
throw new IllegalStateException(
"Only fullscreen opaque activities can request orientation");
}
}
if (mLastNonConfigurationInstances != null) {
mFragments.restoreLoaderNonConfig(mLastNonConfigurationInstances.loaders);
}
......@@ -5885,6 +5871,16 @@ public class Activity extends ContextThemeWrapper
return mComponent;
}
/**
* Temporary method on O-MR1 only.
*
* @hide
*/
@Override
public ComponentName getComponentNameForAutofill() {
return mComponent;
}
/**
* Retrieve a {@link SharedPreferences} object for accessing preferences
* that are private to this activity. This simply calls the underlying
......
......@@ -268,4 +268,9 @@ public abstract class ActivityManagerInternal {
* @param token The IApplicationToken for the activity
*/
public abstract void setFocusedActivity(IBinder token);
/**
* Returns {@code true} if {@code uid} is running an activity from {@code packageName}.
*/
public abstract boolean hasRunningActivity(int uid, @Nullable String packageName);
}
This diff is collapsed.
......@@ -279,6 +279,13 @@ public class DownloadManager {
*/
public final static int PAUSED_UNKNOWN = 4;
/**
* Value of {@link #COLUMN_REASON} when the download is paused manually.
*
* @hide
*/
public final static int PAUSED_MANUAL = 5;
/**
* Broadcast intent action sent by the download manager when a download completes.
*/
......@@ -930,6 +937,7 @@ public class DownloadManager {
parts.add(statusClause("=", Downloads.Impl.STATUS_WAITING_TO_RETRY));
parts.add(statusClause("=", Downloads.Impl.STATUS_WAITING_FOR_NETWORK));
parts.add(statusClause("=", Downloads.Impl.STATUS_QUEUED_FOR_WIFI));
parts.add(statusClause("=", Downloads.Impl.STATUS_PAUSED_MANUAL));
}
if ((mStatusFlags & STATUS_SUCCESSFUL) != 0) {
parts.add(statusClause("=", Downloads.Impl.STATUS_SUCCESS));
......@@ -1180,6 +1188,34 @@ public class DownloadManager {
mResolver.update(mBaseUri, values, getWhereClauseForIds(ids), getWhereArgsForIds(ids));
}
/**
* Pause the given running download manually.
*
* @param id the ID of the download to be paused
* @return the number of downloads actually updated
* @hide
*/
public int pauseDownload(long id) {
ContentValues values = new ContentValues();
values.put(Downloads.Impl.COLUMN_STATUS, Downloads.Impl.STATUS_PAUSED_MANUAL);
return mResolver.update(ContentUris.withAppendedId(mBaseUri, id), values, null, null);
}
/**
* Resume the given paused download manually.
*
* @param id the ID of the download to be resumed
* @return the number of downloads actually updated
* @hide
*/
public int resumeDownload(long id) {
ContentValues values = new ContentValues();
values.put(Downloads.Impl.COLUMN_STATUS, Downloads.Impl.STATUS_RUNNING);
return mResolver.update(ContentUris.withAppendedId(mBaseUri, id), values, null, null);
}
/**
* Returns maximum size, in bytes, of downloads that may go over a mobile connection; or null if
* there's no limit
......@@ -1564,6 +1600,9 @@ public class DownloadManager {
case Downloads.Impl.STATUS_QUEUED_FOR_WIFI:
return PAUSED_QUEUED_FOR_WIFI;
case Downloads.Impl.STATUS_PAUSED_MANUAL:
return PAUSED_MANUAL;
default:
return PAUSED_UNKNOWN;
}
......@@ -1619,6 +1658,7 @@ public class DownloadManager {
case Downloads.Impl.STATUS_WAITING_TO_RETRY:
case Downloads.Impl.STATUS_WAITING_FOR_NETWORK:
case Downloads.Impl.STATUS_QUEUED_FOR_WIFI:
case Downloads.Impl.STATUS_PAUSED_MANUAL:
return STATUS_PAUSED;
case Downloads.Impl.STATUS_SUCCESS:
......
......@@ -37,4 +37,6 @@ interface IAlarmManager {
void remove(in PendingIntent operation, in IAlarmListener listener);
long getNextWakeFromIdleTime();
AlarmManager.AlarmClockInfo getNextAlarmClock(int userId);
// update the uids being synchronized by network socket request manager
void updateBlockedUids(int uid, boolean isBlocked);
}
......@@ -135,6 +135,7 @@ interface INotificationManager
void setNotificationPolicy(String pkg, in NotificationManager.Policy policy);
boolean isNotificationPolicyAccessGrantedForPackage(String pkg);
void setNotificationPolicyAccessGranted(String pkg, boolean granted);
void setNotificationPolicyAccessGrantedForUser(String pkg, int userId, boolean granted);
AutomaticZenRule getAutomaticZenRule(String id);
List<ZenModeConfig.ZenRule> getZenRules();
String addAutomaticZenRule(in AutomaticZenRule automaticZenRule);
......
......@@ -1012,7 +1012,7 @@ public final class LoadedApk {
final int N = packageIdentifiers.size();
for (int i = 0; i < N; i++) {
final int id = packageIdentifiers.keyAt(i);
if (id == 0x01 || id == 0x7f) {
if (id == 0x01 || id == 0x7f || id == 0x3f) {
continue;
}
......
/**
* Copyright (c) 2012, The CyanogenMod 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.app;
parcelable NotificationGroup;
/*
* Copyright (C) 2011 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.app;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import android.content.Context;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.ParcelUuid;
import android.os.RemoteException;
import android.text.TextUtils;
import android.util.Log;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/** @hide */
public class NotificationGroup implements Parcelable {
private static final String TAG = "NotificationGroup";
private String mName;
private int mNameResId;
private UUID mUuid;
private Set<String> mPackages = new HashSet<String>();
private boolean mDirty;
public static final Parcelable.Creator<NotificationGroup> CREATOR = new Parcelable.Creator<NotificationGroup>() {
public NotificationGroup createFromParcel(Parcel in) {
return new NotificationGroup(in);
}
@Override
public NotificationGroup[] newArray(int size) {
return new NotificationGroup[size];
}
};
public NotificationGroup(String name) {
this(name, -1, null);
}
public NotificationGroup(String name, int nameResId, UUID uuid) {
mName = name;
mNameResId = nameResId;
mUuid = (uuid != null) ? uuid : UUID.randomUUID();
mDirty = uuid == null;
}
private NotificationGroup(Parcel in) {
readFromParcel(in);
}
@Override
public String toString() {
return getName();
}
public String getName() {
return mName;
}
public void setName(String name) {
mName = name;
mNameResId = -1;
mDirty = true;
}
public UUID getUuid() {
return mUuid;
}
public void addPackage(String pkg) {
mPackages.add(pkg);
mDirty = true;
}
public String[] getPackages() {
return mPackages.toArray(new String[mPackages.size()]);
}
public void removePackage(String pkg) {
mPackages.remove(pkg);
mDirty = true;
}
public boolean hasPackage(String pkg) {
return mPackages.contains(pkg);
}
public boolean isDirty() {
return mDirty;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(mName);
dest.writeInt(mNameResId);
dest.writeInt(mDirty ? 1 : 0);
new ParcelUuid(mUuid).writeToParcel(dest, 0);
dest.writeStringArray(getPackages());
}
public void readFromParcel(Parcel in) {
mName = in.readString();
mNameResId = in.readInt();
mDirty = in.readInt() != 0;
mUuid = ParcelUuid.CREATOR.createFromParcel(in).getUuid();
mPackages.addAll(Arrays.asList(in.readStringArray()));
}
public void getXmlString(StringBuilder builder, Context context) {
builder.append("<notificationGroup ");
if (mNameResId > 0) {
builder.append("nameres=\"");
builder.append(context.getResources().getResourceEntryName(mNameResId));
} else {
builder.append("name=\"");
builder.append(TextUtils.htmlEncode(getName()));
}
builder.append("\" uuid=\"");
builder.append(TextUtils.htmlEncode(getUuid().toString()));
builder.append("\">\n");
for (String pkg : mPackages) {
builder.append("<package>" + TextUtils.htmlEncode(pkg) + "</package>\n");
}
builder.append("</notificationGroup>\n");
mDirty = false;
}
public static NotificationGroup fromXml(XmlPullParser xpp, Context context)
throws XmlPullParserException, IOException {
String value = xpp.getAttributeValue(null, "nameres");
int nameResId = -1;
String name = null;
UUID uuid = null;
if (value != null) {
nameResId = context.getResources().getIdentifier(value, "string", "android");
if (nameResId > 0) {
name = context.getResources().getString(nameResId);
}
}
if (name == null) {
name = xpp.getAttributeValue(null, "name");
}
value = xpp.getAttributeValue(null, "uuid");
if (value != null) {
try {
uuid = UUID.fromString(value);
} catch (IllegalArgumentException e) {
Log.w(TAG, "UUID not recognized for " + name + ", using new one.");
}
}
NotificationGroup notificationGroup = new NotificationGroup(name, nameResId, uuid);