Merge "Fix privacy tags based on PWG review meeting." into pi-dev
diff --git a/Android.mk b/Android.mk
index bbe2faf..e2f88e8 100644
--- a/Android.mk
+++ b/Android.mk
@@ -868,8 +868,12 @@
$(eval $(call copy-one-file,frameworks/base/config/hiddenapi-blacklist.txt,\
$(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST)))
-$(eval $(call copy-one-file,frameworks/base/config/hiddenapi-light-greylist.txt,\
- $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST)))
+
+# Temporarily merge light greylist from two files. Vendor list will become dark
+# grey once we remove the UI toast.
+$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): frameworks/base/config/hiddenapi-light-greylist.txt \
+ frameworks/base/config/hiddenapi-vendor-list.txt
+ sort $^ > $@
# Generate dark greylist as private API minus (blacklist plus light greylist).
diff --git a/api/current.txt b/api/current.txt
index 59e7c46..9c0e630 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -42821,17 +42821,17 @@
ctor public ServiceState(android.os.Parcel);
method protected void copyFrom(android.telephony.ServiceState);
method public int describeContents();
+ method public int getCdmaNetworkId();
+ method public int getCdmaSystemId();
method public int[] getCellBandwidths();
method public int getChannelNumber();
method public int getDuplexMode();
method public boolean getIsManualSelection();
- method public int getNetworkId();
method public java.lang.String getOperatorAlphaLong();
method public java.lang.String getOperatorAlphaShort();
method public java.lang.String getOperatorNumeric();
method public boolean getRoaming();
method public int getState();
- method public int getSystemId();
method public void setIsManualSelection(boolean);
method public void setOperatorName(java.lang.String, java.lang.String, java.lang.String);
method public void setRoaming(boolean);
@@ -44041,7 +44041,7 @@
method public abstract int getSpanTypeId();
}
- public class PrecomputedText implements android.text.Spanned {
+ public class PrecomputedText implements android.text.Spannable {
method public char charAt(int);
method public static android.text.PrecomputedText create(java.lang.CharSequence, android.text.PrecomputedText.Params);
method public int getParagraphCount();
@@ -44055,6 +44055,8 @@
method public java.lang.CharSequence getText();
method public int length();
method public int nextSpanTransition(int, int, java.lang.Class);
+ method public void removeSpan(java.lang.Object);
+ method public void setSpan(java.lang.Object, int, int, int);
method public java.lang.CharSequence subSequence(int, int);
}
diff --git a/api/test-current.txt b/api/test-current.txt
index 54ddd5d..3ddbdba 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -759,7 +759,7 @@
}
public class ServiceState implements android.os.Parcelable {
- method public void setSystemAndNetworkId(int, int);
+ method public void setCdmaSystemAndNetworkId(int, int);
}
}
diff --git a/config/hiddenapi-vendor-list.txt b/config/hiddenapi-vendor-list.txt
new file mode 100644
index 0000000..952b28b
--- /dev/null
+++ b/config/hiddenapi-vendor-list.txt
@@ -0,0 +1,552 @@
+Landroid/app/ActivityManager$RecentTaskInfo;->configuration:Landroid/content/res/Configuration;
+Landroid/app/ActivityManager$TaskDescription;->loadTaskDescriptionIcon(Ljava/lang/String;I)Landroid/graphics/Bitmap;
+Landroid/app/ActivityManager$TaskSnapshot;->getSnapshot()Landroid/graphics/GraphicBuffer;
+Landroid/app/ActivityOptions;->makeRemoteAnimation(Landroid/view/RemoteAnimationAdapter;)Landroid/app/ActivityOptions;
+Landroid/app/ActivityOptions;->setSplitScreenCreateMode(I)V
+Landroid/app/Activity;->registerRemoteAnimations(Landroid/view/RemoteAnimationDefinition;)V
+Landroid/app/IActivityController$Stub;-><init>()V
+Landroid/app/IActivityManager;->cancelRecentsAnimation()V
+Landroid/app/IActivityManager;->cancelTaskWindowTransition(I)V
+Landroid/app/IActivityManager;->closeSystemDialogs(Ljava/lang/String;)V
+Landroid/app/IActivityManager;->getCurrentUser()Landroid/content/pm/UserInfo;
+Landroid/app/IActivityManager;->getFilteredTasks(III)Ljava/util/List;
+Landroid/app/IActivityManager;->getLockTaskModeState()I
+Landroid/app/IActivityManager;->getRecentTasks(III)Landroid/content/pm/ParceledListSlice;
+Landroid/app/IActivityManager;->getTaskSnapshot(IZ)Landroid/app/ActivityManager$TaskSnapshot;
+Landroid/app/IActivityManager;->registerTaskStackListener(Landroid/app/ITaskStackListener;)V
+Landroid/app/IActivityManager;->removeTask(I)Z
+Landroid/app/IActivityManager;->startActivityFromRecents(ILandroid/os/Bundle;)I
+Landroid/app/IActivityManager;->startRecentsActivity(Landroid/content/Intent;Landroid/app/IAssistDataReceiver;Landroid/view/IRecentsAnimationRunner;)V
+Landroid/app/IAssistDataReceiver;->onHandleAssistData(Landroid/os/Bundle;)V
+Landroid/app/IAssistDataReceiver;->onHandleAssistScreenshot(Landroid/graphics/Bitmap;)V
+Landroid/app/IAssistDataReceiver$Stub;-><init>()V
+Landroid/app/KeyguardManager;->isDeviceLocked(I)Z
+Landroid/app/StatusBarManager;->removeIcon(Ljava/lang/String;)V
+Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V
+Landroid/app/TaskStackListener;->onActivityDismissingDockedStack()V
+Landroid/app/TaskStackListener;->onActivityForcedResizable(Ljava/lang/String;II)V
+Landroid/app/TaskStackListener;->onActivityLaunchOnSecondaryDisplayFailed()V
+Landroid/app/TaskStackListener;->onActivityPinned(Ljava/lang/String;III)V
+Landroid/app/TaskStackListener;->onActivityRequestedOrientationChanged(II)V
+Landroid/app/TaskStackListener;->onActivityUnpinned()V
+Landroid/app/TaskStackListener;->onPinnedActivityRestartAttempt(Z)V
+Landroid/app/TaskStackListener;->onPinnedStackAnimationEnded()V
+Landroid/app/TaskStackListener;->onPinnedStackAnimationStarted()V
+Landroid/app/TaskStackListener;->onTaskMovedToFront(I)V
+Landroid/app/TaskStackListener;->onTaskProfileLocked(II)V
+Landroid/app/TaskStackListener;->onTaskRemoved(I)V
+Landroid/app/TaskStackListener;->onTaskSnapshotChanged(ILandroid/app/ActivityManager$TaskSnapshot;)V
+Landroid/app/TaskStackListener;->onTaskStackChanged()V
+Landroid/app/VrStateCallback;-><init>()V
+Landroid/app/VrStateCallback;->onPersistentVrStateChanged(Z)V
+Landroid/app/WallpaperColors;-><init>(Landroid/graphics/Color;Landroid/graphics/Color;Landroid/graphics/Color;I)V
+Landroid/companion/AssociationRequest;->getDeviceFilters()Ljava/util/List;
+Landroid/companion/AssociationRequest;->isSingleDevice()Z
+Landroid/companion/BluetoothDeviceFilter;->getAddress()Ljava/lang/String;
+Landroid/companion/BluetoothDeviceFilterUtils;->getDeviceDisplayNameInternal(Landroid/bluetooth/BluetoothDevice;)Ljava/lang/String;
+Landroid/companion/BluetoothDeviceFilterUtils;->getDeviceDisplayNameInternal(Landroid/net/wifi/ScanResult;)Ljava/lang/String;
+Landroid/companion/BluetoothDeviceFilterUtils;->getDeviceMacAddress(Landroid/os/Parcelable;)Ljava/lang/String;
+Landroid/companion/BluetoothLeDeviceFilter;->getScanFilter()Landroid/bluetooth/le/ScanFilter;
+Landroid/companion/DeviceFilter;->getDeviceDisplayName(Landroid/os/Parcelable;)Ljava/lang/String;
+Landroid/companion/DeviceFilter;->matches(Landroid/os/Parcelable;)Z
+Landroid/companion/ICompanionDeviceDiscoveryServiceCallback;->onDeviceSelected(Ljava/lang/String;ILjava/lang/String;)V
+Landroid/companion/ICompanionDeviceDiscoveryServiceCallback;->onDeviceSelectionCancel()V
+Landroid/companion/ICompanionDeviceDiscoveryService$Stub;-><init>()V
+Landroid/companion/IFindDeviceCallback;->onSuccess(Landroid/app/PendingIntent;)V
+Landroid/content/Context;->getOpPackageName()Ljava/lang/String;
+Landroid/content/Context;->registerReceiverAsUser(Landroid/content/BroadcastReceiver;Landroid/os/UserHandle;Landroid/content/IntentFilter;Ljava/lang/String;Landroid/os/Handler;)Landroid/content/Intent;
+Landroid/content/Context;->startActivityAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)V
+Landroid/content/Context;->startServiceAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)Landroid/content/ComponentName;
+Landroid/content/ContextWrapper;->getThemeResId()I
+Landroid/content/pm/IPackageDataObserver;->onRemoveCompleted(Ljava/lang/String;Z)V
+Landroid/content/pm/IPackageDataObserver$Stub;-><init>()V
+Landroid/content/pm/IPackageDeleteObserver;->packageDeleted(Ljava/lang/String;I)V
+Landroid/content/pm/IPackageDeleteObserver$Stub;-><init>()V
+Landroid/content/pm/IPackageManager;->getActivityInfo(Landroid/content/ComponentName;II)Landroid/content/pm/ActivityInfo;
+Landroid/content/pm/IPackageManager;->getHomeActivities(Ljava/util/List;)Landroid/content/ComponentName;
+Landroid/content/pm/IPackageStatsObserver;->onGetStatsCompleted(Landroid/content/pm/PackageStats;Z)V
+Landroid/database/sqlite/SqliteWrapper;->insert(Landroid/content/Context;Landroid/content/ContentResolver;Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;
+Landroid/graphics/AvoidXfermode;-><init>(IILandroid/graphics/AvoidXfermode$Mode;)V
+Landroid/graphics/Bitmap;->createGraphicBufferHandle()Landroid/graphics/GraphicBuffer;
+Landroid/graphics/Bitmap;->createHardwareBitmap(Landroid/graphics/GraphicBuffer;)Landroid/graphics/Bitmap;
+Landroid/graphics/Canvas;->clipRegion(Landroid/graphics/Region;Landroid/graphics/Region$Op;)Z
+Landroid/graphics/Canvas;->clipRegion(Landroid/graphics/Region;)Z
+Landroid/graphics/drawable/Drawable;->isProjected()Z
+Landroid/graphics/drawable/Drawable;->updateTintFilter(Landroid/graphics/PorterDuffColorFilter;Landroid/content/res/ColorStateList;Landroid/graphics/PorterDuff$Mode;)Landroid/graphics/PorterDuffColorFilter;
+Landroid/hardware/camera2/CaptureRequest$Key;-><init>(Ljava/lang/String;Ljava/lang/Class;)V
+Landroid/hardware/location/GeofenceHardware;-><init>(Landroid/hardware/location/IGeofenceHardware;)V
+Landroid/hardware/location/IActivityRecognitionHardwareClient;->onAvailabilityChanged(ZLandroid/hardware/location/IActivityRecognitionHardware;)V
+Landroid/location/IFusedProvider;->onFusedLocationHardwareChange(Landroid/hardware/location/IFusedLocationHardware;)V
+Landroid/location/IGeocodeProvider;->getFromLocation(DDILandroid/location/GeocoderParams;Ljava/util/List;)Ljava/lang/String;
+Landroid/location/IGeocodeProvider;->getFromLocationName(Ljava/lang/String;DDDDILandroid/location/GeocoderParams;Ljava/util/List;)Ljava/lang/String;
+Landroid/location/IGeofenceProvider;->setGeofenceHardware(Landroid/hardware/location/IGeofenceHardware;)V
+Landroid/location/ILocationManager;->reportLocation(Landroid/location/Location;Z)V
+Landroid/media/AudioManager;->registerAudioPortUpdateListener(Landroid/media/AudioManager$OnAudioPortUpdateListener;)V
+Landroid/media/AudioManager;->unregisterAudioPortUpdateListener(Landroid/media/AudioManager$OnAudioPortUpdateListener;)V
+Landroid/media/AudioSystem;->checkAudioFlinger()I
+Landroid/media/AudioSystem;->getParameters(Ljava/lang/String;)Ljava/lang/String;
+Landroid/media/AudioSystem;->setParameters(Ljava/lang/String;)I
+Landroid/media/MediaDrm$Certificate;->getContent()[B
+Landroid/media/MediaDrm$Certificate;->getWrappedPrivateKey()[B
+Landroid/media/MediaDrm$CertificateRequest;->getData()[B
+Landroid/media/MediaDrm$CertificateRequest;->getDefaultUrl()Ljava/lang/String;
+Landroid/media/MediaDrm;->getCertificateRequest(ILjava/lang/String;)Landroid/media/MediaDrm$CertificateRequest;
+Landroid/media/MediaDrm;->provideCertificateResponse([B)Landroid/media/MediaDrm$Certificate;
+Landroid/media/MediaDrm;->signRSA([BLjava/lang/String;[B[B)[B
+Landroid/media/tv/ITvRemoteProvider$Stub;-><init>()V
+Landroid/media/tv/ITvRemoteServiceInput;->clearInputBridge(Landroid/os/IBinder;)V
+Landroid/media/tv/ITvRemoteServiceInput;->closeInputBridge(Landroid/os/IBinder;)V
+Landroid/media/tv/ITvRemoteServiceInput;->openInputBridge(Landroid/os/IBinder;Ljava/lang/String;III)V
+Landroid/media/tv/ITvRemoteServiceInput;->sendKeyDown(Landroid/os/IBinder;I)V
+Landroid/media/tv/ITvRemoteServiceInput;->sendKeyUp(Landroid/os/IBinder;I)V
+Landroid/media/tv/ITvRemoteServiceInput;->sendPointerDown(Landroid/os/IBinder;III)V
+Landroid/media/tv/ITvRemoteServiceInput;->sendPointerSync(Landroid/os/IBinder;)V
+Landroid/media/tv/ITvRemoteServiceInput;->sendPointerUp(Landroid/os/IBinder;I)V
+Landroid/media/tv/ITvRemoteServiceInput;->sendTimestamp(Landroid/os/IBinder;J)V
+Landroid/net/ConnectivityManager$PacketKeepaliveCallback;-><init>()V
+Landroid/net/ConnectivityManager$PacketKeepaliveCallback;->onError(I)V
+Landroid/net/ConnectivityManager$PacketKeepaliveCallback;->onStarted()V
+Landroid/net/ConnectivityManager$PacketKeepaliveCallback;->onStopped()V
+Landroid/net/ConnectivityManager$PacketKeepalive;->stop()V
+Landroid/net/ConnectivityManager;->startNattKeepalive(Landroid/net/Network;ILandroid/net/ConnectivityManager$PacketKeepaliveCallback;Ljava/net/InetAddress;ILjava/net/InetAddress;)Landroid/net/ConnectivityManager$PacketKeepalive;
+Landroid/net/ConnectivityManager;->startUsingNetworkFeature(ILjava/lang/String;)I
+Landroid/net/ConnectivityManager;->stopUsingNetworkFeature(ILjava/lang/String;)I
+Landroid/net/DhcpResults;-><init>(Landroid/net/DhcpResults;)V
+Landroid/net/DhcpResults;-><init>(Landroid/net/StaticIpConfiguration;)V
+Landroid/net/DhcpResults;-><init>()V
+Landroid/net/DhcpResults;->leaseDuration:I
+Landroid/net/DhcpResults;->mtu:I
+Landroid/net/DhcpResults;->serverAddress:Ljava/net/Inet4Address;
+Landroid/net/DhcpResults;->vendorInfo:Ljava/lang/String;
+Landroid/net/IConnectivityManager;->getAllNetworkState()[Landroid/net/NetworkState;
+Landroid/net/INetd;->interfaceAddAddress(Ljava/lang/String;Ljava/lang/String;I)V
+Landroid/net/INetd$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/INetd;
+Landroid/net/INetworkPolicyManager;->getNetworkQuotaInfo(Landroid/net/NetworkState;)Landroid/net/NetworkQuotaInfo;
+Landroid/net/INetworkPolicyManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/INetworkPolicyManager;
+Landroid/net/INetworkStatsService;->openSession()Landroid/net/INetworkStatsSession;
+Landroid/net/INetworkStatsService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/INetworkStatsService;
+Landroid/net/INetworkStatsSession;->getHistoryForNetwork(Landroid/net/NetworkTemplate;I)Landroid/net/NetworkStatsHistory;
+Landroid/net/INetworkStatsSession;->getHistoryForUid(Landroid/net/NetworkTemplate;IIII)Landroid/net/NetworkStatsHistory;
+Landroid/net/InterfaceConfiguration;-><init>()V
+Landroid/net/InterfaceConfiguration;->setLinkAddress(Landroid/net/LinkAddress;)V
+Landroid/net/LinkAddress;-><init>(Ljava/lang/String;)V
+Landroid/net/LinkAddress;-><init>(Ljava/net/InetAddress;I)V
+Landroid/net/LinkAddress;->isIPv6()Z
+Landroid/net/LinkAddress;->isSameAddressAs(Landroid/net/LinkAddress;)Z
+Landroid/net/LinkProperties;->addDnsServer(Ljava/net/InetAddress;)Z
+Landroid/net/LinkProperties;->addRoute(Landroid/net/RouteInfo;)Z
+Landroid/net/LinkProperties;->addStackedLink(Landroid/net/LinkProperties;)Z
+Landroid/net/LinkProperties;->clear()V
+Landroid/net/LinkProperties;->compareProvisioning(Landroid/net/LinkProperties;Landroid/net/LinkProperties;)Landroid/net/LinkProperties$ProvisioningChange;
+Landroid/net/LinkProperties;->getMtu()I
+Landroid/net/LinkProperties;->getStackedLinks()Ljava/util/List;
+Landroid/net/LinkProperties;->hasGlobalIPv6Address()Z
+Landroid/net/LinkProperties;->hasIPv4Address()Z
+Landroid/net/LinkProperties;->hasIPv4DefaultRoute()Z
+Landroid/net/LinkProperties;->hasIPv4DnsServer()Z
+Landroid/net/LinkProperties;->hasIPv6DefaultRoute()Z
+Landroid/net/LinkProperties;->hasIPv6DnsServer()Z
+Landroid/net/LinkProperties;-><init>(Landroid/net/LinkProperties;)V
+Landroid/net/LinkProperties;-><init>()V
+Landroid/net/LinkProperties;->isIdenticalAddresses(Landroid/net/LinkProperties;)Z
+Landroid/net/LinkProperties;->isIdenticalDnses(Landroid/net/LinkProperties;)Z
+Landroid/net/LinkProperties;->isIdenticalRoutes(Landroid/net/LinkProperties;)Z
+Landroid/net/LinkProperties;->isIdenticalStackedLinks(Landroid/net/LinkProperties;)Z
+Landroid/net/LinkProperties;->isIPv6Provisioned()Z
+Landroid/net/LinkProperties;->isProvisioned()Z
+Landroid/net/LinkProperties;->isReachable(Ljava/net/InetAddress;)Z
+Landroid/net/LinkProperties$ProvisioningChange;->GAINED_PROVISIONING:Landroid/net/LinkProperties$ProvisioningChange;
+Landroid/net/LinkProperties$ProvisioningChange;->LOST_PROVISIONING:Landroid/net/LinkProperties$ProvisioningChange;
+Landroid/net/LinkProperties$ProvisioningChange;->STILL_NOT_PROVISIONED:Landroid/net/LinkProperties$ProvisioningChange;
+Landroid/net/LinkProperties$ProvisioningChange;->STILL_PROVISIONED:Landroid/net/LinkProperties$ProvisioningChange;
+Landroid/net/LinkProperties$ProvisioningChange;->values()[Landroid/net/LinkProperties$ProvisioningChange;
+Landroid/net/LinkProperties;->removeDnsServer(Ljava/net/InetAddress;)Z
+Landroid/net/LinkProperties;->removeRoute(Landroid/net/RouteInfo;)Z
+Landroid/net/LinkProperties;->setDnsServers(Ljava/util/Collection;)V
+Landroid/net/LinkProperties;->setDomains(Ljava/lang/String;)V
+Landroid/net/LinkProperties;->setInterfaceName(Ljava/lang/String;)V
+Landroid/net/LinkProperties;->setLinkAddresses(Ljava/util/Collection;)V
+Landroid/net/LinkProperties;->setMtu(I)V
+Landroid/net/LinkProperties;->setTcpBufferSizes(Ljava/lang/String;)V
+Landroid/net/MacAddress;->ALL_ZEROS_ADDRESS:Landroid/net/MacAddress;
+Landroid/net/metrics/ApfProgramEvent;->actualLifetime:J
+Landroid/net/metrics/ApfProgramEvent;->currentRas:I
+Landroid/net/metrics/ApfProgramEvent;->filteredRas:I
+Landroid/net/metrics/ApfProgramEvent;->flagsFor(ZZ)I
+Landroid/net/metrics/ApfProgramEvent;->flags:I
+Landroid/net/metrics/ApfProgramEvent;-><init>()V
+Landroid/net/metrics/ApfProgramEvent;->lifetime:J
+Landroid/net/metrics/ApfProgramEvent;->programLength:I
+Landroid/net/metrics/ApfStats;->droppedRas:I
+Landroid/net/metrics/ApfStats;->durationMs:J
+Landroid/net/metrics/ApfStats;-><init>()V
+Landroid/net/metrics/ApfStats;->matchingRas:I
+Landroid/net/metrics/ApfStats;->maxProgramSize:I
+Landroid/net/metrics/ApfStats;->parseErrors:I
+Landroid/net/metrics/ApfStats;->programUpdatesAll:I
+Landroid/net/metrics/ApfStats;->programUpdatesAllowingMulticast:I
+Landroid/net/metrics/ApfStats;->programUpdates:I
+Landroid/net/metrics/ApfStats;->receivedRas:I
+Landroid/net/metrics/ApfStats;->zeroLifetimeRas:I
+Landroid/net/metrics/DhcpClientEvent;-><init>(Ljava/lang/String;I)V
+Landroid/net/metrics/DhcpErrorEvent;->BOOTP_TOO_SHORT:I
+Landroid/net/metrics/DhcpErrorEvent;->BUFFER_UNDERFLOW:I
+Landroid/net/metrics/DhcpErrorEvent;->DHCP_BAD_MAGIC_COOKIE:I
+Landroid/net/metrics/DhcpErrorEvent;->DHCP_INVALID_OPTION_LENGTH:I
+Landroid/net/metrics/DhcpErrorEvent;->DHCP_NO_COOKIE:I
+Landroid/net/metrics/DhcpErrorEvent;->DHCP_NO_MSG_TYPE:I
+Landroid/net/metrics/DhcpErrorEvent;->DHCP_UNKNOWN_MSG_TYPE:I
+Landroid/net/metrics/DhcpErrorEvent;->errorCodeWithOption(II)I
+Landroid/net/metrics/DhcpErrorEvent;-><init>(I)V
+Landroid/net/metrics/DhcpErrorEvent;->L2_TOO_SHORT:I
+Landroid/net/metrics/DhcpErrorEvent;->L2_WRONG_ETH_TYPE:I
+Landroid/net/metrics/DhcpErrorEvent;->L3_INVALID_IP:I
+Landroid/net/metrics/DhcpErrorEvent;->L3_NOT_IPV4:I
+Landroid/net/metrics/DhcpErrorEvent;->L3_TOO_SHORT:I
+Landroid/net/metrics/DhcpErrorEvent;->L4_NOT_UDP:I
+Landroid/net/metrics/DhcpErrorEvent;->L4_WRONG_PORT:I
+Landroid/net/metrics/DhcpErrorEvent;->PARSING_ERROR:I
+Landroid/net/metrics/DhcpErrorEvent;->RECEIVE_ERROR:I
+Landroid/net/metrics/IpConnectivityLog;-><init>()V
+Landroid/net/metrics/IpConnectivityLog;->log(Landroid/os/Parcelable;)Z
+Landroid/net/metrics/IpConnectivityLog;->log(Ljava/lang/String;Landroid/os/Parcelable;)Z
+Landroid/net/metrics/IpManagerEvent;-><init>(IJ)V
+Landroid/net/metrics/IpReachabilityEvent;-><init>(I)V
+Landroid/net/metrics/IpReachabilityEvent;->nudFailureEventType(ZZ)I
+Landroid/net/metrics/RaEvent$Builder;->build()Landroid/net/metrics/RaEvent;
+Landroid/net/metrics/RaEvent$Builder;-><init>()V
+Landroid/net/metrics/RaEvent$Builder;->updateDnsslLifetime(J)Landroid/net/metrics/RaEvent$Builder;
+Landroid/net/metrics/RaEvent$Builder;->updatePrefixPreferredLifetime(J)Landroid/net/metrics/RaEvent$Builder;
+Landroid/net/metrics/RaEvent$Builder;->updatePrefixValidLifetime(J)Landroid/net/metrics/RaEvent$Builder;
+Landroid/net/metrics/RaEvent$Builder;->updateRdnssLifetime(J)Landroid/net/metrics/RaEvent$Builder;
+Landroid/net/metrics/RaEvent$Builder;->updateRouteInfoLifetime(J)Landroid/net/metrics/RaEvent$Builder;
+Landroid/net/metrics/RaEvent$Builder;->updateRouterLifetime(J)Landroid/net/metrics/RaEvent$Builder;
+Landroid/net/NetworkCapabilities;->getNetworkSpecifier()Landroid/net/NetworkSpecifier;
+Landroid/net/NetworkCapabilities;->getSignalStrength()I
+Landroid/net/NetworkCapabilities;->hasSignalStrength()Z
+Landroid/net/NetworkCapabilities;->transportNamesOf([I)Ljava/lang/String;
+Landroid/net/Network;-><init>(I)V
+Landroid/net/NetworkQuotaInfo;->getEstimatedBytes()J
+Landroid/net/NetworkQuotaInfo;->getHardLimitBytes()J
+Landroid/net/NetworkQuotaInfo;->getSoftLimitBytes()J
+Landroid/net/NetworkRequest$Builder;->setSignalStrength(I)Landroid/net/NetworkRequest$Builder;
+Landroid/net/NetworkStats;->combineValues(Landroid/net/NetworkStats$Entry;)Landroid/net/NetworkStats;
+Landroid/net/NetworkStats$Entry;-><init>()V
+Landroid/net/NetworkStatsHistory$Entry;->txBytes:J
+Landroid/net/NetworkStatsHistory;->getStart()J
+Landroid/net/NetworkStatsHistory;->getValues(JJLandroid/net/NetworkStatsHistory$Entry;)Landroid/net/NetworkStatsHistory$Entry;
+Landroid/net/NetworkStats;-><init>(JI)V
+Landroid/net/NetworkTemplate;->buildTemplateMobileAll(Ljava/lang/String;)Landroid/net/NetworkTemplate;
+Landroid/net/NetworkUtils;->attachControlPacketFilter(Ljava/io/FileDescriptor;I)V
+Landroid/net/NetworkUtils;->attachDhcpFilter(Ljava/io/FileDescriptor;)V
+Landroid/net/NetworkUtils;->attachRaFilter(Ljava/io/FileDescriptor;I)V
+Landroid/net/NetworkUtils;->getImplicitNetmask(Ljava/net/Inet4Address;)I
+Landroid/net/NetworkUtils;->netmaskToPrefixLength(Ljava/net/Inet4Address;)I
+Landroid/net/NetworkUtils;->protectFromVpn(Ljava/io/FileDescriptor;)Z
+Landroid/net/RouteInfo;->hasGateway()Z
+Landroid/net/RouteInfo;-><init>(Landroid/net/IpPrefix;Ljava/net/InetAddress;Ljava/lang/String;)V
+Landroid/net/SntpClient;->getNtpTime()J
+Landroid/net/SntpClient;->requestTime(Ljava/lang/String;I)Z
+Landroid/net/StaticIpConfiguration;->dnsServers:Ljava/util/ArrayList;
+Landroid/net/StaticIpConfiguration;->domains:Ljava/lang/String;
+Landroid/net/StaticIpConfiguration;->gateway:Ljava/net/InetAddress;
+Landroid/net/StaticIpConfiguration;->getRoutes(Ljava/lang/String;)Ljava/util/List;
+Landroid/net/StaticIpConfiguration;->ipAddress:Landroid/net/LinkAddress;
+Landroid/net/StringNetworkSpecifier;->specifier:Ljava/lang/String;
+Landroid/net/TrafficStats;->getMobileTcpRxPackets()J
+Landroid/net/TrafficStats;->getMobileTcpTxPackets()J
+Landroid/net/wifi/WifiInfo;->is5GHz()Z
+Landroid/net/wifi/WifiInfo;->score:I
+Landroid/os/AsyncResult;->exception:Ljava/lang/Throwable;
+Landroid/os/AsyncResult;->forMessage(Landroid/os/Message;Ljava/lang/Object;Ljava/lang/Throwable;)Landroid/os/AsyncResult;
+Landroid/os/AsyncResult;-><init>(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Throwable;)V
+Landroid/os/AsyncResult;->result:Ljava/lang/Object;
+Landroid/os/AsyncResult;->userObj:Ljava/lang/Object;
+Landroid/os/BatteryStats;->getNextHistoryLocked(Landroid/os/BatteryStats$HistoryItem;)Z
+Landroid/os/BatteryStats$HistoryItem;->batteryLevel:B
+Landroid/os/BatteryStats$HistoryItem;->cmd:B
+Landroid/os/BatteryStats$HistoryItem;-><init>()V
+Landroid/os/BatteryStats$HistoryItem;->states:I
+Landroid/os/BatteryStats$HistoryItem;->time:J
+Landroid/os/BatteryStats$Uid;->getWifiRunningTime(JI)J
+Landroid/os/BatteryStats$Uid;-><init>()V
+Landroid/os/BatteryStats$Uid$Wakelock;->getWakeTime(I)Landroid/os/BatteryStats$Timer;
+Landroid/os/Handler;->getMain()Landroid/os/Handler;
+Landroid/os/Handler;-><init>(Landroid/os/Looper;Landroid/os/Handler$Callback;Z)V
+Landroid/os/HwBinder;->reportSyspropChanged()V
+Landroid/os/INetworkManagementService;->clearInterfaceAddresses(Ljava/lang/String;)V
+Landroid/os/INetworkManagementService;->disableIpv6(Ljava/lang/String;)V
+Landroid/os/INetworkManagementService;->enableIpv6(Ljava/lang/String;)V
+Landroid/os/INetworkManagementService;->registerObserver(Landroid/net/INetworkManagementEventObserver;)V
+Landroid/os/INetworkManagementService;->setInterfaceConfig(Ljava/lang/String;Landroid/net/InterfaceConfiguration;)V
+Landroid/os/INetworkManagementService;->setInterfaceIpv6PrivacyExtensions(Ljava/lang/String;Z)V
+Landroid/os/INetworkManagementService;->setIPv6AddrGenMode(Ljava/lang/String;I)V
+Landroid/os/INetworkManagementService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/os/INetworkManagementService;
+Landroid/os/INetworkManagementService;->unregisterObserver(Landroid/net/INetworkManagementEventObserver;)V
+Landroid/os/IPowerManager;->reboot(ZLjava/lang/String;Z)V
+Landroid/os/IRemoteCallback$Stub;-><init>()V
+Landroid/os/Message;->setCallback(Ljava/lang/Runnable;)Landroid/os/Message;
+Landroid/os/Parcel;->readBlob()[B
+Landroid/os/Parcel;->readStringArray()[Ljava/lang/String;
+Landroid/os/Parcel;->writeBlob([B)V
+Landroid/os/PowerManager;->isScreenBrightnessBoosted()Z
+Landroid/os/Registrant;->clear()V
+Landroid/os/Registrant;-><init>(Landroid/os/Handler;ILjava/lang/Object;)V
+Landroid/os/RegistrantList;->add(Landroid/os/Registrant;)V
+Landroid/os/RegistrantList;->addUnique(Landroid/os/Handler;ILjava/lang/Object;)V
+Landroid/os/RegistrantList;-><init>()V
+Landroid/os/RegistrantList;->notifyRegistrants(Landroid/os/AsyncResult;)V
+Landroid/os/RegistrantList;->notifyRegistrants()V
+Landroid/os/RegistrantList;->removeCleared()V
+Landroid/os/RegistrantList;->remove(Landroid/os/Handler;)V
+Landroid/os/Registrant;->notifyRegistrant(Landroid/os/AsyncResult;)V
+Landroid/os/Registrant;->notifyRegistrant()V
+Landroid/os/RemoteException;->rethrowFromSystemServer()Ljava/lang/RuntimeException;
+Landroid/os/ServiceSpecificException;->errorCode:I
+Landroid/os/SystemProperties;->reportSyspropChanged()V
+Landroid/print/PrintDocumentAdapter$LayoutResultCallback;-><init>()V
+Landroid/print/PrintDocumentAdapter$WriteResultCallback;-><init>()V
+Landroid/provider/CalendarContract$Events;->PROVIDER_WRITABLE_COLUMNS:[Ljava/lang/String;
+Landroid/service/vr/VrListenerService;->onCurrentVrActivityChanged(Landroid/content/ComponentName;ZI)V
+Landroid/system/NetlinkSocketAddress;-><init>(II)V
+Landroid/system/Os;->bind(Ljava/io/FileDescriptor;Ljava/net/SocketAddress;)V
+Landroid/system/Os;->connect(Ljava/io/FileDescriptor;Ljava/net/SocketAddress;)V
+Landroid/system/Os;->sendto(Ljava/io/FileDescriptor;[BIIILjava/net/SocketAddress;)I
+Landroid/system/Os;->setsockoptIfreq(Ljava/io/FileDescriptor;IILjava/lang/String;)V
+Landroid/system/Os;->setsockoptTimeval(Ljava/io/FileDescriptor;IILandroid/system/StructTimeval;)V
+Landroid/system/PacketSocketAddress;-><init>(I[B)V
+Landroid/system/PacketSocketAddress;-><init>(SI)V
+Landroid/telecom/TelecomManager;->from(Landroid/content/Context;)Landroid/telecom/TelecomManager;
+Landroid/telecom/VideoProfile$CameraCapabilities;-><init>(IIZF)V
+Landroid/telephony/ims/compat/feature/MMTelFeature;-><init>()V
+Landroid/telephony/ims/compat/ImsService;-><init>()V
+Landroid/telephony/ims/compat/stub/ImsCallSessionImplBase;-><init>()V
+Landroid/telephony/ims/compat/stub/ImsConfigImplBase;-><init>(Landroid/content/Context;)V
+Landroid/telephony/ims/compat/stub/ImsUtListenerImplBase;-><init>()V
+Landroid/telephony/ims/ImsCallForwardInfo;-><init>()V
+Landroid/telephony/ims/ImsCallProfile;->presentationToOIR(I)I
+Landroid/telephony/ims/ImsExternalCallState;-><init>(ILandroid/net/Uri;ZIIZ)V
+Landroid/telephony/ims/ImsReasonInfo;-><init>(IILjava/lang/String;)V
+Landroid/telephony/ims/ImsReasonInfo;-><init>(II)V
+Landroid/telephony/ims/ImsStreamMediaProfile;-><init>()V
+Landroid/telephony/PhoneNumberUtils;->isEmergencyNumber(ILjava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->isPotentialEmergencyNumber(ILjava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->isPotentialLocalEmergencyNumber(Landroid/content/Context;ILjava/lang/String;)Z
+Landroid/telephony/PhoneStateListener;-><init>(Ljava/lang/Integer;Landroid/os/Looper;)V
+Landroid/telephony/PhoneStateListener;-><init>(Ljava/lang/Integer;)V
+Landroid/telephony/PreciseCallState;->getBackgroundCallState()I
+Landroid/telephony/PreciseCallState;->getForegroundCallState()I
+Landroid/telephony/RadioAccessFamily;->getRafFromNetworkType(I)I
+Landroid/telephony/RadioAccessFamily;-><init>(II)V
+Landroid/telephony/Rlog;->d(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/telephony/Rlog;->e(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/telephony/Rlog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
+Landroid/telephony/Rlog;->i(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/telephony/ServiceState;->getDataRoaming()Z
+Landroid/telephony/ServiceState;->getRilDataRadioTechnology()I
+Landroid/telephony/ServiceState;->getVoiceRegState()I
+Landroid/telephony/ServiceState;->isCdma(I)Z
+Landroid/telephony/ServiceState;->isEmergencyOnly()Z
+Landroid/telephony/ServiceState;->mergeServiceStates(Landroid/telephony/ServiceState;Landroid/telephony/ServiceState;)Landroid/telephony/ServiceState;
+Landroid/telephony/SubscriptionManager;->getResourcesForSubId(Landroid/content/Context;I)Landroid/content/res/Resources;
+Landroid/telephony/SubscriptionManager;->isActiveSubId(I)Z
+Landroid/telephony/SubscriptionManager;->isUsableSubIdValue(I)Z
+Landroid/telephony/SubscriptionManager;->isValidPhoneId(I)Z
+Landroid/telephony/SubscriptionManager;->isValidSlotIndex(I)Z
+Landroid/telephony/SubscriptionManager;->isValidSubscriptionId(I)Z
+Landroid/telephony/SubscriptionManager;->putPhoneIdAndSubIdExtra(Landroid/content/Intent;II)V
+Landroid/telephony/TelephonyManager;->getIntAtIndex(Landroid/content/ContentResolver;Ljava/lang/String;I)I
+Landroid/telephony/TelephonyManager;->getVoiceNetworkType(I)I
+Landroid/telephony/TelephonyManager;->putIntAtIndex(Landroid/content/ContentResolver;Ljava/lang/String;II)Z
+Landroid/util/FloatMath;->ceil(F)F
+Landroid/util/FloatMath;->cos(F)F
+Landroid/util/FloatMath;->exp(F)F
+Landroid/util/FloatMath;->floor(F)F
+Landroid/util/FloatMath;->sin(F)F
+Landroid/util/FloatMath;->sqrt(F)F
+Landroid/util/IconDrawableFactory;->getBadgedIcon(Landroid/content/pm/PackageItemInfo;Landroid/content/pm/ApplicationInfo;I)Landroid/graphics/drawable/Drawable;
+Landroid/util/IconDrawableFactory;->newInstance(Landroid/content/Context;)Landroid/util/IconDrawableFactory;
+Landroid/util/LocalLog;-><init>(I)V
+Landroid/util/LocalLog;->log(Ljava/lang/String;)V
+Landroid/util/LocalLog$ReadOnlyLocalLog;->dump(Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V
+Landroid/util/LocalLog;->readOnlyLocalLog()Landroid/util/LocalLog$ReadOnlyLocalLog;
+Landroid/util/LongArray;->add(IJ)V
+Landroid/util/LongArray;->get(I)J
+Landroid/util/LongArray;-><init>()V
+Landroid/util/LongArray;->size()I
+Landroid/util/Slog;->wtf(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/view/AppTransitionAnimationSpec;-><init>(ILandroid/graphics/GraphicBuffer;Landroid/graphics/Rect;)V
+Landroid/view/BatchedInputEventReceiver;-><init>(Landroid/view/InputChannel;Landroid/os/Looper;Landroid/view/Choreographer;)V
+Landroid/view/Choreographer;->getSfInstance()Landroid/view/Choreographer;
+Landroid/view/DisplayListCanvas;->drawRenderNode(Landroid/view/RenderNode;)V
+Landroid/view/IAppTransitionAnimationSpecsFuture$Stub;-><init>()V
+Landroid/view/InputEventReceiver;->onInputEvent(Landroid/view/InputEvent;I)V
+Landroid/view/IRecentsAnimationController;->finish(Z)V
+Landroid/view/IRecentsAnimationController;->screenshotTask(I)Landroid/app/ActivityManager$TaskSnapshot;
+Landroid/view/IRecentsAnimationController;->setInputConsumerEnabled(Z)V
+Landroid/view/IRecentsAnimationRunner;->onAnimationCanceled()V
+Landroid/view/IRecentsAnimationRunner;->onAnimationStart(Landroid/view/IRecentsAnimationController;[Landroid/view/RemoteAnimationTarget;)V
+Landroid/view/IRecentsAnimationRunner;->onAnimationStart_New(Landroid/view/IRecentsAnimationController;[Landroid/view/RemoteAnimationTarget;Landroid/graphics/Rect;Landroid/graphics/Rect;)V
+Landroid/view/IRecentsAnimationRunner$Stub;-><init>()V
+Landroid/view/IRemoteAnimationFinishedCallback;->onAnimationFinished()V
+Landroid/view/IRemoteAnimationRunner;->onAnimationCancelled()V
+Landroid/view/IRemoteAnimationRunner;->onAnimationStart([Landroid/view/RemoteAnimationTarget;Landroid/view/IRemoteAnimationFinishedCallback;)V
+Landroid/view/IRemoteAnimationRunner$Stub;-><init>()V
+Landroid/view/IWindowManager;->createInputConsumer(Landroid/os/IBinder;Ljava/lang/String;Landroid/view/InputChannel;)V
+Landroid/view/IWindowManager;->destroyInputConsumer(Ljava/lang/String;)Z
+Landroid/view/IWindowManager;->endProlongedAnimations()V
+Landroid/view/IWindowManager;->getStableInsets(ILandroid/graphics/Rect;)V
+Landroid/view/IWindowManager;->overridePendingAppTransitionMultiThumbFuture(Landroid/view/IAppTransitionAnimationSpecsFuture;Landroid/os/IRemoteCallback;Z)V
+Landroid/view/IWindowManager;->overridePendingAppTransitionRemote(Landroid/view/RemoteAnimationAdapter;)V
+Landroid/view/IWindowManager;->setNavBarVirtualKeyHapticFeedbackEnabled(Z)V
+Landroid/view/RemoteAnimationAdapter;-><init>(Landroid/view/IRemoteAnimationRunner;JJ)V
+Landroid/view/RemoteAnimationDefinition;->addRemoteAnimation(ILandroid/view/RemoteAnimationAdapter;)V
+Landroid/view/RemoteAnimationDefinition;-><init>()V
+Landroid/view/RenderNode;->create(Ljava/lang/String;Landroid/view/View;)Landroid/view/RenderNode;
+Landroid/view/RenderNode;->end(Landroid/view/DisplayListCanvas;)V
+Landroid/view/RenderNode;->isValid()Z
+Landroid/view/RenderNode;->setClipToBounds(Z)Z
+Landroid/view/RenderNode;->setLeftTopRightBottom(IIII)Z
+Landroid/view/RenderNode;->start(II)Landroid/view/DisplayListCanvas;
+Landroid/view/SurfaceControl$Transaction;->apply()V
+Landroid/view/SurfaceControl$Transaction;->deferTransactionUntil(Landroid/view/SurfaceControl;Landroid/os/IBinder;J)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->deferTransactionUntilSurface(Landroid/view/SurfaceControl;Landroid/view/Surface;J)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->hide(Landroid/view/SurfaceControl;)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;-><init>()V
+Landroid/view/SurfaceControl$Transaction;->setAlpha(Landroid/view/SurfaceControl;F)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->setColor(Landroid/view/SurfaceControl;[F)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->setFinalCrop(Landroid/view/SurfaceControl;Landroid/graphics/Rect;)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->setLayer(Landroid/view/SurfaceControl;I)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->setMatrix(Landroid/view/SurfaceControl;FFFF)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->setMatrix(Landroid/view/SurfaceControl;Landroid/graphics/Matrix;[F)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->setPosition(Landroid/view/SurfaceControl;FF)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->setSize(Landroid/view/SurfaceControl;II)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->setWindowCrop(Landroid/view/SurfaceControl;Landroid/graphics/Rect;)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->show(Landroid/view/SurfaceControl;)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/Surface;->getNextFrameNumber()J
+Landroid/view/ThreadedRenderer;->createHardwareBitmap(Landroid/view/RenderNode;II)Landroid/graphics/Bitmap;
+Landroid/view/View;->hideTooltip()V
+Landroid/view/View;->setTooltip(Ljava/lang/CharSequence;)V
+Landroid/webkit/WebSettings;->getPluginsPath()Ljava/lang/String;
+Landroid/webkit/WebSettings;->getUseDoubleTree()Z
+Landroid/webkit/WebSettings;->setPluginsPath(Ljava/lang/String;)V
+Landroid/webkit/WebSettings;->setUseDoubleTree(Z)V
+Landroid/webkit/WebView;->getPluginList()Landroid/webkit/PluginList;
+Landroid/webkit/WebView;->getZoomControls()Landroid/view/View;
+Landroid/webkit/WebView;->refreshPlugins(Z)V
+Landroid/widget/ListView;->lookForSelectablePosition(IZ)I
+Lcom/android/ims/ImsConfigListener;->onSetFeatureResponse(IIII)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionConferenceStateUpdated(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsConferenceState;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionHandoverFailed(Lcom/android/ims/internal/IImsCallSession;IILandroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionHandover(Lcom/android/ims/internal/IImsCallSession;IILandroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionHeld(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsCallProfile;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionHoldFailed(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionHoldReceived(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsCallProfile;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionInviteParticipantsRequestDelivered(Lcom/android/ims/internal/IImsCallSession;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionInviteParticipantsRequestFailed(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionMergeComplete(Lcom/android/ims/internal/IImsCallSession;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionMergeFailed(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionMergeStarted(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsCallProfile;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionMultipartyStateChanged(Lcom/android/ims/internal/IImsCallSession;Z)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionProgressing(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsStreamMediaProfile;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionResumed(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsCallProfile;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionResumeFailed(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionResumeReceived(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsCallProfile;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionStarted(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsCallProfile;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionStartFailed(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionSuppServiceReceived(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsSuppServiceNotification;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionTerminated(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionTtyModeReceived(Lcom/android/ims/internal/IImsCallSession;I)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionUpdated(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsCallProfile;)V
+Lcom/android/ims/internal/IImsRegistrationListener;->registrationAssociatedUriChanged([Landroid/net/Uri;)V
+Lcom/android/ims/internal/IImsRegistrationListener;->registrationConnectedWithRadioTech(I)V
+Lcom/android/ims/internal/IImsRegistrationListener;->registrationDisconnected(Landroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsRegistrationListener;->registrationFeatureCapabilityChanged(I[I[I)V
+Lcom/android/ims/internal/IImsRegistrationListener;->registrationProgressingWithRadioTech(I)V
+Lcom/android/ims/internal/IImsRegistrationListener;->voiceMessageCountUpdate(I)V
+Lcom/android/ims/internal/IImsUtListener;->utConfigurationCallBarringQueried(Lcom/android/ims/internal/IImsUt;I[Landroid/telephony/ims/ImsSsInfo;)V
+Lcom/android/ims/internal/IImsUtListener;->utConfigurationCallForwardQueried(Lcom/android/ims/internal/IImsUt;I[Landroid/telephony/ims/ImsCallForwardInfo;)V
+Lcom/android/ims/internal/IImsUtListener;->utConfigurationCallWaitingQueried(Lcom/android/ims/internal/IImsUt;I[Landroid/telephony/ims/ImsSsInfo;)V
+Lcom/android/ims/internal/IImsUtListener;->utConfigurationQueried(Lcom/android/ims/internal/IImsUt;ILandroid/os/Bundle;)V
+Lcom/android/ims/internal/IImsUtListener;->utConfigurationQueryFailed(Lcom/android/ims/internal/IImsUt;ILandroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsUtListener;->utConfigurationUpdated(Lcom/android/ims/internal/IImsUt;I)V
+Lcom/android/ims/internal/IImsUtListener;->utConfigurationUpdateFailed(Lcom/android/ims/internal/IImsUt;ILandroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/uce/common/StatusCode;->getStatusCode()I
+Lcom/android/ims/internal/uce/common/UceLong;->getClientId()I
+Lcom/android/ims/internal/uce/common/UceLong;-><init>()V
+Lcom/android/ims/internal/uce/common/UceLong;->setClientId(I)V
+Lcom/android/ims/internal/uce/options/IOptionsListener;->cmdStatus(Lcom/android/ims/internal/uce/options/OptionsCmdStatus;)V
+Lcom/android/ims/internal/uce/options/IOptionsListener;->getVersionCb(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/options/IOptionsListener;->incomingOptions(Ljava/lang/String;Lcom/android/ims/internal/uce/options/OptionsCapInfo;I)V
+Lcom/android/ims/internal/uce/options/IOptionsListener;->serviceAvailable(Lcom/android/ims/internal/uce/common/StatusCode;)V
+Lcom/android/ims/internal/uce/options/IOptionsListener;->serviceUnavailable(Lcom/android/ims/internal/uce/common/StatusCode;)V
+Lcom/android/ims/internal/uce/options/IOptionsListener;->sipResponseReceived(Ljava/lang/String;Lcom/android/ims/internal/uce/options/OptionsSipResponse;Lcom/android/ims/internal/uce/options/OptionsCapInfo;)V
+Lcom/android/ims/internal/uce/options/IOptionsService;->addListener(ILcom/android/ims/internal/uce/options/IOptionsListener;Lcom/android/ims/internal/uce/common/UceLong;)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/IOptionsService;->getContactCap(ILjava/lang/String;I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/IOptionsService;->getContactListCap(I[Ljava/lang/String;I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/IOptionsService;->getMyInfo(II)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/IOptionsService;->getVersion(I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/IOptionsService;->removeListener(ILcom/android/ims/internal/uce/common/UceLong;)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/IOptionsService;->responseIncomingOptions(IIILjava/lang/String;Lcom/android/ims/internal/uce/options/OptionsCapInfo;Z)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/IOptionsService;->setMyInfo(ILcom/android/ims/internal/uce/common/CapInfo;I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/IOptionsService$Stub;-><init>()V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->capInfoReceived(Ljava/lang/String;[Lcom/android/ims/internal/uce/presence/PresTupleInfo;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->cmdStatus(Lcom/android/ims/internal/uce/presence/PresCmdStatus;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->getVersionCb(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->listCapInfoReceived(Lcom/android/ims/internal/uce/presence/PresRlmiInfo;[Lcom/android/ims/internal/uce/presence/PresResInfo;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->publishTriggering(Lcom/android/ims/internal/uce/presence/PresPublishTriggerType;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->serviceAvailable(Lcom/android/ims/internal/uce/common/StatusCode;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->serviceUnAvailable(Lcom/android/ims/internal/uce/common/StatusCode;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->sipResponseReceived(Lcom/android/ims/internal/uce/presence/PresSipResponse;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->unpublishMessageSent()V
+Lcom/android/ims/internal/uce/presence/IPresenceService;->addListener(ILcom/android/ims/internal/uce/presence/IPresenceListener;Lcom/android/ims/internal/uce/common/UceLong;)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/IPresenceService;->getContactCap(ILjava/lang/String;I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/IPresenceService;->getContactListCap(I[Ljava/lang/String;I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/IPresenceService;->getVersion(I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/IPresenceService;->publishMyCap(ILcom/android/ims/internal/uce/presence/PresCapInfo;I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/IPresenceService;->reenableService(II)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/IPresenceService;->removeListener(ILcom/android/ims/internal/uce/common/UceLong;)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/IPresenceService;->setNewFeatureTag(ILjava/lang/String;Lcom/android/ims/internal/uce/presence/PresServiceInfo;I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/IPresenceService$Stub;-><init>()V
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->getCmdId()Lcom/android/ims/internal/uce/presence/PresCmdId;
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->getReasonPhrase()Ljava/lang/String;
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->getRequestId()I
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->getRetryAfter()I
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->getSipResponseCode()I
+Lcom/android/ims/internal/uce/uceservice/IUceListener;->setStatus(I)V
+Lcom/android/ims/internal/uce/uceservice/IUceService;->createOptionsService(Lcom/android/ims/internal/uce/options/IOptionsListener;Lcom/android/ims/internal/uce/common/UceLong;)I
+Lcom/android/ims/internal/uce/uceservice/IUceService;->createPresenceService(Lcom/android/ims/internal/uce/presence/IPresenceListener;Lcom/android/ims/internal/uce/common/UceLong;)I
+Lcom/android/ims/internal/uce/uceservice/IUceService;->destroyOptionsService(I)V
+Lcom/android/ims/internal/uce/uceservice/IUceService;->destroyPresenceService(I)V
+Lcom/android/ims/internal/uce/uceservice/IUceService;->getOptionsService()Lcom/android/ims/internal/uce/options/IOptionsService;
+Lcom/android/ims/internal/uce/uceservice/IUceService;->getPresenceService()Lcom/android/ims/internal/uce/presence/IPresenceService;
+Lcom/android/ims/internal/uce/uceservice/IUceService;->getServiceStatus()Z
+Lcom/android/ims/internal/uce/uceservice/IUceService;->isServiceStarted()Z
+Lcom/android/ims/internal/uce/uceservice/IUceService;->startService(Lcom/android/ims/internal/uce/uceservice/IUceListener;)Z
+Lcom/android/ims/internal/uce/uceservice/IUceService;->stopService()Z
+Lcom/android/ims/internal/uce/uceservice/IUceService$Stub;-><init>()V
+Lcom/android/internal/location/ILocationProvider;->disable()V
+Lcom/android/internal/location/ILocationProvider;->enable()V
+Lcom/android/internal/location/ILocationProvider;->getProperties()Lcom/android/internal/location/ProviderProperties;
+Lcom/android/internal/location/ILocationProvider;->getStatus(Landroid/os/Bundle;)I
+Lcom/android/internal/location/ILocationProvider;->getStatusUpdateTime()J
+Lcom/android/internal/location/ILocationProvider;->sendExtraCommand(Ljava/lang/String;Landroid/os/Bundle;)Z
+Lcom/android/internal/location/ILocationProvider;->setRequest(Lcom/android/internal/location/ProviderRequest;Landroid/os/WorkSource;)V
+Lcom/android/internal/os/BatteryStatsImpl;->getDischargeCurrentLevel()I
+Lcom/android/internal/os/BatteryStatsImpl;->getDischargeStartLevel()I
+Lcom/android/internal/os/BatteryStatsImpl;->getPhoneOnTime(JI)J
+Lcom/android/internal/os/BatteryStatsImpl;->getPhoneSignalScanningTime(JI)J
+Lcom/android/internal/os/BatteryStatsImpl;->getPhoneSignalStrengthTime(IJI)J
+Lcom/android/internal/os/BatteryStatsImpl;->getScreenBrightnessTime(IJI)J
+Lcom/android/internal/os/BatteryStatsImpl;->getWifiOnTime(JI)J
+Lcom/android/internal/os/SomeArgs;->obtain()Lcom/android/internal/os/SomeArgs;
+Lcom/android/internal/os/SomeArgs;->recycle()V
+Lcom/android/internal/telephony/ITelephony;->getDataEnabled(I)Z
+Lcom/android/internal/util/IndentingPrintWriter;->decreaseIndent()Lcom/android/internal/util/IndentingPrintWriter;
+Lcom/android/internal/util/IndentingPrintWriter;->increaseIndent()Lcom/android/internal/util/IndentingPrintWriter;
+Lcom/android/internal/util/IndentingPrintWriter;-><init>(Ljava/io/Writer;Ljava/lang/String;)V
+Lcom/android/internal/util/XmlUtils;->beginDocument(Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;)V
+Lcom/android/internal/util/XmlUtils;->nextElement(Lorg/xmlpull/v1/XmlPullParser;)V
+Ljava/lang/System;->arraycopy([BI[BII)V
+Ljava/net/Inet4Address;->ALL:Ljava/net/InetAddress;
+Ljava/net/Inet4Address;->ANY:Ljava/net/InetAddress;
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index afcd515..8dd0f42 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -704,7 +704,7 @@
streamingOutput);
profiling = true;
} catch (RuntimeException e) {
- Slog.w(TAG, "Profiling failed on path " + profileFile);
+ Slog.w(TAG, "Profiling failed on path " + profileFile, e);
try {
profileFd.close();
profileFd = null;
diff --git a/core/java/android/app/slice/SliceManager.java b/core/java/android/app/slice/SliceManager.java
index c5ea9b2..67a72ec 100644
--- a/core/java/android/app/slice/SliceManager.java
+++ b/core/java/android/app/slice/SliceManager.java
@@ -273,7 +273,8 @@
*/
public @Nullable Uri mapIntentToUri(@NonNull Intent intent) {
Preconditions.checkNotNull(intent, "intent");
- Preconditions.checkArgument(intent.getComponent() != null || intent.getPackage() != null,
+ Preconditions.checkArgument(intent.getComponent() != null || intent.getPackage() != null
+ || intent.getData() != null,
"Slice intent must be explicit %s", intent);
ContentResolver resolver = mContext.getContentResolver();
@@ -337,7 +338,8 @@
public @Nullable Slice bindSlice(@NonNull Intent intent,
@NonNull List<SliceSpec> supportedSpecs) {
Preconditions.checkNotNull(intent, "intent");
- Preconditions.checkArgument(intent.getComponent() != null || intent.getPackage() != null,
+ Preconditions.checkArgument(intent.getComponent() != null || intent.getPackage() != null
+ || intent.getData() != null,
"Slice intent must be explicit %s", intent);
ContentResolver resolver = mContext.getContentResolver();
diff --git a/core/java/android/app/slice/SliceSpec.java b/core/java/android/app/slice/SliceSpec.java
index 8cc0384..03ffe6d 100644
--- a/core/java/android/app/slice/SliceSpec.java
+++ b/core/java/android/app/slice/SliceSpec.java
@@ -89,7 +89,7 @@
*
* @param candidate candidate format of data.
* @return true if versions are compatible.
- * @see androidx.app.slice.widget.SliceView
+ * @see androidx.slice.widget.SliceView
*/
public boolean canRender(@NonNull SliceSpec candidate) {
if (!mType.equals(candidate.mType)) return false;
diff --git a/core/java/android/content/AbstractThreadedSyncAdapter.java b/core/java/android/content/AbstractThreadedSyncAdapter.java
index 5a1216b7..b528e39 100644
--- a/core/java/android/content/AbstractThreadedSyncAdapter.java
+++ b/core/java/android/content/AbstractThreadedSyncAdapter.java
@@ -16,9 +16,14 @@
package android.content;
+import static com.android.internal.util.function.pooled.PooledLambda.obtainMessage;
+
import android.accounts.Account;
+import android.annotation.MainThread;
+import android.annotation.NonNull;
import android.os.Build;
import android.os.Bundle;
+import android.os.Handler;
import android.os.IBinder;
import android.os.Process;
import android.os.RemoteException;
@@ -167,9 +172,10 @@
private class ISyncAdapterImpl extends ISyncAdapter.Stub {
@Override
- public void onUnsyncableAccount(ISyncAdapterUnsyncableAccountCallback cb)
- throws RemoteException {
- cb.onUnsyncableAccountDone(AbstractThreadedSyncAdapter.this.onUnsyncableAccount());
+ public void onUnsyncableAccount(ISyncAdapterUnsyncableAccountCallback cb) {
+ Handler.getMain().sendMessage(obtainMessage(
+ AbstractThreadedSyncAdapter::handleOnUnsyncableAccount,
+ AbstractThreadedSyncAdapter.this, cb));
}
@Override
@@ -381,6 +387,27 @@
}
/**
+ * Handle a call of onUnsyncableAccount.
+ *
+ * @param cb The callback to report the return value to
+ */
+ private void handleOnUnsyncableAccount(@NonNull ISyncAdapterUnsyncableAccountCallback cb) {
+ boolean doSync;
+ try {
+ doSync = onUnsyncableAccount();
+ } catch (RuntimeException e) {
+ Log.e(TAG, "Exception while calling onUnsyncableAccount, assuming 'true'", e);
+ doSync = true;
+ }
+
+ try {
+ cb.onUnsyncableAccountDone(doSync);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Could not report result of onUnsyncableAccount", e);
+ }
+ }
+
+ /**
* Allows to defer syncing until all accounts are properly set up.
*
* <p>Called when a account / authority pair
@@ -393,9 +420,16 @@
*
* <p>This might be called on a different service connection as {@link #onPerformSync}.
*
+ * <p>The system expects this method to immediately return. If the call stalls the system
+ * behaves as if this method returned {@code true}. If it is required to perform a longer task
+ * (such as interacting with the user), return {@code false} and proceed in a difference
+ * context, such as an {@link android.app.Activity}, or foreground service. The sync can then be
+ * rescheduled once the account becomes syncable.
+ *
* @return If {@code false} syncing is deferred. Returns {@code true} by default, i.e. by
* default syncing starts immediately.
*/
+ @MainThread
public boolean onUnsyncableAccount() {
return true;
}
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 2b5cece..e46a5f0 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -12338,6 +12338,28 @@
* @hide
*/
public static final String SHOW_ZEN_UPGRADE_NOTIFICATION = "show_zen_upgrade_notification";
+
+ /**
+ * Backup and restore agent timeout parameters.
+ * These parameters are represented by a comma-delimited key-value list.
+ *
+ * The following strings are supported as keys:
+ * <pre>
+ * kv_backup_agent_timeout_millis (long)
+ * full_backup_agent_timeout_millis (long)
+ * shared_backup_agent_timeout_millis (long)
+ * restore_agent_timeout_millis (long)
+ * restore_agent_finished_timeout_millis (long)
+ * </pre>
+ *
+ * They map to milliseconds represented as longs.
+ *
+ * Ex: "kv_backup_agent_timeout_millis=30000,full_backup_agent_timeout_millis=300000"
+ *
+ * @hide
+ */
+ public static final String BACKUP_AGENT_TIMEOUT_PARAMETERS =
+ "backup_agent_timeout_parameters";
}
/**
diff --git a/core/java/android/text/DynamicLayout.java b/core/java/android/text/DynamicLayout.java
index 18431ca..febca7e 100644
--- a/core/java/android/text/DynamicLayout.java
+++ b/core/java/android/text/DynamicLayout.java
@@ -704,7 +704,12 @@
// Spans other than ReplacementSpan can be ignored because line top and bottom are
// disjunction of all tops and bottoms, although it's not optimal.
final Paint paint = getPaint();
- paint.getTextBounds(text, start, end, mTempRect);
+ if (text instanceof PrecomputedText) {
+ PrecomputedText precomputed = (PrecomputedText) text;
+ precomputed.getBounds(start, end, mTempRect);
+ } else {
+ paint.getTextBounds(text, start, end, mTempRect);
+ }
final Paint.FontMetricsInt fm = paint.getFontMetricsInt();
return mTempRect.top < fm.top || mTempRect.bottom > fm.bottom;
}
diff --git a/core/java/android/text/MeasuredParagraph.java b/core/java/android/text/MeasuredParagraph.java
index aafcf44..801d6e7 100644
--- a/core/java/android/text/MeasuredParagraph.java
+++ b/core/java/android/text/MeasuredParagraph.java
@@ -21,6 +21,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.graphics.Paint;
+import android.graphics.Rect;
import android.text.AutoGrowArray.ByteArray;
import android.text.AutoGrowArray.FloatArray;
import android.text.AutoGrowArray.IntArray;
@@ -297,6 +298,18 @@
}
/**
+ * Retrieves the bounding rectangle that encloses all of the characters, with an implied origin
+ * at (0, 0).
+ *
+ * This is available only if the MeasuredParagraph is computed with buildForStaticLayout.
+ */
+ public void getBounds(@NonNull Paint paint, @IntRange(from = 0) int start,
+ @IntRange(from = 0) int end, @NonNull Rect bounds) {
+ nGetBounds(mNativePtr, mCopiedBuffer, paint.getNativeInstance(), start, end,
+ paint.getBidiFlags(), bounds);
+ }
+
+ /**
* Generates new MeasuredParagraph for Bidi computation.
*
* If recycle is null, this returns new instance. If recycle is not null, this fills computed
@@ -728,4 +741,7 @@
@CriticalNative
private static native int nGetMemoryUsage(/* Non Zero */ long nativePtr);
+
+ private static native void nGetBounds(long nativePtr, char[] buf, long paintPtr, int start,
+ int end, int bidiFlag, Rect rect);
}
diff --git a/core/java/android/text/PrecomputedText.java b/core/java/android/text/PrecomputedText.java
index b740193..74b199f 100644
--- a/core/java/android/text/PrecomputedText.java
+++ b/core/java/android/text/PrecomputedText.java
@@ -19,6 +19,8 @@
import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.graphics.Rect;
+import android.text.style.MetricAffectingSpan;
import android.util.IntArray;
import com.android.internal.util.Preconditions;
@@ -61,7 +63,7 @@
* {@link android.widget.TextView} will be rejected internally and compute the text layout again
* with the current {@link android.widget.TextView} parameters.
*/
-public class PrecomputedText implements Spanned {
+public class PrecomputedText implements Spannable {
private static final char LINE_FEED = '\n';
/**
@@ -268,7 +270,7 @@
};
// The original text.
- private final @NonNull SpannedString mText;
+ private final @NonNull SpannableString mText;
// The inclusive start offset of the measuring target.
private final @IntRange(from = 0) int mStart;
@@ -342,7 +344,7 @@
private PrecomputedText(@NonNull CharSequence text, @IntRange(from = 0) int start,
@IntRange(from = 0) int end, @NonNull Params param,
@NonNull MeasuredParagraph[] measuredTexts, @NonNull int[] paragraphBreakPoints) {
- mText = new SpannedString(text);
+ mText = new SpannableString(text);
mStart = start;
mEnd = end;
mParams = param;
@@ -448,6 +450,21 @@
return getMeasuredParagraph(paraIndex).getWidth(start - paraStart, end - paraStart);
}
+ /** @hide */
+ public void getBounds(@IntRange(from = 0) int start, @IntRange(from = 0) int end,
+ @NonNull Rect bounds) {
+ final int paraIndex = findParaIndex(start);
+ final int paraStart = getParagraphStart(paraIndex);
+ final int paraEnd = getParagraphEnd(paraIndex);
+ if (start < paraStart || paraEnd < end) {
+ throw new RuntimeException("Cannot measured across the paragraph:"
+ + "para: (" + paraStart + ", " + paraEnd + "), "
+ + "request: (" + start + ", " + end + ")");
+ }
+ getMeasuredParagraph(paraIndex).getBounds(mParams.mPaint,
+ start - paraStart, end - paraStart, bounds);
+ }
+
/**
* Returns the size of native PrecomputedText memory usage.
*
@@ -463,6 +480,35 @@
}
///////////////////////////////////////////////////////////////////////////////////////////////
+ // Spannable overrides
+ //
+ // Do not allow to modify MetricAffectingSpan
+
+ /**
+ * @throws IllegalArgumentException if {@link MetricAffectingSpan} is specified.
+ */
+ @Override
+ public void setSpan(Object what, int start, int end, int flags) {
+ if (what instanceof MetricAffectingSpan) {
+ throw new IllegalArgumentException(
+ "MetricAffectingSpan can not be set to PrecomputedText.");
+ }
+ mText.setSpan(what, start, end, flags);
+ }
+
+ /**
+ * @throws IllegalArgumentException if {@link MetricAffectingSpan} is specified.
+ */
+ @Override
+ public void removeSpan(Object what) {
+ if (what instanceof MetricAffectingSpan) {
+ throw new IllegalArgumentException(
+ "MetricAffectingSpan can not be removed from PrecomputedText.");
+ }
+ mText.removeSpan(what);
+ }
+
+ ///////////////////////////////////////////////////////////////////////////////////////////////
// Spanned overrides
//
// Just proxy for underlying mText if appropriate.
diff --git a/core/java/android/view/DisplayCutout.java b/core/java/android/view/DisplayCutout.java
index b6adee9..66a9c6c 100644
--- a/core/java/android/view/DisplayCutout.java
+++ b/core/java/android/view/DisplayCutout.java
@@ -51,6 +51,7 @@
private static final String TAG = "DisplayCutout";
private static final String BOTTOM_MARKER = "@bottom";
private static final String DP_MARKER = "@dp";
+ private static final String RIGHT_MARKER = "@right";
/**
* Category for overlays that allow emulating a display cutout on devices that don't have
@@ -373,6 +374,13 @@
}
}
spec = spec.trim();
+ final float offsetX;
+ if (spec.endsWith(RIGHT_MARKER)) {
+ offsetX = displayWidth;
+ spec = spec.substring(0, spec.length() - RIGHT_MARKER.length()).trim();
+ } else {
+ offsetX = displayWidth / 2f;
+ }
final boolean inDp = spec.endsWith(DP_MARKER);
if (inDp) {
spec = spec.substring(0, spec.length() - DP_MARKER.length());
@@ -397,7 +405,7 @@
if (inDp) {
m.postScale(density, density);
}
- m.postTranslate(displayWidth / 2f, 0);
+ m.postTranslate(offsetX, 0);
p.transform(m);
if (bottomSpec != null) {
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index d908e79..d521684 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -29,6 +29,7 @@
import android.Manifest;
import android.animation.LayoutTransition;
import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.app.ActivityManager;
import android.app.ActivityThread;
import android.app.ResourcesManager;
@@ -4152,9 +4153,7 @@
Log.v(TAG, "Dispatching key " + msg.obj + " from Autofill to " + mView);
}
KeyEvent event = (KeyEvent) msg.obj;
- // send InputEvent to pre IME, set FLAG_FROM_AUTOFILL so the InputEvent
- // wont be dropped as app window is not focus.
- enqueueInputEvent(event, null, QueuedInputEvent.FLAG_FROM_AUTOFILL, true);
+ enqueueInputEvent(event, null, 0, true);
} break;
case MSG_CHECK_FOCUS: {
InputMethodManager imm = InputMethodManager.peekInstance();
@@ -4447,7 +4446,7 @@
return true;
} else if ((!mAttachInfo.mHasWindowFocus
&& !q.mEvent.isFromSource(InputDevice.SOURCE_CLASS_POINTER)
- && (q.mFlags & QueuedInputEvent.FLAG_FROM_AUTOFILL) == 0) || mStopped
+ && !isAutofillUiShowing()) || mStopped
|| (mIsAmbientMode && !q.mEvent.isFromSource(InputDevice.SOURCE_CLASS_BUTTON))
|| (mPausedForTransition && !isBack(q.mEvent))) {
// This is a focus event and the window doesn't currently have input focus or
@@ -4782,18 +4781,11 @@
ensureTouchMode(event.isFromSource(InputDevice.SOURCE_TOUCHSCREEN));
}
- if (action == MotionEvent.ACTION_DOWN && mView instanceof ViewGroup) {
+ if (action == MotionEvent.ACTION_DOWN) {
// Upon motion event within app window, close autofill ui.
- ViewGroup decorView = (ViewGroup) mView;
- if (decorView.getChildCount() > 0) {
- // We cannot use decorView's Context for querying AutofillManager: DecorView's
- // context is based on Application Context, it would allocate a different
- // AutofillManager instance.
- AutofillManager afm = (AutofillManager) decorView.getChildAt(0).getContext()
- .getSystemService(Context.AUTOFILL_MANAGER_SERVICE);
- if (afm != null) {
- afm.requestHideFillUi();
- }
+ AutofillManager afm = getAutofillManager();
+ if (afm != null) {
+ afm.requestHideFillUi();
}
}
@@ -6435,6 +6427,28 @@
return mAudioManager;
}
+ private @Nullable AutofillManager getAutofillManager() {
+ if (mView instanceof ViewGroup) {
+ ViewGroup decorView = (ViewGroup) mView;
+ if (decorView.getChildCount() > 0) {
+ // We cannot use decorView's Context for querying AutofillManager: DecorView's
+ // context is based on Application Context, it would allocate a different
+ // AutofillManager instance.
+ return decorView.getChildAt(0).getContext()
+ .getSystemService(AutofillManager.class);
+ }
+ }
+ return null;
+ }
+
+ private boolean isAutofillUiShowing() {
+ AutofillManager afm = getAutofillManager();
+ if (afm == null) {
+ return false;
+ }
+ return afm.isAutofillUiShowing();
+ }
+
public AccessibilityInteractionController getAccessibilityInteractionController() {
if (mView == null) {
throw new IllegalStateException("getAccessibilityInteractionController"
@@ -6840,7 +6854,6 @@
public static final int FLAG_FINISHED_HANDLED = 1 << 3;
public static final int FLAG_RESYNTHESIZED = 1 << 4;
public static final int FLAG_UNHANDLED = 1 << 5;
- public static final int FLAG_FROM_AUTOFILL = 1 << 6;
public QueuedInputEvent mNext;
diff --git a/core/java/android/view/autofill/AutofillManager.java b/core/java/android/view/autofill/AutofillManager.java
index 158c2ee0b..c109297 100644
--- a/core/java/android/view/autofill/AutofillManager.java
+++ b/core/java/android/view/autofill/AutofillManager.java
@@ -1407,6 +1407,15 @@
return client;
}
+ /**
+ * Check if autofill ui is showing, must be called on UI thread.
+ * @hide
+ */
+ public boolean isAutofillUiShowing() {
+ final AutofillClient client = mContext.getAutofillClient();
+ return client != null & client.autofillClientIsFillUiShowing();
+ }
+
/** @hide */
public void onAuthenticationResult(int authenticationId, Intent data, View focusView) {
if (!hasAutofillFeature()) {
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index f77a6b7..1e2d18c 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -5642,6 +5642,8 @@
needEditableForNotification = true;
}
+ PrecomputedText precomputed =
+ (text instanceof PrecomputedText) ? (PrecomputedText) text : null;
if (type == BufferType.EDITABLE || getKeyListener() != null
|| needEditableForNotification) {
createEditorIfNeeded();
@@ -5651,10 +5653,7 @@
setFilters(t, mFilters);
InputMethodManager imm = InputMethodManager.peekInstance();
if (imm != null) imm.restartInput(this);
- } else if (type == BufferType.SPANNABLE || mMovement != null) {
- text = mSpannableFactory.newSpannable(text);
- } else if (text instanceof PrecomputedText) {
- PrecomputedText precomputed = (PrecomputedText) text;
+ } else if (precomputed != null) {
if (mTextDir == null) {
mTextDir = getTextDirectionHeuristic();
}
@@ -5667,6 +5666,8 @@
+ "PrecomputedText: " + precomputed.getParams()
+ "TextView: " + getTextMetricsParams());
}
+ } else if (type == BufferType.SPANNABLE || mMovement != null) {
+ text = mSpannableFactory.newSpannable(text);
} else if (!(text instanceof CharWrapper)) {
text = TextUtils.stringOrSpannedString(text);
}
diff --git a/core/java/com/android/internal/os/FuseAppLoop.java b/core/java/com/android/internal/os/FuseAppLoop.java
index 12405eb..67fbe5e 100644
--- a/core/java/com/android/internal/os/FuseAppLoop.java
+++ b/core/java/com/android/internal/os/FuseAppLoop.java
@@ -138,7 +138,7 @@
private static final int FUSE_FSYNC = 20;
// Defined in FuseBuffer.h
- private static final int FUSE_MAX_WRITE = 256 * 1024;
+ private static final int FUSE_MAX_WRITE = 128 * 1024;
@Override
public boolean handleMessage(Message msg) {
diff --git a/core/jni/android_text_MeasuredParagraph.cpp b/core/jni/android_text_MeasuredParagraph.cpp
index d33337d..9d79417 100644
--- a/core/jni/android_text_MeasuredParagraph.cpp
+++ b/core/jni/android_text_MeasuredParagraph.cpp
@@ -16,6 +16,7 @@
#define LOG_TAG "MeasuredParagraph"
+#include "GraphicsJNI.h"
#include "ScopedIcuLocale.h"
#include "unicode/locid.h"
#include "unicode/brkiter.h"
@@ -109,6 +110,33 @@
return r;
}
+// Regular JNI
+static void nGetBounds(JNIEnv* env, jobject, jlong ptr, jcharArray javaText, jlong paintPtr,
+ jint start, jint end, jint bidiFlags, jobject bounds) {
+ ScopedCharArrayRO text(env, javaText);
+ const minikin::U16StringPiece textBuffer(text.get(), text.size());
+
+ minikin::MeasuredText* mt = toMeasuredParagraph(ptr);
+ Paint* paint = toPaint(paintPtr);
+ const Typeface* typeface = Typeface::resolveDefault(paint->getAndroidTypeface());
+ minikin::Layout layout = MinikinUtils::doLayout(paint,
+ static_cast<minikin::Bidi>(bidiFlags), typeface, textBuffer.data(), start, end - start,
+ textBuffer.size(), mt);
+
+ minikin::MinikinRect rect;
+ layout.getBounds(&rect);
+
+ SkRect r;
+ r.fLeft = rect.mLeft;
+ r.fTop = rect.mTop;
+ r.fRight = rect.mRight;
+ r.fBottom = rect.mBottom;
+
+ SkIRect ir;
+ r.roundOut(&ir);
+ GraphicsJNI::irect_to_jrect(ir, env, bounds);
+}
+
// CriticalNative
static jlong nGetReleaseFunc() {
return toJLong(&releaseMeasuredParagraph);
@@ -128,6 +156,7 @@
// MeasuredParagraph native functions.
{"nGetWidth", "(JII)F", (void*) nGetWidth}, // Critical Natives
+ {"nGetBounds", "(J[CJIIILandroid/graphics/Rect;)V", (void*) nGetBounds}, // Regular JNI
{"nGetReleaseFunc", "()J", (void*) nGetReleaseFunc}, // Critical Natives
{"nGetMemoryUsage", "(J)I", (void*) nGetMemoryUsage}, // Critical Native
};
diff --git a/core/jni/android_view_SurfaceControl.cpp b/core/jni/android_view_SurfaceControl.cpp
index 8ca5062..a30b2ad 100644
--- a/core/jni/android_view_SurfaceControl.cpp
+++ b/core/jni/android_view_SurfaceControl.cpp
@@ -36,8 +36,9 @@
#include <stdio.h>
#include <system/graphics.h>
#include <ui/DisplayInfo.h>
-#include <ui/HdrCapabilities.h>
#include <ui/FrameStats.h>
+#include <ui/GraphicsTypes.h>
+#include <ui/HdrCapabilities.h>
#include <ui/Rect.h>
#include <ui/Region.h>
#include <utils/Log.h>
@@ -290,7 +291,7 @@
}
sp<GraphicBuffer> buffer;
- status_t res = ScreenshotClient::captureLayers(layerHandle, sourceCrop, frameScale, &buffer);
+ status_t res = ScreenshotClient::captureChildLayers(layerHandle, sourceCrop, frameScale, &buffer);
if (res != NO_ERROR) {
return NULL;
}
@@ -593,7 +594,7 @@
static jintArray nativeGetDisplayColorModes(JNIEnv* env, jclass, jobject tokenObj) {
sp<IBinder> token(ibinderForJavaObject(env, tokenObj));
if (token == NULL) return NULL;
- Vector<android_color_mode_t> colorModes;
+ Vector<ColorMode> colorModes;
if (SurfaceComposerClient::getDisplayColorModes(token, &colorModes) != NO_ERROR ||
colorModes.isEmpty()) {
return NULL;
@@ -623,7 +624,7 @@
sp<IBinder> token(ibinderForJavaObject(env, tokenObj));
if (token == NULL) return JNI_FALSE;
status_t err = SurfaceComposerClient::setActiveColorMode(token,
- static_cast<android_color_mode_t>(colorMode));
+ static_cast<ColorMode>(colorMode));
return err == NO_ERROR ? JNI_TRUE : JNI_FALSE;
}
diff --git a/core/jni/com_android_internal_os_FuseAppLoop.cpp b/core/jni/com_android_internal_os_FuseAppLoop.cpp
index 8837df5..fdc088e 100644
--- a/core/jni/com_android_internal_os_FuseAppLoop.cpp
+++ b/core/jni/com_android_internal_os_FuseAppLoop.cpp
@@ -166,8 +166,8 @@
void com_android_internal_os_FuseAppLoop_replyRead(
JNIEnv* env, jobject self, jlong ptr, jlong unique, jint size, jbyteArray data) {
ScopedByteArrayRO array(env, data);
- CHECK(size >= 0);
- CHECK(static_cast<size_t>(size) < array.size());
+ CHECK_GE(size, 0);
+ CHECK_LE(static_cast<size_t>(size), array.size());
if (!reinterpret_cast<fuse::FuseAppLoop*>(ptr)->ReplyRead(unique, size, array.get())) {
reinterpret_cast<fuse::FuseAppLoop*>(ptr)->Break();
}
diff --git a/core/proto/android/providers/settings.proto b/core/proto/android/providers/settings.proto
index 23c5661..a818e20 100644
--- a/core/proto/android/providers/settings.proto
+++ b/core/proto/android/providers/settings.proto
@@ -502,9 +502,10 @@
optional SettingProto show_restart_in_crash_dialog = 383 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto show_mute_in_crash_dialog = 384 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingsProto show_zen_upgrade_notification = 385 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingsProto backup_agent_timeout_parameters = 386;
// Please insert fields in the same order as in
// frameworks/base/core/java/android/provider/Settings.java.
- // Next tag = 386;
+ // Next tag = 387;
}
message SecureSettingsProto {
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 0a56ef7..daad866 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -3279,7 +3279,7 @@
<!-- USB_PREFERENCES: Notification for when the user connects the phone to a computer via USB in MIDI mode. This is the title -->
<string name="usb_midi_notification_title">MIDI via USB turned on</string>
<!-- USB_PREFERENCES: Notification for when a USB accessory is attached. This is the title -->
- <string name="usb_accessory_notification_title">USB accessory mode turned on</string>
+ <string name="usb_accessory_notification_title">USB accessory connected</string>
<!-- See USB_PREFERENCES. This is the message. -->
<string name="usb_notification_message">Tap for more options.</string>
<!-- See USB_PREFERENCES. This is the message when a data mode is turned on (mtp, ptp, midi) and the device is supplying power.. -->
@@ -3293,7 +3293,7 @@
<!-- Title of notification shown when ADB is actively connected to the phone. -->
<string name="adb_active_notification_title">USB debugging connected</string>
<!-- Message of notification shown when ADB is actively connected to the phone. -->
- <string name="adb_active_notification_message">Tap to disable USB debugging.</string>
+ <string name="adb_active_notification_message">Tap to turn off USB debugging</string>
<string name="adb_active_notification_message" product="tv">Select to disable USB debugging.</string>
<!-- Title of notification shown to indicate that bug report is being collected. -->
diff --git a/core/tests/coretests/src/android/provider/SettingsBackupTest.java b/core/tests/coretests/src/android/provider/SettingsBackupTest.java
index 73fb713..a08eae9 100644
--- a/core/tests/coretests/src/android/provider/SettingsBackupTest.java
+++ b/core/tests/coretests/src/android/provider/SettingsBackupTest.java
@@ -463,8 +463,8 @@
Settings.Global.ZRAM_ENABLED,
Settings.Global.OVERRIDE_SETTINGS_PROVIDER_RESTORE_ANY_VERSION,
Settings.Global.CHAINED_BATTERY_ATTRIBUTION_ENABLED,
- Settings.Global.HIDDEN_API_BLACKLIST_EXEMPTIONS);
-
+ Settings.Global.HIDDEN_API_BLACKLIST_EXEMPTIONS,
+ Settings.Global.BACKUP_AGENT_TIMEOUT_PARAMETERS);
private static final Set<String> BACKUP_BLACKLISTED_SECURE_SETTINGS =
newHashSet(
Settings.Secure.ACCESSIBILITY_SOFT_KEYBOARD_MODE,
diff --git a/media/java/android/media/MediaController2.java b/media/java/android/media/MediaController2.java
index 40be018..20c3209 100644
--- a/media/java/android/media/MediaController2.java
+++ b/media/java/android/media/MediaController2.java
@@ -28,7 +28,6 @@
import android.media.MediaSession2.CommandGroup;
import android.media.MediaSession2.ControllerInfo;
import android.media.MediaSession2.ErrorCode;
-import android.media.MediaSession2.PlaylistParams;
import android.media.session.MediaSessionManager;
import android.media.update.ApiLoader;
import android.media.update.MediaController2Provider;
@@ -139,23 +138,6 @@
@Nullable ResultReceiver receiver) { }
/**
- * Called when the playlist is changed.
- * <p>
- * If the previously playing media item is gone, you should invalidate previous playback
- * information and wait for later callbacks.
- *
- * @param controller the controller for this event
- * @param playlist A new playlist set by the session.
- * @see #onPositionChanged(MediaController2, long, long)
- * @see #onBufferedPositionChanged(MediaController2, long)
- * @see #onCurrentMediaItemChanged(MediaController2, MediaItem2)
- * @hide
- */
- // TODO(jaewan): Remove (b/74174728)
- public void onPlaylistChanged(@NonNull MediaController2 controller,
- @NonNull List<MediaItem2> playlist) { }
-
- /**
* Called when the player state is changed.
*
* @param controller the controller for this event
@@ -266,17 +248,6 @@
public void onRepeatModeChanged(@NonNull MediaController2 controller,
@NonNull MediaPlaylistAgent playlistAgent,
@MediaPlaylistAgent.RepeatMode int repeatMode) { }
-
- /**
- * Called when the playlist parameters are changed.
- *
- * @param controller the controller for this event
- * @param params The new play list parameters.
- * @hide
- */
- // TODO(jaewan): Remove (b/74116823)
- public void onPlaylistParamsChanged(@NonNull MediaController2 controller,
- @NonNull PlaylistParams params) { }
}
/**
@@ -478,19 +449,6 @@
}
/**
- * Sets the {@link PlaylistParams} for the current play list. Repeat/shuffle mode and metadata
- * for the list can be set by calling this method.
- *
- * @param params A {@link PlaylistParams} object to set.
- * @throws IllegalArgumentException if given {@param param} is null.
- * @hide
- */
- // TODO(jaewan): Remove (b/74116823)
- public void setPlaylistParams(@NonNull PlaylistParams params) {
- mProvider.setPlaylistParams_impl(params);
- }
-
- /**
* @hide
*/
public void skipForward() {
@@ -778,17 +736,6 @@
}
/**
- * Returns the {@link PlaylistParams} for the current play list.
- * Can return {@code null} if the controller doesn't have enough permission, or if the session
- * has not set the parameters.
- * @hide
- */
- // TODO(jaewan): Remove (b/74116823)
- public @Nullable PlaylistParams getPlaylistParams() {
- return mProvider.getPlaylistParams_impl();
- }
-
- /**
* Inserts the media item to the playlist at position index.
* <p>
* This will not change the currently playing media item.
@@ -836,6 +783,24 @@
}
/**
+ * Skips to the previous item in the playlist.
+ * <p>
+ * This calls {@link MediaPlaylistAgent#skipToPreviousItem()}.
+ */
+ public void skipToPreviousItem() {
+ mProvider.skipToPreviousItem_impl();
+ }
+
+ /**
+ * Skips to the next item in the playlist.
+ * <p>
+ * This calls {@link MediaPlaylistAgent#skipToNextItem()}.
+ */
+ public void skipToNextItem() {
+ mProvider.skipToNextItem_impl();
+ }
+
+ /**
* Skips to the item in the playlist.
* <p>
* This calls {@link MediaPlaylistAgent#skipToPlaylistItem(MediaItem2)}.
@@ -847,38 +812,54 @@
}
/**
- * Skips to the previous item in the playlist.
- * <p>
- * This calls {@link MediaPlaylistAgent#skipToPreviousItem()}.
+ * Gets the cached repeat mode from the {@link ControllerCallback#onRepeatModeChanged(
+ * MediaController2, MediaPlaylistAgent, int)}.
+ *
+ * @return repeat mode
+ * @see MediaPlaylistAgent#REPEAT_MODE_NONE
+ * @see MediaPlaylistAgent#REPEAT_MODE_ONE
+ * @see MediaPlaylistAgent#REPEAT_MODE_ALL
+ * @see MediaPlaylistAgent#REPEAT_MODE_GROUP
*/
- public void skipToPreviousItem() {
- mProvider.skipToPreviousItem_impl();
+ public @RepeatMode int getRepeatMode() {
+ return mProvider.getRepeatMode_impl();
}
/**
- * Skips to the next item in the playlist.
- * <p>
- * This calls {@link MediaPlaylistAgent#skipToNextItem()}.
+ * Sets the repeat mode.
+ *
+ * @param repeatMode repeat mode
+ * @see MediaPlaylistAgent#REPEAT_MODE_NONE
+ * @see MediaPlaylistAgent#REPEAT_MODE_ONE
+ * @see MediaPlaylistAgent#REPEAT_MODE_ALL
+ * @see MediaPlaylistAgent#REPEAT_MODE_GROUP
*/
- public void skipToNextItem() {
- mProvider.skipToNextItem_impl();
- }
-
- public @RepeatMode int getRepeatMode() {
- // TODO(jaewan): Implement (b/74118768)
- return 0;
- }
-
public void setRepeatMode(@RepeatMode int repeatMode) {
- // TODO(jaewan): Implement (b/74118768)
+ mProvider.setRepeatMode_impl(repeatMode);
}
+ /**
+ * Gets the cached shuffle mode from the {@link ControllerCallback#onShuffleModeChanged(
+ * MediaController2, MediaPlaylistAgent, int)}.
+ *
+ * @return The shuffle mode
+ * @see MediaPlaylistAgent#SHUFFLE_MODE_NONE
+ * @see MediaPlaylistAgent#SHUFFLE_MODE_ALL
+ * @see MediaPlaylistAgent#SHUFFLE_MODE_GROUP
+ */
public @ShuffleMode int getShuffleMode() {
- // TODO(jaewan): Implement (b/74118768)
- return 0;
+ return mProvider.getShuffleMode_impl();
}
+ /**
+ * Sets the shuffle mode.
+ *
+ * @param shuffleMode The shuffle mode
+ * @see MediaPlaylistAgent#SHUFFLE_MODE_NONE
+ * @see MediaPlaylistAgent#SHUFFLE_MODE_ALL
+ * @see MediaPlaylistAgent#SHUFFLE_MODE_GROUP
+ */
public void setShuffleMode(@ShuffleMode int shuffleMode) {
- // TODO(jaewan): Implement (b/74118768)
+ mProvider.setShuffleMode_impl(shuffleMode);
}
}
diff --git a/media/java/android/media/MediaPlayerBase.java b/media/java/android/media/MediaPlayerBase.java
index 70a36bf..f18e347 100644
--- a/media/java/android/media/MediaPlayerBase.java
+++ b/media/java/android/media/MediaPlayerBase.java
@@ -132,8 +132,8 @@
public static final long UNKNOWN_TIME = -1;
/**
- * Returns the current playback head position.
- * @return the current play position in ms, or {@link #UNKNOWN_TIME} if unknown.
+ * Gets the current playback head position.
+ * @return the current playback position in ms, or {@link #UNKNOWN_TIME} if unknown.
*/
public long getCurrentPosition() { return UNKNOWN_TIME; }
@@ -144,8 +144,8 @@
public long getDuration() { return UNKNOWN_TIME; }
/**
- * Returns the duration of the current data source, or {@link #UNKNOWN_TIME} if unknown.
- * @return the duration in ms, or {@link #UNKNOWN_TIME}.
+ * Gets the buffered position of current playback, or {@link #UNKNOWN_TIME} if unknown.
+ * @return the buffered position in ms, or {@link #UNKNOWN_TIME}.
*/
public long getBufferedPosition() { return UNKNOWN_TIME; }
diff --git a/media/java/android/media/MediaPlaylistAgent.java b/media/java/android/media/MediaPlaylistAgent.java
index 6588474..6b3620b 100644
--- a/media/java/android/media/MediaPlaylistAgent.java
+++ b/media/java/android/media/MediaPlaylistAgent.java
@@ -46,7 +46,7 @@
@IntDef({REPEAT_MODE_NONE, REPEAT_MODE_ONE, REPEAT_MODE_ALL,
REPEAT_MODE_GROUP})
@Retention(RetentionPolicy.SOURCE)
- @interface RepeatMode {}
+ public @interface RepeatMode {}
/**
* Playback will be stopped at the end of the playing media list.
@@ -75,7 +75,7 @@
*/
@IntDef({SHUFFLE_MODE_NONE, SHUFFLE_MODE_ALL, SHUFFLE_MODE_GROUP})
@Retention(RetentionPolicy.SOURCE)
- @interface ShuffleMode {}
+ public @interface ShuffleMode {}
/**
* Media list will be played in order.
@@ -281,7 +281,7 @@
}
/**
- * Get repeat mode
+ * Gets the repeat mode
*
* @return repeat mode
* @see #REPEAT_MODE_NONE
@@ -294,7 +294,7 @@
}
/**
- * Set repeat mode
+ * Sets the repeat mode
*
* @param repeatMode repeat mode
* @see #REPEAT_MODE_NONE
@@ -307,9 +307,9 @@
}
/**
- * Get shuffle mode
+ * Gets the shuffle mode
*
- * @return shuffle mode
+ * @return The shuffle mode
* @see #SHUFFLE_MODE_NONE
* @see #SHUFFLE_MODE_ALL
* @see #SHUFFLE_MODE_GROUP
@@ -319,9 +319,9 @@
}
/**
- * Set shuffle mode
+ * Sets the shuffle mode
*
- * @param shuffleMode shuffle mode
+ * @param shuffleMode The shuffle mode
* @see #SHUFFLE_MODE_NONE
* @see #SHUFFLE_MODE_ALL
* @see #SHUFFLE_MODE_GROUP
@@ -329,4 +329,19 @@
public void setShuffleMode(@ShuffleMode int shuffleMode) {
mProvider.setShuffleMode_impl(shuffleMode);
}
+
+ /**
+ * Gets a {@link MediaItem2} in the playlist that matches given {@code dsd}.
+ * You can override this method to have more finer control of updating {@link DataSourceDesc}
+ * on items in the playlist.
+ *
+ * @return A {@link MediaItem2} object in the playlist that matches given {@code dsd}.
+ * {@code null} if playlist is not set, or if the playlist has no matching item.
+ * @throws IllegalArgumentException if {@code dsd} is null
+ * @hide
+ */
+ // TODO(jaewan): Unhide
+ public @Nullable MediaItem2 getMediaItem(@NonNull DataSourceDesc dsd) {
+ return mProvider.getMediaItem_impl(dsd);
+ }
}
diff --git a/media/java/android/media/MediaSession2.java b/media/java/android/media/MediaSession2.java
index a7aa3a7..60714df 100644
--- a/media/java/android/media/MediaSession2.java
+++ b/media/java/android/media/MediaSession2.java
@@ -28,8 +28,8 @@
import android.media.MediaPlayerBase.BuffState;
import android.media.MediaPlayerBase.PlayerEventCallback;
import android.media.MediaPlayerBase.PlayerState;
-import android.media.MediaSession2.PlaylistParams.RepeatMode;
-import android.media.MediaSession2.PlaylistParams.ShuffleMode;
+import android.media.MediaPlaylistAgent.RepeatMode;
+import android.media.MediaPlaylistAgent.ShuffleMode;
import android.media.update.ApiLoader;
import android.media.update.MediaSession2Provider;
import android.media.update.MediaSession2Provider.BuilderBaseProvider;
@@ -40,7 +40,6 @@
import android.media.update.ProviderCreator;
import android.net.Uri;
import android.os.Bundle;
-import android.os.Handler;
import android.os.IInterface;
import android.os.ResultReceiver;
@@ -1224,134 +1223,6 @@
}
/**
- * Parameter for the playlist.
- * @hide
- */
- // TODO(jaewan): Remove (b/74116823)
- public final static class PlaylistParams {
- /**
- * @hide
- */
- @IntDef({REPEAT_MODE_NONE, REPEAT_MODE_ONE, REPEAT_MODE_ALL,
- REPEAT_MODE_GROUP})
- @Retention(RetentionPolicy.SOURCE)
- public @interface RepeatMode {}
-
- /**
- * Playback will be stopped at the end of the playing media list.
- */
- public static final int REPEAT_MODE_NONE = 0;
-
- /**
- * Playback of the current playing media item will be repeated.
- */
- public static final int REPEAT_MODE_ONE = 1;
-
- /**
- * Playing media list will be repeated.
- */
- public static final int REPEAT_MODE_ALL = 2;
-
- /**
- * Playback of the playing media group will be repeated.
- * A group is a logical block of media items which is specified in the section 5.7 of the
- * Bluetooth AVRCP 1.6.
- */
- public static final int REPEAT_MODE_GROUP = 3;
-
- /**
- * @hide
- */
- @IntDef({SHUFFLE_MODE_NONE, SHUFFLE_MODE_ALL, SHUFFLE_MODE_GROUP})
- @Retention(RetentionPolicy.SOURCE)
- public @interface ShuffleMode {}
-
- /**
- * Media list will be played in order.
- */
- public static final int SHUFFLE_MODE_NONE = 0;
-
- /**
- * Media list will be played in shuffled order.
- */
- public static final int SHUFFLE_MODE_ALL = 1;
-
- /**
- * Media group will be played in shuffled order.
- * A group is a logical block of media items which is specified in the section 5.7 of the
- * Bluetooth AVRCP 1.6.
- */
- public static final int SHUFFLE_MODE_GROUP = 2;
-
-
- private final MediaSession2Provider.PlaylistParamsProvider mProvider;
-
- /**
- * Instantiate {@link PlaylistParams}
- *
- * @param context context
- * @param repeatMode repeat mode
- * @param shuffleMode shuffle mode
- * @param playlistMetadata metadata for the list
- */
- public PlaylistParams(@NonNull Context context, @RepeatMode int repeatMode,
- @ShuffleMode int shuffleMode, @Nullable MediaMetadata2 playlistMetadata) {
- mProvider = ApiLoader.getProvider(context).createMediaSession2PlaylistParams(
- context, this, repeatMode, shuffleMode, playlistMetadata);
- }
-
- /**
- * Create a new bundle for this object.
- *
- * @return
- */
- public @NonNull Bundle toBundle() {
- return mProvider.toBundle_impl();
- }
-
- /**
- * Create a new playlist params from the bundle that was previously returned by
- * {@link #toBundle}.
- *
- * @param context context
- * @return a new playlist params. Can be {@code null} for error.
- */
- public static @Nullable PlaylistParams fromBundle(
- @NonNull Context context, @Nullable Bundle bundle) {
- return ApiLoader.getProvider(context).fromBundle_PlaylistParams(context, bundle);
- }
-
- /**
- * Get repeat mode
- *
- * @return repeat mode
- * @see #REPEAT_MODE_NONE, #REPEAT_MODE_ONE, #REPEAT_MODE_ALL, #REPEAT_MODE_GROUP
- */
- public @RepeatMode int getRepeatMode() {
- return mProvider.getRepeatMode_impl();
- }
-
- /**
- * Get shuffle mode
- *
- * @return shuffle mode
- * @see #SHUFFLE_MODE_NONE, #SHUFFLE_MODE_ALL, #SHUFFLE_MODE_GROUP
- */
- public @ShuffleMode int getShuffleMode() {
- return mProvider.getShuffleMode_impl();
- }
-
- /**
- * Get metadata for the playlist
- *
- * @return metadata. Can be {@code null}
- */
- public @Nullable MediaMetadata2 getPlaylistMetadata() {
- return mProvider.getPlaylistMetadata_impl();
- }
- }
-
- /**
* Constructor is hidden and apps can only instantiate indirectly through {@link Builder}.
* <p>
* This intended behavior and here's the reasons.
@@ -1584,29 +1455,6 @@
}
/**
- * Sets the {@link PlaylistParams} for the current play list. Repeat/shuffle mode and metadata
- * for the list can be set by calling this method.
- *
- * @param params A {@link PlaylistParams} object to set.
- * @throws IllegalArgumentException if given {@param param} is null.
- * @hide
- */
- // TODO(jaewan): Remove (b/74116823)
- public void setPlaylistParams(PlaylistParams params) {
- mProvider.setPlaylistParams_impl(params);
- }
-
- /**
- * Returns the {@link PlaylistParams} for the current play list.
- * Returns {@code null} if not set.
- * @hide
- */
- // TODO(jaewan): Remove (b/74116823)
- public PlaylistParams getPlaylistParams() {
- return mProvider.getPlaylistParams_impl();
- }
-
- /**
* Notify errors to the connected controllers
*
* @param errorCode error code
@@ -1617,65 +1465,37 @@
}
/**
- * Register {@link PlayerEventCallback} to listen changes in the underlying
- * {@link MediaPlayerBase}, regardless of the change in the underlying player.
- * <p>
- * Registered callbacks will be also called when the underlying player is changed.
+ * Gets the current player state.
*
- * @param executor a callback Executor
- * @param callback a EventCallback
- * @throws IllegalArgumentException if executor or callback is {@code null}.
+ * @return the current player state
* @hide
*/
- // TODO(jaewan): Remove (b/74157064)
- public void registerPlayerEventCallback(@NonNull @CallbackExecutor Executor executor,
- @NonNull PlayerEventCallback callback) {
- mProvider.registerPlayerEventCallback_impl(executor, callback);
- }
-
- /**
- * Unregister the previously registered {@link PlayerEventCallback}.
- *
- * @param callback the callback to be removed
- * @throws IllegalArgumentException if the callback is {@code null}.
- * @hide
- */
- // TODO(jaewan): Remove (b/74157064)
- public void unregisterPlayerEventCallback(@NonNull PlayerEventCallback callback) {
- mProvider.unregisterPlayerEventCallback_impl(callback);
- }
-
- /**
- * Get the player state.
- *
- * @return player state
- * @hide
- */
+ // TODO(jaewan): Unhide (b/74578458)
public @PlayerState int getPlayerState() {
- // TODO(jaewan): implement this (b/74578458)
- return PLAYER_STATE_IDLE;
+ return mProvider.getPlayerState_impl();
}
/**
- * Get the current position.
+ * Gets the current position.
*
- * @return position
+ * @return the current playback position in ms, or {@link MediaPlayerBase#UNKNOWN_TIME} if
+ * unknown.
* @hide
*/
- public long getCurrentPosition() {
- // TODO(jaewan): implement this (b/74578458)
- return -1;
+ // TODO(jaewan): Unhide (b/74578458)
+ public long getPosition() {
+ return mProvider.getPosition_impl();
}
/**
- * Get the buffered position.
+ * Gets the buffered position, or {@link MediaPlayerBase#UNKNOWN_TIME} if unknown.
*
- * @return buffered position
+ * @return the buffered position in ms, or {@link MediaPlayerBase#UNKNOWN_TIME}.
* @hide
*/
+ // TODO(jaewan): Unhide (b/74578458)
public long getBufferedPosition() {
- // TODO(jaewan): implement this (b/74578458)
- return -1;
+ return mProvider.getBufferedPosition_impl();
}
/**
@@ -1883,21 +1703,53 @@
mProvider.updatePlaylistMetadata_impl(metadata);
}
+ /**
+ * Gets the repeat mode from the {@link MediaPlaylistAgent}.
+ *
+ * @return repeat mode
+ * @see MediaPlaylistAgent#REPEAT_MODE_NONE
+ * @see MediaPlaylistAgent#REPEAT_MODE_ONE
+ * @see MediaPlaylistAgent#REPEAT_MODE_ALL
+ * @see MediaPlaylistAgent#REPEAT_MODE_GROUP
+ */
public @RepeatMode int getRepeatMode() {
- // TODO(jaewan): Implement (b/74118768)
- return 0;
+ return mProvider.getRepeatMode_impl();
}
+ /**
+ * Sets the repeat mode to the {@link MediaPlaylistAgent}.
+ *
+ * @param repeatMode repeat mode
+ * @see MediaPlaylistAgent#REPEAT_MODE_NONE
+ * @see MediaPlaylistAgent#REPEAT_MODE_ONE
+ * @see MediaPlaylistAgent#REPEAT_MODE_ALL
+ * @see MediaPlaylistAgent#REPEAT_MODE_GROUP
+ */
public void setRepeatMode(@RepeatMode int repeatMode) {
- // TODO(jaewan): Implement (b/74118768)
+ mProvider.setRepeatMode_impl(repeatMode);
}
+ /**
+ * Gets the shuffle mode from the {@link MediaPlaylistAgent}.
+ *
+ * @return The shuffle mode
+ * @see MediaPlaylistAgent#SHUFFLE_MODE_NONE
+ * @see MediaPlaylistAgent#SHUFFLE_MODE_ALL
+ * @see MediaPlaylistAgent#SHUFFLE_MODE_GROUP
+ */
public @ShuffleMode int getShuffleMode() {
- // TODO(jaewan): Implement (b/74118768)
- return 0;
+ return mProvider.getShuffleMode_impl();
}
+ /**
+ * Sets the shuffle mode to the {@link MediaPlaylistAgent}.
+ *
+ * @param shuffleMode The shuffle mode
+ * @see MediaPlaylistAgent#SHUFFLE_MODE_NONE
+ * @see MediaPlaylistAgent#SHUFFLE_MODE_ALL
+ * @see MediaPlaylistAgent#SHUFFLE_MODE_GROUP
+ */
public void setShuffleMode(@ShuffleMode int shuffleMode) {
- // TODO(jaewan): Implement (b/74118768)
+ mProvider.setShuffleMode_impl(shuffleMode);
}
}
diff --git a/media/java/android/media/update/MediaController2Provider.java b/media/java/android/media/update/MediaController2Provider.java
index 55672b6..22e5b18 100644
--- a/media/java/android/media/update/MediaController2Provider.java
+++ b/media/java/android/media/update/MediaController2Provider.java
@@ -22,7 +22,6 @@
import android.media.MediaItem2;
import android.media.MediaMetadata2;
import android.media.MediaSession2.Command;
-import android.media.MediaSession2.PlaylistParams;
import android.media.Rating2;
import android.media.SessionToken2;
import android.net.Uri;
@@ -65,8 +64,6 @@
void replacePlaylistItem_impl(int index, MediaItem2 item);
void removePlaylistItem_impl(MediaItem2 item);
- PlaylistParams getPlaylistParams_impl();
- void setPlaylistParams_impl(PlaylistParams params);
int getPlayerState_impl();
long getPosition_impl();
float getPlaybackSpeed_impl();
diff --git a/media/java/android/media/update/MediaPlaylistAgentProvider.java b/media/java/android/media/update/MediaPlaylistAgentProvider.java
index b27d5a1..e1522cf 100644
--- a/media/java/android/media/update/MediaPlaylistAgentProvider.java
+++ b/media/java/android/media/update/MediaPlaylistAgentProvider.java
@@ -16,6 +16,7 @@
package android.media.update;
+import android.media.DataSourceDesc;
import android.media.MediaItem2;
import android.media.MediaMetadata2;
import android.media.MediaPlaylistAgent.PlaylistEventCallback;
@@ -50,4 +51,5 @@
void setRepeatMode_impl(int repeatMode);
int getShuffleMode_impl();
void setShuffleMode_impl(int shuffleMode);
+ MediaItem2 getMediaItem_impl(DataSourceDesc dsd);
}
diff --git a/media/java/android/media/update/MediaSession2Provider.java b/media/java/android/media/update/MediaSession2Provider.java
index 84ea369..e5ea386 100644
--- a/media/java/android/media/update/MediaSession2Provider.java
+++ b/media/java/android/media/update/MediaSession2Provider.java
@@ -29,7 +29,6 @@
import android.media.MediaSession2.CommandButton.Builder;
import android.media.MediaSession2.CommandGroup;
import android.media.MediaSession2.ControllerInfo;
-import android.media.MediaSession2.PlaylistParams;
import android.media.MediaSession2.SessionCallback;
import android.media.SessionToken2;
import android.media.VolumeProvider2;
@@ -65,11 +64,10 @@
List<MediaItem2> getPlaylist_impl();
void setPlaylist_impl(List<MediaItem2> list, MediaMetadata2 metadata);
MediaItem2 getCurrentPlaylistItem_impl();
- void setPlaylistParams_impl(PlaylistParams params);
- PlaylistParams getPlaylistParams_impl();
void notifyError_impl(int errorCode, Bundle extras);
- void registerPlayerEventCallback_impl(Executor executor, PlayerEventCallback callback);
- void unregisterPlayerEventCallback_impl(PlayerEventCallback callback);
+ int getPlayerState_impl();
+ long getPosition_impl();
+ long getBufferedPosition_impl();
interface CommandProvider {
int getCommandCode_impl();
@@ -117,13 +115,6 @@
String toString_impl();
}
- interface PlaylistParamsProvider {
- int getRepeatMode_impl();
- int getShuffleMode_impl();
- MediaMetadata2 getPlaylistMetadata_impl();
- Bundle toBundle_impl();
- }
-
interface BuilderBaseProvider<T extends MediaSession2, C extends SessionCallback> {
void setPlayer_impl(MediaPlayerBase player);
void setPlaylistAgent_impl(MediaPlaylistAgent playlistAgent);
diff --git a/media/java/android/media/update/StaticProvider.java b/media/java/android/media/update/StaticProvider.java
index f78d4a4..1c0e255 100644
--- a/media/java/android/media/update/StaticProvider.java
+++ b/media/java/android/media/update/StaticProvider.java
@@ -31,7 +31,6 @@
import android.media.MediaMetadata2;
import android.media.MediaPlaylistAgent;
import android.media.MediaSession2;
-import android.media.MediaSession2.PlaylistParams;
import android.media.MediaSession2.SessionCallback;
import android.media.MediaSessionService2;
import android.media.MediaSessionService2.MediaNotification;
@@ -44,7 +43,6 @@
import android.media.update.MediaSession2Provider.CommandGroupProvider;
import android.media.update.MediaSession2Provider.CommandProvider;
import android.media.update.MediaSession2Provider.ControllerInfoProvider;
-import android.media.update.MediaSession2Provider.PlaylistParamsProvider;
import android.media.update.MediaSessionService2Provider.MediaNotificationProvider;
import android.os.Bundle;
import android.os.IInterface;
@@ -78,10 +76,6 @@
ControllerInfoProvider createMediaSession2ControllerInfo(Context context,
MediaSession2.ControllerInfo instance, int uid, int pid,
String packageName, IInterface callback);
- PlaylistParamsProvider createMediaSession2PlaylistParams(Context context,
- PlaylistParams playlistParams, int repeatMode, int shuffleMode,
- MediaMetadata2 playlistMetadata);
- PlaylistParams fromBundle_PlaylistParams(Context context, Bundle bundle);
CommandButtonProvider.BuilderProvider createMediaSession2CommandButtonBuilder(Context context,
MediaSession2.CommandButton.Builder instance);
BuilderBaseProvider<MediaSession2, SessionCallback> createMediaSession2Builder(
diff --git a/media/java/android/media/update/TransportControlProvider.java b/media/java/android/media/update/TransportControlProvider.java
index eb03ca7f..03944d2 100644
--- a/media/java/android/media/update/TransportControlProvider.java
+++ b/media/java/android/media/update/TransportControlProvider.java
@@ -33,4 +33,9 @@
void rewind_impl();
void seekTo_impl(long pos);
void skipToPlaylistItem_impl(MediaItem2 item);
+
+ int getRepeatMode_impl();
+ void setRepeatMode_impl(int repeatMode);
+ int getShuffleMode_impl();
+ void setShuffleMode_impl(int shuffleMode);
}
diff --git a/media/jni/Android.bp b/media/jni/Android.bp
index 44e5d61..0ba45f13 100644
--- a/media/jni/Android.bp
+++ b/media/jni/Android.bp
@@ -128,7 +128,6 @@
"libcutils",
"libdexfile",
"liblzma",
- "libmedia",
"libmedia_helper",
"libmedia_player2_util",
"libmediadrm",
@@ -149,7 +148,6 @@
"libstagefright_timedtext",
"libunwindstack",
"libutilscallstack",
- "libvndksupport",
"libz",
"libziparchive",
],
diff --git a/packages/SettingsLib/common.mk b/packages/SettingsLib/common.mk
index 15b50d7..28f97d1 100644
--- a/packages/SettingsLib/common.mk
+++ b/packages/SettingsLib/common.mk
@@ -16,11 +16,11 @@
ifeq ($(LOCAL_USE_AAPT2),true)
LOCAL_STATIC_JAVA_LIBRARIES += \
android-support-annotations \
- apptoolkit-lifecycle-common
+ android-arch-lifecycle-common
LOCAL_STATIC_ANDROID_LIBRARIES += \
android-support-v4 \
- apptoolkit-lifecycle-runtime \
+ android-arch-lifecycle-runtime \
android-support-v7-recyclerview \
android-support-v7-preference \
android-support-v7-appcompat \
diff --git a/packages/SettingsLib/res/layout/preference_access_point.xml b/packages/SettingsLib/res/layout/preference_access_point.xml
new file mode 100644
index 0000000..62173da
--- /dev/null
+++ b/packages/SettingsLib/res/layout/preference_access_point.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2017 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.
+ -->
+
+<!-- Based off preference_two_target.xml with Material ripple moved to parent for full ripple. -->
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:settings="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="?android:attr/listPreferredItemHeightSmall"
+ android:gravity="center_vertical"
+ android:background="?android:attr/selectableItemBackground"
+ android:clipToPadding="false">
+
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:gravity="start|center_vertical"
+ android:clipToPadding="false"
+ android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+ android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
+
+ <LinearLayout
+ android:id="@+id/icon_frame"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="start|center_vertical"
+ android:minWidth="56dp"
+ android:orientation="horizontal"
+ android:clipToPadding="false"
+ android:paddingTop="4dp"
+ android:paddingBottom="4dp">
+ <android.support.v7.internal.widget.PreferenceImageView
+ android:id="@android:id/icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ settings:maxWidth="48dp"
+ settings:maxHeight="48dp" />
+ </LinearLayout>
+
+ <RelativeLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp">
+
+ <TextView
+ android:id="@android:id/title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceListItem"
+ android:ellipsize="marquee" />
+
+ <TextView
+ android:id="@android:id/summary"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@android:id/title"
+ android:layout_alignStart="@android:id/title"
+ android:textAppearance="?android:attr/textAppearanceListItemSecondary"
+ android:textColor="?android:attr/textColorSecondary"
+ android:maxLines="10" />
+
+ </RelativeLayout>
+
+ </LinearLayout>
+
+ <include layout="@layout/preference_two_target_divider" />
+
+ <!-- Preference should place its actual preference widget here. -->
+ <LinearLayout
+ android:id="@android:id/widget_frame"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:minWidth="64dp"
+ android:gravity="center"
+ android:orientation="vertical" />
+
+</LinearLayout>
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java
index 8115ede2..26f3683 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java
@@ -68,6 +68,7 @@
private final UserBadgeCache mBadgeCache;
private final IconInjector mIconInjector;
private TextView mTitleView;
+ private boolean mShowDivider;
private boolean mForSavedNetworks = false;
private AccessPoint mAccessPoint;
@@ -115,7 +116,8 @@
int iconResId, boolean forSavedNetworks, StateListDrawable frictionSld,
int level, IconInjector iconInjector) {
super(context);
- setWidgetLayoutResource(R.layout.access_point_friction_widget);
+ setLayoutResource(R.layout.preference_access_point);
+ setWidgetLayoutResource(getWidgetLayoutResourceId());
mBadgeCache = cache;
mAccessPoint = accessPoint;
mForSavedNetworks = forSavedNetworks;
@@ -128,6 +130,10 @@
.getDimensionPixelSize(R.dimen.wifi_preference_badge_padding);
}
+ protected int getWidgetLayoutResourceId() {
+ return R.layout.access_point_friction_widget;
+ }
+
public AccessPoint getAccessPoint() {
return mAccessPoint;
}
@@ -154,6 +160,18 @@
ImageView frictionImageView = (ImageView) view.findViewById(R.id.friction_icon);
bindFrictionImage(frictionImageView);
+
+ final View divider = view.findViewById(R.id.two_target_divider);
+ divider.setVisibility(shouldShowDivider() ? View.VISIBLE : View.INVISIBLE);
+ }
+
+ public boolean shouldShowDivider() {
+ return mShowDivider;
+ }
+
+ public void setShowDivider(boolean showDivider) {
+ mShowDivider = showDivider;
+ notifyChanged();
}
protected void updateIcon(int level, Context context) {
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index 1cd02f4..ecda53a 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -207,4 +207,7 @@
Else (if negative), turning on dnd manually will surface a dialog that prompts
user to specify a duration.-->
<integer name="def_zen_duration">0</integer>
+
+ <!-- Default for Settings.Global.BACKUP_AGENT_TIMEOUT_PARAMETERS -->
+ <string name="def_backup_agent_timeout_parameters"></string>
</resources>
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
index 53cff4e..9a43839 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
@@ -1253,6 +1253,9 @@
dumpSetting(s, p,
Settings.Global.SHOW_ZEN_UPGRADE_NOTIFICATION,
GlobalSettingsProto.SHOW_ZEN_UPGRADE_NOTIFICATION);
+ dumpSetting(s, p,
+ Settings.Global.BACKUP_AGENT_TIMEOUT_PARAMETERS,
+ GlobalSettingsProto.BACKUP_AGENT_TIMEOUT_PARAMETERS);
// Please insert new settings using the same order as in Settings.Global.
p.end(token);
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index 6398858..da62d94 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -2938,7 +2938,7 @@
}
private final class UpgradeController {
- private static final int SETTINGS_VERSION = 157;
+ private static final int SETTINGS_VERSION = 158;
private final int mUserId;
@@ -3584,7 +3584,7 @@
}
if (currentVersion == 155) {
- // Version 155: Set the default value for CHARGING_STARTED_SOUND.
+ // Version 156: Set the default value for CHARGING_STARTED_SOUND.
final SettingsState globalSettings = getGlobalSettingsLocked();
final String oldValue = globalSettings.getSettingLocked(
Global.CHARGING_STARTED_SOUND).getValue();
@@ -3605,7 +3605,7 @@
}
if (currentVersion == 156) {
- // Version 156: Set a default value for zen duration
+ // Version 157: Set a default value for zen duration
final SettingsState globalSettings = getGlobalSettingsLocked();
final Setting currentSetting = globalSettings.getSettingLocked(
Global.ZEN_DURATION);
@@ -3616,9 +3616,26 @@
Global.ZEN_DURATION, defaultZenDuration,
null, true, SettingsState.SYSTEM_PACKAGE_NAME);
}
-
currentVersion = 157;
}
+
+ if (currentVersion == 157) {
+ // Version 158: Set default value for BACKUP_AGENT_TIMEOUT_PARAMETERS.
+ final SettingsState globalSettings = getGlobalSettingsLocked();
+ final String oldValue = globalSettings.getSettingLocked(
+ Settings.Global.BACKUP_AGENT_TIMEOUT_PARAMETERS).getValue();
+ if (TextUtils.equals(null, oldValue)) {
+ final String defaultValue = getContext().getResources().getString(
+ R.string.def_backup_agent_timeout_parameters);
+ if (!TextUtils.isEmpty(defaultValue)) {
+ globalSettings.insertSettingLocked(
+ Settings.Global.BACKUP_AGENT_TIMEOUT_PARAMETERS, defaultValue,
+ null, true,
+ SettingsState.SYSTEM_PACKAGE_NAME);
+ }
+ }
+ currentVersion = 158;
+ }
// vXXX: Add new settings above this point.
if (currentVersion != newVersion) {
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 60129e6..1db9050 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -88,13 +88,13 @@
support charging on it. That is, a charger that fits into the USB port and goes into
a wall socket, not into a computer. (This happens because some devices require more
current than the USB spec allows. [CHAR LIMIT=NONE] -->
- <string name="invalid_charger">USB charging not supported.\nUse only the supplied charger.</string>
+ <string name="invalid_charger">Can\'t charge via USB. Use the charger that came with your device.</string>
<!-- First line of invalid_charger, used in the notification form. [CHAR LIMIT=NONE]-->
- <string name="invalid_charger_title">USB charging not supported.</string>
+ <string name="invalid_charger_title">Can\'t charge via USB</string>
<!-- Second line of invalid_charger, used in the notification form. [CHAR LIMIT=NONE]-->
- <string name="invalid_charger_text">Use only the supplied charger.</string>
+ <string name="invalid_charger_text">Use the charger that came with your device</string>
<!-- When the battery is low, this is the label of the button to go to the
power usage activity to find out what drained the battery. [CHAR LIMIT=30] -->
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardEsimArea.java b/packages/SystemUI/src/com/android/keyguard/KeyguardEsimArea.java
index b8a07cd..63b7ae2 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardEsimArea.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardEsimArea.java
@@ -60,7 +60,7 @@
.setMessage(R.string.error_disable_esim_msg)
.setTitle(R.string.error_disable_esim_title)
.setCancelable(false /* cancelable */)
- .setNeutralButton(R.string.ok, null /* listener */);
+ .setPositiveButton(R.string.ok, null /* listener */);
AlertDialog alertDialog = builder.create();
alertDialog.getWindow().setType(
WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
index 08b4fee..10ba7f6 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
@@ -47,12 +47,12 @@
import java.util.List;
import java.util.function.Consumer;
-import androidx.app.slice.Slice;
-import androidx.app.slice.SliceItem;
-import androidx.app.slice.core.SliceQuery;
-import androidx.app.slice.widget.ListContent;
-import androidx.app.slice.widget.RowContent;
-import androidx.app.slice.widget.SliceLiveData;
+import androidx.slice.Slice;
+import androidx.slice.SliceItem;
+import androidx.slice.core.SliceQuery;
+import androidx.slice.widget.ListContent;
+import androidx.slice.widget.RowContent;
+import androidx.slice.widget.SliceLiveData;
/**
* View visible under the clock on the lock screen and AoD.
@@ -117,7 +117,7 @@
private void showSlice(Slice slice) {
- ListContent lc = new ListContent(slice);
+ ListContent lc = new ListContent(getContext(), slice);
mHasHeader = lc.hasHeader();
List<SliceItem> subItems = lc.getRowItems();
if (!mHasHeader) {
@@ -125,7 +125,8 @@
} else {
mTitle.setVisibility(VISIBLE);
// If there's a header it'll be the first subitem
- RowContent header = new RowContent(subItems.get(0), true /* showStartItem */);
+ RowContent header = new RowContent(getContext(), subItems.get(0),
+ true /* showStartItem */);
SliceItem mainTitle = header.getTitleItem();
CharSequence title = mainTitle != null ? mainTitle.getText() : null;
mTitle.setText(title);
@@ -149,7 +150,7 @@
final int startIndex = mHasHeader ? 1 : 0; // First item is header; skip it
for (int i = startIndex; i < subItemsCount; i++) {
SliceItem item = subItems.get(i);
- RowContent rc = new RowContent(item, true /* showStartItem */);
+ RowContent rc = new RowContent(getContext(), item, true /* showStartItem */);
final Uri itemTag = item.getSlice().getUri();
// Try to reuse the view if already exists in the layout
KeyguardSliceButton button = mRow.findViewWithTag(itemTag);
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java
index 26618bf..d81b32b 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java
@@ -40,10 +40,10 @@
import java.util.Locale;
import java.util.concurrent.TimeUnit;
-import androidx.app.slice.Slice;
-import androidx.app.slice.SliceProvider;
-import androidx.app.slice.builders.ListBuilder;
-import androidx.app.slice.builders.ListBuilder.RowBuilder;
+import androidx.slice.Slice;
+import androidx.slice.SliceProvider;
+import androidx.slice.builders.ListBuilder;
+import androidx.slice.builders.ListBuilder.RowBuilder;
/**
* Simple Slice provider that shows the current date.
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
index a48dcc6..9792e41 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
@@ -33,7 +33,9 @@
import android.text.format.DateUtils;
import android.util.AttributeSet;
import android.util.Log;
+import android.util.Pair;
import android.view.View;
+import android.view.WindowInsets;
import android.widget.RelativeLayout;
import android.widget.TextView;
@@ -47,6 +49,7 @@
import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.qs.QSDetail.Callback;
import com.android.systemui.statusbar.CommandQueue;
+import com.android.systemui.statusbar.phone.PhoneStatusBarView;
import com.android.systemui.statusbar.phone.StatusBarIconController;
import com.android.systemui.statusbar.phone.StatusBarIconController.TintedIconManager;
import com.android.systemui.statusbar.policy.DarkIconDispatcher;
@@ -260,6 +263,19 @@
public void onAttachedToWindow() {
SysUiServiceProvider.getComponent(getContext(), CommandQueue.class).addCallbacks(this);
Dependency.get(StatusBarIconController.class).addIconGroup(mIconManager);
+ requestApplyInsets();
+ }
+
+ @Override
+ public WindowInsets onApplyWindowInsets(WindowInsets insets) {
+ Pair<Integer, Integer> padding = PhoneStatusBarView.cornerCutoutMargins(
+ insets.getDisplayCutout(), getDisplay());
+ if (padding == null) {
+ setPadding(0, 0, 0, 0);
+ } else {
+ setPadding(padding.first, 0, padding.second, 0);
+ }
+ return super.onApplyWindowInsets(insets);
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/VibratorHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/VibratorHelper.java
index 5c21fd1..6560f8f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/VibratorHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/VibratorHelper.java
@@ -18,6 +18,7 @@
import android.content.Context;
import android.database.ContentObserver;
+import android.media.AudioAttributes;
import android.os.AsyncTask;
import android.os.Handler;
import android.os.UserHandle;
@@ -30,6 +31,11 @@
private final Vibrator mVibrator;
private final Context mContext;
private boolean mHapticFeedbackEnabled;
+ private static final AudioAttributes STATUS_BAR_VIBRATION_ATTRIBUTES =
+ new AudioAttributes.Builder()
+ .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
+ .setUsage(AudioAttributes.USAGE_ASSISTANCE_SONIFICATION)
+ .build();
final private ContentObserver mVibrationObserver = new ContentObserver(Handler.getMain()) {
@Override
@@ -51,7 +57,8 @@
public void vibrate(final int effectId) {
if (mHapticFeedbackEnabled) {
AsyncTask.execute(() ->
- mVibrator.vibrate(VibrationEffect.get(effectId, false /* fallback */)));
+ mVibrator.vibrate(VibrationEffect.get(effectId, false /* fallback */),
+ STATUS_BAR_VIBRATION_ATTRIBUTES));
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
index bb929dd..994c0ab 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
@@ -26,6 +26,7 @@
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
+import android.util.Pair;
import android.util.TypedValue;
import android.view.DisplayCutout;
import android.view.Gravity;
@@ -43,7 +44,6 @@
import com.android.systemui.Dependency;
import com.android.systemui.Interpolators;
import com.android.systemui.R;
-import com.android.systemui.ScreenDecorations;
import com.android.systemui.qs.QSPanel;
import com.android.systemui.statusbar.phone.StatusBarIconController.TintedIconManager;
import com.android.systemui.statusbar.policy.BatteryController;
@@ -213,6 +213,7 @@
@Override
public WindowInsets onApplyWindowInsets(WindowInsets insets) {
+ mLayoutState = LAYOUT_NONE;
if (updateLayoutConsideringCutout()) {
requestLayout();
}
@@ -221,13 +222,24 @@
private boolean updateLayoutConsideringCutout() {
DisplayCutout dc = getRootWindowInsets().getDisplayCutout();
- if (dc == null) {
+ Pair<Integer, Integer> cornerCutoutMargins =
+ PhoneStatusBarView.cornerCutoutMargins(dc, getDisplay());
+ updateCornerCutoutPadding(cornerCutoutMargins);
+ if (dc == null || cornerCutoutMargins != null) {
return updateLayoutParamsNoCutout();
} else {
return updateLayoutParamsForCutout(dc);
}
}
+ private void updateCornerCutoutPadding(Pair<Integer, Integer> cornerCutoutMargins) {
+ if (cornerCutoutMargins != null) {
+ setPadding(cornerCutoutMargins.first, 0, cornerCutoutMargins.second, 0);
+ } else {
+ setPadding(0, 0, 0, 0);
+ }
+ }
+
private boolean updateLayoutParamsNoCutout() {
if (mLayoutState == LAYOUT_NO_CUTOUT) {
return false;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
index 5076404..0fd0a05 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
@@ -23,9 +23,12 @@
import android.annotation.Nullable;
import android.content.Context;
import android.content.res.Configuration;
+import android.graphics.Point;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.util.EventLog;
+import android.util.Pair;
+import android.view.Display;
import android.view.DisplayCutout;
import android.view.Gravity;
import android.view.MotionEvent;
@@ -33,9 +36,9 @@
import android.view.ViewGroup;
import android.view.WindowInsets;
import android.view.accessibility.AccessibilityEvent;
-
import android.widget.FrameLayout;
import android.widget.LinearLayout;
+
import com.android.systemui.Dependency;
import com.android.systemui.EventLogTags;
import com.android.systemui.R;
@@ -284,18 +287,20 @@
}
private void updateLayoutForCutout() {
- updateCutoutLocation();
- updateSafeInsets();
+ Pair<Integer, Integer> cornerCutoutMargins = cornerCutoutMargins(mDisplayCutout,
+ getDisplay());
+ updateCutoutLocation(cornerCutoutMargins);
+ updateSafeInsets(cornerCutoutMargins);
}
- private void updateCutoutLocation() {
+ private void updateCutoutLocation(Pair<Integer, Integer> cornerCutoutMargins) {
// Not all layouts have a cutout (e.g., Car)
if (mCutoutSpace == null) {
return;
}
if (mDisplayCutout == null || mDisplayCutout.isEmpty()
- || mLastOrientation != ORIENTATION_PORTRAIT) {
+ || mLastOrientation != ORIENTATION_PORTRAIT || cornerCutoutMargins != null) {
mCutoutSpace.setVisibility(View.GONE);
return;
}
@@ -310,7 +315,7 @@
lp.height = bounds.height();
}
- private void updateSafeInsets() {
+ private void updateSafeInsets(Pair<Integer, Integer> cornerCutoutMargins) {
// Depending on our rotation, we may have to work around a cutout in the middle of the view,
// or letterboxing from the right or left sides.
@@ -323,5 +328,30 @@
lp.leftMargin = mDisplayCutout.getSafeInsetLeft();
lp.rightMargin = mDisplayCutout.getSafeInsetRight();
+
+ if (cornerCutoutMargins != null) {
+ lp.leftMargin = Math.max(lp.leftMargin, cornerCutoutMargins.first);
+ lp.rightMargin = Math.max(lp.rightMargin, cornerCutoutMargins.second);
+ }
+ }
+
+ public static Pair<Integer, Integer> cornerCutoutMargins(DisplayCutout cutout,
+ Display display) {
+ if (cutout == null) {
+ return null;
+ }
+ Point size = new Point();
+ display.getRealSize(size);
+
+ Rect bounds = new Rect();
+ boundsFromDirection(cutout, Gravity.TOP, bounds);
+
+ if (bounds.left <= 0) {
+ return new Pair<>(bounds.right, 0);
+ }
+ if (bounds.right >= size.x) {
+ return new Pair<>(0, size.x - bounds.left);
+ }
+ return null;
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java
index 89e7dd1..ee6748e 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java
@@ -26,8 +26,7 @@
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.database.ContentObserver;
-import android.media.AudioDeviceCallback;
-import android.media.AudioDeviceInfo;
+import android.media.AudioAttributes;
import android.media.AudioManager;
import android.media.AudioSystem;
import android.media.IVolumeController;
@@ -40,6 +39,7 @@
import android.os.Looper;
import android.os.Message;
import android.os.RemoteException;
+import android.os.VibrationEffect;
import android.os.Vibrator;
import android.provider.Settings;
import android.service.notification.Condition;
@@ -59,9 +59,7 @@
import java.io.FileDescriptor;
import java.io.PrintWriter;
-import java.util.ArrayList;
import java.util.HashMap;
-import java.util.List;
import java.util.Map;
import java.util.Objects;
@@ -77,6 +75,11 @@
private static final int DYNAMIC_STREAM_START_INDEX = 100;
private static final int VIBRATE_HINT_DURATION = 50;
+ private static final AudioAttributes SONFICIATION_VIBRATION_ATTRIBUTES =
+ new AudioAttributes.Builder()
+ .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
+ .setUsage(AudioAttributes.USAGE_ASSISTANCE_SONIFICATION)
+ .build();
static final ArrayMap<Integer, Integer> STREAMS = new ArrayMap<>();
static {
@@ -299,7 +302,8 @@
public void vibrate() {
if (mHasVibrator) {
- mVibrator.vibrate(VIBRATE_HINT_DURATION);
+ mVibrator.vibrate(VibrationEffect.createOneShot(VIBRATE_HINT_DURATION,
+ VibrationEffect.DEFAULT_AMPLITUDE), SONFICIATION_VIBRATION_ATTRIBUTES);
}
}
@@ -308,7 +312,7 @@
}
private void onNotifyVisibleW(boolean visible) {
- if (mDestroyed) return;
+ if (mDestroyed) return;
mAudio.notifyVolumeControllerVisible(mVolumeController, visible);
if (!visible) {
if (updateActiveStreamW(-1)) {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardSliceProviderTest.java b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardSliceProviderTest.java
index b6116e0..5812da2 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardSliceProviderTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardSliceProviderTest.java
@@ -21,7 +21,7 @@
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.verify;
-import androidx.app.slice.Slice;
+import androidx.slice.Slice;
import android.app.AlarmManager;
import android.content.ContentResolver;
@@ -45,10 +45,10 @@
import java.util.Arrays;
import java.util.concurrent.TimeUnit;
-import androidx.app.slice.SliceItem;
-import androidx.app.slice.SliceProvider;
-import androidx.app.slice.SliceSpecs;
-import androidx.app.slice.core.SliceQuery;
+import androidx.slice.SliceItem;
+import androidx.slice.SliceProvider;
+import androidx.slice.SliceSpecs;
+import androidx.slice.core.SliceQuery;
@SmallTest
@RunWith(AndroidTestingRunner.class)
diff --git a/packages/overlays/DisplayCutoutEmulationCornerOverlay/Android.mk b/packages/overlays/DisplayCutoutEmulationCornerOverlay/Android.mk
new file mode 100644
index 0000000..74c43b4
--- /dev/null
+++ b/packages/overlays/DisplayCutoutEmulationCornerOverlay/Android.mk
@@ -0,0 +1,14 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := DisplayCutoutEmulationCorner
+LOCAL_CERTIFICATE := platform
+
+LOCAL_SRC_FILES := $(call all-subdir-java-files)
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := DisplayCutoutEmulationCornerOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/DisplayCutoutEmulationCornerOverlay/AndroidManifest.xml b/packages/overlays/DisplayCutoutEmulationCornerOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..5f7f7c9
--- /dev/null
+++ b/packages/overlays/DisplayCutoutEmulationCornerOverlay/AndroidManifest.xml
@@ -0,0 +1,26 @@
+<!--
+ ~ Copyright (C) 2018 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.internal.display.cutout.emulation.corner"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <overlay android:targetPackage="android"
+ android:category="com.android.internal.display_cutout_emulation"
+ android:priority="1"/>
+
+ <application android:label="@string/display_cutout_emulation_overlay" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/DisplayCutoutEmulationCornerOverlay/res/values/config.xml b/packages/overlays/DisplayCutoutEmulationCornerOverlay/res/values/config.xml
new file mode 100644
index 0000000..80d8066
--- /dev/null
+++ b/packages/overlays/DisplayCutoutEmulationCornerOverlay/res/values/config.xml
@@ -0,0 +1,55 @@
+<!--
+ ~ Copyright (C) 2018 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.
+ -->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- The bounding path of the cutout region of the main built-in display.
+ Must either be empty if there is no cutout region, or a string that is parsable by
+ {@link android.util.PathParser}.
+
+ The path is assumed to be specified in display coordinates with pixel units and in
+ the display's native orientation, with the origin of the coordinate system at the
+ center top of the display.
+
+ To facilitate writing device-independent emulation overlays, the marker `@dp` can be
+ appended after the path string to interpret coordinates in dp instead of px units.
+ Note that a physical cutout should be configured in pixels for the best results.
+ -->
+ <string translatable="false" name="config_mainBuiltInDisplayCutout">
+ M 0,0
+ L -48, 0
+ C -48,48 -48,48 0,48
+ Z
+ @dp
+ @right
+ </string>
+
+ <!-- Whether the display cutout region of the main built-in display should be forced to
+ black in software (to avoid aliasing or emulate a cutout that is not physically existent).
+ -->
+ <bool name="config_fillMainBuiltInDisplayCutout">true</bool>
+
+ <!-- Height of the status bar -->
+ <dimen name="status_bar_height_portrait">48dp</dimen>
+ <dimen name="status_bar_height_landscape">28dp</dimen>
+ <!-- Height of area above QQS where battery/time go (equal to status bar height if > 48dp) -->
+ <dimen name="quick_qs_offset_height">48dp</dimen>
+ <!-- Total height of QQS (quick_qs_offset_height + 128) -->
+ <dimen name="quick_qs_total_height">176dp</dimen>
+
+</resources>
+
+
diff --git a/packages/overlays/DisplayCutoutEmulationCornerOverlay/res/values/strings.xml b/packages/overlays/DisplayCutoutEmulationCornerOverlay/res/values/strings.xml
new file mode 100644
index 0000000..754ba72
--- /dev/null
+++ b/packages/overlays/DisplayCutoutEmulationCornerOverlay/res/values/strings.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2018 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.
+ -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <string name="display_cutout_emulation_overlay">Corner display cutout</string>
+
+</resources>
+
diff --git a/services/backup/java/com/android/server/backup/BackupAgentTimeoutParameters.java b/services/backup/java/com/android/server/backup/BackupAgentTimeoutParameters.java
new file mode 100644
index 0000000..4de2c9b
--- /dev/null
+++ b/services/backup/java/com/android/server/backup/BackupAgentTimeoutParameters.java
@@ -0,0 +1,150 @@
+/*
+ * Copyright (C) 2018 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 com.android.server.backup;
+
+import android.content.ContentResolver;
+import android.os.Handler;
+import android.provider.Settings;
+import android.util.KeyValueListParser;
+import android.util.KeyValueSettingObserver;
+import com.android.internal.annotations.GuardedBy;
+import com.android.internal.annotations.VisibleForTesting;
+
+/**
+ * Configure backup and restore agent timeouts.
+ *
+ * <p>These timeout parameters are stored in Settings.Global to be configurable flags with P/H. They
+ * are represented as a comma-delimited key value list.
+ */
+public class BackupAgentTimeoutParameters extends KeyValueSettingObserver {
+ @VisibleForTesting
+ public static final String SETTING = Settings.Global.BACKUP_AGENT_TIMEOUT_PARAMETERS;
+
+ @VisibleForTesting
+ public static final String SETTING_KV_BACKUP_AGENT_TIMEOUT_MILLIS =
+ "kv_backup_agent_timeout_millis";
+
+ @VisibleForTesting
+ public static final String SETTING_FULL_BACKUP_AGENT_TIMEOUT_MILLIS =
+ "full_backup_agent_timeout_millis";
+
+ @VisibleForTesting
+ public static final String SETTING_SHARED_BACKUP_AGENT_TIMEOUT_MILLIS =
+ "shared_backup_agent_timeout_millis";
+
+ @VisibleForTesting
+ public static final String SETTING_RESTORE_AGENT_TIMEOUT_MILLIS =
+ "restore_agent_timeout_millis";
+
+ @VisibleForTesting
+ public static final String SETTING_RESTORE_AGENT_FINISHED_TIMEOUT_MILLIS =
+ "restore_agent_finished_timeout_millis";
+
+ // Default values
+ @VisibleForTesting public static final long DEFAULT_KV_BACKUP_AGENT_TIMEOUT_MILLIS = 30 * 1000;
+
+ @VisibleForTesting
+ public static final long DEFAULT_FULL_BACKUP_AGENT_TIMEOUT_MILLIS = 5 * 60 * 1000;
+
+ @VisibleForTesting
+ public static final long DEFAULT_SHARED_BACKUP_AGENT_TIMEOUT_MILLIS = 30 * 60 * 1000;
+
+ @VisibleForTesting public static final long DEFAULT_RESTORE_AGENT_TIMEOUT_MILLIS = 60 * 1000;
+
+ @VisibleForTesting
+ public static final long DEFAULT_RESTORE_AGENT_FINISHED_TIMEOUT_MILLIS = 30 * 1000;
+
+ @GuardedBy("mLock")
+ private long mKvBackupAgentTimeoutMillis;
+
+ @GuardedBy("mLock")
+ private long mFullBackupAgentTimeoutMillis;
+
+ @GuardedBy("mLock")
+ private long mSharedBackupAgentTimeoutMillis;
+
+ @GuardedBy("mLock")
+ private long mRestoreAgentTimeoutMillis;
+
+ @GuardedBy("mLock")
+ private long mRestoreAgentFinishedTimeoutMillis;
+
+ private final Object mLock = new Object();
+
+ public BackupAgentTimeoutParameters(Handler handler, ContentResolver resolver) {
+ super(handler, resolver, Settings.Global.getUriFor(SETTING));
+ }
+
+ public String getSettingValue(ContentResolver resolver) {
+ return Settings.Global.getString(resolver, SETTING);
+ }
+
+ public void update(KeyValueListParser parser) {
+ synchronized (mLock) {
+ mKvBackupAgentTimeoutMillis =
+ parser.getLong(
+ SETTING_KV_BACKUP_AGENT_TIMEOUT_MILLIS,
+ DEFAULT_KV_BACKUP_AGENT_TIMEOUT_MILLIS);
+ mFullBackupAgentTimeoutMillis =
+ parser.getLong(
+ SETTING_FULL_BACKUP_AGENT_TIMEOUT_MILLIS,
+ DEFAULT_FULL_BACKUP_AGENT_TIMEOUT_MILLIS);
+ mSharedBackupAgentTimeoutMillis =
+ parser.getLong(
+ SETTING_SHARED_BACKUP_AGENT_TIMEOUT_MILLIS,
+ DEFAULT_SHARED_BACKUP_AGENT_TIMEOUT_MILLIS);
+ mRestoreAgentTimeoutMillis =
+ parser.getLong(
+ SETTING_RESTORE_AGENT_TIMEOUT_MILLIS,
+ DEFAULT_RESTORE_AGENT_TIMEOUT_MILLIS);
+ mRestoreAgentFinishedTimeoutMillis =
+ parser.getLong(
+ SETTING_RESTORE_AGENT_FINISHED_TIMEOUT_MILLIS,
+ DEFAULT_RESTORE_AGENT_FINISHED_TIMEOUT_MILLIS);
+ }
+ }
+
+ public long getKvBackupAgentTimeoutMillis() {
+ synchronized (mLock) {
+ return mKvBackupAgentTimeoutMillis;
+ }
+ }
+
+ public long getFullBackupAgentTimeoutMillis() {
+ synchronized (mLock) {
+ return mFullBackupAgentTimeoutMillis;
+ }
+ }
+
+ public long getSharedBackupAgentTimeoutMillis() {
+ synchronized (mLock) {
+ return mSharedBackupAgentTimeoutMillis;
+ }
+ }
+
+ public long getRestoreAgentTimeoutMillis() {
+ synchronized (mLock) {
+ return mRestoreAgentTimeoutMillis;
+ }
+ }
+
+ public long getRestoreAgentFinishedTimeoutMillis() {
+ synchronized (mLock) {
+ return mRestoreAgentFinishedTimeoutMillis;
+ }
+ }
+}
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 31ae472..04d46aa 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -25377,6 +25377,14 @@
} catch (IOException e) {
}
mProfilerInfo.profileFd = null;
+
+ if (proc.pid == MY_PID) {
+ // When profiling the system server itself, avoid closing the file
+ // descriptor, as profilerControl will not create a copy.
+ // Note: it is also not correct to just set profileFd to null, as the
+ // whole ProfilerInfo instance is passed down!
+ profilerInfo = null;
+ }
} else {
stopProfilerLocked(proc, profileType);
if (profilerInfo != null && profilerInfo.profileFd != null) {
@@ -25924,16 +25932,19 @@
Bundle bOptions) {
Preconditions.checkNotNull(intents, "intents");
final String[] resolvedTypes = new String[intents.length];
- for (int i = 0; i < intents.length; i++) {
- resolvedTypes[i] = intents[i].resolveTypeIfNeeded(mContext.getContentResolver());
- }
// UID of the package on user userId.
// "= 0" is needed because otherwise catch(RemoteException) would make it look like
// packageUid may not be initialized.
int packageUid = 0;
final long ident = Binder.clearCallingIdentity();
+
try {
+ for (int i = 0; i < intents.length; i++) {
+ resolvedTypes[i] =
+ intents[i].resolveTypeIfNeeded(mContext.getContentResolver());
+ }
+
packageUid = AppGlobals.getPackageManager().getPackageUid(
packageName, PackageManager.MATCH_DEBUG_TRIAGED_MISSING, userId);
} catch (RemoteException e) {
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index 2c4eac0..a24f84a 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -195,8 +195,12 @@
// How long we wait for the activity to tell us it has stopped before
// giving up. This is a good amount of time because we really need this
- // from the application in order to get its saved state.
- private static final int STOP_TIMEOUT = 10 * 1000;
+ // from the application in order to get its saved state. Once the stop
+ // is complete we may start destroying client resources triggering
+ // crashes if the UI thread was hung. We put this timeout one second behind
+ // the ANR timeout so these situations will generate ANR instead of
+ // Surface lost or other errors.
+ private static final int STOP_TIMEOUT = 11 * 1000;
// How long we wait until giving up on an activity telling us it has
// finished destroying itself.
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index b9fb2e0..b911c7b 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -256,6 +256,9 @@
static final int LONG_DELAY = PhoneWindowManager.TOAST_WINDOW_TIMEOUT;
static final int SHORT_DELAY = 2000; // 2 seconds
+ // 1 second past the ANR timeout.
+ static final int FINISH_TOKEN_TIMEOUT = 11 * 1000;
+
static final long[] DEFAULT_VIBRATE_PATTERN = {0, 250, 250, 250};
static final long SNOOZE_UNTIL_UNSPECIFIED = -1;
@@ -4804,7 +4807,7 @@
{
mHandler.removeCallbacksAndMessages(token);
Message m = Message.obtain(mHandler, MESSAGE_FINISH_TOKEN_TIMEOUT, token);
- mHandler.sendMessageDelayed(m, 5);
+ mHandler.sendMessageDelayed(m, FINISH_TOKEN_TIMEOUT);
}
private void handleKillTokenTimeout(IBinder token)
diff --git a/services/core/java/com/android/server/power/BatterySaverPolicy.java b/services/core/java/com/android/server/power/BatterySaverPolicy.java
index 16336b3..483f974 100644
--- a/services/core/java/com/android/server/power/BatterySaverPolicy.java
+++ b/services/core/java/com/android/server/power/BatterySaverPolicy.java
@@ -69,6 +69,7 @@
private static final String KEY_FORCE_BACKGROUND_CHECK = "force_background_check";
private static final String KEY_OPTIONAL_SENSORS_DISABLED = "optional_sensors_disabled";
private static final String KEY_AOD_DISABLED = "aod_disabled";
+ private static final String KEY_SEND_TRON_LOG = "send_tron_log";
private static final String KEY_CPU_FREQ_INTERACTIVE = "cpufreq-i";
private static final String KEY_CPU_FREQ_NONINTERACTIVE = "cpufreq-n";
@@ -212,6 +213,12 @@
@GuardedBy("mLock")
private boolean mAodDisabled;
+ /**
+ * Whether BatterySavingStats should send tron events.
+ */
+ @GuardedBy("mLock")
+ private boolean mSendTronLog;
+
@GuardedBy("mLock")
private Context mContext;
@@ -347,6 +354,7 @@
mForceBackgroundCheck = parser.getBoolean(KEY_FORCE_BACKGROUND_CHECK, true);
mOptionalSensorsDisabled = parser.getBoolean(KEY_OPTIONAL_SENSORS_DISABLED, true);
mAodDisabled = parser.getBoolean(KEY_AOD_DISABLED, true);
+ mSendTronLog = parser.getBoolean(KEY_SEND_TRON_LOG, true);
// Get default value from Settings.Secure
final int defaultGpsMode = Settings.Secure.getInt(mContentResolver, SECURE_KEY_GPS_MODE,
@@ -384,10 +392,13 @@
if (mLaunchBoostDisabled) sb.append("l");
if (mOptionalSensorsDisabled) sb.append("S");
if (mAodDisabled) sb.append("o");
+ if (mSendTronLog) sb.append("t");
sb.append(mGpsMode);
mEventLogKeys = sb.toString();
+
+ BatterySavingStats.getInstance().setSendTronLog(mSendTronLog);
}
/**
@@ -483,7 +494,10 @@
public void dump(PrintWriter pw) {
synchronized (mLock) {
pw.println();
- pw.println("Battery saver policy");
+ BatterySavingStats.getInstance().dump(pw, "");
+
+ pw.println();
+ pw.println("Battery saver policy (*NOTE* they only apply when battery saver is ON):");
pw.println(" Settings: " + Settings.Global.BATTERY_SAVER_CONSTANTS);
pw.println(" value: " + mSettings);
pw.println(" Settings: " + mDeviceSpecificSettingsSource);
@@ -504,6 +518,7 @@
pw.println(" " + KEY_FORCE_BACKGROUND_CHECK + "=" + mForceBackgroundCheck);
pw.println(" " + KEY_OPTIONAL_SENSORS_DISABLED + "=" + mOptionalSensorsDisabled);
pw.println(" " + KEY_AOD_DISABLED + "=" + mAodDisabled);
+ pw.println(" " + KEY_SEND_TRON_LOG + "=" + mSendTronLog);
pw.println();
pw.print(" Interactive File values:\n");
@@ -512,9 +527,6 @@
pw.print(" Noninteractive File values:\n");
dumpMap(pw, " ", mFilesForNoninteractive);
- pw.println();
- pw.println();
- BatterySavingStats.getInstance().dump(pw, " ");
}
}
diff --git a/services/core/java/com/android/server/power/batterysaver/BatterySavingStats.java b/services/core/java/com/android/server/power/batterysaver/BatterySavingStats.java
index 5d76329..4fd8686 100644
--- a/services/core/java/com/android/server/power/batterysaver/BatterySavingStats.java
+++ b/services/core/java/com/android/server/power/batterysaver/BatterySavingStats.java
@@ -20,6 +20,7 @@
import android.os.SystemClock;
import android.util.ArrayMap;
import android.util.Slog;
+import android.util.TimeUtils;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
@@ -31,6 +32,8 @@
import com.android.server.power.BatterySaverPolicy;
import java.io.PrintWriter;
+import java.text.SimpleDateFormat;
+import java.util.Date;
/**
* This class keeps track of battery drain rate.
@@ -46,9 +49,6 @@
private static final boolean DEBUG = BatterySaverPolicy.DEBUG;
- @VisibleForTesting
- static final boolean SEND_TRON_EVENTS = true;
-
private final Object mLock = new Object();
/** Whether battery saver is on or off. */
@@ -159,8 +159,18 @@
@GuardedBy("mLock")
final ArrayMap<Integer, Stat> mStats = new ArrayMap<>();
+ @GuardedBy("mLock")
+ private int mBatterySaverEnabledCount = 0;
+
+ @GuardedBy("mLock")
+ private long mLastBatterySaverEnabledTime = 0;
+
private final MetricsLoggerHelper mMetricsLoggerHelper = new MetricsLoggerHelper();
+ @VisibleForTesting
+ @GuardedBy("mLock")
+ private boolean mSendTronLog;
+
/**
* Don't call it directly -- use {@link #getInstance()}. Not private for testing.
* @param metricsLogger
@@ -178,6 +188,12 @@
return sInstance;
}
+ public void setSendTronLog(boolean send) {
+ synchronized (mLock) {
+ mSendTronLog = send;
+ }
+ }
+
private BatteryManagerInternal getBatteryManagerInternal() {
if (mBatteryManagerInternal == null) {
mBatteryManagerInternal = LocalServices.getService(BatteryManagerInternal.class);
@@ -291,9 +307,22 @@
final int batteryLevel = injectBatteryLevel();
final int batteryPercent = injectBatteryPercent();
+ final boolean oldBatterySaverEnabled =
+ BatterySaverState.fromIndex(mCurrentState) != BatterySaverState.OFF;
+ final boolean newBatterySaverEnabled =
+ BatterySaverState.fromIndex(newState) != BatterySaverState.OFF;
+ if (oldBatterySaverEnabled != newBatterySaverEnabled) {
+ if (newBatterySaverEnabled) {
+ mBatterySaverEnabledCount++;
+ mLastBatterySaverEnabledTime = injectCurrentTime();
+ } else {
+ mLastBatterySaverEnabledTime = 0;
+ }
+ }
+
endLastStateLocked(now, batteryLevel, batteryPercent);
startNewStateLocked(newState, now, batteryLevel, batteryPercent);
- mMetricsLoggerHelper.transitionState(newState, now, batteryLevel, batteryPercent);
+ mMetricsLoggerHelper.transitionStateLocked(newState, now, batteryLevel, batteryPercent);
}
@GuardedBy("mLock")
@@ -358,12 +387,39 @@
public void dump(PrintWriter pw, String indent) {
synchronized (mLock) {
pw.print(indent);
- pw.println("Battery Saving Stats:");
+ pw.println("Battery saving stats:");
indent = indent + " ";
pw.print(indent);
- pw.println("Battery Saver: w/Off w/On");
+ pw.print("Battery Saver state: ");
+ if (mLastBatterySaverEnabledTime == 0) {
+ pw.print("OFF");
+ } else {
+ pw.print("ON since ");
+
+ final long now = System.currentTimeMillis();
+ final long nowElapsed = injectCurrentTime();
+
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
+ pw.print(sdf.format(new Date(now - nowElapsed + mLastBatterySaverEnabledTime)));
+
+ pw.print(" ");
+ TimeUtils.formatDuration(mLastBatterySaverEnabledTime, nowElapsed, pw);
+ }
+ pw.println();
+
+ pw.print(indent);
+ pw.print("Times enabled: ");
+ pw.println(mBatterySaverEnabledCount);
+
+ pw.println();
+
+ pw.print(indent);
+ pw.println("Drain stats:");
+
+ pw.print(indent);
+ pw.println(" Battery saver OFF ON");
dumpLineLocked(pw, indent, InteractiveState.NON_INTERACTIVE, "NonIntr",
DozeState.NOT_DOZING, "NonDoze");
dumpLineLocked(pw, indent, InteractiveState.INTERACTIVE, " Intr",
@@ -378,8 +434,6 @@
DozeState.LIGHT, "Light ");
dumpLineLocked(pw, indent, InteractiveState.INTERACTIVE, " Intr",
DozeState.LIGHT, " ");
-
- pw.println();
}
}
@@ -395,7 +449,7 @@
final Stat offStat = getStat(BatterySaverState.OFF, interactiveState, dozeState);
final Stat onStat = getStat(BatterySaverState.ON, interactiveState, dozeState);
- pw.println(String.format("%6dm %6dmA (%3d%%) %8.1fmA/h %6dm %6dmA (%3d%%) %8.1fmA/h",
+ pw.println(String.format("%6dm %6dmAh(%3d%%) %8.1fmAh/h %6dm %6dmAh(%3d%%) %8.1fmAh/h",
offStat.totalMinutes(),
offStat.totalBatteryDrain / 1000,
offStat.totalBatteryDrainPercent,
@@ -417,7 +471,8 @@
(BatterySaverState.MASK << BatterySaverState.SHIFT) |
(InteractiveState.MASK << InteractiveState.SHIFT);
- public void transitionState(int newState, long now, int batteryLevel, int batteryPercent) {
+ public void transitionStateLocked(
+ int newState, long now, int batteryLevel, int batteryPercent) {
final boolean stateChanging =
((mLastState >= 0) ^ (newState >= 0)) ||
(((mLastState ^ newState) & STATE_CHANGE_DETECT_MASK) != 0);
@@ -425,7 +480,7 @@
if (mLastState >= 0) {
final long deltaTime = now - mStartTime;
- report(mLastState, deltaTime, mStartBatteryLevel, mStartPercent,
+ reportLocked(mLastState, deltaTime, mStartBatteryLevel, mStartPercent,
batteryLevel, batteryPercent);
}
mStartTime = now;
@@ -435,10 +490,10 @@
mLastState = newState;
}
- void report(int state, long deltaTimeMs,
+ void reportLocked(int state, long deltaTimeMs,
int startBatteryLevelUa, int startBatteryLevelPercent,
int endBatteryLevelUa, int endBatteryLevelPercent) {
- if (!SEND_TRON_EVENTS) {
+ if (!mSendTronLog) {
return;
}
final boolean batterySaverOn =
diff --git a/services/core/java/com/android/server/wm/AppTransition.java b/services/core/java/com/android/server/wm/AppTransition.java
index f0ca2ef..93ca4dc 100644
--- a/services/core/java/com/android/server/wm/AppTransition.java
+++ b/services/core/java/com/android/server/wm/AppTransition.java
@@ -469,10 +469,16 @@
* boost the priorities to a more important value whenever an app transition is going to happen
* soon or an app transition is running.
*/
- private void updateBooster() {
- WindowManagerService.sThreadPriorityBooster.setAppTransitionRunning(
- mNextAppTransition != TRANSIT_UNSET || mAppTransitionState == APP_STATE_READY
- || mAppTransitionState == APP_STATE_RUNNING);
+ void updateBooster() {
+ WindowManagerService.sThreadPriorityBooster.setAppTransitionRunning(needsBoosting());
+ }
+
+ private boolean needsBoosting() {
+ final boolean recentsAnimRunning = mService.getRecentsAnimationController() != null;
+ return mNextAppTransition != TRANSIT_UNSET
+ || mAppTransitionState == APP_STATE_READY
+ || mAppTransitionState == APP_STATE_RUNNING
+ || recentsAnimRunning;
}
void registerListenerLocked(AppTransitionListener listener) {
diff --git a/services/core/java/com/android/server/wm/AppWindowToken.java b/services/core/java/com/android/server/wm/AppWindowToken.java
index fef615d..1f71b8f 100644
--- a/services/core/java/com/android/server/wm/AppWindowToken.java
+++ b/services/core/java/com/android/server/wm/AppWindowToken.java
@@ -450,6 +450,12 @@
if (isReallyAnimating()) {
delayed = true;
+ } else {
+
+ // We aren't animating anything, but exiting windows rely on the animation finished
+ // callback being called in case the AppWindowToken was pretending to be animating,
+ // which we might have done because we were in closing/opening apps list.
+ onAnimationFinished();
}
for (int i = mChildren.size() - 1; i >= 0 && !delayed; i--) {
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index c2cc191..ea84b22 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -2651,6 +2651,7 @@
synchronized (mWindowMap) {
mRecentsAnimationController = new RecentsAnimationController(this,
recentsAnimationRunner, callbacks, displayId);
+ mAppTransition.updateBooster();
mRecentsAnimationController.initialize(recentTaskIds);
}
}
@@ -2687,6 +2688,7 @@
if (mRecentsAnimationController != null) {
mRecentsAnimationController.cleanupAnimation();
mRecentsAnimationController = null;
+ mAppTransition.updateBooster();
}
}
}
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 8866fe5..91cd4bb 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -4297,6 +4297,15 @@
final boolean wasVisible = isVisibleLw();
result |= (!wasVisible || !isDrawnLw()) ? RELAYOUT_RES_FIRST_TIME : 0;
+
+ if (mWinAnimator.mChildrenDetached) {
+ // If there are detached children hanging around we need to force
+ // the client receiving a new Surface.
+ mWinAnimator.preserveSurfaceLocked();
+ result |= RELAYOUT_RES_SURFACE_CHANGED
+ | RELAYOUT_RES_FIRST_TIME;
+ }
+
if (mAnimatingExit) {
Slog.d(TAG, "relayoutVisibleWindow: " + this + " mAnimatingExit=true, mRemoveOnExit="
+ mRemoveOnExit + ", mDestroying=" + mDestroying);
diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java
index 46a9961..410eddf 100644
--- a/services/core/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java
@@ -221,6 +221,10 @@
private final SurfaceControl.Transaction mReparentTransaction = new SurfaceControl.Transaction();
+ // Used to track whether we have called detach children on the way to invisibility, in which
+ // case we need to give the client a new Surface if it lays back out to a visible state.
+ boolean mChildrenDetached = false;
+
WindowStateAnimator(final WindowState win) {
final WindowManagerService service = win.mService;
@@ -430,6 +434,7 @@
if (mSurfaceController != null) {
return mSurfaceController;
}
+ mChildrenDetached = false;
if ((mWin.mAttrs.privateFlags & PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY) != 0) {
windowType = SurfaceControl.WINDOW_TYPE_DONT_SCREENSHOT;
@@ -981,7 +986,7 @@
mForceScaleUntilResize = true;
} else {
if (!w.mSeamlesslyRotated) {
- mSurfaceController.setPositionInTransaction(0, 0, recoveringMemory);
+ mSurfaceController.setPositionInTransaction(mXOffset, mYOffset, recoveringMemory);
}
}
@@ -1478,6 +1483,7 @@
if (mSurfaceController != null) {
mSurfaceController.detachChildren();
}
+ mChildrenDetached = true;
}
int getLayer() {
diff --git a/services/core/java/com/android/server/wm/WindowSurfacePlacer.java b/services/core/java/com/android/server/wm/WindowSurfacePlacer.java
index fc5e33a..3256762 100644
--- a/services/core/java/com/android/server/wm/WindowSurfacePlacer.java
+++ b/services/core/java/com/android/server/wm/WindowSurfacePlacer.java
@@ -454,7 +454,7 @@
AppWindowToken wtoken = mService.mOpeningApps.valueAt(i);
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "Now opening app" + wtoken);
- if (!wtoken.setVisibility(animLp, true, transit, false, voiceInteraction)){
+ if (!wtoken.setVisibility(animLp, true, transit, false, voiceInteraction)) {
// This token isn't going to be animating. Add it to the list of tokens to
// be notified of app transition complete since the notification will not be
// sent be the app window animator.
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 165aaac..70abf80 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -685,11 +685,6 @@
* Starts some essential services that are not tangled up in the bootstrap process.
*/
private void startCoreServices() {
- // Records errors and logs, for example wtf()
- traceBeginAndSlog("StartDropBoxManager");
- mSystemServiceManager.startService(DropBoxManagerService.class);
- traceEnd();
-
traceBeginAndSlog("StartBatteryService");
// Tracks the battery level. Requires LightService.
mSystemServiceManager.startService(BatteryService.class);
@@ -816,6 +811,13 @@
SQLiteCompatibilityWalFlags.reset();
traceEnd();
+ // Records errors and logs, for example wtf()
+ // Currently this service indirectly depends on SettingsProvider so do this after
+ // InstallSystemProviders.
+ traceBeginAndSlog("StartDropBoxManager");
+ mSystemServiceManager.startService(DropBoxManagerService.class);
+ traceEnd();
+
traceBeginAndSlog("StartVibratorService");
vibrator = new VibratorService(context);
ServiceManager.addService("vibrator", vibrator);
diff --git a/services/robotests/src/com/android/server/backup/BackupAgentTimeoutParametersTest.java b/services/robotests/src/com/android/server/backup/BackupAgentTimeoutParametersTest.java
new file mode 100644
index 0000000..801451e
--- /dev/null
+++ b/services/robotests/src/com/android/server/backup/BackupAgentTimeoutParametersTest.java
@@ -0,0 +1,140 @@
+/*
+ * Copyright (C) 2018 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 com.android.server.backup;
+
+import static org.junit.Assert.assertEquals;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.os.Handler;
+import android.platform.test.annotations.Presubmit;
+import android.provider.Settings;
+import android.util.KeyValueSettingObserver;
+import com.android.server.testing.FrameworkRobolectricTestRunner;
+import com.android.server.testing.SystemLoaderClasses;
+import com.android.server.testing.SystemLoaderPackages;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.robolectric.RuntimeEnvironment;
+import org.robolectric.annotation.Config;
+
+/** Tests for {@link BackupAgentTimeoutParameters}. */
+@RunWith(FrameworkRobolectricTestRunner.class)
+@Config(manifest = Config.NONE, sdk = 26)
+@SystemLoaderPackages({"com.android.server.backup"})
+@SystemLoaderClasses({KeyValueSettingObserver.class})
+@Presubmit
+public class BackupAgentTimeoutParametersTest {
+ private ContentResolver mContentResolver;
+ private BackupAgentTimeoutParameters mParameters;
+
+ /** Initialize timeout parameters and start observing changes. */
+ @Before
+ public void setUp() {
+ Context context = RuntimeEnvironment.application.getApplicationContext();
+
+ mContentResolver = context.getContentResolver();
+ mParameters = new BackupAgentTimeoutParameters(new Handler(), mContentResolver);
+ mParameters.start();
+ }
+
+ /** Stop observing changes to the setting. */
+ @After
+ public void tearDown() {
+ mParameters.stop();
+ }
+
+ /** Tests that timeout parameters are initialized with default values on creation. */
+ @Test
+ public void testGetParameters_afterConstructorWithStart_returnsDefaultValues() {
+ long kvBackupAgentTimeoutMillis = mParameters.getKvBackupAgentTimeoutMillis();
+ long fullBackupAgentTimeoutMillis = mParameters.getFullBackupAgentTimeoutMillis();
+ long sharedBackupAgentTimeoutMillis = mParameters.getSharedBackupAgentTimeoutMillis();
+ long restoreAgentTimeoutMillis = mParameters.getRestoreAgentTimeoutMillis();
+ long restoreAgentFinishedTimeoutMillis = mParameters.getRestoreAgentFinishedTimeoutMillis();
+
+ assertEquals(
+ BackupAgentTimeoutParameters.DEFAULT_KV_BACKUP_AGENT_TIMEOUT_MILLIS,
+ kvBackupAgentTimeoutMillis);
+ assertEquals(
+ BackupAgentTimeoutParameters.DEFAULT_FULL_BACKUP_AGENT_TIMEOUT_MILLIS,
+ fullBackupAgentTimeoutMillis);
+ assertEquals(
+ BackupAgentTimeoutParameters.DEFAULT_SHARED_BACKUP_AGENT_TIMEOUT_MILLIS,
+ sharedBackupAgentTimeoutMillis);
+ assertEquals(
+ BackupAgentTimeoutParameters.DEFAULT_RESTORE_AGENT_TIMEOUT_MILLIS,
+ restoreAgentTimeoutMillis);
+ assertEquals(
+ BackupAgentTimeoutParameters.DEFAULT_RESTORE_AGENT_FINISHED_TIMEOUT_MILLIS,
+ restoreAgentFinishedTimeoutMillis);
+ }
+
+ /**
+ * Tests that timeout parameters are updated when we call start, even when a setting change
+ * occurs while we are not observing.
+ */
+ @Test
+ public void testGetParameters_withSettingChangeBeforeStart_updatesValues() {
+ mParameters.stop();
+ long testTimeout = BackupAgentTimeoutParameters.DEFAULT_KV_BACKUP_AGENT_TIMEOUT_MILLIS * 2;
+ final String setting =
+ BackupAgentTimeoutParameters.SETTING_KV_BACKUP_AGENT_TIMEOUT_MILLIS
+ + "="
+ + testTimeout;
+ putStringAndNotify(setting);
+ mParameters.start();
+
+ long kvBackupAgentTimeoutMillis = mParameters.getKvBackupAgentTimeoutMillis();
+
+ assertEquals(testTimeout, kvBackupAgentTimeoutMillis);
+ }
+
+ /**
+ * Tests that timeout parameters are updated when a setting change occurs while we are observing
+ * changes.
+ */
+ @Test
+ public void testGetParameters_withSettingChangeAfterStart_updatesValues() {
+ long testTimeout = BackupAgentTimeoutParameters.DEFAULT_KV_BACKUP_AGENT_TIMEOUT_MILLIS * 2;
+ final String setting =
+ BackupAgentTimeoutParameters.SETTING_KV_BACKUP_AGENT_TIMEOUT_MILLIS
+ + "="
+ + testTimeout;
+ putStringAndNotify(setting);
+
+ long kvBackupAgentTimeoutMillis = mParameters.getKvBackupAgentTimeoutMillis();
+
+ assertEquals(testTimeout, kvBackupAgentTimeoutMillis);
+ }
+
+ /**
+ * Robolectric does not notify observers of changes to settings so we have to trigger it here.
+ * Currently, the mock of {@link Settings.Secure#putString(ContentResolver, String, String)}
+ * only stores the value. TODO: Implement properly in ShadowSettings.
+ */
+ private void putStringAndNotify(String value) {
+ Settings.Global.putString(mContentResolver, BackupAgentTimeoutParameters.SETTING, value);
+
+ // We pass null as the observer since notifyChange iterates over all available observers and
+ // we don't have access to the local observer.
+ mContentResolver.notifyChange(
+ Settings.Global.getUriFor(BackupAgentTimeoutParameters.SETTING), /*observer*/ null);
+ }
+}
diff --git a/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySavingStatsTest.java b/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySavingStatsTest.java
index f7112d4..0f3ca03 100644
--- a/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySavingStatsTest.java
+++ b/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySavingStatsTest.java
@@ -15,8 +15,6 @@
*/
package com.android.server.power.batterysaver;
-import static com.android.server.power.batterysaver.BatterySavingStats.SEND_TRON_EVENTS;
-
import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
@@ -105,9 +103,23 @@
public MetricsLogger mMetricsLogger = mock(MetricsLogger.class);
+ private boolean sendTronEvents;
+
@Test
- public void testAll() {
+ public void testAll_withTron() {
+ sendTronEvents = true;
+ checkAll();
+ }
+
+ @Test
+ public void testAll_noTron() {
+ sendTronEvents = false;
+ checkAll();
+ }
+
+ private void checkAll() {
final BatterySavingStatsTestable target = new BatterySavingStatsTestable();
+ target.setSendTronLog(sendTronEvents);
target.assertDumpable();
@@ -229,7 +241,7 @@
private void assertLog(boolean batterySaver, boolean interactive, long deltaTimeMs,
int deltaBatteryLevelUa, int deltaBatteryLevelPercent) {
- if (SEND_TRON_EVENTS) {
+ if (sendTronEvents) {
ArgumentCaptor<LogMaker> ac = ArgumentCaptor.forClass(LogMaker.class);
verify(mMetricsLogger, times(1)).write(ac.capture());
@@ -251,9 +263,22 @@
}
}
+
@Test
- public void testMetricsLogger() {
+ public void testMetricsLogger_withTron() {
+ sendTronEvents = true;
+ checkMetricsLogger();
+ }
+
+ @Test
+ public void testMetricsLogger_noTron() {
+ sendTronEvents = false;
+ checkMetricsLogger();
+ }
+
+ private void checkMetricsLogger() {
final BatterySavingStatsTestable target = new BatterySavingStatsTestable();
+ target.setSendTronLog(sendTronEvents);
target.advanceClock(1);
target.drainBattery(1000);
diff --git a/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java b/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java
index 8d5214a..0c63cd2 100644
--- a/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java
@@ -20,6 +20,7 @@
import org.junit.runner.RunWith;
import android.platform.test.annotations.Presubmit;
+import android.support.test.filters.FlakyTest;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import android.view.Surface;
@@ -29,12 +30,14 @@
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSET;
+import static android.view.WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW;
import static android.view.WindowManager.LayoutParams.FIRST_SUB_WINDOW;
import static android.view.WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD;
import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING;
import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
+import static android.view.WindowManager.TRANSIT_UNSET;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
@@ -43,7 +46,7 @@
* Tests for the {@link AppWindowToken} class.
*
* Build/Install/Run:
- * bit FrameworksServicesTests:com.android.server.wm.AppWindowTokenTests
+ * atest FrameworksServicesTests:com.android.server.wm.AppWindowTokenTests
*/
@SmallTest
// TODO: b/68267650
@@ -231,4 +234,20 @@
mToken.finishRelaunching();
assertFalse(mToken.containsShowWhenLockedWindow() || mToken.containsDismissKeyguardWindow());
}
+
+ @Test
+ @FlakyTest(detail = "Promote once confirmed non-flaky")
+ public void testStuckExitingWindow() throws Exception {
+ final WindowState closingWindow = createWindow(null, FIRST_APPLICATION_WINDOW,
+ "closingWindow");
+ closingWindow.mAnimatingExit = true;
+ closingWindow.mRemoveOnExit = true;
+ closingWindow.mAppToken.setVisibility(null, false /* visible */, TRANSIT_UNSET,
+ true /* performLayout */, false /* isVoiceInteraction */);
+
+ // We pretended that we were running an exit animation, but that should have been cleared up
+ // by changing visibility of AppWindowToken
+ closingWindow.removeIfPossible();
+ assertTrue(closingWindow.mRemoved);
+ }
}
diff --git a/telephony/java/android/provider/Telephony.java b/telephony/java/android/provider/Telephony.java
index 4f78c4c..f1653ce 100644
--- a/telephony/java/android/provider/Telephony.java
+++ b/telephony/java/android/provider/Telephony.java
@@ -3165,8 +3165,8 @@
values.put(RIL_VOICE_RADIO_TECHNOLOGY, state.getRilVoiceRadioTechnology());
values.put(RIL_DATA_RADIO_TECHNOLOGY, state.getRilDataRadioTechnology());
values.put(CSS_INDICATOR, state.getCssIndicator());
- values.put(NETWORK_ID, state.getNetworkId());
- values.put(SYSTEM_ID, state.getSystemId());
+ values.put(NETWORK_ID, state.getCdmaNetworkId());
+ values.put(SYSTEM_ID, state.getCdmaSystemId());
values.put(CDMA_ROAMING_INDICATOR, state.getCdmaRoamingIndicator());
values.put(CDMA_DEFAULT_ROAMING_INDICATOR, state.getCdmaDefaultRoamingIndicator());
values.put(CDMA_ERI_ICON_INDEX, state.getCdmaEriIconIndex());
@@ -3296,13 +3296,13 @@
public static final String CSS_INDICATOR = "css_indicator";
/**
- * This is the same as {@link ServiceState#getNetworkId()}.
+ * This is the same as {@link ServiceState#getCdmaNetworkId()}.
* @hide
*/
public static final String NETWORK_ID = "network_id";
/**
- * This is the same as {@link ServiceState#getSystemId()}.
+ * This is the same as {@link ServiceState#getCdmaSystemId()}.
* @hide
*/
public static final String SYSTEM_ID = "system_id";
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java
index a9c1cf6..9c831b9 100644
--- a/telephony/java/android/telephony/ServiceState.java
+++ b/telephony/java/android/telephony/ServiceState.java
@@ -221,7 +221,7 @@
public static final int ROAMING_TYPE_INTERNATIONAL = 3;
/**
- * Unknown ID. Could be returned by {@link #getNetworkId()} or {@link #getSystemId()}
+ * Unknown ID. Could be returned by {@link #getCdmaNetworkId()} or {@link #getCdmaSystemId()}
*/
public static final int UNKNOWN_ID = -1;
@@ -1222,7 +1222,7 @@
/** @hide */
@TestApi
- public void setSystemAndNetworkId(int systemId, int networkId) {
+ public void setCdmaSystemAndNetworkId(int systemId, int networkId) {
this.mSystemId = systemId;
this.mNetworkId = networkId;
}
@@ -1388,7 +1388,7 @@
* within a wireless system. (Defined in 3GPP2 C.S0023 3.4.8)
* @return The CDMA NID or {@link #UNKNOWN_ID} if not available.
*/
- public int getNetworkId() {
+ public int getCdmaNetworkId() {
return this.mNetworkId;
}
@@ -1397,7 +1397,7 @@
* system. (Defined in 3GPP2 C.S0023 3.4.8)
* @return The CDMA SID or {@link #UNKNOWN_ID} if not available.
*/
- public int getSystemId() {
+ public int getCdmaSystemId() {
return this.mSystemId;
}
diff --git a/tests/AppLaunchWear/src/com/android/tests/applaunch/AppLaunch.java b/tests/AppLaunchWear/src/com/android/tests/applaunch/AppLaunch.java
index 38c298c..d36d84e 100644
--- a/tests/AppLaunchWear/src/com/android/tests/applaunch/AppLaunch.java
+++ b/tests/AppLaunchWear/src/com/android/tests/applaunch/AppLaunch.java
@@ -229,6 +229,9 @@
setLaunchOrder();
for (LaunchOrder launch : mLaunchOrderList) {
+ if (mNameToIntent.get(launch.getApp()) == null) {
+ continue;
+ }
dropCache();
String appPkgName = mNameToIntent.get(launch.getApp())
.getComponent().getPackageName();