summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/current.txt5
-rw-r--r--config/hiddenapi-light-greylist.txt323
-rw-r--r--core/java/android/app/WallpaperColors.java7
-rw-r--r--core/java/android/app/admin/DevicePolicyManager.java2
-rw-r--r--core/java/android/bluetooth/BluetoothAdapter.java9
-rw-r--r--core/java/android/content/pm/ApplicationInfo.java14
-rw-r--r--core/java/android/net/metrics/IpManagerEvent.java3
-rw-r--r--core/java/android/os/Process.java1
-rw-r--r--core/java/android/widget/MediaControlView2.java18
-rw-r--r--core/java/com/android/internal/os/BatterySipper.java32
-rw-r--r--core/java/com/android/internal/os/BatteryStatsHelper.java7
-rw-r--r--core/java/com/android/internal/os/MediaPowerCalculator.java61
-rw-r--r--core/java/com/android/internal/os/PowerProfile.java27
-rw-r--r--core/proto/android/bluetooth/enums.proto30
-rw-r--r--core/res/res/values/config.xml2
-rw-r--r--core/res/res/values/strings.xml2
-rw-r--r--core/res/res/xml/power_profile.xml4
-rw-r--r--core/res/res/xml/power_profile_test.xml7
-rw-r--r--core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java1
-rw-r--r--core/tests/coretests/src/com/android/internal/os/PowerCalculatorTest.java71
-rw-r--r--core/tests/coretests/src/com/android/internal/os/PowerProfileTest.java2
-rw-r--r--media/java/android/media/MediaPlayer2.java156
-rw-r--r--media/java/android/media/MediaSession2.java16
-rw-r--r--media/java/android/media/update/MediaSession2Provider.java5
-rwxr-xr-xmedia/java/android/mtp/MtpDatabase.java4
-rw-r--r--packages/SystemUI/res/layout/super_status_bar.xml6
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java16
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/RecentsOnboarding.java33
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/ScrimView.java17
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java82
-rw-r--r--services/autofill/java/com/android/server/autofill/Session.java41
-rw-r--r--services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java16
-rw-r--r--services/autofill/java/com/android/server/autofill/ui/FillUi.java17
-rw-r--r--services/core/java/com/android/server/am/ActivityDisplay.java4
-rw-r--r--services/core/java/com/android/server/location/ContextHubClientManager.java2
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java25
-rw-r--r--services/core/java/com/android/server/pm/SELinuxMMAC.java51
-rw-r--r--services/core/java/com/android/server/pm/SharedUserSetting.java31
-rw-r--r--services/net/java/android/net/ip/IpClient.java53
-rw-r--r--services/net/java/android/net/ip/IpManager.java15
-rw-r--r--tests/UsbTests/src/com/android/server/usb/UsbHandlerTest.java32
-rw-r--r--tests/net/java/android/net/ip/IpClientTest.java (renamed from tests/net/java/android/net/ip/IpManagerTest.java)123
44 files changed, 1004 insertions, 377 deletions
diff --git a/api/current.txt b/api/current.txt
index 01117c9c2716..15b866174f0a 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -24371,8 +24371,6 @@ package android.media {
field public static final int MEDIA_CALL_PAUSE = 4; // 0x4
field public static final int MEDIA_CALL_PLAY = 5; // 0x5
field public static final int MEDIA_CALL_PREPARE = 6; // 0x6
- field public static final int MEDIA_CALL_PREPARE_DRM = 7; // 0x7
- field public static final int MEDIA_CALL_PROVIDE_DRM_KEY_RESPONSE = 8; // 0x8
field public static final int MEDIA_CALL_RELEASE_DRM = 12; // 0xc
field public static final int MEDIA_CALL_RESTORE_DRM_KEYS = 13; // 0xd
field public static final int MEDIA_CALL_SEEK_TO = 14; // 0xe
@@ -24381,8 +24379,6 @@ package android.media {
field public static final int MEDIA_CALL_SET_AUDIO_SESSION_ID = 17; // 0x11
field public static final int MEDIA_CALL_SET_AUX_EFFECT_SEND_LEVEL = 18; // 0x12
field public static final int MEDIA_CALL_SET_DATA_SOURCE = 19; // 0x13
- field public static final int MEDIA_CALL_SET_DRM_CONFIG_HELPER = 20; // 0x14
- field public static final int MEDIA_CALL_SET_DRM_PROPERTY_STRING = 21; // 0x15
field public static final int MEDIA_CALL_SET_NEXT_DATA_SOURCE = 22; // 0x16
field public static final int MEDIA_CALL_SET_NEXT_DATA_SOURCES = 23; // 0x17
field public static final int MEDIA_CALL_SET_PLAYBACK_PARAMS = 24; // 0x18
@@ -33590,6 +33586,7 @@ package android.os {
method public static final int getUidForName(java.lang.String);
method public static final boolean is64Bit();
method public static boolean isApplicationUid(int);
+ method public static final boolean isIsolated();
method public static final void killProcess(int);
method public static final int myPid();
method public static final int myTid();
diff --git a/config/hiddenapi-light-greylist.txt b/config/hiddenapi-light-greylist.txt
index fb4d3b8f7323..9528ff14ad94 100644
--- a/config/hiddenapi-light-greylist.txt
+++ b/config/hiddenapi-light-greylist.txt
@@ -33,6 +33,7 @@ Landroid/app/Activity;->mComponent:Landroid/content/ComponentName;
Landroid/app/Activity;->mFragments:Landroid/app/FragmentController;
Landroid/app/Activity;->mHandler:Landroid/os/Handler;
Landroid/app/Activity;->mInstrumentation:Landroid/app/Instrumentation;
+Landroid/app/Activity;->mMainThread:Landroid/app/ActivityThread;
Landroid/app/Activity;->mReferrer:Ljava/lang/String;
Landroid/app/Activity;->mResultCode:I
Landroid/app/Activity;->mResultData:Landroid/content/Intent;
@@ -76,6 +77,7 @@ Landroid/app/ActivityThread;->getPackageInfoNoCheck(Landroid/content/pm/Applicat
Landroid/app/ActivityThread;->getPackageManager()Landroid/content/pm/IPackageManager;
Landroid/app/ActivityThread;->getProcessName()Ljava/lang/String;
Landroid/app/ActivityThread;->getSystemContext()Landroid/app/ContextImpl;
+Landroid/app/ActivityThread;->handleBindApplication(Landroid/app/ActivityThread$AppBindData;)V
Landroid/app/ActivityThread$H;->BIND_SERVICE:I
Landroid/app/ActivityThread$H;->CREATE_SERVICE:I
Landroid/app/ActivityThread$H;->DUMP_PROVIDER:I
@@ -97,6 +99,7 @@ Landroid/app/ActivityThread;->mH:Landroid/app/ActivityThread$H;
Landroid/app/ActivityThread;->mInitialApplication:Landroid/app/Application;
Landroid/app/ActivityThread;->mInstrumentation:Landroid/app/Instrumentation;
Landroid/app/ActivityThread;->mLocalProvidersByName:Landroid/util/ArrayMap;
+Landroid/app/ActivityThread;->mLocalProviders:Landroid/util/ArrayMap;
Landroid/app/ActivityThread;->mNumVisibleActivities:I
Landroid/app/ActivityThread;->mPackages:Landroid/util/ArrayMap;
Landroid/app/ActivityThread;->mProviderMap:Landroid/util/ArrayMap;
@@ -244,6 +247,7 @@ Landroid/app/Dialog;->mShowMessage:Landroid/os/Message;
Landroid/app/DownloadManager$Request;->mUri:Landroid/net/Uri;
Landroid/app/FragmentManagerImpl;->mAdded:Ljava/util/ArrayList;
Landroid/app/Fragment;->mChildFragmentManager:Landroid/app/FragmentManagerImpl;
+Landroid/app/Fragment;->mWho:Ljava/lang/String;
Landroid/app/IActivityManager;->bindService(Landroid/app/IApplicationThread;Landroid/os/IBinder;Landroid/content/Intent;Ljava/lang/String;Landroid/app/IServiceConnection;ILjava/lang/String;I)I
Landroid/app/IActivityManager;->finishActivity(Landroid/os/IBinder;ILandroid/content/Intent;I)Z
Landroid/app/IActivityManager;->finishReceiver(Landroid/os/IBinder;ILjava/lang/String;Landroid/os/Bundle;ZI)V
@@ -313,6 +317,7 @@ Landroid/app/Notification;->isGroupSummary()Z
Landroid/app/NotificationManager;->getService()Landroid/app/INotificationManager;
Landroid/app/NotificationManager;->notifyAsUser(Ljava/lang/String;ILandroid/app/Notification;Landroid/os/UserHandle;)V
Landroid/app/NotificationManager;->sService:Landroid/app/INotificationManager;
+Landroid/app/Notification;->mGroupKey:Ljava/lang/String;
Landroid/app/Notification;->mLargeIcon:Landroid/graphics/drawable/Icon;
Landroid/app/Notification;->mSmallIcon:Landroid/graphics/drawable/Icon;
Landroid/app/Notification;->setLatestEventInfo(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V
@@ -345,6 +350,7 @@ Landroid/app/StatusBarManager;->expandSettingsPanel()V
Landroid/app/StatusBarManager;->getService()Lcom/android/internal/statusbar/IStatusBarService;
Landroid/app/TimePickerDialog;->mTimePicker:Landroid/widget/TimePicker;
Landroid/app/trust/ITrustManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/app/usage/UsageStatsManager;->getAppStandbyBucket(Ljava/lang/String;)I
Landroid/app/usage/UsageStatsManager;->getAppStandbyBuckets()Ljava/util/Map;
Landroid/app/usage/UsageStatsManager;->mService:Landroid/app/usage/IUsageStatsManager;
Landroid/app/usage/UsageStatsManager;->setAppStandbyBuckets(Ljava/util/Map;)V
@@ -360,6 +366,7 @@ Landroid/app/WallpaperManager;->sGlobals:Landroid/app/WallpaperManager$Globals;
Landroid/appwidget/AppWidgetManager;->bindAppWidgetIdIfAllowed(IILandroid/content/ComponentName;Landroid/os/Bundle;)Z
Landroid/appwidget/AppWidgetManager;->bindAppWidgetId(ILandroid/content/ComponentName;Landroid/os/Bundle;)V
Landroid/appwidget/AppWidgetManager;->bindAppWidgetId(ILandroid/content/ComponentName;)V
+Landroid/appwidget/AppWidgetManager;->mService:Lcom/android/internal/appwidget/IAppWidgetService;
Landroid/bluetooth/BluetoothA2dp;->connect(Landroid/bluetooth/BluetoothDevice;)Z
Landroid/bluetooth/BluetoothAdapter;->disableBLE()Z
Landroid/bluetooth/BluetoothAdapter;->disable(Z)Z
@@ -387,6 +394,7 @@ Landroid/bluetooth/BluetoothHeadset;->close()V
Landroid/bluetooth/BluetoothHeadset;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z
Landroid/bluetooth/BluetoothUuid;->RESERVED_UUIDS:[Landroid/os/ParcelUuid;
Landroid/bluetooth/IBluetooth;->getAddress()Ljava/lang/String;
+Landroid/bluetooth/IBluetoothManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/bluetooth/IBluetooth$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetooth;
Landroid/bluetooth/IBluetooth$Stub$Proxy;->getAddress()Ljava/lang/String;
Landroid/bluetooth/le/BluetoothLeScanner;->startScanFromSource(Ljava/util/List;Landroid/bluetooth/le/ScanSettings;Landroid/os/WorkSource;Landroid/bluetooth/le/ScanCallback;)V
@@ -429,6 +437,7 @@ Landroid/content/ContextWrapper;->mBase:Landroid/content/Context;
Landroid/content/CursorLoader;->mCancellationSignal:Landroid/os/CancellationSignal;
Landroid/content/CursorLoader;->mObserver:Landroid/content/Loader$ForceLoadContentObserver;
Landroid/content/IClipboard$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/IClipboard;
+Landroid/content/IClipboard$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/content/IContentProvider;->call(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/os/Bundle;)Landroid/os/Bundle;
Landroid/content/IContentService;->cancelSync(Landroid/accounts/Account;Ljava/lang/String;Landroid/content/ComponentName;)V
Landroid/content/IContentService;->getMasterSyncAutomatically()Z
@@ -439,6 +448,7 @@ Landroid/content/Intent;->ACTION_ALARM_CHANGED:Ljava/lang/String;
Landroid/content/IntentFilter;->mActions:Ljava/util/ArrayList;
Landroid/content/IntentFilter;->setOrder(I)V
Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/IBinder;)Landroid/content/Intent;
+Landroid/content/pm/ActivityInfo;->resizeMode:I
Landroid/content/pm/ApplicationInfo;->enabledSetting:I
Landroid/content/pm/ApplicationInfo;->getBaseResourcePath()Ljava/lang/String;
Landroid/content/pm/ApplicationInfo;->installLocation:I
@@ -585,6 +595,7 @@ Landroid/content/res/TypedArray;->mValue:Landroid/util/TypedValue;
Landroid/content/res/TypedArray;->mXml:Landroid/content/res/XmlBlock$Parser;
Landroid/content/res/XmlBlock;-><init>([B)V
Landroid/content/res/XmlBlock;->newParser()Landroid/content/res/XmlResourceParser;
+Landroid/content/res/XmlBlock$Parser;->mBlock:Landroid/content/res/XmlBlock;
Landroid/content/res/XmlBlock$Parser;->mParseState:J
Landroid/content/SyncStatusInfo;->lastSuccessTime:J
Landroid/database/AbstractCursor;->mExtras:Landroid/os/Bundle;
@@ -625,20 +636,42 @@ Landroid/graphics/Camera;->native_instance:J
Landroid/graphics/Canvas;-><init>(J)V
Landroid/graphics/Canvas;->release()V
Landroid/graphics/drawable/AnimatedImageDrawable;->onAnimationEnd()V
+Landroid/graphics/drawable/AnimatedStateListDrawable$AnimatedStateListState;->mStateIds:Landroid/util/SparseIntArray;
+Landroid/graphics/drawable/AnimatedStateListDrawable$AnimatedStateListState;->mTransitions:Landroid/util/LongSparseLongArray;
+Landroid/graphics/drawable/AnimatedStateListDrawable;->mState:Landroid/graphics/drawable/AnimatedStateListDrawable$AnimatedStateListState;
Landroid/graphics/drawable/AnimatedVectorDrawable$VectorDrawableAnimatorRT;->callOnFinished(Landroid/graphics/drawable/AnimatedVectorDrawable$VectorDrawableAnimatorRT;I)V
Landroid/graphics/drawable/AnimationDrawable;->mCurFrame:I
+Landroid/graphics/drawable/BitmapDrawable;->getOpticalInsets()Landroid/graphics/Insets;
Landroid/graphics/drawable/BitmapDrawable;->getTint()Landroid/content/res/ColorStateList;
Landroid/graphics/drawable/BitmapDrawable;->getTintMode()Landroid/graphics/PorterDuff$Mode;
Landroid/graphics/drawable/BitmapDrawable;->setBitmap(Landroid/graphics/Bitmap;)V
Landroid/graphics/drawable/DrawableContainer$DrawableContainerState;->mConstantPadding:Landroid/graphics/Rect;
Landroid/graphics/drawable/DrawableContainer;->getOpticalInsets()Landroid/graphics/Insets;
Landroid/graphics/drawable/DrawableContainer;->mDrawableContainerState:Landroid/graphics/drawable/DrawableContainer$DrawableContainerState;
+Landroid/graphics/drawable/Drawable;->getOpticalInsets()Landroid/graphics/Insets;
Landroid/graphics/drawable/Drawable;->inflateWithAttributes(Landroid/content/res/Resources;Lorg/xmlpull/v1/XmlPullParser;Landroid/content/res/TypedArray;I)V
Landroid/graphics/drawable/Drawable;->mCallback:Ljava/lang/ref/WeakReference;
Landroid/graphics/drawable/GradientDrawable$GradientState;->mAngle:I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mGradientColors:[I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mGradient:I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mHeight:I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mInnerRadius:I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mInnerRadiusRatio:F
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mOrientation:Landroid/graphics/drawable/GradientDrawable$Orientation;
Landroid/graphics/drawable/GradientDrawable$GradientState;->mPadding:Landroid/graphics/Rect;
Landroid/graphics/drawable/GradientDrawable$GradientState;->mPositions:[F
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mRadiusArray:[F
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mRadius:F
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mShape:I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mStrokeDashGap:F
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mStrokeDashWidth:F
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mStrokeWidth:I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mThickness:I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mThicknessRatio:F
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mWidth:I
Landroid/graphics/drawable/GradientDrawable;->mPadding:Landroid/graphics/Rect;
+Landroid/graphics/drawable/Icon;->mType:I
+Landroid/graphics/drawable/InsetDrawable;->mState:Landroid/graphics/drawable/InsetDrawable$InsetState;
Landroid/graphics/drawable/NinePatchDrawable;->mNinePatchState:Landroid/graphics/drawable/NinePatchDrawable$NinePatchState;
Landroid/graphics/drawable/NinePatchDrawable$NinePatchState;->mNinePatch:Landroid/graphics/NinePatch;
Landroid/graphics/drawable/StateListDrawable;->extractStateSet(Landroid/util/AttributeSet;)[I
@@ -692,6 +725,7 @@ Landroid/hardware/display/WifiDisplayStatus;->mDisplays:[Landroid/hardware/displ
Landroid/hardware/HardwareBuffer;-><init>(J)V
Landroid/hardware/HardwareBuffer;->mNativeObject:J
Landroid/hardware/input/IInputManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/input/IInputManager;
+Landroid/hardware/input/IInputManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/hardware/input/InputManager;->getInstance()Landroid/hardware/input/InputManager;
Landroid/hardware/input/InputManager;->mIm:Landroid/hardware/input/IInputManager;
Landroid/hardware/location/ContextHubInfo;->getId()I
@@ -763,6 +797,7 @@ Landroid/hardware/soundtrigger/SoundTrigger$SoundModel;->vendorUuid:Ljava/util/U
Landroid/hardware/SystemSensorManager$BaseEventQueue;->dispatchAdditionalInfoEvent(III[F[I)V
Landroid/hardware/SystemSensorManager$BaseEventQueue;->dispatchFlushCompleteEvent(I)V
Landroid/hardware/SystemSensorManager$BaseEventQueue;->dispatchSensorEvent(I[FIJ)V
+Landroid/hardware/usb/IUsbManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/hardware/usb/UsbDeviceConnection;->mNativeContext:J
Landroid/hardware/usb/UsbManager;->setCurrentFunction(Ljava/lang/String;Z)V
Landroid/hardware/usb/UsbRequest;->mNativeContext:J
@@ -798,6 +833,7 @@ Landroid/icu/util/Calendar;->writeObject(Ljava/io/ObjectOutputStream;)V
Landroid/icu/util/ChineseCalendar;->readObject(Ljava/io/ObjectInputStream;)V
Landroid/icu/util/IslamicCalendar;->readObject(Ljava/io/ObjectInputStream;)V
Landroid/icu/util/SimpleTimeZone;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/inputmethodservice/InputMethodService;->mExtractEditText:Landroid/inputmethodservice/ExtractEditText;
Landroid/location/CountryDetector;->detectCountry()Landroid/location/Country;
Landroid/location/Country;->getCountryIso()Ljava/lang/String;
Landroid/location/Country;->getSource()I
@@ -837,6 +873,7 @@ Landroid/media/AudioGain;-><init>(IIIIIIIII)V
Landroid/media/AudioHandle;-><init>(I)V
Landroid/media/AudioHandle;->mId:I
Landroid/media/AudioManager;->abandonAudioFocus(Landroid/media/AudioManager$OnAudioFocusChangeListener;Landroid/media/AudioAttributes;)I
+Landroid/media/AudioManager;->getOutputLatency(I)I
Landroid/media/AudioManager;->getService()Landroid/media/IAudioService;
Landroid/media/AudioManager;->mAudioFocusIdListenerMap:Ljava/util/concurrent/ConcurrentHashMap;
Landroid/media/AudioManager;->registerAudioPolicy(Landroid/media/audiopolicy/AudioPolicy;)I
@@ -907,6 +944,7 @@ Landroid/media/AudioTrack;->mNativeTrackInJavaObj:J
Landroid/media/AudioTrack;->mStreamType:I
Landroid/media/AudioTrack;->postEventFromNative(Ljava/lang/Object;IIILjava/lang/Object;)V
Landroid/media/IAudioService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/media/IAudioService;
+Landroid/media/IAudioService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/media/JetPlayer;->mNativePlayerInJavaObj:J
Landroid/media/JetPlayer;->postEventFromNative(Ljava/lang/Object;III)V
Landroid/media/MediaCodec;->releaseOutputBuffer(IZZJ)V
@@ -921,6 +959,8 @@ Landroid/media/MediaFile;->LAST_AUDIO_FILE_TYPE:I
Landroid/media/MediaFile$MediaFileType;->fileType:I
Landroid/media/MediaFile$MediaFileType;->mimeType:Ljava/lang/String;
Landroid/media/MediaFile;->sFileTypeMap:Ljava/util/HashMap;
+Landroid/media/MediaFormat;->getMap()Ljava/util/Map;
+Landroid/media/MediaHTTPService;->createHttpServiceBinderIfNecessary(Ljava/lang/String;)Landroid/os/IBinder;
Landroid/media/MediaMetadataRetriever;->getEmbeddedPicture(I)[B
Landroid/media/MediaPlayer;->getMetadata(ZZ)Landroid/media/Metadata;
Landroid/media/MediaPlayer;->invoke(Landroid/os/Parcel;Landroid/os/Parcel;)V
@@ -957,6 +997,8 @@ Landroid/media/RemoteDisplay;->notifyDisplayDisconnected()V
Landroid/media/RemoteDisplay;->notifyDisplayError(I)V
Landroid/media/RingtoneManager;->getRingtone(Landroid/content/Context;Landroid/net/Uri;I)Landroid/media/Ringtone;
Landroid/media/session/MediaSessionLegacyHelper;->getHelper(Landroid/content/Context;)Landroid/media/session/MediaSessionLegacyHelper;
+Landroid/media/soundtrigger/SoundTriggerManager;->stopRecognition(Ljava/util/UUID;)I
+Landroid/media/soundtrigger/SoundTriggerManager;->unloadSoundModel(Ljava/util/UUID;)I
Landroid/media/SubtitleController;->mHandler:Landroid/os/Handler;
Landroid/media/ThumbnailUtils;->createImageThumbnail(Ljava/lang/String;I)Landroid/graphics/Bitmap;
Landroid/media/ToneGenerator;->mNativeContext:J
@@ -1020,9 +1062,12 @@ Landroid/net/IConnectivityManager$Stub$Proxy;->getTetherableIfaces()[Ljava/lang/
Landroid/net/IConnectivityManager$Stub$Proxy;->getTetherableUsbRegexs()[Ljava/lang/String;
Landroid/net/IConnectivityManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/net/INetworkStatsService$Stub$Proxy;->getMobileIfaces()[Ljava/lang/String;
+Landroid/net/IpConfiguration;->httpProxy:Landroid/net/ProxyInfo;
Landroid/net/LinkProperties;->setHttpProxy(Landroid/net/ProxyInfo;)V
Landroid/net/LocalSocketImpl;->inboundFileDescriptors:[Ljava/io/FileDescriptor;
Landroid/net/LocalSocketImpl;->outboundFileDescriptors:[Ljava/io/FileDescriptor;
+Landroid/net/NetworkCapabilities;->getCapabilities()[I
+Landroid/net/NetworkCapabilities;->getTransportTypes()[I
Landroid/net/NetworkKey;-><init>(Landroid/net/WifiKey;)V
Landroid/net/NetworkPolicyManager;->mService:Landroid/net/INetworkPolicyManager;
Landroid/net/NetworkRecommendationProvider;-><init>(Landroid/content/Context;Ljava/util/concurrent/Executor;)V
@@ -1187,6 +1232,7 @@ Landroid/os/Bundle;->getIBinder(Ljava/lang/String;)Landroid/os/IBinder;
Landroid/os/Bundle;->putIBinder(Ljava/lang/String;Landroid/os/IBinder;)V
Landroid/os/Debug;->countInstancesOfClass(Ljava/lang/Class;)J
Landroid/os/Debug;->dumpReferenceTables()V
+Landroid/os/Debug;-><init>()V
Landroid/os/Debug$MemoryInfo;->dalvikPrivateClean:I
Landroid/os/Debug$MemoryInfo;->dalvikRss:I
Landroid/os/Debug$MemoryInfo;->dalvikSharedClean:I
@@ -1231,7 +1277,9 @@ Landroid/os/Handler;->getIMessenger()Landroid/os/IMessenger;
Landroid/os/Handler;->hasCallbacks(Ljava/lang/Runnable;)Z
Landroid/os/Handler;->mCallback:Landroid/os/Handler$Callback;
Landroid/os/Handler;->mMessenger:Landroid/os/IMessenger;
+Landroid/os/HwBlob;-><init>(I)V
Landroid/os/HwParcel;-><init>(Z)V
+Landroid/os/IBatteryPropertiesRegistrar$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/os/IPermissionController$Stub;->asInterface(Landroid/os/IBinder;)Landroid/os/IPermissionController;
Landroid/os/IPermissionController$Stub$Proxy;->checkPermission(Ljava/lang/String;II)Z
Landroid/os/IPowerManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/os/IPowerManager;
@@ -1275,7 +1323,6 @@ Landroid/os/Process;->getPids(Ljava/lang/String;[I)[I
Landroid/os/Process;->getTotalMemory()J
Landroid/os/Process;->getUidForPid(I)I
Landroid/os/Process;->isIsolated(I)Z
-Landroid/os/Process;->isIsolated()Z
Landroid/os/Process;->readProcFile(Ljava/lang/String;[I[Ljava/lang/String;[J[F)Z
Landroid/os/Process;->readProcLines(Ljava/lang/String;[Ljava/lang/String;[J)V
Landroid/os/RecoverySystem;->cancelScheduledUpdate(Landroid/content/Context;)V
@@ -1387,12 +1434,14 @@ Landroid/os/UserManager;->isUserUnlocked(I)Z
Landroid/os/VintfObject;->report()[Ljava/lang/String;
Landroid/os/WorkSource;->add(ILjava/lang/String;)Z
Landroid/os/WorkSource;->add(I)Z
+Landroid/os/WorkSource;->createWorkChain()Landroid/os/WorkSource$WorkChain;
Landroid/os/WorkSource;->get(I)I
Landroid/os/WorkSource;->getName(I)Ljava/lang/String;
Landroid/os/WorkSource;->mNames:[Ljava/lang/String;
Landroid/os/WorkSource;->mNum:I
Landroid/os/WorkSource;->mUids:[I
Landroid/os/WorkSource;->size()I
+Landroid/os/WorkSource$WorkChain;->addNode(ILjava/lang/String;)Landroid/os/WorkSource$WorkChain;
Landroid/preference/DialogPreference;->mBuilder:Landroid/app/AlertDialog$Builder;
Landroid/preference/DialogPreference;->mDialogIcon:Landroid/graphics/drawable/Drawable;
Landroid/preference/DialogPreference;->mDialog:Landroid/app/Dialog;
@@ -1412,6 +1461,7 @@ Landroid/preference/PreferenceManager;->getPreferenceScreen()Landroid/preference
Landroid/preference/PreferenceManager;->inflateFromIntent(Landroid/content/Intent;Landroid/preference/PreferenceScreen;)Landroid/preference/PreferenceScreen;
Landroid/preference/PreferenceManager;->inflateFromResource(Landroid/content/Context;ILandroid/preference/PreferenceScreen;)Landroid/preference/PreferenceScreen;
Landroid/preference/PreferenceManager;-><init>(Landroid/app/Activity;I)V
+Landroid/preference/PreferenceManager;-><init>(Landroid/content/Context;)V
Landroid/preference/PreferenceManager;->mActivityDestroyListeners:Ljava/util/List;
Landroid/preference/PreferenceManager;->mOnPreferenceTreeClickListener:Landroid/preference/PreferenceManager$OnPreferenceTreeClickListener;
Landroid/preference/PreferenceManager;->mSharedPreferences:Landroid/content/SharedPreferences;
@@ -1445,6 +1495,7 @@ Landroid/provider/Settings$Secure;->ACCESSIBILITY_AUTOCLICK_ENABLED:Ljava/lang/S
Landroid/provider/Settings$Secure;->ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED:Ljava/lang/String;
Landroid/provider/Settings$Secure;->ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED:Ljava/lang/String;
Landroid/provider/Settings$Secure;->ACCESSIBILITY_LARGE_POINTER_ICON:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->ENABLED_NOTIFICATION_LISTENERS:Ljava/lang/String;
Landroid/provider/Settings$Secure;->INCALL_POWER_BUTTON_BEHAVIOR:Ljava/lang/String;
Landroid/provider/Settings$Secure;->LONG_PRESS_TIMEOUT:Ljava/lang/String;
Landroid/provider/Settings$Secure;->PACKAGE_VERIFIER_USER_CONSENT:Ljava/lang/String;
@@ -1468,10 +1519,201 @@ Landroid/renderscript/RenderScriptCacheDir;->mCacheDir:Ljava/io/File;
Landroid/renderscript/RenderScript;->create(Landroid/content/Context;I)Landroid/renderscript/RenderScript;
Landroid/renderscript/RenderScript;->create(Landroid/content/Context;ILandroid/renderscript/RenderScript$ContextType;I)Landroid/renderscript/RenderScript;
Landroid/renderscript/RenderScript;->getMinorID()J
+Landroid/R$styleable;->ActionBar_background:I
+Landroid/R$styleable;->ActionBar_backgroundSplit:I
+Landroid/R$styleable;->ActionBar_backgroundStacked:I
+Landroid/R$styleable;->ActionBar_divider:I
+Landroid/R$styleable;->ActionBar:[I
+Landroid/R$styleable;->ActionBar_itemPadding:I
+Landroid/R$styleable;->CalendarView_dateTextAppearance:I
+Landroid/R$styleable;->CalendarView_firstDayOfWeek:I
+Landroid/R$styleable;->CalendarView_focusedMonthDateColor:I
+Landroid/R$styleable;->CalendarView:[I
+Landroid/R$styleable;->CalendarView_selectedDateVerticalBar:I
+Landroid/R$styleable;->CalendarView_selectedWeekBackgroundColor:I
+Landroid/R$styleable;->CalendarView_shownWeekCount:I
+Landroid/R$styleable;->CalendarView_showWeekNumber:I
+Landroid/R$styleable;->CalendarView_unfocusedMonthDateColor:I
+Landroid/R$styleable;->CalendarView_weekDayTextAppearance:I
+Landroid/R$styleable;->CalendarView_weekNumberColor:I
+Landroid/R$styleable;->CalendarView_weekSeparatorLineColor:I
+Landroid/R$styleable;->CheckedTextView_checkMark:I
+Landroid/R$styleable;->CheckedTextView:[I
+Landroid/R$styleable;->CompoundButton_button:I
+Landroid/R$styleable;->CompoundButton:[I
+Landroid/R$styleable;->ImageView_adjustViewBounds:I
+Landroid/R$styleable;->ImageView_baselineAlignBottom:I
+Landroid/R$styleable;->ImageView_cropToPadding:I
+Landroid/R$styleable;->ImageView:[I
+Landroid/R$styleable;->ImageView_maxHeight:I
+Landroid/R$styleable;->ImageView_maxWidth:I
+Landroid/R$styleable;->ImageView_scaleType:I
+Landroid/R$styleable;->ImageView_src:I
+Landroid/R$styleable;->ImageView_tint:I
+Landroid/R$styleable;->LinearLayout_divider:I
+Landroid/R$styleable;->LinearLayout_dividerPadding:I
+Landroid/R$styleable;->LinearLayout:[I
+Landroid/R$styleable;->LinearLayout_showDividers:I
+Landroid/R$styleable;->ListView_dividerHeight:I
+Landroid/R$styleable;->ListView_divider:I
+Landroid/R$styleable;->ListView:[I
+Landroid/R$styleable;->ProgressBar:[I
+Landroid/R$styleable;->ProgressBar_indeterminateDrawable:I
+Landroid/R$styleable;->ProgressBar_indeterminateDuration:I
+Landroid/R$styleable;->ProgressBar_maxHeight:I
+Landroid/R$styleable;->ProgressBar_maxWidth:I
+Landroid/R$styleable;->ProgressBar_minHeight:I
+Landroid/R$styleable;->ProgressBar_minWidth:I
+Landroid/R$styleable;->ProgressBar_progressDrawable:I
+Landroid/R$styleable;->SeekBar:[I
+Landroid/R$styleable;->SeekBar_thumb:I
+Landroid/R$styleable;->SeekBar_thumbOffset:I
+Landroid/R$styleable;->Switch:[I
+Landroid/R$styleable;->Switch_showText:I
+Landroid/R$styleable;->Switch_splitTrack:I
+Landroid/R$styleable;->Switch_switchMinWidth:I
+Landroid/R$styleable;->Switch_switchPadding:I
+Landroid/R$styleable;->Switch_switchTextAppearance:I
+Landroid/R$styleable;->Switch_textOff:I
+Landroid/R$styleable;->Switch_textOn:I
+Landroid/R$styleable;->Switch_thumb:I
+Landroid/R$styleable;->Switch_thumbTextPadding:I
+Landroid/R$styleable;->Switch_track:I
Landroid/R$styleable;->TextAppearance:[I
+Landroid/R$styleable;->TextAppearance_textAllCaps:I
+Landroid/R$styleable;->TextAppearance_textColorHighlight:I
+Landroid/R$styleable;->TextAppearance_textColorHint:I
Landroid/R$styleable;->TextAppearance_textColor:I
+Landroid/R$styleable;->TextAppearance_textColorLink:I
Landroid/R$styleable;->TextAppearance_textSize:I
+Landroid/R$styleable;->TextAppearance_textStyle:I
+Landroid/R$styleable;->TextAppearance_typeface:I
+Landroid/R$styleable;->TextView_autoLink:I
+Landroid/R$styleable;->TextView_autoText:I
+Landroid/R$styleable;->TextView_bufferType:I
+Landroid/R$styleable;->TextView_capitalize:I
+Landroid/R$styleable;->TextView_cursorVisible:I
+Landroid/R$styleable;->TextView_digits:I
+Landroid/R$styleable;->TextView_drawableBottom:I
+Landroid/R$styleable;->TextView_drawableEnd:I
+Landroid/R$styleable;->TextView_drawableLeft:I
+Landroid/R$styleable;->TextView_drawablePadding:I
+Landroid/R$styleable;->TextView_drawableRight:I
+Landroid/R$styleable;->TextView_drawableStart:I
+Landroid/R$styleable;->TextView_drawableTop:I
+Landroid/R$styleable;->TextView_editable:I
+Landroid/R$styleable;->TextView_ellipsize:I
+Landroid/R$styleable;->TextView_ems:I
+Landroid/R$styleable;->TextView_enabled:I
+Landroid/R$styleable;->TextView_freezesText:I
+Landroid/R$styleable;->TextView_gravity:I
+Landroid/R$styleable;->TextView_height:I
+Landroid/R$styleable;->TextView_hint:I
+Landroid/R$styleable;->TextView:[I
+Landroid/R$styleable;->TextView_imeActionId:I
+Landroid/R$styleable;->TextView_imeActionLabel:I
+Landroid/R$styleable;->TextView_imeOptions:I
+Landroid/R$styleable;->TextView_includeFontPadding:I
+Landroid/R$styleable;->TextView_inputMethod:I
+Landroid/R$styleable;->TextView_inputType:I
+Landroid/R$styleable;->TextView_lines:I
+Landroid/R$styleable;->TextView_lineSpacingExtra:I
+Landroid/R$styleable;->TextView_lineSpacingMultiplier:I
+Landroid/R$styleable;->TextView_linksClickable:I
+Landroid/R$styleable;->TextView_marqueeRepeatLimit:I
+Landroid/R$styleable;->TextView_maxEms:I
+Landroid/R$styleable;->TextView_maxHeight:I
+Landroid/R$styleable;->TextView_maxLength:I
+Landroid/R$styleable;->TextView_maxLines:I
+Landroid/R$styleable;->TextView_maxWidth:I
+Landroid/R$styleable;->TextView_minEms:I
+Landroid/R$styleable;->TextView_minHeight:I
+Landroid/R$styleable;->TextView_minLines:I
+Landroid/R$styleable;->TextView_minWidth:I
+Landroid/R$styleable;->TextView_numeric:I
+Landroid/R$styleable;->TextView_password:I
+Landroid/R$styleable;->TextView_phoneNumber:I
+Landroid/R$styleable;->TextView_privateImeOptions:I
+Landroid/R$styleable;->TextView_scrollHorizontally:I
+Landroid/R$styleable;->TextView_selectAllOnFocus:I
+Landroid/R$styleable;->TextView_shadowColor:I
+Landroid/R$styleable;->TextView_shadowDx:I
+Landroid/R$styleable;->TextView_shadowDy:I
+Landroid/R$styleable;->TextView_shadowRadius:I
+Landroid/R$styleable;->TextView_singleLine:I
+Landroid/R$styleable;->TextView_textAllCaps:I
+Landroid/R$styleable;->TextView_textAppearance:I
+Landroid/R$styleable;->TextView_textColorHighlight:I
+Landroid/R$styleable;->TextView_textColorHint:I
+Landroid/R$styleable;->TextView_textColor:I
+Landroid/R$styleable;->TextView_textColorLink:I
+Landroid/R$styleable;->TextView_textCursorDrawable:I
+Landroid/R$styleable;->TextView_text:I
+Landroid/R$styleable;->TextView_textIsSelectable:I
+Landroid/R$styleable;->TextView_textScaleX:I
+Landroid/R$styleable;->TextView_textSelectHandle:I
+Landroid/R$styleable;->TextView_textSelectHandleLeft:I
+Landroid/R$styleable;->TextView_textSelectHandleRight:I
+Landroid/R$styleable;->TextView_textSize:I
+Landroid/R$styleable;->TextView_textStyle:I
+Landroid/R$styleable;->TextView_typeface:I
+Landroid/R$styleable;->TextView_width:I
+Landroid/R$styleable;->View_background:I
+Landroid/R$styleable;->View_clickable:I
+Landroid/R$styleable;->View_contentDescription:I
+Landroid/R$styleable;->ViewDrawableStates:[I
+Landroid/R$styleable;->View_drawingCacheQuality:I
+Landroid/R$styleable;->View_duplicateParentState:I
+Landroid/R$styleable;->View_fadingEdge:I
+Landroid/R$styleable;->View_filterTouchesWhenObscured:I
+Landroid/R$styleable;->View_fitsSystemWindows:I
+Landroid/R$styleable;->View_focusable:I
+Landroid/R$styleable;->View_focusableInTouchMode:I
+Landroid/R$styleable;->View_hapticFeedbackEnabled:I
+Landroid/R$styleable;->View:[I
+Landroid/R$styleable;->View_id:I
+Landroid/R$styleable;->View_isScrollContainer:I
+Landroid/R$styleable;->View_keepScreenOn:I
+Landroid/R$styleable;->View_longClickable:I
+Landroid/R$styleable;->View_minHeight:I
+Landroid/R$styleable;->View_minWidth:I
+Landroid/R$styleable;->View_nextFocusDown:I
+Landroid/R$styleable;->View_nextFocusLeft:I
+Landroid/R$styleable;->View_nextFocusRight:I
+Landroid/R$styleable;->View_nextFocusUp:I
+Landroid/R$styleable;->View_onClick:I
+Landroid/R$styleable;->View_overScrollMode:I
+Landroid/R$styleable;->View_paddingBottom:I
+Landroid/R$styleable;->View_paddingEnd:I
+Landroid/R$styleable;->View_padding:I
+Landroid/R$styleable;->View_paddingLeft:I
+Landroid/R$styleable;->View_paddingRight:I
+Landroid/R$styleable;->View_paddingStart:I
+Landroid/R$styleable;->View_paddingTop:I
+Landroid/R$styleable;->View_saveEnabled:I
+Landroid/R$styleable;->View_scrollbarDefaultDelayBeforeFade:I
+Landroid/R$styleable;->View_scrollbarFadeDuration:I
+Landroid/R$styleable;->View_scrollbars:I
+Landroid/R$styleable;->View_scrollbarSize:I
+Landroid/R$styleable;->View_scrollbarStyle:I
+Landroid/R$styleable;->View_scrollbarThumbHorizontal:I
+Landroid/R$styleable;->View_scrollbarThumbVertical:I
+Landroid/R$styleable;->View_scrollbarTrackHorizontal:I
+Landroid/R$styleable;->View_scrollbarTrackVertical:I
+Landroid/R$styleable;->View_scrollX:I
+Landroid/R$styleable;->View_scrollY:I
+Landroid/R$styleable;->View_soundEffectsEnabled:I
+Landroid/R$styleable;->View_tag:I
+Landroid/R$styleable;->View_visibility:I
+Landroid/R$styleable;->Window:[I
+Landroid/R$styleable;->Window_windowBackground:I
+Landroid/R$styleable;->Window_windowFrame:I
Landroid/security/KeyStore;->getInstance()Landroid/security/KeyStore;
+Landroid/security/keystore/RecoveryController;->getInstance()Landroid/security/keystore/RecoveryController;
+Landroid/security/keystore/RecoveryController;->initRecoveryService(Ljava/lang/String;[B)V
+Landroid/security/keystore/RecoveryController;->setRecoverySecretTypes([I)V
+Landroid/security/keystore/RecoveryController;->setServerParams([B)V
+Landroid/security/keystore/RecoveryController;->setSnapshotCreatedPendingIntent(Landroid/app/PendingIntent;)V
Landroid/security/net/config/RootTrustManager;->checkServerTrusted([Ljava/security/cert/X509Certificate;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;
Landroid/service/media/IMediaBrowserServiceCallbacks;->onConnectFailed()V
Landroid/service/media/IMediaBrowserServiceCallbacks;->onConnect(Ljava/lang/String;Landroid/media/session/MediaSession$Token;Landroid/os/Bundle;)V
@@ -1521,6 +1763,9 @@ Landroid/telephony/CellSignalStrengthLte;->mCqi:I
Landroid/telephony/CellSignalStrengthLte;->mRsrp:I
Landroid/telephony/CellSignalStrengthLte;->mRsrq:I
Landroid/telephony/CellSignalStrengthLte;->mRssnr:I
+Landroid/telephony/CellSignalStrengthLte;->mSignalStrength:I
+Landroid/telephony/CellSignalStrengthWcdma;->mBitErrorRate:I
+Landroid/telephony/CellSignalStrengthWcdma;->mSignalStrength:I
Landroid/telephony/PhoneStateListener;->mSubId:Ljava/lang/Integer;
Landroid/telephony/ServiceState;->newFromBundle(Landroid/os/Bundle;)Landroid/telephony/ServiceState;
Landroid/telephony/SignalStrength;->getAsuLevel()I
@@ -1580,6 +1825,7 @@ Landroid/telephony/TelephonyManager;->getSimOperator(I)Ljava/lang/String;
Landroid/telephony/TelephonyManager;->getSimOperatorNameForPhone(I)Ljava/lang/String;
Landroid/telephony/TelephonyManager;->getSimOperatorName(I)Ljava/lang/String;
Landroid/telephony/TelephonyManager;->getSimOperatorNumericForPhone(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getSimOperatorNumeric(I)Ljava/lang/String;
Landroid/telephony/TelephonyManager;->getSimSerialNumber(I)Ljava/lang/String;
Landroid/telephony/TelephonyManager;->getSubIdForPhoneAccount(Landroid/telecom/PhoneAccount;)I
Landroid/telephony/TelephonyManager;->getSubscriberId(I)Ljava/lang/String;
@@ -1634,6 +1880,7 @@ Landroid/text/SpannableStringInternal;->sendSpanRemoved(Ljava/lang/Object;II)V
Landroid/text/SpannableStringInternal;->setSpan(Ljava/lang/Object;III)V
Landroid/text/SpannableStringInternal;->setSpan(Ljava/lang/Object;IIIZ)V
Landroid/text/SpannableStringInternal;->START:I
+Landroid/text/SpanSet;->spans:[Ljava/lang/Object;
Landroid/text/StaticLayout;-><init>(Ljava/lang/CharSequence;IILandroid/text/TextPaint;ILandroid/text/Layout$Alignment;Landroid/text/TextDirectionHeuristic;FFZLandroid/text/TextUtils$TruncateAt;II)V
Landroid/text/StaticLayout$LineBreaks;->ascents:[F
Landroid/text/StaticLayout$LineBreaks;->breaks:[I
@@ -1643,6 +1890,11 @@ Landroid/text/StaticLayout$LineBreaks;->widths:[F
Landroid/text/StaticLayout;->mColumns:I
Landroid/text/StaticLayout;->mLineCount:I
Landroid/text/StaticLayout;->mLines:[I
+Landroid/text/TextLine;->mCharacterStyleSpanSet:Landroid/text/SpanSet;
+Landroid/text/TextLine;->mMetricAffectingSpanSpanSet:Landroid/text/SpanSet;
+Landroid/text/TextLine;->mReplacementSpanSpanSet:Landroid/text/SpanSet;
+Landroid/text/TextLine;->mSpanned:Landroid/text/Spanned;
+Landroid/text/TextLine;->mText:Ljava/lang/CharSequence;
Landroid/text/TextLine;->obtain()Landroid/text/TextLine;
Landroid/text/TextLine;->sCached:[Landroid/text/TextLine;
Landroid/text/TextPaint;->setUnderlineText(IF)V
@@ -1654,11 +1906,23 @@ Landroid/util/DisplayMetrics;->noncompatHeightPixels:I
Landroid/util/DisplayMetrics;->noncompatWidthPixels:I
Landroid/util/EventLog$Event;-><init>([B)V
Landroid/util/Log;->wtf(ILjava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ZZ)I
+Landroid/util/LongSparseLongArray;->mKeys:[J
+Landroid/util/LongSparseLongArray;->mSize:I
+Landroid/util/LongSparseLongArray;->mValues:[J
+Landroid/util/NtpTrustedTime;->forceRefresh()Z
+Landroid/util/NtpTrustedTime;->getCachedNtpTime()J
+Landroid/util/NtpTrustedTime;->getCachedNtpTimeReference()J
+Landroid/util/NtpTrustedTime;->getInstance(Landroid/content/Context;)Landroid/util/NtpTrustedTime;
+Landroid/util/NtpTrustedTime;->hasCache()Z
Landroid/util/Pools$SynchronizedPool;->acquire()Ljava/lang/Object;
Landroid/util/Rational;->readObject(Ljava/io/ObjectInputStream;)V
Landroid/util/Singleton;->mInstance:Ljava/lang/Object;
+Landroid/util/SparseIntArray;->mKeys:[I
+Landroid/util/SparseIntArray;->mSize:I
+Landroid/util/SparseIntArray;->mValues:[I
Landroid/view/accessibility/AccessibilityManager;->getInstance(Landroid/content/Context;)Landroid/view/accessibility/AccessibilityManager;
Landroid/view/accessibility/AccessibilityManager;->isHighTextContrastEnabled()Z
+Landroid/view/accessibility/AccessibilityManager;->mIsEnabled:Z
Landroid/view/accessibility/AccessibilityManager;->mIsHighTextContrastEnabled:Z
Landroid/view/accessibility/AccessibilityManager;->sInstance:Landroid/view/accessibility/AccessibilityManager;
Landroid/view/accessibility/AccessibilityManager;->sInstanceSync:Ljava/lang/Object;
@@ -1668,6 +1932,7 @@ Landroid/view/accessibility/IAccessibilityManager$Stub;->asInterface(Landroid/os
Landroid/view/accessibility/IAccessibilityManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/view/ActionMode;->isUiFocusable()Z
Landroid/view/animation/Animation;->mListener:Landroid/view/animation/Animation$AnimationListener;
+Landroid/view/autofill/IAutoFillManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/view/Choreographer$CallbackQueue;->addCallbackLocked(JLjava/lang/Object;Ljava/lang/Object;)V
Landroid/view/Choreographer;->doFrame(JI)V
Landroid/view/Choreographer;->getFrameTime()J
@@ -1772,6 +2037,7 @@ Landroid/view/PointerIcon;->mHotSpotY:F
Landroid/view/PointerIcon;->mType:I
Landroid/view/RenderNodeAnimator;->callOnFinished(Landroid/view/RenderNodeAnimator;)V
Landroid/view/ScaleGestureDetector;->mListener:Landroid/view/ScaleGestureDetector$OnScaleGestureListener;
+Landroid/view/ScaleGestureDetector;->mMinSpan:I
Landroid/view/SurfaceControl$PhysicalDisplayInfo;->appVsyncOffsetNanos:J
Landroid/view/SurfaceControl$PhysicalDisplayInfo;->density:F
Landroid/view/SurfaceControl$PhysicalDisplayInfo;->height:I
@@ -1801,6 +2067,7 @@ Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;-
Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextSelection;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionStarted(I)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
Landroid/view/textservice/TextServicesManager;->isSpellCheckerEnabled()Z
+Landroid/view/TextureView;->destroyHardwareLayer()V
Landroid/view/TextureView;->mLayer:Landroid/view/TextureLayer;
Landroid/view/TextureView;->mNativeWindow:J
Landroid/view/TextureView;->mSurface:Landroid/graphics/SurfaceTexture;
@@ -1879,8 +2146,10 @@ Landroid/view/View;->mViewFlags:I
Landroid/view/View;->notifySubtreeAccessibilityStateChangedIfNeeded()V
Landroid/view/View;->recomputePadding()V
Landroid/view/View;->requestAccessibilityFocus()Z
+Landroid/view/View;->resetDisplayList()V
Landroid/view/View;->resetPaddingToInitialValues()V
Landroid/view/ViewRootImpl;->detachFunctor(J)V
+Landroid/view/ViewRootImpl;->enqueueInputEvent(Landroid/view/InputEvent;)V
Landroid/view/ViewRootImpl;->invokeFunctor(JZ)V
Landroid/view/ViewRootImpl;->mStopped:Z
Landroid/view/ViewRootImpl;->mView:Landroid/view/View;
@@ -2040,6 +2309,7 @@ Landroid/widget/AbsSeekBar;->mIsDragging:Z
Landroid/widget/AbsSeekBar;->mSplitTrack:Z
Landroid/widget/AbsSeekBar;->mThumb:Landroid/graphics/drawable/Drawable;
Landroid/widget/AbsSeekBar;->mTouchProgressOffset:F
+Landroid/widget/ActivityChooserModel;->get(Landroid/content/Context;Ljava/lang/String;)Landroid/widget/ActivityChooserModel;
Landroid/widget/ActivityChooserView;->setExpandActivityOverflowButtonDrawable(Landroid/graphics/drawable/Drawable;)V
Landroid/widget/AdapterView;->mDataChanged:Z
Landroid/widget/AdapterView;->mFirstPosition:I
@@ -2053,10 +2323,17 @@ Landroid/widget/AutoCompleteTextView;->setDropDownAlwaysVisible(Z)V
Landroid/widget/CompoundButton;->mButtonDrawable:Landroid/graphics/drawable/Drawable;
Landroid/widget/DatePicker;->mDelegate:Landroid/widget/DatePicker$DatePickerDelegate;
Landroid/widget/EdgeEffect;->mPaint:Landroid/graphics/Paint;
+Landroid/widget/Editor;->invalidateTextDisplayList()V
Landroid/widget/Editor;->mShowCursor:J
Landroid/widget/ExpandableListView;->mChildDivider:Landroid/graphics/drawable/Drawable;
+Landroid/widget/FastScroller;->mContainerRect:Landroid/graphics/Rect;
+Landroid/widget/FastScroller;->mHeaderCount:I
+Landroid/widget/FastScroller;->mLongList:Z
+Landroid/widget/FastScroller;->mMinimumTouchTarget:I
Landroid/widget/FastScroller;->mThumbDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/widget/FastScroller;->mThumbImage:Landroid/widget/ImageView;
Landroid/widget/FastScroller;->mTrackDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/widget/FastScroller;->mTrackImage:Landroid/widget/ImageView;
Landroid/widget/Gallery;->fillToGalleryLeft()V
Landroid/widget/Gallery;->fillToGalleryRight()V
Landroid/widget/Gallery$FlingRunnable;->startUsingVelocity(I)V
@@ -2141,6 +2418,8 @@ Landroid/widget/RelativeLayout$LayoutParams;->mTop:I
Landroid/widget/RelativeLayout;->mGravity:I
Landroid/widget/RemoteViews$Action;->mergeBehavior()I
Landroid/widget/RemoteViews$Action;->viewId:I
+Landroid/widget/RemoteViewsAdapter;->mCache:Landroid/widget/RemoteViewsAdapter$FixedSizeRemoteViewsCache;
+Landroid/widget/RemoteViewsAdapter;->mWorkerThread:Landroid/os/HandlerThread;
Landroid/widget/RemoteViews$BitmapCache;->mBitmaps:Ljava/util/ArrayList;
Landroid/widget/RemoteViews$BitmapReflectionAction;->bitmap:Landroid/graphics/Bitmap;
Landroid/widget/RemoteViews$BitmapReflectionAction;->methodName:Ljava/lang/String;
@@ -2164,6 +2443,7 @@ Landroid/widget/ScrollView;->mScroller:Landroid/widget/OverScroller;
Landroid/widget/SearchView;->mCloseButton:Landroid/widget/ImageView;
Landroid/widget/SearchView;->mSearchButton:Landroid/widget/ImageView;
Landroid/widget/SearchView;->mSearchPlate:Landroid/view/View;
+Landroid/widget/SearchView;->mSearchSrcTextView:Landroid/widget/SearchView$SearchAutoComplete;
Landroid/widget/SearchView;->onCloseClicked()V
Landroid/widget/SearchView;->setQuery(Ljava/lang/CharSequence;)V
Landroid/widget/SlidingDrawer;->mTopOffset:I
@@ -2174,6 +2454,7 @@ Landroid/widget/TabHost$TabSpec;->mContentStrategy:Landroid/widget/TabHost$Conte
Landroid/widget/TabWidget;->setTabSelectionListener(Landroid/widget/TabWidget$OnTabSelectionChanged;)V
Landroid/widget/TextView;->assumeLayout()V
Landroid/widget/TextView;->createEditorIfNeeded()V
+Landroid/widget/TextView;->isSingleLine()Z
Landroid/widget/TextView;->mCursorDrawableRes:I
Landroid/widget/TextView;->mCurTextColor:I
Landroid/widget/TextView;->mEditor:Landroid/widget/Editor;
@@ -2197,6 +2478,7 @@ Lcom/android/internal/app/IAppOpsService$Stub$Proxy;->checkOperation(IILjava/lan
Lcom/android/internal/app/IAppOpsService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Lcom/android/internal/app/IBatteryStats;->getStatistics()[B
Lcom/android/internal/app/IBatteryStats$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/app/IBatteryStats;
+Lcom/android/internal/app/IBatteryStats$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Lcom/android/internal/app/IVoiceInteractionManagerService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/app/IVoiceInteractionManagerService;
Lcom/android/internal/app/IVoiceInteractionManagerService$Stub$Proxy;->showSessionFromSession(Landroid/os/IBinder;Landroid/os/Bundle;I)Z
Lcom/android/internal/os/BatterySipper;->add(Lcom/android/internal/os/BatterySipper;)V
@@ -2248,6 +2530,7 @@ Lcom/android/internal/R$array;->config_mobile_hotspot_provision_app:I
Lcom/android/internal/R$array;->config_tether_wifi_regexs:I
Lcom/android/internal/R$array;->maps_starting_lat_lng:I
Lcom/android/internal/R$array;->maps_starting_zoom:I
+Lcom/android/internal/R$attr;->actionBarStyle:I
Lcom/android/internal/R$attr;->mapViewStyle:I
Lcom/android/internal/R$attr;->state_focused:I
Lcom/android/internal/R$attr;->state_pressed:I
@@ -2317,6 +2600,10 @@ Lcom/android/internal/R$styleable;->AndroidManifestUsesSdk_minSdkVersion:I
Lcom/android/internal/R$styleable;->AndroidManifestUsesSdk_targetSdkVersion:I
Lcom/android/internal/R$styleable;->AndroidManifest_versionCode:I
Lcom/android/internal/R$styleable;->AndroidManifest_versionName:I
+Lcom/android/internal/R$styleable;->CheckBoxPreference_disableDependentsState:I
+Lcom/android/internal/R$styleable;->CheckBoxPreference:[I
+Lcom/android/internal/R$styleable;->CheckBoxPreference_summaryOff:I
+Lcom/android/internal/R$styleable;->CheckBoxPreference_summaryOn:I
Lcom/android/internal/R$styleable;->CompoundButton_button:I
Lcom/android/internal/R$styleable;->CompoundButton:[I
Lcom/android/internal/R$styleable;->EdgeEffect_colorEdgeEffect:I
@@ -2324,6 +2611,23 @@ Lcom/android/internal/R$styleable;->EdgeEffect:[I
Lcom/android/internal/R$styleable;->IconMenuView:[I
Lcom/android/internal/R$styleable;->ImageView:[I
Lcom/android/internal/R$styleable;->ImageView_src:I
+Lcom/android/internal/R$styleable;->Preference_defaultValue:I
+Lcom/android/internal/R$styleable;->Preference_dependency:I
+Lcom/android/internal/R$styleable;->Preference_enabled:I
+Lcom/android/internal/R$styleable;->Preference_fragment:I
+Lcom/android/internal/R$styleable;->PreferenceGroup:[I
+Lcom/android/internal/R$styleable;->PreferenceGroup_orderingFromXml:I
+Lcom/android/internal/R$styleable;->Preference:[I
+Lcom/android/internal/R$styleable;->Preference_icon:I
+Lcom/android/internal/R$styleable;->Preference_key:I
+Lcom/android/internal/R$styleable;->Preference_layout:I
+Lcom/android/internal/R$styleable;->Preference_order:I
+Lcom/android/internal/R$styleable;->Preference_persistent:I
+Lcom/android/internal/R$styleable;->Preference_selectable:I
+Lcom/android/internal/R$styleable;->Preference_shouldDisableView:I
+Lcom/android/internal/R$styleable;->Preference_summary:I
+Lcom/android/internal/R$styleable;->Preference_title:I
+Lcom/android/internal/R$styleable;->Preference_widgetLayout:I
Lcom/android/internal/R$styleable;->ScrollView_fillViewport:I
Lcom/android/internal/R$styleable;->ScrollView:[I
Lcom/android/internal/R$styleable;->SyncAdapter_accountType:I
@@ -2340,6 +2644,7 @@ Lcom/android/internal/R$styleable;->TextView_drawableLeft:I
Lcom/android/internal/R$styleable;->TextView_drawableRight:I
Lcom/android/internal/R$styleable;->TextView_drawableTop:I
Lcom/android/internal/R$styleable;->TextView:[I
+Lcom/android/internal/R$styleable;->TextView_maxLines:I
Lcom/android/internal/R$styleable;->View_background:I
Lcom/android/internal/R$styleable;->ViewGroup_Layout:[I
Lcom/android/internal/R$styleable;->ViewGroup_Layout_layout_height:I
@@ -2361,12 +2666,16 @@ Lcom/android/internal/telephony/IPhoneSubInfo$Stub$Proxy;-><init>(Landroid/os/IB
Lcom/android/internal/telephony/ISms$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/ISms;
Lcom/android/internal/telephony/ISub$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Lcom/android/internal/telephony/ITelephony;->call(Ljava/lang/String;Ljava/lang/String;)V
+Lcom/android/internal/telephony/ITelephony;->disableDataConnectivity()Z
+Lcom/android/internal/telephony/ITelephony;->enableDataConnectivity()Z
Lcom/android/internal/telephony/ITelephony;->endCall()Z
Lcom/android/internal/telephony/ITelephony;->isIdle(Ljava/lang/String;)Z
Lcom/android/internal/telephony/ITelephony;->silenceRinger()V
Lcom/android/internal/telephony/ITelephony$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/ITelephony;
+Lcom/android/internal/telephony/ITelephony$Stub$Proxy;->endCall()Z
Lcom/android/internal/telephony/ITelephony$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Lcom/android/internal/telephony/ITelephony$Stub;->TRANSACTION_getDeviceId:I
+Lcom/android/internal/textservice/ITextServicesManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Lcom/android/internal/util/XmlUtils;->readMapXml(Ljava/io/InputStream;)Ljava/util/HashMap;
Lcom/android/internal/view/IInputMethodManager$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/view/IInputMethodManager;
Lcom/android/internal/view/IInputMethodManager$Stub$Proxy;->getEnabledInputMethodList()Ljava/util/List;
@@ -2377,6 +2686,7 @@ Lcom/android/internal/view/menu/MenuBuilder;->setCurrentMenuInfo(Landroid/view/C
Lcom/android/internal/view/menu/MenuBuilder;->setOptionalIconsVisible(Z)V
Lcom/android/internal/view/menu/MenuItemImpl;->mIconResId:I
Lcom/android/internal/view/menu/MenuItemImpl;->setMenuInfo(Landroid/view/ContextMenu$ContextMenuInfo;)V
+Lcom/android/internal/view/menu/MenuPopupHelper;->setForceShowIcon(Z)V
Lcom/android/internal/view/menu/MenuView$ItemView;->getItemData()Lcom/android/internal/view/menu/MenuItemImpl;
Lcom/android/okhttp/ConnectionPool;->keepAliveDurationNs:J
Lcom/android/okhttp/ConnectionPool;->maxIdleConnections:I
@@ -2386,6 +2696,7 @@ Lcom/android/okhttp/OkHttpClient;->connectionPool:Lcom/android/okhttp/Connection
Lcom/android/okhttp/OkHttpClient;->DEFAULT_PROTOCOLS:Ljava/util/List;
Lcom/android/okhttp/OkHttpClient;->dns:Lcom/android/okhttp/Dns;
Lcom/android/okhttp/OkHttpClient;->setProtocols(Ljava/util/List;)Lcom/android/okhttp/OkHttpClient;
+Lcom/android/okhttp/OkHttpClient;->setRetryOnConnectionFailure(Z)V
Lcom/android/okhttp/okio/ByteString;->readObject(Ljava/io/ObjectInputStream;)V
Lcom/android/okhttp/okio/ByteString;->writeObject(Ljava/io/ObjectOutputStream;)V
Lcom/android/org/conscrypt/AbstractConscryptSocket;->getAlpnSelectedProtocol()[B
@@ -2397,8 +2708,8 @@ Lcom/android/org/conscrypt/AbstractConscryptSocket;->getHostname()Ljava/lang/Str
Lcom/android/org/conscrypt/AbstractConscryptSocket;->getHostnameOrIP()Ljava/lang/String;
Lcom/android/org/conscrypt/AbstractConscryptSocket;->getNpnSelectedProtocol()[B
Lcom/android/org/conscrypt/AbstractConscryptSocket;->getSoWriteTimeout()I
-Lcom/android/org/conscrypt/AbstractConscryptSocket;->setAlpnProtocols([Ljava/lang/String;)V
Lcom/android/org/conscrypt/AbstractConscryptSocket;->setAlpnProtocols([B)V
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->setAlpnProtocols([Ljava/lang/String;)V
Lcom/android/org/conscrypt/AbstractConscryptSocket;->setApplicationProtocols([Ljava/lang/String;)V
Lcom/android/org/conscrypt/AbstractConscryptSocket;->setChannelIdEnabled(Z)V
Lcom/android/org/conscrypt/AbstractConscryptSocket;->setChannelIdPrivateKey(Ljava/security/PrivateKey;)V
@@ -2419,8 +2730,8 @@ Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getHostname()Ljava/lang/String;
Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getHostnameOrIP()Ljava/lang/String;
Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getNpnSelectedProtocol()[B
Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getSoWriteTimeout()I
-Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setAlpnProtocols([Ljava/lang/String;)V
Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setAlpnProtocols([B)V
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setAlpnProtocols([Ljava/lang/String;)V
Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setChannelIdEnabled(Z)V
Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setChannelIdPrivateKey(Ljava/security/PrivateKey;)V
Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setHandshakeTimeout(I)V
@@ -2428,6 +2739,7 @@ Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setHostname(Ljava/lang/String;)V
Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setNpnProtocols([B)V
Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setSoWriteTimeout(I)V
Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setUseSessionTickets(Z)V
+Lcom/android/org/conscrypt/OpenSSLX509Certificate;->mContext:J
Lcom/android/org/conscrypt/TrustManagerImpl;-><init>(Ljava/security/KeyStore;)V
Ldalvik/system/BaseDexClassLoader;->getLdLibraryPath()Ljava/lang/String;
Ldalvik/system/BaseDexClassLoader;->pathList:Ldalvik/system/DexPathList;
@@ -2448,6 +2760,7 @@ Ldalvik/system/DexPathList$Element;->dexFile:Ldalvik/system/DexFile;
Ldalvik/system/DexPathList$Element;-><init>(Ldalvik/system/DexFile;Ljava/io/File;)V
Ldalvik/system/DexPathList$Element;-><init>(Ljava/io/File;ZLjava/io/File;Ldalvik/system/DexFile;)V
Ldalvik/system/DexPathList;-><init>(Ljava/lang/ClassLoader;Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)V
+Ldalvik/system/DexPathList;->loadDexFile(Ljava/io/File;Ljava/io/File;Ljava/lang/ClassLoader;[Ldalvik/system/DexPathList$Element;)Ldalvik/system/DexFile;
Ldalvik/system/DexPathList;->makeDexElements(Ljava/util/List;Ljava/io/File;Ljava/util/List;Ljava/lang/ClassLoader;)[Ldalvik/system/DexPathList$Element;
Ldalvik/system/DexPathList;->makeInMemoryDexElements([Ljava/nio/ByteBuffer;Ljava/util/List;)[Ldalvik/system/DexPathList$Element;
Ldalvik/system/DexPathList;->makePathElements(Ljava/util/List;)[Ldalvik/system/DexPathList$NativeLibraryElement;
@@ -2536,6 +2849,7 @@ Ljava/lang/StringBuffer;->writeObject(Ljava/io/ObjectOutputStream;)V
Ljava/lang/StringBuilder;->readObject(Ljava/io/ObjectInputStream;)V
Ljava/lang/StringBuilder;->writeObject(Ljava/io/ObjectOutputStream;)V
Ljava/lang/String;-><init>(II[C)V
+Ljava/lang/System;-><init>()V
Ljava/lang/Thread;->daemon:Z
Ljava/lang/Thread;->dispatchUncaughtException(Ljava/lang/Throwable;)V
Ljava/lang/ThreadGroup;->add(Ljava/lang/Thread;)V
@@ -2596,6 +2910,7 @@ Ljava/net/Socket;->impl:Ljava/net/SocketImpl;
Ljava/net/URI;->host:Ljava/lang/String;
Ljava/net/URI;->readObject(Ljava/io/ObjectInputStream;)V
Ljava/net/URI;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/net/URL;->handler:Ljava/net/URLStreamHandler;
Ljava/net/URL;->handlers:Ljava/util/Hashtable;
Ljava/net/URL;->readObject(Ljava/io/ObjectInputStream;)V
Ljava/net/URL;->writeObject(Ljava/io/ObjectOutputStream;)V
@@ -2692,6 +3007,7 @@ Ljava/util/concurrent/atomic/DoubleAccumulator;->readObject(Ljava/io/ObjectInput
Ljava/util/concurrent/atomic/DoubleAdder;->readObject(Ljava/io/ObjectInputStream;)V
Ljava/util/concurrent/atomic/LongAccumulator;->readObject(Ljava/io/ObjectInputStream;)V
Ljava/util/concurrent/atomic/LongAdder;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/concurrent/ConcurrentHashMap$BaseIterator;->hasMoreElements()Z
Ljava/util/concurrent/ConcurrentHashMap;->readObject(Ljava/io/ObjectInputStream;)V
Ljava/util/concurrent/ConcurrentHashMap;->writeObject(Ljava/io/ObjectOutputStream;)V
Ljava/util/concurrent/ConcurrentLinkedDeque;->readObject(Ljava/io/ObjectInputStream;)V
@@ -2740,6 +3056,7 @@ Ljava/util/IdentityHashMap;->writeObject(Ljava/io/ObjectOutputStream;)V
Ljava/util/InvalidPropertiesFormatException;->readObject(Ljava/io/ObjectInputStream;)V
Ljava/util/InvalidPropertiesFormatException;->writeObject(Ljava/io/ObjectOutputStream;)V
Ljava/util/LinkedHashMap;->eldest()Ljava/util/Map$Entry;
+Ljava/util/LinkedHashMap$LinkedHashIterator;->hasNext()Z
Ljava/util/LinkedList;->readObject(Ljava/io/ObjectInputStream;)V
Ljava/util/LinkedList;->writeObject(Ljava/io/ObjectOutputStream;)V
Ljava/util/Locale;->createConstant(Ljava/lang/String;Ljava/lang/String;)Ljava/util/Locale;
diff --git a/core/java/android/app/WallpaperColors.java b/core/java/android/app/WallpaperColors.java
index a2864b9d83af..60e8a121dc45 100644
--- a/core/java/android/app/WallpaperColors.java
+++ b/core/java/android/app/WallpaperColors.java
@@ -21,6 +21,7 @@ import android.annotation.Nullable;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
+import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Parcel;
import android.os.Parcelable;
@@ -107,6 +108,11 @@ public final class WallpaperColors implements Parcelable {
* @param drawable Source where to extract from.
*/
public static WallpaperColors fromDrawable(Drawable drawable) {
+ if (drawable == null) {
+ throw new IllegalArgumentException("Drawable cannot be null");
+ }
+
+ Rect initialBounds = drawable.copyBounds();
int width = drawable.getIntrinsicWidth();
int height = drawable.getIntrinsicHeight();
@@ -126,6 +132,7 @@ public final class WallpaperColors implements Parcelable {
final WallpaperColors colors = WallpaperColors.fromBitmap(bitmap);
bitmap.recycle();
+ drawable.setBounds(initialBounds);
return colors;
}
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index 3d169b0656a6..83707ab265f7 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -2865,7 +2865,7 @@ public class DevicePolicyManager {
* false if the profile has empty password as a separate challenge.
*
* @param admin Which {@link DeviceAdminReceiver} this request is associated with.
- * @throws SecurityException if {@code admin} is not a profile owner.
+ * @throws SecurityException if {@code admin} is not a profile owner of a managed profile.
* @see UserManager#DISALLOW_UNIFIED_PASSWORD
*/
public boolean isUsingUnifiedPassword(@NonNull ComponentName admin) {
diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java
index 1dc7549e763a..ee667c220779 100644
--- a/core/java/android/bluetooth/BluetoothAdapter.java
+++ b/core/java/android/bluetooth/BluetoothAdapter.java
@@ -541,13 +541,14 @@ public final class BluetoothAdapter {
"android.bluetooth.adapter.action.BLE_ACL_DISCONNECTED";
/** The profile is in disconnected state */
- public static final int STATE_DISCONNECTED = 0;
+ public static final int STATE_DISCONNECTED = BluetoothProtoEnums.CONNECTION_STATE_DISCONNECTED;
/** The profile is in connecting state */
- public static final int STATE_CONNECTING = 1;
+ public static final int STATE_CONNECTING = BluetoothProtoEnums.CONNECTION_STATE_CONNECTING;
/** The profile is in connected state */
- public static final int STATE_CONNECTED = 2;
+ public static final int STATE_CONNECTED = BluetoothProtoEnums.CONNECTION_STATE_CONNECTED;
/** The profile is in disconnecting state */
- public static final int STATE_DISCONNECTING = 3;
+ public static final int STATE_DISCONNECTING =
+ BluetoothProtoEnums.CONNECTION_STATE_DISCONNECTING;
/** @hide */
public static final String BLUETOOTH_MANAGER_SERVICE = "bluetooth_manager";
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index f7649c9edf01..4a8f61c24a48 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -763,13 +763,15 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
public String[] resourceDirs;
/**
- * String retrieved from the seinfo tag found in selinux policy. This value can be set through
- * the mac_permissions.xml policy construct. This value is used for setting an SELinux security
- * context on the process as well as its data directory.
+ * String retrieved from the seinfo tag found in selinux policy. This value
+ * can be overridden with a value set through the mac_permissions.xml policy
+ * construct. This value is useful in setting an SELinux security context on
+ * the process as well as its data directory. The String default is being used
+ * here to represent a catchall label when no policy matches.
*
* {@hide}
*/
- public String seInfo;
+ public String seInfo = "default";
/**
* The seinfo tag generated per-user. This value may change based upon the
@@ -1188,6 +1190,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
if (category != CATEGORY_UNDEFINED) {
pw.println(prefix + "category=" + category);
}
+ pw.println("isAllowedToUseHiddenApi=" + isAllowedToUseHiddenApi());
}
super.dumpBack(pw, prefix);
}
@@ -1604,8 +1607,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
public boolean isAllowedToUseHiddenApi() {
boolean whitelisted =
SystemConfig.getInstance().getHiddenApiWhitelistedApps().contains(packageName);
- return isSystemApp() || // TODO get rid of this once the whitelist has been populated
- (whitelisted && (isSystemApp() || isUpdatedSystemApp()));
+ return whitelisted && (isSystemApp() || isUpdatedSystemApp());
}
/**
diff --git a/core/java/android/net/metrics/IpManagerEvent.java b/core/java/android/net/metrics/IpManagerEvent.java
index a94b9284df3b..f8a63ce5f1a3 100644
--- a/core/java/android/net/metrics/IpManagerEvent.java
+++ b/core/java/android/net/metrics/IpManagerEvent.java
@@ -40,11 +40,12 @@ public final class IpManagerEvent implements Parcelable {
public static final int ERROR_STARTING_IPV6 = 5;
public static final int ERROR_STARTING_IPREACHABILITYMONITOR = 6;
public static final int ERROR_INVALID_PROVISIONING = 7;
+ public static final int ERROR_INTERFACE_NOT_FOUND = 8;
@IntDef(value = {
PROVISIONING_OK, PROVISIONING_FAIL, COMPLETE_LIFECYCLE,
ERROR_STARTING_IPV4, ERROR_STARTING_IPV6, ERROR_STARTING_IPREACHABILITYMONITOR,
- ERROR_INVALID_PROVISIONING,
+ ERROR_INVALID_PROVISIONING, ERROR_INTERFACE_NOT_FOUND,
})
@Retention(RetentionPolicy.SOURCE)
public @interface EventType {}
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java
index 96e2ae3d5ac1..21c1263c47d1 100644
--- a/core/java/android/os/Process.java
+++ b/core/java/android/os/Process.java
@@ -599,7 +599,6 @@ public class Process {
/**
* Returns whether the current process is in an isolated sandbox.
- * @hide
*/
public static final boolean isIsolated() {
return isIsolated(myUid());
diff --git a/core/java/android/widget/MediaControlView2.java b/core/java/android/widget/MediaControlView2.java
index 4fb303e14990..adc443214458 100644
--- a/core/java/android/widget/MediaControlView2.java
+++ b/core/java/android/widget/MediaControlView2.java
@@ -134,24 +134,6 @@ public class MediaControlView2 extends ViewGroupHelper<MediaControlView2Provider
*/
public static final int BUTTON_SETTINGS = 11;
- /**
- * String for receiving command to show subtitle from MediaSession. Can be checked by
- * implementing {@link android.media.session.MediaSession.Callback#onCommand}
- * @hide
- */
- public static final String COMMAND_SHOW_SUBTITLE = "showSubtitle";
- /**
- * String for receiving command to hide subtitle from MediaSession. Can be checked by
- * implementing {@link android.media.session.MediaSession.Callback#onCommand}
- * @hide
- */
- public static final String COMMAND_HIDE_SUBTITLE = "hideSubtitle";
-
- /**
- * @hide TODO: remove once the implementation is revised
- */
- public static final String COMMAND_SET_FULLSCREEN = "setFullscreen";
-
public MediaControlView2(@NonNull Context context) {
this(context, null);
}
diff --git a/core/java/com/android/internal/os/BatterySipper.java b/core/java/com/android/internal/os/BatterySipper.java
index 5b6291e4523f..5abc6d4f76b1 100644
--- a/core/java/com/android/internal/os/BatterySipper.java
+++ b/core/java/com/android/internal/os/BatterySipper.java
@@ -73,14 +73,16 @@ public class BatterySipper implements Comparable<BatterySipper> {
public double usagePowerMah;
// Subsystem usage times.
+ public long audioTimeMs;
+ public long bluetoothRunningTimeMs;
+ public long cameraTimeMs;
+ public long cpuFgTimeMs;
public long cpuTimeMs;
+ public long flashlightTimeMs;
public long gpsTimeMs;
- public long wifiRunningTimeMs;
- public long cpuFgTimeMs;
+ public long videoTimeMs;
public long wakeLockTimeMs;
- public long cameraTimeMs;
- public long flashlightTimeMs;
- public long bluetoothRunningTimeMs;
+ public long wifiRunningTimeMs;
public long mobileRxPackets;
public long mobileTxPackets;
@@ -102,15 +104,17 @@ public class BatterySipper implements Comparable<BatterySipper> {
// Measured in mAh (milli-ampere per hour).
// These are included when summed.
- public double wifiPowerMah;
+ public double audioPowerMah;
+ public double bluetoothPowerMah;
+ public double cameraPowerMah;
public double cpuPowerMah;
- public double wakeLockPowerMah;
- public double mobileRadioPowerMah;
+ public double flashlightPowerMah;
public double gpsPowerMah;
+ public double mobileRadioPowerMah;
public double sensorPowerMah;
- public double cameraPowerMah;
- public double flashlightPowerMah;
- public double bluetoothPowerMah;
+ public double videoPowerMah;
+ public double wakeLockPowerMah;
+ public double wifiPowerMah;
public enum DrainType {
AMBIENT_DISPLAY,
@@ -177,10 +181,12 @@ public class BatterySipper implements Comparable<BatterySipper> {
totalPowerMah += other.totalPowerMah;
usageTimeMs += other.usageTimeMs;
usagePowerMah += other.usagePowerMah;
+ audioTimeMs += other.audioTimeMs;
cpuTimeMs += other.cpuTimeMs;
gpsTimeMs += other.gpsTimeMs;
wifiRunningTimeMs += other.wifiRunningTimeMs;
cpuFgTimeMs += other.cpuFgTimeMs;
+ videoTimeMs += other.videoTimeMs;
wakeLockTimeMs += other.wakeLockTimeMs;
cameraTimeMs += other.cameraTimeMs;
flashlightTimeMs += other.flashlightTimeMs;
@@ -197,6 +203,7 @@ public class BatterySipper implements Comparable<BatterySipper> {
wifiTxBytes += other.wifiTxBytes;
btRxBytes += other.btRxBytes;
btTxBytes += other.btTxBytes;
+ audioPowerMah += other.audioPowerMah;
wifiPowerMah += other.wifiPowerMah;
gpsPowerMah += other.gpsPowerMah;
cpuPowerMah += other.cpuPowerMah;
@@ -207,6 +214,7 @@ public class BatterySipper implements Comparable<BatterySipper> {
flashlightPowerMah += other.flashlightPowerMah;
bluetoothPowerMah += other.bluetoothPowerMah;
screenPowerMah += other.screenPowerMah;
+ videoPowerMah += other.videoPowerMah;
proportionalSmearMah += other.proportionalSmearMah;
totalSmearedPowerMah += other.totalSmearedPowerMah;
}
@@ -220,7 +228,7 @@ public class BatterySipper implements Comparable<BatterySipper> {
public double sumPower() {
totalPowerMah = usagePowerMah + wifiPowerMah + gpsPowerMah + cpuPowerMah +
sensorPowerMah + mobileRadioPowerMah + wakeLockPowerMah + cameraPowerMah +
- flashlightPowerMah + bluetoothPowerMah;
+ flashlightPowerMah + bluetoothPowerMah + audioPowerMah + videoPowerMah;
totalSmearedPowerMah = totalPowerMah + screenPowerMah + proportionalSmearMah;
return totalPowerMah;
diff --git a/core/java/com/android/internal/os/BatteryStatsHelper.java b/core/java/com/android/internal/os/BatteryStatsHelper.java
index a76cf0a2ddc5..1e5bd1894843 100644
--- a/core/java/com/android/internal/os/BatteryStatsHelper.java
+++ b/core/java/com/android/internal/os/BatteryStatsHelper.java
@@ -136,6 +136,7 @@ public class BatteryStatsHelper {
PowerCalculator mCameraPowerCalculator;
PowerCalculator mFlashlightPowerCalculator;
PowerCalculator mMemoryPowerCalculator;
+ PowerCalculator mMediaPowerCalculator;
boolean mHasWifiPowerReporting = false;
boolean mHasBluetoothPowerReporting = false;
@@ -424,6 +425,11 @@ public class BatteryStatsHelper {
}
mFlashlightPowerCalculator.reset();
+ if (mMediaPowerCalculator == null) {
+ mMediaPowerCalculator = new MediaPowerCalculator(mPowerProfile);
+ }
+ mMediaPowerCalculator.reset();
+
mStatsType = statsType;
mRawUptimeUs = rawUptimeUs;
mRawRealtimeUs = rawRealtimeUs;
@@ -560,6 +566,7 @@ public class BatteryStatsHelper {
mCameraPowerCalculator.calculateApp(app, u, mRawRealtimeUs, mRawUptimeUs, mStatsType);
mFlashlightPowerCalculator.calculateApp(app, u, mRawRealtimeUs, mRawUptimeUs,
mStatsType);
+ mMediaPowerCalculator.calculateApp(app, u, mRawRealtimeUs, mRawUptimeUs, mStatsType);
final double totalPower = app.sumPower();
if (DEBUG && totalPower != 0) {
diff --git a/core/java/com/android/internal/os/MediaPowerCalculator.java b/core/java/com/android/internal/os/MediaPowerCalculator.java
new file mode 100644
index 000000000000..a35c1341905b
--- /dev/null
+++ b/core/java/com/android/internal/os/MediaPowerCalculator.java
@@ -0,0 +1,61 @@
+/*
+ * 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.internal.os;
+
+import android.os.BatteryStats;
+
+/**
+ * A {@link PowerCalculator} to calculate power consumed by audio and video hardware.
+ *
+ * Also see {@link PowerProfile#POWER_AUDIO} and {@link PowerProfile#POWER_VIDEO}.
+ */
+public class MediaPowerCalculator extends PowerCalculator {
+ private static final int MS_IN_HR = 1000 * 60 * 60;
+ private final double mAudioAveragePowerMa;
+ private final double mVideoAveragePowerMa;
+
+ public MediaPowerCalculator(PowerProfile profile) {
+ mAudioAveragePowerMa = profile.getAveragePower(PowerProfile.POWER_AUDIO);
+ mVideoAveragePowerMa = profile.getAveragePower(PowerProfile.POWER_VIDEO);
+ }
+
+ @Override
+ public void calculateApp(BatterySipper app, BatteryStats.Uid u, long rawRealtimeUs,
+ long rawUptimeUs, int statsType) {
+ // Calculate audio power usage, an estimate based on the average power routed to different
+ // components like speaker, bluetooth, usb-c, earphone, etc.
+ final BatteryStats.Timer audioTimer = u.getAudioTurnedOnTimer();
+ if (audioTimer == null) {
+ app.audioTimeMs = 0;
+ app.audioPowerMah = 0;
+ } else {
+ final long totalTime = audioTimer.getTotalTimeLocked(rawRealtimeUs, statsType) / 1000;
+ app.audioTimeMs = totalTime;
+ app.audioPowerMah = (totalTime * mAudioAveragePowerMa) / MS_IN_HR;
+ }
+
+ // Calculate video power usage.
+ final BatteryStats.Timer videoTimer = u.getVideoTurnedOnTimer();
+ if (videoTimer == null) {
+ app.videoTimeMs = 0;
+ app.videoPowerMah = 0;
+ } else {
+ final long totalTime = videoTimer.getTotalTimeLocked(rawRealtimeUs, statsType) / 1000;
+ app.videoTimeMs = totalTime;
+ app.videoPowerMah = (totalTime * mVideoAveragePowerMa) / MS_IN_HR;
+ }
+ }
+}
diff --git a/core/java/com/android/internal/os/PowerProfile.java b/core/java/com/android/internal/os/PowerProfile.java
index 747d633ea1c3..344c772554ae 100644
--- a/core/java/com/android/internal/os/PowerProfile.java
+++ b/core/java/com/android/internal/os/PowerProfile.java
@@ -43,12 +43,12 @@ public class PowerProfile {
*/
public static final String POWER_NONE = "none";
- /**
+ /*
* POWER_CPU_SUSPEND: Power consumption when CPU is in power collapse mode.
* POWER_CPU_IDLE: Power consumption when CPU is awake (when a wake lock is held). This should
* be zero on devices that can go into full CPU power collapse even when a wake
* lock is held. Otherwise, this is the power consumption in addition to
- * POWER_CPU_SUSPEND due to a wake lock being held but with no CPU activity.
+ * POWER_CPU_SUSPEND due to a wake lock being held but with no CPU activity.
* POWER_CPU_ACTIVE: Power consumption when CPU is running, excluding power consumed by clusters
* and cores.
*
@@ -84,7 +84,6 @@ public class PowerProfile {
// Updated power constants. These are not estimated, they are real world
// currents and voltages for the underlying bluetooth and wifi controllers.
//
-
public static final String POWER_WIFI_CONTROLLER_IDLE = "wifi.controller.idle";
public static final String POWER_WIFI_CONTROLLER_RX = "wifi.controller.rx";
public static final String POWER_WIFI_CONTROLLER_TX = "wifi.controller.tx";
@@ -117,6 +116,7 @@ public class PowerProfile {
/**
* Power consumption when Bluetooth driver is on.
+ *
* @deprecated
*/
@Deprecated
@@ -124,6 +124,7 @@ public class PowerProfile {
/**
* Power consumption when Bluetooth driver is transmitting/receiving.
+ *
* @deprecated
*/
@Deprecated
@@ -131,6 +132,7 @@ public class PowerProfile {
/**
* Power consumption when Bluetooth driver gets an AT command.
+ *
* @deprecated
*/
@Deprecated
@@ -171,13 +173,13 @@ public class PowerProfile {
* Power consumed by the audio hardware when playing back audio content. This is in addition
* to the CPU power, probably due to a DSP and / or amplifier.
*/
- public static final String POWER_AUDIO = "dsp.audio";
+ public static final String POWER_AUDIO = "audio";
/**
* Power consumed by any media hardware when playing back video content. This is in addition
* to the CPU power, probably due to a DSP.
*/
- public static final String POWER_VIDEO = "dsp.video";
+ public static final String POWER_VIDEO = "video";
/**
* Average power consumption when camera flashlight is on.
@@ -409,6 +411,7 @@ public class PowerProfile {
/**
* Returns the number of memory bandwidth buckets defined in power_profile.xml, or a
* default value if the subsystem has no recorded value.
+ *
* @return the number of memory bandwidth buckets.
*/
public int getNumElements(String key) {
@@ -423,7 +426,8 @@ public class PowerProfile {
/**
* Returns the average current in mA consumed by the subsystem, or the given
* default value if the subsystem has no recorded value.
- * @param type the subsystem type
+ *
+ * @param type the subsystem type
* @param defaultValue the value to return if the subsystem has no recorded value.
* @return the average current in milliAmps.
*/
@@ -439,19 +443,21 @@ public class PowerProfile {
/**
* Returns the average current in mA consumed by the subsystem
+ *
* @param type the subsystem type
* @return the average current in milliAmps.
*/
public double getAveragePower(String type) {
return getAveragePowerOrDefault(type, 0);
}
-
+
/**
* Returns the average current in mA consumed by the subsystem for the given level.
- * @param type the subsystem type
+ *
+ * @param type the subsystem type
* @param level the level of power at which the subsystem is running. For instance, the
- * signal strength of the cell network between 0 and 4 (if there are 4 bars max.)
- * If there is no data for multiple levels, the level is ignored.
+ * signal strength of the cell network between 0 and 4 (if there are 4 bars max.)
+ * If there is no data for multiple levels, the level is ignored.
* @return the average current in milliAmps.
*/
public double getAveragePower(String type, int level) {
@@ -474,6 +480,7 @@ public class PowerProfile {
/**
* Returns the battery capacity, if available, in milli Amp Hours. If not available,
* it returns zero.
+ *
* @return the battery capacity in mAh
*/
public double getBatteryCapacity() {
diff --git a/core/proto/android/bluetooth/enums.proto b/core/proto/android/bluetooth/enums.proto
new file mode 100644
index 000000000000..06ae2d3850d3
--- /dev/null
+++ b/core/proto/android/bluetooth/enums.proto
@@ -0,0 +1,30 @@
+/*
+ * Copyright 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.
+ */
+
+syntax = "proto2";
+package android.bluetooth;
+
+option java_outer_classname = "BluetoothProtoEnums";
+option java_multiple_files = true;
+
+// Bluetooth connection states.
+// Primarily used by android/bluetooth/BluetoothAdapter.java
+enum ConnectionStateEnum {
+ CONNECTION_STATE_DISCONNECTED = 0;
+ CONNECTION_STATE_CONNECTING = 1;
+ CONNECTION_STATE_CONNECTED = 2;
+ CONNECTION_STATE_DISCONNECTING = 3;
+} \ No newline at end of file
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 375627d806df..da53cef0c779 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1637,7 +1637,7 @@
<integer translatable="false" name="config_bluetooth_operating_voltage_mv">0</integer>
<!-- Max number of connected audio devices supported by Bluetooth stack -->
- <integer name="config_bluetooth_max_connected_audio_devices">1</integer>
+ <integer name="config_bluetooth_max_connected_audio_devices">5</integer>
<!-- Whether supported profiles should be reloaded upon enabling bluetooth -->
<bool name="config_bluetooth_reload_supported_profiles_when_enabled">false</bool>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index d59ba1822f47..2fcf18820b31 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -3077,7 +3077,7 @@
<!-- Notification action name for connecting to the network specified in the notification body. -->
<string name="wifi_available_action_connect">Connect</string>
<!-- Notification action name for opening the wifi picker, showing the user all the nearby networks. -->
- <string name="wifi_available_action_all_networks">All Networks</string>
+ <string name="wifi_available_action_all_networks">All networks</string>
<!--Notification title for Wi-Fi Wake onboarding. This is displayed the first time a user disables Wi-Fi with the feature enabled. -->
<string name="wifi_wakeup_onboarding_title">Wi\u2011Fi will turn on automatically</string>
diff --git a/core/res/res/xml/power_profile.xml b/core/res/res/xml/power_profile.xml
index bd0958dcf6c1..eff7c554e5ed 100644
--- a/core/res/res/xml/power_profile.xml
+++ b/core/res/res/xml/power_profile.xml
@@ -36,8 +36,8 @@
<item name="wifi.on">0.1</item> <!-- ~3mA -->
<item name="wifi.active">0.1</item> <!-- WIFI data transfer, ~200mA -->
<item name="wifi.scan">0.1</item> <!-- WIFI network scanning, ~100mA -->
- <item name="dsp.audio">0.1</item> <!-- ~10mA -->
- <item name="dsp.video">0.1</item> <!-- ~50mA -->
+ <item name="audio">0.1</item> <!-- ~10mA -->
+ <item name="video">0.1</item> <!-- ~50mA -->
<item name="camera.flashlight">0.1</item> <!-- Avg. power for camera flash, ~160mA -->
<item name="camera.avg">0.1</item> <!-- Avg. power use of camera in standard usecases, ~550mA -->
<item name="gps.on">0.1</item> <!-- ~50mA -->
diff --git a/core/res/res/xml/power_profile_test.xml b/core/res/res/xml/power_profile_test.xml
index eb347325a5b6..6dc5c7e16681 100644
--- a/core/res/res/xml/power_profile_test.xml
+++ b/core/res/res/xml/power_profile_test.xml
@@ -96,8 +96,11 @@
minute. -->
<item name="camera.avg">600</item>
- <!-- Additional power used when audio decoding/encoding via DSP -->
- <item name="dsp.audio">100</item>
+ <!-- Additional power used by the audio hardware, probably due to DSP -->
+ <item name="audio">100.0</item>
+
+ <!-- Additional power used by the video hardware, probably due to DSP -->
+ <item name="video">150.0</item> <!-- ~50mA -->
<!-- Additional power used when GPS is acquiring a signal -->
<item name="gps.on">10</item>
diff --git a/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java b/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
index 98b7a3fde56a..f5fe80c0f6ae 100644
--- a/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
+++ b/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
@@ -44,6 +44,7 @@ import org.junit.runners.Suite;
KernelUidCpuClusterTimeReaderTest.class,
KernelWakelockReaderTest.class,
LongSamplingCounterArrayTest.class,
+ PowerCalculatorTest.class,
PowerProfileTest.class
})
public class BatteryStatsTests {
diff --git a/core/tests/coretests/src/com/android/internal/os/PowerCalculatorTest.java b/core/tests/coretests/src/com/android/internal/os/PowerCalculatorTest.java
new file mode 100644
index 000000000000..14d62e0b2f9c
--- /dev/null
+++ b/core/tests/coretests/src/com/android/internal/os/PowerCalculatorTest.java
@@ -0,0 +1,71 @@
+/*
+ * 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.internal.os;
+
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import android.os.BatteryStats;
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+
+import junit.framework.TestCase;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+public class PowerCalculatorTest extends TestCase {
+ private static final long US_IN_HR = 1000L * 1000L * 60L * 60L;
+
+ @Mock
+ private PowerProfile mPowerProfile;
+
+ @Before
+ public void setUp() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ /** Test {@link MediaPowerCalculator#calculateApp} */
+ @Test
+ public void testMediaPowerCalculator() {
+ when(mPowerProfile.getAveragePower(PowerProfile.POWER_AUDIO)).thenReturn(12.0);
+ when(mPowerProfile.getAveragePower(PowerProfile.POWER_VIDEO)).thenReturn(25.0);
+
+ BatteryStats.Uid u = mock(BatteryStats.Uid.class);
+ BatteryStats.Timer audioTimer = mock(BatteryStats.Timer.class);
+ when(u.getAudioTurnedOnTimer()).thenReturn(audioTimer);
+ when(audioTimer.getTotalTimeLocked(2L * US_IN_HR, 0)).thenReturn(2L * US_IN_HR);
+ BatteryStats.Timer videoTimer = mock(BatteryStats.Timer.class);
+ when(u.getVideoTurnedOnTimer()).thenReturn(videoTimer);
+ when(videoTimer.getTotalTimeLocked(2L * US_IN_HR, 0)).thenReturn(1L * US_IN_HR);
+
+ MediaPowerCalculator mediaPowerCalculator = new MediaPowerCalculator(mPowerProfile);
+ BatterySipper app = new BatterySipper(BatterySipper.DrainType.APP, null, 0);
+
+ mediaPowerCalculator.calculateApp(app, u, 2L * US_IN_HR, 2L * US_IN_HR, 0);
+ assertEquals(49.0, app.sumPower());
+ }
+
+
+}
diff --git a/core/tests/coretests/src/com/android/internal/os/PowerProfileTest.java b/core/tests/coretests/src/com/android/internal/os/PowerProfileTest.java
index c7de99a0ade0..2853c965e871 100644
--- a/core/tests/coretests/src/com/android/internal/os/PowerProfileTest.java
+++ b/core/tests/coretests/src/com/android/internal/os/PowerProfileTest.java
@@ -54,6 +54,8 @@ public class PowerProfileTest extends TestCase {
assertEquals(60.0, mProfile.getAveragePowerForCpuCore(1, 3));
assertEquals(3000.0, mProfile.getBatteryCapacity());
assertEquals(0.5, mProfile.getAveragePower(PowerProfile.POWER_AMBIENT_DISPLAY));
+ assertEquals(100.0, mProfile.getAveragePower(PowerProfile.POWER_AUDIO));
+ assertEquals(150.0, mProfile.getAveragePower(PowerProfile.POWER_VIDEO));
}
}
diff --git a/media/java/android/media/MediaPlayer2.java b/media/java/android/media/MediaPlayer2.java
index 0cc744186a75..f73c38eb9fb0 100644
--- a/media/java/android/media/MediaPlayer2.java
+++ b/media/java/android/media/MediaPlayer2.java
@@ -130,22 +130,21 @@ import java.util.concurrent.Executor;
* the internal player engine.</li>
* <li>IllegalStateException is
* thrown to prevent programming errors such as calling
- * {@link #prepare()}, {@link #setDataSource(DataSourceDesc)}, or
- * {@code setPlaylist} methods in an invalid state. </li>
+ * {@link #prepare()}, {@link #setDataSource(DataSourceDesc)}
+ * methods in an invalid state. </li>
* </ul>
* </li>
* <li>Calling
- * {@link #setDataSource(DataSourceDesc)}, or
- * {@code setPlaylist} transfers a
+ * {@link #setDataSource(DataSourceDesc)} transfers a
* MediaPlayer2 object in the <em>Idle</em> state to the
* <em>Initialized</em> state.
* <ul>
* <li>An IllegalStateException is thrown if
- * setDataSource() or setPlaylist() is called in any other state.</li>
+ * setDataSource() is called in any other state.</li>
* <li>It is good programming
* practice to always look out for <code>IllegalArgumentException</code>
* and <code>IOException</code> that may be thrown from
- * <code>setDataSource</code> and <code>setPlaylist</code> methods.</li>
+ * <code>setDataSource</code>.</li>
* </ul>
* </li>
* <li>A MediaPlayer2 object must first enter the <em>Prepared</em> state
@@ -258,7 +257,7 @@ import java.util.concurrent.Executor;
* <tr><td>attachAuxEffect </p></td>
* <td>{Initialized, Prepared, Started, Paused, Stopped, PlaybackCompleted} </p></td>
* <td>{Idle, Error} </p></td>
- * <td>This method must be called after setDataSource or setPlaylist.
+ * <td>This method must be called after setDataSource.
* Calling it does not change the object state. </p></td></tr>
* <tr><td>getAudioSessionId </p></td>
* <td>any </p></td>
@@ -338,7 +337,7 @@ import java.util.concurrent.Executor;
* <td>{Initialized, Prepared, Started, Paused, Stopped, PlaybackCompleted,
* Error} </p></td>
* <td>This method must be called in idle state as the audio session ID must be known before
- * calling setDataSource or setPlaylist. Calling it does not change the object
+ * calling setDataSource. Calling it does not change the object
* state. </p></td></tr>
* <tr><td>setAudioStreamType (deprecated)</p></td>
* <td>{Idle, Initialized, Stopped, Prepared, Started, Paused,
@@ -358,13 +357,6 @@ import java.util.concurrent.Executor;
* <td>Successful invoke of this method in a valid state transfers the
* object to the <em>Initialized</em> state. Calling this method in an
* invalid state throws an IllegalStateException.</p></td></tr>
- * <tr><td>setPlaylist </p></td>
- * <td>{Idle} </p></td>
- * <td>{Initialized, Prepared, Started, Paused, Stopped, PlaybackCompleted,
- * Error} </p></td>
- * <td>Successful invoke of this method in a valid state transfers the
- * object to the <em>Initialized</em> state. Calling this method in an
- * invalid state throws an IllegalStateException.</p></td></tr>
* <tr><td>setDisplay </p></td>
* <td>any </p></td>
* <td>{} </p></td>
@@ -500,6 +492,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* This class implements the Java {@code AutoCloseable} interface and
* may be used with try-with-resources.
*/
+ // This is a synchronous call.
@Override
public abstract void close();
@@ -511,6 +504,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* prepared, the player will prepare the source and play.
*
*/
+ // This is an asynchronous call.
@Override
public abstract void play();
@@ -521,18 +515,21 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* call prepare().
*
*/
+ // This is an asynchronous call.
@Override
public abstract void prepare();
/**
* Pauses playback. Call play() to resume.
*/
+ // This is an asynchronous call.
@Override
public abstract void pause();
/**
* Tries to play next data source if applicable.
*/
+ // This is an asynchronous call.
@Override
public abstract void skipToNext();
@@ -542,6 +539,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
*
* @param msec the offset in milliseconds from the start to seek to
*/
+ // This is an asynchronous call.
@Override
public void seekTo(long msec) {
seekTo(msec, SEEK_PREVIOUS_SYNC /* mode */);
@@ -600,6 +598,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* for the audio attributes to become effective thereafter.
* @param attributes a non-null set of audio attributes
*/
+ // This is an asynchronous call.
@Override
public abstract void setAudioAttributes(@NonNull AudioAttributes attributes);
@@ -615,6 +614,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
*
* @param dsd the descriptor of data source you want to play
*/
+ // This is an asynchronous call.
@Override
public abstract void setDataSource(@NonNull DataSourceDesc dsd);
@@ -624,6 +624,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
*
* @param dsd the descriptor of data source you want to play after current one
*/
+ // This is an asynchronous call.
@Override
public abstract void setNextDataSource(@NonNull DataSourceDesc dsd);
@@ -632,6 +633,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
*
* @param dsds the list of data sources you want to play after current one
*/
+ // This is an asynchronous call.
@Override
public abstract void setNextDataSources(@NonNull List<DataSourceDesc> dsds);
@@ -647,6 +649,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* Configures the player to loop on the current data source.
* @param loop true if the current data source is meant to loop.
*/
+ // This is an asynchronous call.
@Override
public abstract void loopCurrent(boolean loop);
@@ -659,6 +662,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* by the player, see {@link #getPlaybackSpeed()}.
* @param speed the desired playback speed
*/
+ // This is an asynchronous call.
@Override
public abstract void setPlaybackSpeed(float speed);
@@ -692,6 +696,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* gain. See {@link #getMaxPlayerVolume()} for the volume range supported by this player.
* @param volume a value between 0.0f and {@link #getMaxPlayerVolume()}.
*/
+ // This is an asynchronous call.
@Override
public abstract void setPlayerVolume(float volume);
@@ -716,6 +721,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* @param e the {@link Executor} to be used for the events.
* @param cb the callback to receive the events.
*/
+ // This is a synchronous call.
@Override
public abstract void registerPlayerEventCallback(@NonNull Executor e,
@NonNull PlayerEventCallback cb);
@@ -724,6 +730,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* Removes a previously registered callback for player events
* @param cb the callback to remove
*/
+ // This is a synchronous call.
@Override
public abstract void unregisterPlayerEventCallback(@NonNull PlayerEventCallback cb);
@@ -746,7 +753,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* Invoke a generic method on the native player using opaque
* parcels for the request and reply. Both payloads' format is a
* convention between the java caller and the native player.
- * Must be called after setDataSource or setPlaylist to make sure a native player
+ * Must be called after setDataSource to make sure a native player
* exists. On failure, a RuntimeException is thrown.
*
* @param request Parcel with the data for the extension. The
@@ -769,6 +776,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* @param label An application specific Object used to help to identify the completeness
* of a batch of commands.
*/
+ // This is an asynchronous call.
public void notifyWhenCommandLabelReached(Object label) { }
/**
@@ -807,6 +815,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* @throws IllegalStateException if the internal player engine has not been
* initialized or has been released.
*/
+ // This is an asynchronous call.
public abstract void setSurface(Surface surface);
/* Do not change these video scaling mode values below without updating
@@ -855,6 +864,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
/**
* Discards all pending commands.
*/
+ // This is a synchronous call.
public abstract void clearPendingCommands();
/**
@@ -878,6 +888,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* @return true if succesful, false if the specified {@link AudioDeviceInfo} is non-null and
* does not correspond to a valid audio device.
*/
+ // This is an asynchronous call.
@Override
public abstract boolean setPreferredDevice(AudioDeviceInfo deviceInfo);
@@ -905,6 +916,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* @param handler Specifies the {@link Handler} object for the thread on which to execute
* the callback. If <code>null</code>, the handler on the main looper will be used.
*/
+ // This is a synchronous call.
@Override
public abstract void addOnRoutingChangedListener(AudioRouting.OnRoutingChangedListener listener,
Handler handler);
@@ -915,6 +927,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* @param listener The previously added {@link AudioRouting.OnRoutingChangedListener} interface
* to remove.
*/
+ // This is a synchronous call.
@Override
public abstract void removeOnRoutingChangedListener(AudioRouting.OnRoutingChangedListener listener);
@@ -1070,6 +1083,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* @throws IllegalArgumentException if params is invalid or not supported.
* @hide
*/
+ // This is an asynchronous call.
public void setBufferingParams(@NonNull BufferingParams params) { }
/**
@@ -1152,6 +1166,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
*
* @param params the playback params.
*/
+ // This is an asynchronous call.
public abstract void setPlaybackParams(@NonNull PlaybackParams params);
/**
@@ -1167,6 +1182,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
*
* @param params the A/V sync params to apply
*/
+ // This is an asynchronous call.
public abstract void setSyncParams(@NonNull SyncParams params);
/**
@@ -1255,6 +1271,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* {@link #SEEK_CLOSEST} often has larger performance overhead compared
* to the other options if there is no sync frame located at msec.
*/
+ // This is an asynchronous call.
public abstract void seekTo(long msec, @SeekMode int mode);
/**
@@ -1327,6 +1344,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* this method, you will have to initialize it again by setting the
* data source and calling prepare().
*/
+ // This is a synchronous call.
@Override
public abstract void reset();
@@ -1365,6 +1383,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* by calling this method.
* This method must be called before one of the overloaded <code> setDataSource </code> methods.
*/
+ // This is an asynchronous call.
public abstract void setAudioSessionId(int sessionId);
/**
@@ -1389,6 +1408,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* methods.
* @param effectId system wide unique id of the effect to attach
*/
+ // This is an asynchronous call.
public abstract void attachAuxEffect(int effectId);
@@ -1404,6 +1424,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* 0 < x <= R -> level = 10^(72*(x-R)/20/R)
* @param level send level scalar
*/
+ // This is an asynchronous call.
public abstract void setAuxEffectSendLevel(float level);
/**
@@ -1618,6 +1639,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
*
* @see android.media.MediaPlayer2#getTrackInfo
*/
+ // This is an asynchronous call.
public abstract void selectTrack(int index);
/**
@@ -1634,6 +1656,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
*
* @see android.media.MediaPlayer2#getTrackInfo
*/
+ // This is an asynchronous call.
public abstract void deselectTrack(int index);
/** @hide */
@@ -1754,8 +1777,6 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* <li>{@link #MEDIA_CALL_PAUSE}
* <li>{@link #MEDIA_CALL_PLAY}
* <li>{@link #MEDIA_CALL_PREPARE}
- * <li>{@link #MEDIA_CALL_PREPARE_DRM}
- * <li>{@link #MEDIA_CALL_PROVIDE_DRM_KEY_RESPONSE}
* <li>{@link #MEDIA_CALL_RELEASE_DRM}
* <li>{@link #MEDIA_CALL_RESTORE_DRM_KEYS}
* <li>{@link #MEDIA_CALL_SEEK_TO}
@@ -1764,8 +1785,6 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* <li>{@link #MEDIA_CALL_SET_AUDIO_SESSION_ID}
* <li>{@link #MEDIA_CALL_SET_AUX_EFFECT_SEND_LEVEL}
* <li>{@link #MEDIA_CALL_SET_DATA_SOURCE}
- * <li>{@link #MEDIA_CALL_SET_DRM_CONFIG_HELPER}
- * <li>{@link #MEDIA_CALL_SET_DRM_PROPERTY_STRING}
* <li>{@link #MEDIA_CALL_SET_NEXT_DATA_SOURCE}
* <li>{@link #MEDIA_CALL_SET_NEXT_DATA_SOURCES}
* <li>{@link #MEDIA_CALL_SET_PLAYBACK_PARAMS}
@@ -1804,12 +1823,14 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* @param eventCallback the callback that will be run
* @param executor the executor through which the callback should be invoked
*/
+ // This is a synchronous call.
public abstract void setMediaPlayer2EventCallback(@NonNull @CallbackExecutor Executor executor,
@NonNull MediaPlayer2EventCallback eventCallback);
/**
* Clears the {@link MediaPlayer2EventCallback}.
*/
+ // This is a synchronous call.
public abstract void clearMediaPlayer2EventCallback();
/**
@@ -1830,6 +1851,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
*
* @hide
*/
+ // This is a synchronous call.
public void setOnSubtitleDataListener(OnSubtitleDataListener listener) { }
@@ -1996,136 +2018,128 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
public static final int MEDIA_INFO_SUBTITLE_TIMED_OUT = 902;
//--------------------------------------------------------------------------
- /** The player just completed a call {@code attachAuxEffect}.
+ /** The player just completed a call {@link #attachAuxEffect}.
* @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
*/
public static final int MEDIA_CALL_ATTACH_AUX_EFFECT = 1;
- /** The player just completed a call {@code deselectTrack}.
+ /** The player just completed a call {@link #deselectTrack}.
* @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
*/
public static final int MEDIA_CALL_DESELECT_TRACK = 2;
- /** The player just completed a call {@code loopCurrent}.
+ /** The player just completed a call {@link #loopCurrent}.
* @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
*/
public static final int MEDIA_CALL_LOOP_CURRENT = 3;
- /** The player just completed a call {@code pause}.
+ /** The player just completed a call {@link #pause}.
* @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
*/
public static final int MEDIA_CALL_PAUSE = 4;
- /** The player just completed a call {@code play}.
+ /** The player just completed a call {@link #play}.
* @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
*/
public static final int MEDIA_CALL_PLAY = 5;
- /** The player just completed a call {@code prepare}.
+ /** The player just completed a call {@link #prepare}.
* @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
*/
public static final int MEDIA_CALL_PREPARE = 6;
- /** The player just completed a call {@code prepareDrm}.
- * @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
- */
- public static final int MEDIA_CALL_PREPARE_DRM = 7;
-
- /** The player just completed a call {@code provideDrmKeyResponse}.
- * @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
- */
- public static final int MEDIA_CALL_PROVIDE_DRM_KEY_RESPONSE = 8;
-
- /** The player just completed a call {@code releaseDrm}.
+ /** The player just completed a call {@link #releaseDrm}.
* @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
*/
public static final int MEDIA_CALL_RELEASE_DRM = 12;
- /** The player just completed a call {@code restoreDrmKeys}.
+ /** The player just completed a call {@link #restoreDrmKeys}.
* @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
*/
public static final int MEDIA_CALL_RESTORE_DRM_KEYS = 13;
- /** The player just completed a call {@code seekTo}.
+ /** The player just completed a call {@link #seekTo}.
* @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
*/
public static final int MEDIA_CALL_SEEK_TO = 14;
- /** The player just completed a call {@code selectTrack}.
+ /** The player just completed a call {@link #selectTrack}.
* @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
*/
public static final int MEDIA_CALL_SELECT_TRACK = 15;
- /** The player just completed a call {@code setAudioAttributes}.
+ /** The player just completed a call {@link #setAudioAttributes}.
* @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
*/
public static final int MEDIA_CALL_SET_AUDIO_ATTRIBUTES = 16;
- /** The player just completed a call {@code setAudioSessionId}.
+ /** The player just completed a call {@link #setAudioSessionId}.
* @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
*/
public static final int MEDIA_CALL_SET_AUDIO_SESSION_ID = 17;
- /** The player just completed a call {@code setAuxEffectSendLevel}.
+ /** The player just completed a call {@link #setAuxEffectSendLevel}.
* @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
*/
public static final int MEDIA_CALL_SET_AUX_EFFECT_SEND_LEVEL = 18;
- /** The player just completed a call {@code setDataSource}.
+ /** The player just completed a call {@link #setDataSource}.
* @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
*/
public static final int MEDIA_CALL_SET_DATA_SOURCE = 19;
- /** The player just completed a call {@code setOnDrmConfigHelper}.
- * @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
- */
- public static final int MEDIA_CALL_SET_DRM_CONFIG_HELPER = 20;
-
- /** The player just completed a call {@code setDrmPropertyString}.
- * @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
- */
- public static final int MEDIA_CALL_SET_DRM_PROPERTY_STRING = 21;
-
- /** The player just completed a call {@code setNextDataSource}.
+ /** The player just completed a call {@link #setNextDataSource}.
* @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
*/
public static final int MEDIA_CALL_SET_NEXT_DATA_SOURCE = 22;
- /** The player just completed a call {@code setNextDataSources}.
+ /** The player just completed a call {@link #setNextDataSources}.
* @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
*/
public static final int MEDIA_CALL_SET_NEXT_DATA_SOURCES = 23;
- /** The player just completed a call {@code setPlaybackParams}.
+ /** The player just completed a call {@link #setPlaybackParams}.
* @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
*/
public static final int MEDIA_CALL_SET_PLAYBACK_PARAMS = 24;
- /** The player just completed a call {@code setPlaybackSpeed}.
+ /** The player just completed a call {@link #setPlaybackSpeed}.
* @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
*/
public static final int MEDIA_CALL_SET_PLAYBACK_SPEED = 25;
- /** The player just completed a call {@code setPlayerVolume}.
+ /** The player just completed a call {@link #setPlayerVolume}.
* @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
*/
public static final int MEDIA_CALL_SET_PLAYER_VOLUME = 26;
- /** The player just completed a call {@code setSurface}.
+ /** The player just completed a call {@link #setSurface}.
* @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
*/
public static final int MEDIA_CALL_SET_SURFACE = 27;
- /** The player just completed a call {@code setSyncParams}.
+ /** The player just completed a call {@link #setSyncParams}.
* @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
*/
public static final int MEDIA_CALL_SET_SYNC_PARAMS = 28;
- /** The player just completed a call {@code skipToNext}.
+ /** The player just completed a call {@link #skipToNext}.
* @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
*/
public static final int MEDIA_CALL_SKIP_TO_NEXT = 29;
+ /** The player just completed a call {@link #setBufferingParams}.
+ * @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
+ * @hide
+ */
+ public static final int MEDIA_CALL_SET_BUFFERING_PARAMS = 1001;
+
+ /** The player just completed a call {@link #setPreferredDevice}.
+ * @see android.media.MediaPlayer2.MediaPlayer2EventCallback#onCallComplete
+ * @hide
+ */
+ public static final int MEDIA_CALL_SET_PREFERRED_DEVICE = 1002;
+
// Modular DRM begin
@@ -2136,8 +2150,8 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* 'securityLevel', which has to be set after DRM scheme creation but
* before the DRM session is opened.
*
- * The only allowed DRM calls in this listener are {@code getDrmPropertyString}
- * and {@code setDrmPropertyString}.
+ * The only allowed DRM calls in this listener are {@link #getDrmPropertyString}
+ * and {@link #setDrmPropertyString}.
*/
public interface OnDrmConfigHelper
{
@@ -2158,6 +2172,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
*
* @param listener the callback that will be run
*/
+ // This is a synchronous call.
public abstract void setOnDrmConfigHelper(OnDrmConfigHelper listener);
/**
@@ -2176,7 +2191,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
public void onDrmInfo(MediaPlayer2 mp, DataSourceDesc dsd, DrmInfo drmInfo) { }
/**
- * Called to notify the client that {@code prepareDrm} is finished and ready for
+ * Called to notify the client that {@link #prepareDrm} is finished and ready for
* key request/response.
*
* @param mp the {@code MediaPlayer2} associated with this callback
@@ -2196,12 +2211,14 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* @param eventCallback the callback that will be run
* @param executor the executor through which the callback should be invoked
*/
+ // This is a synchronous call.
public abstract void setDrmEventCallback(@NonNull @CallbackExecutor Executor executor,
@NonNull DrmEventCallback eventCallback);
/**
* Clears the {@link DrmEventCallback}.
*/
+ // This is a synchronous call.
public abstract void clearDrmEventCallback();
/**
@@ -2248,10 +2265,10 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
/**
* Prepares the DRM for the current source
* <p>
- * If {@code OnDrmConfigHelper} is registered, it will be called during
+ * If {@link OnDrmConfigHelper} is registered, it will be called during
* preparation to allow configuration of the DRM properties before opening the
* DRM session. Note that the callback is called synchronously in the thread that called
- * {@code prepareDrm}. It should be used only for a series of {@code getDrmPropertyString}
+ * {@link #prepareDrm}. It should be used only for a series of {@code getDrmPropertyString}
* and {@code setDrmPropertyString} calls and refrain from any lengthy operation.
* <p>
* If the device has not been provisioned before, this call also provisions the device
@@ -2281,6 +2298,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* @throws ProvisioningServerErrorException if provisioning is required but failed due to
* the request denied by the provisioning server
*/
+ // This is a synchronous call.
public abstract void prepareDrm(@NonNull UUID uuid)
throws UnsupportedSchemeException, ResourceBusyException,
ProvisioningNetworkErrorException, ProvisioningServerErrorException;
@@ -2294,6 +2312,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
*
* @throws NoDrmSchemeException if there is no active DRM session to release
*/
+ // This is an asynchronous call.
public abstract void releaseDrm() throws NoDrmSchemeException;
/**
@@ -2359,6 +2378,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* @throws DeniedByServerException if the response indicates that the
* server rejected the request
*/
+ // This is a synchronous call.
public abstract byte[] provideDrmKeyResponse(
@Nullable byte[] keySetId, @NonNull byte[] response)
throws NoDrmSchemeException, DeniedByServerException;
@@ -2369,6 +2389,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
*
* @param keySetId identifies the saved key set to restore
*/
+ // This is an asynchronous call.
public abstract void restoreDrmKeys(@NonNull byte[] keySetId)
throws NoDrmSchemeException;
@@ -2396,6 +2417,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* {@link MediaDrm#PROPERTY_VENDOR}, {@link MediaDrm#PROPERTY_VERSION},
* {@link MediaDrm#PROPERTY_DESCRIPTION}, {@link MediaDrm#PROPERTY_ALGORITHMS}
*/
+ // This is a synchronous call.
public abstract void setDrmPropertyString(
@NonNull @MediaDrm.StringProperty String propertyName, @NonNull String value)
throws NoDrmSchemeException;
diff --git a/media/java/android/media/MediaSession2.java b/media/java/android/media/MediaSession2.java
index d94be66c853a..cad63e3950a1 100644
--- a/media/java/android/media/MediaSession2.java
+++ b/media/java/android/media/MediaSession2.java
@@ -709,8 +709,7 @@ public class MediaSession2 implements AutoCloseable, MediaPlaylistController {
* @param player a {@link MediaPlayerBase} that handles actual media playback in your app.
*/
U setPlayer(@NonNull MediaPlayerBase player) {
- // TODO(jaewan): Change the provider properly (b/74093082)
- mProvider.setPlayer_impl(player, null, null);
+ mProvider.setPlayer_impl(player);
return (U) this;
}
@@ -722,7 +721,7 @@ public class MediaSession2 implements AutoCloseable, MediaPlaylistController {
* {@code player.}
*/
U setPlaylistController(@NonNull MediaPlaylistController mplc) {
- // TODO(jaewan): implement this (b/74093082)
+ mProvider.setPlaylistController_impl(mplc);
return (U) this;
}
@@ -733,7 +732,7 @@ public class MediaSession2 implements AutoCloseable, MediaPlaylistController {
* @param volumeProvider The provider that will receive volume button events.
*/
U setVolumeProvider(@NonNull VolumeProvider2 volumeProvider) {
- // TODO(jaewan): implement this (b/74093082)
+ mProvider.setVolumeProvider_impl(volumeProvider);
return (U) this;
}
@@ -805,25 +804,16 @@ public class MediaSession2 implements AutoCloseable, MediaPlaylistController {
@Override
public Builder setPlayer(@NonNull MediaPlayerBase player) {
- if (player == null) {
- throw new IllegalArgumentException("Illegal null MediaPlayerBase");
- }
return super.setPlayer(player);
}
@Override
public Builder setPlaylistController(@NonNull MediaPlaylistController mplc) {
- if (mplc == null) {
- throw new IllegalArgumentException("Illegal null MediaPlaylistController");
- }
return super.setPlaylistController(mplc);
}
@Override
public Builder setVolumeProvider(@NonNull VolumeProvider2 volumeProvider) {
- if (volumeProvider == null) {
- throw new IllegalArgumentException("Illegal null VolumeProvider2");
- }
return super.setVolumeProvider(volumeProvider);
}
diff --git a/media/java/android/media/update/MediaSession2Provider.java b/media/java/android/media/update/MediaSession2Provider.java
index f97a6f07a45b..295175260106 100644
--- a/media/java/android/media/update/MediaSession2Provider.java
+++ b/media/java/android/media/update/MediaSession2Provider.java
@@ -123,8 +123,9 @@ public interface MediaSession2Provider extends TransportControlProvider {
}
interface BuilderBaseProvider<T extends MediaSession2, C extends SessionCallback> {
- void setPlayer_impl(MediaPlayerBase player, MediaPlaylistController mplc,
- VolumeProvider2 volumeProvider);
+ void setPlayer_impl(MediaPlayerBase player);
+ void setPlaylistController_impl(MediaPlaylistController mplc);
+ void setVolumeProvider_impl(VolumeProvider2 volumeProvider);
void setSessionActivity_impl(PendingIntent pi);
void setId_impl(String id);
void setSessionCallback_impl(Executor executor, C callback);
diff --git a/media/java/android/mtp/MtpDatabase.java b/media/java/android/mtp/MtpDatabase.java
index a647dcc2d4b9..32a00d597e62 100755
--- a/media/java/android/mtp/MtpDatabase.java
+++ b/media/java/android/mtp/MtpDatabase.java
@@ -292,7 +292,9 @@ public class MtpDatabase implements AutoCloseable {
mCloseGuard.close();
if (mClosed.compareAndSet(false, true)) {
mMediaScanner.close();
- mMediaProvider.close();
+ if (mMediaProvider != null) {
+ mMediaProvider.close();
+ }
native_finalize();
}
}
diff --git a/packages/SystemUI/res/layout/super_status_bar.xml b/packages/SystemUI/res/layout/super_status_bar.xml
index 029d16e999cc..ef442e539c0c 100644
--- a/packages/SystemUI/res/layout/super_status_bar.xml
+++ b/packages/SystemUI/res/layout/super_status_bar.xml
@@ -43,7 +43,8 @@
android:visibility="invisible" />
</com.android.systemui.statusbar.BackDropView>
- <com.android.systemui.statusbar.ScrimView android:id="@+id/scrim_behind"
+ <com.android.systemui.statusbar.ScrimView
+ android:id="@+id/scrim_behind"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:importantForAccessibility="no"
@@ -75,7 +76,8 @@
android:layout_height="match_parent"
android:visibility="invisible" />
- <com.android.systemui.statusbar.ScrimView android:id="@+id/scrim_in_front"
+ <com.android.systemui.statusbar.ScrimView
+ android:id="@+id/scrim_in_front"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:importantForAccessibility="no"
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
index 7572512eac31..6b9920696baf 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
@@ -72,6 +72,7 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe
private int mIconSize;
private Consumer<Boolean> mListener;
private boolean mHasHeader;
+ private boolean mHideContent;
public KeyguardSliceView(Context context) {
this(context, null, 0);
@@ -192,12 +193,16 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe
}
}
- final int visibility = mHasHeader || subItemsCount > 0 ? VISIBLE : GONE;
+ updateVisibility();
+ mListener.accept(mHasHeader);
+ }
+
+ private void updateVisibility() {
+ final boolean hasContent = mHasHeader || mRow.getChildCount() > 0;
+ final int visibility = hasContent && !mHideContent ? VISIBLE : GONE;
if (visibility != getVisibility()) {
setVisibility(visibility);
}
-
- mListener.accept(mHasHeader);
}
/**
@@ -321,6 +326,11 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe
updateTextColors();
}
+ public void setHideContent(boolean hideContent) {
+ mHideContent = hideContent;
+ updateVisibility();
+ }
+
/**
* Representation of an item that appears under the clock on main keyguard message.
*/
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java
index 3b5f34cd84cc..a3ffa40ee19a 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java
@@ -362,7 +362,7 @@ public class KeyguardStatusView extends GridLayout {
public void setPulsing(boolean pulsing) {
mPulsing = pulsing;
- mKeyguardSlice.setVisibility(pulsing ? INVISIBLE : VISIBLE);
+ mKeyguardSlice.setHideContent(pulsing);
onSliceContentChanged(mKeyguardSlice.hasHeader());
updateDozeVisibleViews();
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsOnboarding.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsOnboarding.java
index 127361a8bdd3..d9359a43d8a8 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsOnboarding.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsOnboarding.java
@@ -21,6 +21,7 @@ import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
import android.annotation.TargetApi;
import android.app.ActivityManager;
+import android.content.ComponentName;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
@@ -65,6 +66,8 @@ public class RecentsOnboarding {
private static final long SHOW_HIDE_DURATION_MS = 300;
// Don't show the onboarding until the user has launched this number of apps.
private static final int SHOW_ON_APP_LAUNCH = 2;
+ // After explicitly dismissing, show again after launching this number of apps.
+ private static final int SHOW_ON_APP_LAUNCH_AFTER_DISMISS = 5;
private final Context mContext;
private final WindowManager mWindowManager;
@@ -84,6 +87,9 @@ public class RecentsOnboarding {
private boolean mTaskListenerRegistered;
private boolean mLayoutAttachedToWindow;
private boolean mBackgroundIsLight;
+ private int mLastTaskId;
+ private boolean mHasDismissed;
+ private int mNumAppsLaunchedSinceDismiss;
private final SysUiTaskStackChangeListener mTaskListener = new SysUiTaskStackChangeListener() {
@Override
@@ -94,14 +100,26 @@ public class RecentsOnboarding {
hide(true);
return;
}
+ if (info.id == mLastTaskId) {
+ // We only count launches that go to a new task.
+ return;
+ }
int activityType = info.configuration.windowConfiguration.getActivityType();
- int numAppsLaunched = Prefs.getInt(mContext, Prefs.Key.NUM_APPS_LAUNCHED, 0);
if (activityType == ACTIVITY_TYPE_STANDARD) {
+ mLastTaskId = info.id;
+ int numAppsLaunched = mHasDismissed ? mNumAppsLaunchedSinceDismiss
+ : Prefs.getInt(mContext, Prefs.Key.NUM_APPS_LAUNCHED, 0);
+ int showOnAppLaunch = mHasDismissed ? SHOW_ON_APP_LAUNCH_AFTER_DISMISS
+ : SHOW_ON_APP_LAUNCH;
numAppsLaunched++;
- if (numAppsLaunched >= SHOW_ON_APP_LAUNCH) {
+ if (numAppsLaunched >= showOnAppLaunch) {
show();
} else {
- Prefs.putInt(mContext, Prefs.Key.NUM_APPS_LAUNCHED, numAppsLaunched);
+ if (mHasDismissed) {
+ mNumAppsLaunchedSinceDismiss = numAppsLaunched;
+ } else {
+ Prefs.putInt(mContext, Prefs.Key.NUM_APPS_LAUNCHED, numAppsLaunched);
+ }
}
} else {
hide(false);
@@ -115,6 +133,7 @@ public class RecentsOnboarding {
public void onViewAttachedToWindow(View view) {
if (view == mLayout) {
mLayoutAttachedToWindow = true;
+ mHasDismissed = false;
}
}
@@ -149,7 +168,11 @@ public class RecentsOnboarding {
mLayout.addOnAttachStateChangeListener(mOnAttachStateChangeListener);
mLayout.setBackground(mBackgroundDrawable);
- mDismissView.setOnClickListener(v -> hide(true));
+ mDismissView.setOnClickListener(v -> {
+ hide(true);
+ mHasDismissed = true;
+ mNumAppsLaunchedSinceDismiss = 0;
+ });
if (RESET_PREFS_FOR_DEBUG) {
Prefs.putBoolean(mContext, Prefs.Key.HAS_SEEN_RECENTS_ONBOARDING, false);
@@ -180,6 +203,8 @@ public class RecentsOnboarding {
ActivityManagerWrapper.getInstance().unregisterTaskStackListener(mTaskListener);
mTaskListenerRegistered = false;
}
+ mHasDismissed = false;
+ mNumAppsLaunchedSinceDismiss = 0;
hide(false);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ScrimView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ScrimView.java
index 8830352296dd..475a6091323e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ScrimView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ScrimView.java
@@ -107,6 +107,11 @@ public class ScrimView extends View implements ConfigurationController.Configura
}
@Override
+ public void setBackground(Drawable background) {
+ Log.wtfStack(TAG, "ScrimView should never have a background.");
+ }
+
+ @Override
protected void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
int densityDpi = newConfig.densityDpi;
@@ -321,18 +326,6 @@ public class ScrimView extends View implements ConfigurationController.Configura
return mViewAlpha;
}
- public void animateViewAlpha(float alpha, long durationOut, Interpolator interpolator) {
- if (mAlphaAnimator != null) {
- mAlphaAnimator.cancel();
- }
- mAlphaAnimator = ValueAnimator.ofFloat(getViewAlpha(), alpha);
- mAlphaAnimator.addUpdateListener(mAlphaUpdateListener);
- mAlphaAnimator.addListener(mClearAnimatorListener);
- mAlphaAnimator.setInterpolator(interpolator);
- mAlphaAnimator.setDuration(durationOut);
- mAlphaAnimator.start();
- }
-
public void setExcludedArea(Rect area) {
if (area == null) {
mHasExcludedArea = false;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
index 407be6253bfd..11e57e19b64c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
@@ -665,7 +665,7 @@ public class NavigationBarFragment extends Fragment implements Callbacks {
}
private void notifyNavigationBarScreenOn() {
- mNavigationBarView.notifyScreenOn();
+ mNavigationBarView.updateNavButtonIcons();
}
private void prepareNavigationBarView() {
@@ -813,7 +813,7 @@ public class NavigationBarFragment extends Fragment implements Callbacks {
if ((time - mLastLockToAppLongPress) < LOCK_TO_APP_GESTURE_TOLERENCE) {
activityManager.stopSystemLockTaskMode();
// When exiting refresh disabled flags.
- mNavigationBarView.setDisabledFlags(mDisabledFlags1, true);
+ mNavigationBarView.updateNavButtonIcons();
return true;
} else if (v.getId() == btnId1) {
ButtonDispatcher button = btnId2 == R.id.recent_apps
@@ -835,7 +835,7 @@ public class NavigationBarFragment extends Fragment implements Callbacks {
// should stop lock task.
activityManager.stopSystemLockTaskMode();
// When exiting refresh disabled flags.
- mNavigationBarView.setDisabledFlags(mDisabledFlags1, true);
+ mNavigationBarView.updateNavButtonIcons();
return true;
} else if (v.getId() == btnId2) {
return btnId2 == R.id.recent_apps
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
index 74fbed1b0da7..3b080cf3984a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
@@ -244,7 +244,7 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
mConfiguration = new Configuration();
mConfiguration.updateFrom(context.getResources().getConfiguration());
- updateIcons(context, Configuration.EMPTY, mConfiguration);
+ reloadNavIcons();
mBarTransitions = new NavigationBarTransitions(this);
@@ -291,7 +291,7 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
public void onConnectionChanged(boolean isConnected) {
updateSlippery();
- setDisabledFlags(mDisabledFlags, true);
+ updateNavButtonIcons();
setUpSwipeUpOnboarding(isConnected);
}
@@ -403,6 +403,10 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
R.drawable.ic_sysbar_home_carmode, R.drawable.ic_sysbar_home_carmode);
}
+ private void reloadNavIcons() {
+ updateIcons(mContext, Configuration.EMPTY, mConfiguration);
+ }
+
private void updateIcons(Context ctx, Configuration oldConfig, Configuration newConfig) {
if (oldConfig.orientation != newConfig.orientation
|| oldConfig.densityDpi != newConfig.densityDpi) {
@@ -482,20 +486,11 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
@Override
public void setLayoutDirection(int layoutDirection) {
- // Reload all the icons
- updateIcons(getContext(), Configuration.EMPTY, mConfiguration);
+ reloadNavIcons();
super.setLayoutDirection(layoutDirection);
}
- public void notifyScreenOn() {
- setDisabledFlags(mDisabledFlags, true);
- }
-
- public void setNavigationIconHints(int hints) {
- setNavigationIconHints(hints, false);
- }
-
private KeyButtonDrawable getBackIconWithAlt(boolean carMode, boolean landscape) {
return landscape
? carMode ? mBackAltLandCarModeIcon : mBackAltLandIcon
@@ -508,8 +503,8 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
: carMode ? mBackCarModeIcon : mBackIcon;
}
- public void setNavigationIconHints(int hints, boolean force) {
- if (!force && hints == mNavigationIconHints) return;
+ public void setNavigationIconHints(int hints) {
+ if (hints == mNavigationIconHints) return;
final boolean backAlt = (hints & StatusBarManager.NAVIGATION_HINT_BACK_ALT) != 0;
if ((mNavigationIconHints & StatusBarManager.NAVIGATION_HINT_BACK_ALT) != 0 && !backAlt) {
mTransitionListener.onBackAltCleared();
@@ -519,16 +514,32 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
"Navigation icon hints = " + hints,
500).show();
}
-
mNavigationIconHints = hints;
+ updateNavButtonIcons();
+ }
+
+ public void setDisabledFlags(int disabledFlags) {
+ if (mDisabledFlags == disabledFlags) return;
+
+ final boolean overviewEnabledBefore = isOverviewEnabled();
+ mDisabledFlags = disabledFlags;
+ // Update icons if overview was just enabled to ensure the correct icons are present
+ if (!overviewEnabledBefore && isOverviewEnabled()) {
+ reloadNavIcons();
+ }
+
+ updateNavButtonIcons();
+ }
+
+ public void updateNavButtonIcons() {
// We have to replace or restore the back and home button icons when exiting or entering
// carmode, respectively. Recents are not available in CarMode in nav bar so change
// to recent icon is not required.
- KeyButtonDrawable backIcon = (backAlt)
- ? getBackIconWithAlt(mUseCarModeUi, mVertical)
- : getBackIcon(mUseCarModeUi, mVertical);
-
+ KeyButtonDrawable backIcon
+ = ((mNavigationIconHints & StatusBarManager.NAVIGATION_HINT_BACK_ALT) != 0)
+ ? getBackIconWithAlt(mUseCarModeUi, mVertical)
+ : getBackIcon(mUseCarModeUi, mVertical);
getBackButton().setImageDrawable(backIcon);
updateRecentsIcon();
@@ -542,8 +553,8 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
// Update IME button visibility, a11y and rotate button always overrides the appearance
final boolean showImeButton =
!mShowAccessibilityButton &&
- !mShowRotateButton &&
- ((hints & StatusBarManager.NAVIGATION_HINT_IME_SHOWN) != 0);
+ !mShowRotateButton &&
+ ((mNavigationIconHints & StatusBarManager.NAVIGATION_HINT_IME_SHOWN) != 0);
getImeSwitchButton().setVisibility(showImeButton ? View.VISIBLE : View.INVISIBLE);
getImeSwitchButton().setImageDrawable(mImeIcon);
@@ -558,26 +569,14 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
setAccessibilityButtonState(mShowAccessibilityButton, mLongClickableAccessibilityButton);
getAccessibilityButton().setImageDrawable(mAccessibilityIcon);
- setDisabledFlags(mDisabledFlags, true);
-
mBarTransitions.reapplyDarkIntensity();
- }
-
- public void setDisabledFlags(int disabledFlags) {
- setDisabledFlags(disabledFlags, false);
- }
-
- public void setDisabledFlags(int disabledFlags, boolean force) {
- if (!force && mDisabledFlags == disabledFlags) return;
-
- mDisabledFlags = disabledFlags;
- boolean disableHome = ((disabledFlags & View.STATUS_BAR_DISABLE_HOME) != 0);
+ boolean disableHome = ((mDisabledFlags & View.STATUS_BAR_DISABLE_HOME) != 0);
// Always disable recents when alternate car mode UI is active.
boolean disableRecent = mUseCarModeUi || !isOverviewEnabled();
- boolean disableBack = ((disabledFlags & View.STATUS_BAR_DISABLE_BACK) != 0)
+ boolean disableBack = ((mDisabledFlags & View.STATUS_BAR_DISABLE_BACK) != 0)
&& ((mNavigationIconHints & StatusBarManager.NAVIGATION_HINT_BACK_ALT) == 0);
// When screen pinning, don't hide back and home when connected service or back and
@@ -670,7 +669,7 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
public void updateStates() {
updateSlippery();
- setDisabledFlags(mDisabledFlags, true);
+ updateNavButtonIcons();
}
private void updateSlippery() {
@@ -773,7 +772,7 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
}
// Hide/restore other button visibility, if necessary
- setNavigationIconHints(mNavigationIconHints, true);
+ updateNavButtonIcons();
}
public boolean isRotateButtonVisible() { return mShowRotateButton; }
@@ -802,8 +801,8 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
public void onOverviewProxyConnectionChanged(boolean isConnected) {
updateStates();
setUpSwipeUpOnboarding(isQuickStepSwipeUpEnabled());
- updateIcons(getContext(), Configuration.EMPTY, mConfiguration);
- setNavigationIconHints(mNavigationIconHints, true);
+ reloadNavIcons();
+ updateNavButtonIcons();
}
@Override
@@ -879,7 +878,6 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
// force the low profile & disabled states into compliance
mBarTransitions.init();
- setDisabledFlags(mDisabledFlags, true /* force */);
setMenuVisibility(mShowMenu, true /* force */);
if (DEBUG) {
@@ -892,7 +890,7 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
resolveLayoutDirection();
}
updateTaskSwitchHelper();
- setNavigationIconHints(mNavigationIconHints, true);
+ updateNavButtonIcons();
getHomeButton().setVertical(mVertical);
}
@@ -937,7 +935,7 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
if (uiCarModeChanged || mConfiguration.densityDpi != newConfig.densityDpi
|| mConfiguration.getLayoutDirection() != newConfig.getLayoutDirection()) {
// If car mode or density changes, we need to reset the icons.
- setNavigationIconHints(mNavigationIconHints, true);
+ updateNavButtonIcons();
}
mConfiguration.updateFrom(newConfig);
}
diff --git a/services/autofill/java/com/android/server/autofill/Session.java b/services/autofill/java/com/android/server/autofill/Session.java
index bcfe1b6eb1f3..5eee9ed6c9b2 100644
--- a/services/autofill/java/com/android/server/autofill/Session.java
+++ b/services/autofill/java/com/android/server/autofill/Session.java
@@ -52,6 +52,7 @@ import android.os.Binder;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
+import android.os.IBinder.DeathRecipient;
import android.os.Parcelable;
import android.os.RemoteCallback;
import android.os.RemoteException;
@@ -87,7 +88,6 @@ import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
-import com.android.internal.os.HandlerCaller;
import com.android.internal.util.ArrayUtils;
import com.android.server.autofill.ui.AutoFillUI;
import com.android.server.autofill.ui.PendingUi;
@@ -158,6 +158,9 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
@GuardedBy("mLock")
private IAutoFillManagerClient mClient;
+ @GuardedBy("mLock")
+ private DeathRecipient mClientVulture;
+
private final RemoteFillService mRemoteFillService;
@GuardedBy("mLock")
@@ -509,7 +512,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
mWtfHistory = wtfHistory;
mComponentName = componentName;
mCompatMode = compatMode;
- mClient = IAutoFillManagerClient.Stub.asInterface(client);
+ setClientLocked(client);
mMetricsLogger.write(newLogMaker(MetricsEvent.AUTOFILL_SESSION_STARTED)
.addTaggedData(MetricsEvent.FIELD_FLAGS, flags));
@@ -539,13 +542,44 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
return;
}
mActivityToken = newActivity;
- mClient = IAutoFillManagerClient.Stub.asInterface(newClient);
+ setClientLocked(newClient);
// The tracked id are not persisted in the client, hence update them
updateTrackedIdsLocked();
}
}
+ @GuardedBy("mLock")
+ private void setClientLocked(@NonNull IBinder client) {
+ unlinkClientVultureLocked();
+ mClient = IAutoFillManagerClient.Stub.asInterface(client);
+ mClientVulture = () -> {
+ Slog.d(TAG, "handling death of " + mActivityToken + " when saving=" + mIsSaving);
+ synchronized (mLock) {
+ if (mIsSaving) {
+ mUi.hideFillUi(this);
+ } else {
+ mUi.destroyAll(mPendingSaveUi, this, false);
+ }
+ }
+ };
+ try {
+ mClient.asBinder().linkToDeath(mClientVulture, 0);
+ } catch (RemoteException e) {
+ Slog.w(TAG, "could not set binder death listener on autofill client: " + e);
+ }
+ }
+
+ @GuardedBy("mLock")
+ private void unlinkClientVultureLocked() {
+ if (mClient != null && mClientVulture != null) {
+ final boolean unlinked = mClient.asBinder().unlinkToDeath(mClientVulture, 0);
+ if (!unlinked) {
+ Slog.w(TAG, "unlinking vulture from death failed for " + mActivityToken);
+ }
+ }
+ }
+
// FillServiceCallbacks
@Override
public void onFillRequestSuccess(int requestFlags, @Nullable FillResponse response,
@@ -2443,6 +2477,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
if (mDestroyed) {
return null;
}
+ unlinkClientVultureLocked();
mUi.destroyAll(mPendingSaveUi, this, true);
mUi.clearCallback(this);
mDestroyed = true;
diff --git a/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java b/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java
index e28a204df787..21a39e483986 100644
--- a/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java
+++ b/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java
@@ -136,7 +136,7 @@ public final class AutoFillUI {
* Hides the fill UI.
*/
public void hideFillUi(@NonNull AutoFillUiCallback callback) {
- mHandler.post(() -> hideFillUiUiThread(callback));
+ mHandler.post(() -> hideFillUiUiThread(callback, true));
}
/**
@@ -189,7 +189,7 @@ public final class AutoFillUI {
@Override
public void onResponsePicked(FillResponse response) {
log.setType(MetricsEvent.TYPE_DETAIL);
- hideFillUiUiThread(callback);
+ hideFillUiUiThread(callback, true);
if (mCallback != null) {
mCallback.authenticate(response.getRequestId(),
AutofillManager.AUTHENTICATION_ID_DATASET_ID_UNDEFINED,
@@ -200,7 +200,7 @@ public final class AutoFillUI {
@Override
public void onDatasetPicked(Dataset dataset) {
log.setType(MetricsEvent.TYPE_ACTION);
- hideFillUiUiThread(callback);
+ hideFillUiUiThread(callback, true);
if (mCallback != null) {
final int datasetIndex = response.getDatasets().indexOf(dataset);
mCallback.fill(response.getRequestId(), datasetIndex, dataset);
@@ -210,7 +210,7 @@ public final class AutoFillUI {
@Override
public void onCanceled() {
log.setType(MetricsEvent.TYPE_DISMISS);
- hideFillUiUiThread(callback);
+ hideFillUiUiThread(callback, true);
}
@Override
@@ -367,9 +367,9 @@ public final class AutoFillUI {
}
@android.annotation.UiThread
- private void hideFillUiUiThread(@Nullable AutoFillUiCallback callback) {
+ private void hideFillUiUiThread(@Nullable AutoFillUiCallback callback, boolean notifyClient) {
if (mFillUi != null && (callback == null || callback == mCallback)) {
- mFillUi.destroy();
+ mFillUi.destroy(notifyClient);
mFillUi = null;
}
}
@@ -413,13 +413,13 @@ public final class AutoFillUI {
@android.annotation.UiThread
private void destroyAllUiThread(@Nullable PendingUi pendingSaveUi,
@Nullable AutoFillUiCallback callback, boolean notifyClient) {
- hideFillUiUiThread(callback);
+ hideFillUiUiThread(callback, notifyClient);
destroySaveUiUiThread(pendingSaveUi, notifyClient);
}
@android.annotation.UiThread
private void hideAllUiThread(@Nullable AutoFillUiCallback callback) {
- hideFillUiUiThread(callback);
+ hideFillUiUiThread(callback, true);
final PendingUi pendingSaveUi = hideSaveUiUiThread(callback);
if (pendingSaveUi != null && pendingSaveUi.getState() == PendingUi.STATE_FINISHED) {
if (sDebug) {
diff --git a/services/autofill/java/com/android/server/autofill/ui/FillUi.java b/services/autofill/java/com/android/server/autofill/ui/FillUi.java
index a32078cc8e9f..ef4656bd06bb 100644
--- a/services/autofill/java/com/android/server/autofill/ui/FillUi.java
+++ b/services/autofill/java/com/android/server/autofill/ui/FillUi.java
@@ -415,10 +415,15 @@ final class FillUi {
applyNewFilterText();
}
- public void destroy() {
+ public void destroy(boolean notifyClient) {
throwIfDestroyed();
+ if (mWindow != null) {
+ mWindow.hide(false);
+ }
mCallback.onDestroy();
- mCallback.requestHideFillUi();
+ if (notifyClient) {
+ mCallback.requestHideFillUi();
+ }
mDestroyed = true;
}
@@ -644,6 +649,10 @@ final class FillUi {
* Hides the window.
*/
void hide() {
+ hide(true);
+ }
+
+ void hide(boolean destroyCallbackOnError) {
try {
if (mShowing) {
mWm.removeView(mContentView);
@@ -654,7 +663,9 @@ final class FillUi {
// happen - since show() and hide() are always called in the UIThread - but if it
// does, it should not crash the system.
Slog.e(TAG, "Exception hiding window ", e);
- mCallback.onDestroy();
+ if (destroyCallbackOnError) {
+ mCallback.onDestroy();
+ }
} finally {
mOverlayControl.showOverlays();
}
diff --git a/services/core/java/com/android/server/am/ActivityDisplay.java b/services/core/java/com/android/server/am/ActivityDisplay.java
index bac81e7cd4a2..dd83a36b99d8 100644
--- a/services/core/java/com/android/server/am/ActivityDisplay.java
+++ b/services/core/java/com/android/server/am/ActivityDisplay.java
@@ -664,6 +664,10 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack>
while (getChildCount() > 0) {
final ActivityStack stack = getChildAt(0);
if (destroyContentOnRemoval) {
+ // Override the stack configuration to make it equal to the current applied one, so
+ // that we don't accidentally report configuration change to activities that are
+ // going to be finished.
+ stack.onOverrideConfigurationChanged(stack.getConfiguration());
mSupervisor.moveStackToDisplayLocked(stack.mStackId, DEFAULT_DISPLAY,
false /* onTop */);
stack.finishAllActivitiesLocked(true /* immediately */);
diff --git a/services/core/java/com/android/server/location/ContextHubClientManager.java b/services/core/java/com/android/server/location/ContextHubClientManager.java
index a61842b6d409..74930c8821d9 100644
--- a/services/core/java/com/android/server/location/ContextHubClientManager.java
+++ b/services/core/java/com/android/server/location/ContextHubClientManager.java
@@ -198,7 +198,7 @@ import java.util.function.Consumer;
ContextHubClientBroker broker = null;
int id = mNextHostEndpointId;
for (int i = 0; i <= MAX_CLIENT_ID; i++) {
- if (!mHostEndPointIdToClientMap.containsKey(id)) {
+ if (!mHostEndPointIdToClientMap.containsKey((short)id)) {
broker = new ContextHubClientBroker(
mContext, mContextHubProxy, this, contextHubId, (short)id, clientCallback);
mHostEndPointIdToClientMap.put((short)id, broker);
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 0da7b01fc0b5..de9cd2a352ae 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -2980,9 +2980,6 @@ public class PackageManagerService extends IPackageManager.Stub
}
}
}
- // Adjust seInfo to ensure apps which share a sharedUserId are placed in the same
- // SELinux domain.
- setting.fixSeInfoLocked();
}
// Now that we know all the packages we are keeping,
@@ -10372,24 +10369,20 @@ public class PackageManagerService extends IPackageManager.Stub
pkg.applicationInfo.flags |= ApplicationInfo.FLAG_UPDATED_SYSTEM_APP;
}
- // Apps which share a sharedUserId must be placed in the same selinux domain. If this
- // package is the first app installed as this shared user, set seInfoTargetSdkVersion to its
- // targetSdkVersion. These are later adjusted in PackageManagerService's constructor to be
- // the lowest targetSdkVersion of all apps within the shared user, which corresponds to the
- // least restrictive selinux domain.
- // NOTE: As new packages are installed / updated, the shared user's seinfoTargetSdkVersion
- // will NOT be modified until next boot, even if a lower targetSdkVersion is used. This
- // ensures that all packages continue to run in the same selinux domain.
- final int targetSdkVersion =
- ((sharedUserSetting != null) && (sharedUserSetting.packages.size() != 0)) ?
- sharedUserSetting.seInfoTargetSdkVersion : pkg.applicationInfo.targetSdkVersion;
+ // SELinux sandboxes become more restrictive as targetSdkVersion increases.
+ // To ensure that apps with sharedUserId are placed in the same selinux domain
+ // without breaking any assumptions about access, put them into the least
+ // restrictive targetSdkVersion=25 domain.
+ // TODO(b/72290969): Base this on the actual targetSdkVersion(s) of the apps within the
+ // sharedUserSetting, instead of defaulting to the least restrictive domain.
+ final int targetSdk = (sharedUserSetting != null) ? 25
+ : pkg.applicationInfo.targetSdkVersion;
// TODO(b/71593002): isPrivileged for sharedUser and appInfo should never be out of sync.
// They currently can be if the sharedUser apps are signed with the platform key.
final boolean isPrivileged = (sharedUserSetting != null) ?
sharedUserSetting.isPrivileged() | pkg.isPrivileged() : pkg.isPrivileged();
- pkg.applicationInfo.seInfo = SELinuxMMAC.getSeInfo(pkg, isPrivileged,
- pkg.applicationInfo.targetSandboxVersion, targetSdkVersion);
+ SELinuxMMAC.assignSeInfoValue(pkg, isPrivileged, targetSdk);
pkg.mExtras = pkgSetting;
pkg.applicationInfo.processName = fixProcessName(
diff --git a/services/core/java/com/android/server/pm/SELinuxMMAC.java b/services/core/java/com/android/server/pm/SELinuxMMAC.java
index b47d96622e96..a9f15282133f 100644
--- a/services/core/java/com/android/server/pm/SELinuxMMAC.java
+++ b/services/core/java/com/android/server/pm/SELinuxMMAC.java
@@ -64,8 +64,6 @@ public final class SELinuxMMAC {
/** Required MAC permissions files */
private static List<File> sMacPermissions = new ArrayList<>();
- private static final String DEFAULT_SEINFO = "default";
-
// Append privapp to existing seinfo label
private static final String PRIVILEGED_APP_STR = ":privapp";
@@ -309,56 +307,45 @@ public final class SELinuxMMAC {
}
/**
- * Selects a security label to a package based on input parameters and the seinfo tag taken
- * from a matched policy. All signature based policy stanzas are consulted and, if no match
- * is found, the default seinfo label of 'default' is used. The security label is attached to
- * the ApplicationInfo instance of the package.
+ * Applies a security label to a package based on an seinfo tag taken from a matched
+ * policy. All signature based policy stanzas are consulted and, if no match is
+ * found, the default seinfo label of 'default' (set in ApplicationInfo object) is
+ * used. The security label is attached to the ApplicationInfo instance of the package
+ * in the event that a matching policy was found.
*
* @param pkg object representing the package to be labeled.
- * @param isPrivileged boolean.
- * @param targetSandboxVersion int.
- * @param targetSdkVersion int. If this pkg runs as a sharedUser, targetSdkVersion is the
- * greater of: lowest targetSdk for all pkgs in the sharedUser, or
- * MINIMUM_TARGETSDKVERSION.
- * @return String representing the resulting seinfo.
*/
- public static String getSeInfo(PackageParser.Package pkg, boolean isPrivileged,
- int targetSandboxVersion, int targetSdkVersion) {
- String seInfo = null;
+ public static void assignSeInfoValue(PackageParser.Package pkg, boolean isPrivileged,
+ int targetSdkVersion) {
synchronized (sPolicies) {
if (!sPolicyRead) {
if (DEBUG_POLICY) {
Slog.d(TAG, "Policy not read");
}
- } else {
- for (Policy policy : sPolicies) {
- seInfo = policy.getMatchedSeInfo(pkg);
- if (seInfo != null) {
- break;
- }
+ return;
+ }
+ for (Policy policy : sPolicies) {
+ String seInfo = policy.getMatchedSeInfo(pkg);
+ if (seInfo != null) {
+ pkg.applicationInfo.seInfo = seInfo;
+ break;
}
}
}
- if (seInfo == null) {
- seInfo = DEFAULT_SEINFO;
- }
-
- if (targetSandboxVersion == 2) {
- seInfo += SANDBOX_V2_STR;
- }
+ if (pkg.applicationInfo.targetSandboxVersion == 2)
+ pkg.applicationInfo.seInfo += SANDBOX_V2_STR;
if (isPrivileged) {
- seInfo += PRIVILEGED_APP_STR;
+ pkg.applicationInfo.seInfo += PRIVILEGED_APP_STR;
}
- seInfo += TARGETSDKVERSION_STR + targetSdkVersion;
+ pkg.applicationInfo.seInfo += TARGETSDKVERSION_STR + targetSdkVersion;
if (DEBUG_POLICY_INSTALL) {
Slog.i(TAG, "package (" + pkg.packageName + ") labeled with " +
- "seinfo=" + seInfo);
+ "seinfo=" + pkg.applicationInfo.seInfo);
}
- return seInfo;
}
}
diff --git a/services/core/java/com/android/server/pm/SharedUserSetting.java b/services/core/java/com/android/server/pm/SharedUserSetting.java
index 1d9afd9895b4..244613180d00 100644
--- a/services/core/java/com/android/server/pm/SharedUserSetting.java
+++ b/services/core/java/com/android/server/pm/SharedUserSetting.java
@@ -39,10 +39,6 @@ public final class SharedUserSetting extends SettingBase {
int uidFlags;
int uidPrivateFlags;
- // The lowest targetSdkVersion of all apps in the sharedUserSetting, used to assign seinfo so
- // that all apps within the sharedUser run in the same selinux context.
- int seInfoTargetSdkVersion;
-
final ArraySet<PackageSetting> packages = new ArraySet<PackageSetting>();
final PackageSignatures signatures = new PackageSignatures();
@@ -88,11 +84,6 @@ public final class SharedUserSetting extends SettingBase {
}
void addPackage(PackageSetting packageSetting) {
- // If this is the first package added to this shared user, temporarily (until next boot) use
- // its targetSdkVersion when assigning seInfo for the shared user.
- if ((packages.size() == 0) && (packageSetting.pkg != null)) {
- seInfoTargetSdkVersion = packageSetting.pkg.applicationInfo.targetSdkVersion;
- }
if (packages.add(packageSetting)) {
setFlags(this.pkgFlags | packageSetting.pkgFlags);
setPrivateFlags(this.pkgPrivateFlags | packageSetting.pkgPrivateFlags);
@@ -116,26 +107,4 @@ public final class SharedUserSetting extends SettingBase {
public boolean isPrivileged() {
return (this.pkgPrivateFlags & ApplicationInfo.PRIVATE_FLAG_PRIVILEGED) != 0;
}
-
- /**
- * Determine the targetSdkVersion for a sharedUser and update pkg.applicationInfo.seInfo
- * to ensure that all apps within the sharedUser share an SELinux domain. Use the lowest
- * targetSdkVersion of all apps within the shared user, which corresponds to the least
- * restrictive selinux domain.
- */
- public void fixSeInfoLocked() {
- final List<PackageParser.Package> pkgList = getPackages();
-
- for (PackageParser.Package pkg : pkgList) {
- if (pkg.applicationInfo.targetSdkVersion < seInfoTargetSdkVersion) {
- seInfoTargetSdkVersion = pkg.applicationInfo.targetSdkVersion;
- }
- }
- for (PackageParser.Package pkg : pkgList) {
- final boolean isPrivileged = isPrivileged() | pkg.isPrivileged();
- pkg.applicationInfo.seInfo = SELinuxMMAC.getSeInfo(pkg, isPrivileged,
- pkg.applicationInfo.targetSandboxVersion, seInfoTargetSdkVersion);
- }
- }
-
}
diff --git a/services/net/java/android/net/ip/IpClient.java b/services/net/java/android/net/ip/IpClient.java
index 1f370a574231..9863370e3840 100644
--- a/services/net/java/android/net/ip/IpClient.java
+++ b/services/net/java/android/net/ip/IpClient.java
@@ -540,6 +540,8 @@ public class IpClient extends StateMachine {
// TODO: Revert this hack once IpClient and Nat464Xlat work in concert.
private static final String CLAT_PREFIX = "v4-";
+ private static final int IMMEDIATE_FAILURE_DURATION = 0;
+
private final State mStoppedState = new StoppedState();
private final State mStoppingState = new StoppingState();
private final State mStartedState = new StartedState();
@@ -551,6 +553,7 @@ public class IpClient extends StateMachine {
private final String mClatInterfaceName;
@VisibleForTesting
protected final Callback mCallback;
+ private final Dependencies mDependencies;
private final CountDownLatch mShutdownLatch;
private final INetworkManagementService mNwService;
private final NetlinkTracker mNetlinkTracker;
@@ -579,10 +582,23 @@ public class IpClient extends StateMachine {
private boolean mMulticastFiltering;
private long mStartTimeMillis;
+ public static class Dependencies {
+ public INetworkManagementService getNMS() {
+ return INetworkManagementService.Stub.asInterface(
+ ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE));
+ }
+
+ public INetd getNetd() {
+ return NetdService.getInstance();
+ }
+
+ public InterfaceParams getInterfaceParams(String ifname) {
+ return InterfaceParams.getByName(ifname);
+ }
+ }
+
public IpClient(Context context, String ifName, Callback callback) {
- this(context, ifName, callback, INetworkManagementService.Stub.asInterface(
- ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE)),
- NetdService.getInstance());
+ this(context, ifName, callback, new Dependencies());
}
/**
@@ -591,27 +607,35 @@ public class IpClient extends StateMachine {
*/
public IpClient(Context context, String ifName, Callback callback,
INetworkManagementService nwService) {
- this(context, ifName, callback, nwService, NetdService.getInstance());
+ this(context, ifName, callback, new Dependencies() {
+ @Override
+ public INetworkManagementService getNMS() { return nwService; }
+ });
}
@VisibleForTesting
- IpClient(Context context, String ifName, Callback callback,
- INetworkManagementService nwService, INetd netd) {
+ IpClient(Context context, String ifName, Callback callback, Dependencies deps) {
super(IpClient.class.getSimpleName() + "." + ifName);
+ Preconditions.checkNotNull(ifName);
+ Preconditions.checkNotNull(callback);
+
mTag = getName();
mContext = context;
mInterfaceName = ifName;
mClatInterfaceName = CLAT_PREFIX + ifName;
mCallback = new LoggingCallbackWrapper(callback);
+ mDependencies = deps;
mShutdownLatch = new CountDownLatch(1);
- mNwService = nwService;
+ mNwService = deps.getNMS();
mLog = new SharedLog(MAX_LOG_RECORDS, mTag);
mConnectivityPacketLog = new LocalLog(MAX_PACKET_RECORDS);
mMsgStateLogger = new MessageHandlingLogger();
- mInterfaceCtrl = new InterfaceController(mInterfaceName, mNwService, netd, mLog);
+ // TODO: Consider creating, constructing, and passing in some kind of
+ // InterfaceController.Dependencies class.
+ mInterfaceCtrl = new InterfaceController(mInterfaceName, mNwService, deps.getNetd(), mLog);
mNetlinkTracker = new NetlinkTracker(
mInterfaceName,
@@ -742,11 +766,11 @@ public class IpClient extends StateMachine {
return;
}
- mInterfaceParams = InterfaceParams.getByName(mInterfaceName);
+ mInterfaceParams = mDependencies.getInterfaceParams(mInterfaceName);
if (mInterfaceParams == null) {
logError("Failed to find InterfaceParams for " + mInterfaceName);
- // TODO: call doImmediateProvisioningFailure() with an error code
- // indicating something like "interface not ready".
+ doImmediateProvisioningFailure(IpManagerEvent.ERROR_INTERFACE_NOT_FOUND);
+ return;
}
mCallback.setNeighborDiscoveryOffload(true);
@@ -930,8 +954,11 @@ public class IpClient extends StateMachine {
}
private void recordMetric(final int type) {
- if (mStartTimeMillis <= 0) { Log.wtf(mTag, "Start time undefined!"); }
- final long duration = SystemClock.elapsedRealtime() - mStartTimeMillis;
+ // We may record error metrics prior to starting.
+ // Map this to IMMEDIATE_FAILURE_DURATION.
+ final long duration = (mStartTimeMillis > 0)
+ ? (SystemClock.elapsedRealtime() - mStartTimeMillis)
+ : IMMEDIATE_FAILURE_DURATION;
mMetricsLog.log(mInterfaceName, new IpManagerEvent(type, duration));
}
diff --git a/services/net/java/android/net/ip/IpManager.java b/services/net/java/android/net/ip/IpManager.java
index 38981453e2e1..508a43d022f4 100644
--- a/services/net/java/android/net/ip/IpManager.java
+++ b/services/net/java/android/net/ip/IpManager.java
@@ -144,20 +144,7 @@ public class IpManager extends IpClient {
}
public IpManager(Context context, String ifName, Callback callback) {
- this(context, ifName, callback, INetworkManagementService.Stub.asInterface(
- ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE)),
- NetdService.getInstance());
- }
-
- public IpManager(Context context, String ifName, Callback callback,
- INetworkManagementService nwService) {
- this(context, ifName, callback, nwService, NetdService.getInstance());
- }
-
- @VisibleForTesting
- public IpManager(Context context, String ifName, Callback callback,
- INetworkManagementService nwService, INetd netd) {
- super(context, ifName, callback, nwService, netd);
+ super(context, ifName, callback);
}
public void startProvisioning(ProvisioningConfiguration req) {
diff --git a/tests/UsbTests/src/com/android/server/usb/UsbHandlerTest.java b/tests/UsbTests/src/com/android/server/usb/UsbHandlerTest.java
index c491b4658999..23311b027183 100644
--- a/tests/UsbTests/src/com/android/server/usb/UsbHandlerTest.java
+++ b/tests/UsbTests/src/com/android/server/usb/UsbHandlerTest.java
@@ -22,6 +22,7 @@ import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import android.app.ActivityManager;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
@@ -29,6 +30,7 @@ import android.content.SharedPreferences;
import android.hardware.usb.UsbManager;
import android.os.Handler;
import android.os.Looper;
+import android.os.Message;
import android.os.UserHandle;
import android.provider.Settings;
import android.support.test.InstrumentationRegistry;
@@ -147,6 +149,7 @@ public class UsbHandlerTest {
}
@SmallTest
+ @Test
public void setFunctionsMtp() {
mUsbHandler.handleMessage(mUsbHandler.obtainMessage(MSG_SET_CURRENT_FUNCTIONS,
UsbManager.FUNCTION_MTP));
@@ -154,6 +157,7 @@ public class UsbHandlerTest {
}
@SmallTest
+ @Test
public void setFunctionsPtp() {
mUsbHandler.handleMessage(mUsbHandler.obtainMessage(MSG_SET_CURRENT_FUNCTIONS,
UsbManager.FUNCTION_PTP));
@@ -161,6 +165,7 @@ public class UsbHandlerTest {
}
@SmallTest
+ @Test
public void setFunctionsMidi() {
mUsbHandler.handleMessage(mUsbHandler.obtainMessage(MSG_SET_CURRENT_FUNCTIONS,
UsbManager.FUNCTION_MIDI));
@@ -168,6 +173,7 @@ public class UsbHandlerTest {
}
@SmallTest
+ @Test
public void setFunctionsRndis() {
mUsbHandler.handleMessage(mUsbHandler.obtainMessage(MSG_SET_CURRENT_FUNCTIONS,
UsbManager.FUNCTION_RNDIS));
@@ -175,14 +181,17 @@ public class UsbHandlerTest {
}
@SmallTest
+ @Test
public void enableAdb() {
sendBootCompleteMessages(mUsbHandler);
- mUsbHandler.handleMessage(mUsbHandler.obtainMessage(MSG_ENABLE_ADB, 1));
+ Message msg = mUsbHandler.obtainMessage(MSG_ENABLE_ADB);
+ msg.arg1 = 1;
+ mUsbHandler.handleMessage(msg);
assertEquals(mUsbHandler.getEnabledFunctions(), UsbManager.FUNCTION_NONE);
- assertTrue(mUsbHandler.mAdbEnabled);
assertEquals(mMockProperties.get(UsbDeviceManager.UsbHandler
.USB_PERSISTENT_CONFIG_PROPERTY), UsbManager.USB_FUNCTION_ADB);
verify(mUsbDebuggingManager).setAdbEnabled(true);
+ assertTrue(mUsbHandler.mAdbEnabled);
mUsbHandler.handleMessage(mUsbHandler.obtainMessage(MSG_UPDATE_STATE, 1, 1));
@@ -194,6 +203,7 @@ public class UsbHandlerTest {
}
@SmallTest
+ @Test
public void disableAdb() {
mMockProperties.put(UsbDeviceManager.UsbHandler.USB_PERSISTENT_CONFIG_PROPERTY,
UsbManager.USB_FUNCTION_ADB);
@@ -211,13 +221,14 @@ public class UsbHandlerTest {
}
@SmallTest
+ @Test
public void bootCompletedCharging() {
sendBootCompleteMessages(mUsbHandler);
assertEquals(mUsbHandler.getEnabledFunctions(), UsbManager.FUNCTION_NONE);
}
- @Test
@SmallTest
+ @Test
public void bootCompletedAdbEnabled() {
mMockProperties.put(UsbDeviceManager.UsbHandler.USB_PERSISTENT_CONFIG_PROPERTY, "adb");
mUsbHandler = new MockUsbHandler(FgThread.get().getLooper(),
@@ -232,17 +243,20 @@ public class UsbHandlerTest {
}
@SmallTest
+ @Test
public void userSwitchedDisablesMtp() {
mUsbHandler.handleMessage(mUsbHandler.obtainMessage(MSG_SET_CURRENT_FUNCTIONS,
UsbManager.FUNCTION_MTP));
assertNotEquals(mUsbHandler.getEnabledFunctions() & UsbManager.FUNCTION_MTP, 0);
- mUsbHandler.handleMessage(mUsbHandler.obtainMessage(MSG_USER_SWITCHED,
- UserHandle.getCallingUserId() + 1));
+ Message msg = mUsbHandler.obtainMessage(MSG_USER_SWITCHED);
+ msg.arg1 = ActivityManager.getCurrentUser() + 1;
+ mUsbHandler.handleMessage(msg);
assertEquals(mUsbHandler.getEnabledFunctions(), UsbManager.FUNCTION_NONE);
}
@SmallTest
+ @Test
public void changedRestrictionsDisablesMtp() {
mUsbHandler.handleMessage(mUsbHandler.obtainMessage(MSG_SET_CURRENT_FUNCTIONS,
UsbManager.FUNCTION_MTP));
@@ -254,6 +268,7 @@ public class UsbHandlerTest {
}
@SmallTest
+ @Test
public void disconnectResetsCharging() {
sendBootCompleteMessages(mUsbHandler);
@@ -267,6 +282,7 @@ public class UsbHandlerTest {
}
@SmallTest
+ @Test
public void configuredSendsBroadcast() {
sendBootCompleteMessages(mUsbHandler);
mUsbHandler.handleMessage(mUsbHandler.obtainMessage(MSG_SET_CURRENT_FUNCTIONS,
@@ -284,6 +300,7 @@ public class UsbHandlerTest {
}
@SmallTest
+ @Test
public void setScreenUnlockedFunctions() {
sendBootCompleteMessages(mUsbHandler);
mUsbHandler.handleMessage(mUsbHandler.obtainMessage(MSG_UPDATE_SCREEN_LOCK, 0));
@@ -298,11 +315,16 @@ public class UsbHandlerTest {
}
@SmallTest
+ @Test
public void unlockScreen() {
when(mSharedPreferences.getString(String.format(Locale.ENGLISH,
UsbDeviceManager.UNLOCKED_CONFIG_PREF, mUsbHandler.mCurrentUser), ""))
.thenReturn(UsbManager.USB_FUNCTION_MTP);
+ mUsbHandler = new MockUsbHandler(FgThread.get().getLooper(),
+ InstrumentationRegistry.getContext(), mUsbDeviceManager, mUsbDebuggingManager,
+ mUsbAlsaManager, mUsbSettingsManager);
sendBootCompleteMessages(mUsbHandler);
+ mUsbHandler.handleMessage(mUsbHandler.obtainMessage(MSG_UPDATE_SCREEN_LOCK, 1));
mUsbHandler.handleMessage(mUsbHandler.obtainMessage(MSG_UPDATE_SCREEN_LOCK, 0));
assertNotEquals(mUsbHandler.getScreenUnlockedFunctions() & UsbManager.FUNCTION_MTP, 0);
diff --git a/tests/net/java/android/net/ip/IpManagerTest.java b/tests/net/java/android/net/ip/IpClientTest.java
index 22d88fb70697..e9e880d1e7c1 100644
--- a/tests/net/java/android/net/ip/IpManagerTest.java
+++ b/tests/net/java/android/net/ip/IpClientTest.java
@@ -21,6 +21,7 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.anyString;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
@@ -38,10 +39,12 @@ import android.net.INetd;
import android.net.IpPrefix;
import android.net.LinkAddress;
import android.net.LinkProperties;
+import android.net.MacAddress;
import android.net.RouteInfo;
-import android.net.ip.IpManager.Callback;
-import android.net.ip.IpManager.InitialConfiguration;
-import android.net.ip.IpManager.ProvisioningConfiguration;
+import android.net.ip.IpClient.Callback;
+import android.net.ip.IpClient.InitialConfiguration;
+import android.net.ip.IpClient.ProvisioningConfiguration;
+import android.net.util.InterfaceParams;
import android.os.INetworkManagementService;
import android.provider.Settings;
import android.support.test.filters.SmallTest;
@@ -68,15 +71,19 @@ import java.util.HashSet;
import java.util.Set;
/**
- * Tests for IpManager.
+ * Tests for IpClient.
*/
@RunWith(AndroidJUnit4.class)
@SmallTest
-public class IpManagerTest {
+public class IpClientTest {
private static final int DEFAULT_AVOIDBADWIFI_CONFIG_VALUE = 1;
private static final String VALID = "VALID";
private static final String INVALID = "INVALID";
+ private static final String TEST_IFNAME = "test_wlan0";
+ private static final int TEST_IFINDEX = 1001;
+ // See RFC 7042#section-2.1.2 for EUI-48 documentation values.
+ private static final MacAddress TEST_MAC = MacAddress.fromString("00:00:5E:00:53:01");
@Mock private Context mContext;
@Mock private INetworkManagementService mNMService;
@@ -84,9 +91,11 @@ public class IpManagerTest {
@Mock private Resources mResources;
@Mock private Callback mCb;
@Mock private AlarmManager mAlarm;
+ @Mock private IpClient.Dependencies mDependecies;
private MockContentResolver mContentResolver;
- BaseNetworkObserver mObserver;
+ private BaseNetworkObserver mObserver;
+ private InterfaceParams mIfParams;
@Before
public void setUp() throws Exception {
@@ -100,10 +109,23 @@ public class IpManagerTest {
mContentResolver = new MockContentResolver();
mContentResolver.addProvider(Settings.AUTHORITY, new FakeSettingsProvider());
when(mContext.getContentResolver()).thenReturn(mContentResolver);
+
+ mIfParams = null;
+
+ when(mDependecies.getNMS()).thenReturn(mNMService);
+ when(mDependecies.getNetd()).thenReturn(mNetd);
+ }
+
+ private void setTestInterfaceParams(String ifname) {
+ mIfParams = (ifname != null)
+ ? new InterfaceParams(ifname, TEST_IFINDEX, TEST_MAC)
+ : null;
+ when(mDependecies.getInterfaceParams(anyString())).thenReturn(mIfParams);
}
- private IpManager makeIpManager(String ifname) throws Exception {
- final IpManager ipm = new IpManager(mContext, ifname, mCb, mNMService, mNetd);
+ private IpClient makeIpClient(String ifname) throws Exception {
+ setTestInterfaceParams(ifname);
+ final IpClient ipc = new IpClient(mContext, ifname, mCb, mDependecies);
verify(mNMService, timeout(100).times(1)).disableIpv6(ifname);
verify(mNMService, timeout(100).times(1)).clearInterfaceAddresses(ifname);
ArgumentCaptor<BaseNetworkObserver> arg =
@@ -111,23 +133,54 @@ public class IpManagerTest {
verify(mNMService, times(1)).registerObserver(arg.capture());
mObserver = arg.getValue();
reset(mNMService);
- return ipm;
+ return ipc;
+ }
+
+ @Test
+ public void testNullInterfaceNameMostDefinitelyThrows() throws Exception {
+ setTestInterfaceParams(null);
+ try {
+ final IpClient ipc = new IpClient(mContext, null, mCb, mDependecies);
+ ipc.shutdown();
+ fail();
+ } catch (NullPointerException npe) {
+ // Phew; null interface names not allowed.
+ }
}
@Test
- public void testNullCallbackDoesNotThrow() throws Exception {
- final IpManager ipm = new IpManager(mContext, "lo", null, mNMService);
+ public void testNullCallbackMostDefinitelyThrows() throws Exception {
+ final String ifname = "lo";
+ setTestInterfaceParams(ifname);
+ try {
+ final IpClient ipc = new IpClient(mContext, ifname, null, mDependecies);
+ ipc.shutdown();
+ fail();
+ } catch (NullPointerException npe) {
+ // Phew; null callbacks not allowed.
+ }
}
@Test
public void testInvalidInterfaceDoesNotThrow() throws Exception {
- final IpManager ipm = new IpManager(mContext, "test_wlan0", mCb, mNMService);
+ setTestInterfaceParams(TEST_IFNAME);
+ final IpClient ipc = new IpClient(mContext, TEST_IFNAME, mCb, mDependecies);
+ ipc.shutdown();
+ }
+
+ @Test
+ public void testInterfaceNotFoundFailsImmediately() throws Exception {
+ setTestInterfaceParams(null);
+ final IpClient ipc = new IpClient(mContext, TEST_IFNAME, mCb, mDependecies);
+ ipc.startProvisioning(new IpClient.ProvisioningConfiguration());
+ verify(mCb, times(1)).onProvisioningFailure(any());
+ ipc.shutdown();
}
@Test
public void testDefaultProvisioningConfiguration() throws Exception {
- final String iface = "test_wlan0";
- final IpManager ipm = makeIpManager(iface);
+ final String iface = TEST_IFNAME;
+ final IpClient ipc = makeIpClient(iface);
ProvisioningConfiguration config = new ProvisioningConfiguration.Builder()
.withoutIPv4()
@@ -136,20 +189,20 @@ public class IpManagerTest {
.withoutIpReachabilityMonitor()
.build();
- ipm.startProvisioning(config);
+ ipc.startProvisioning(config);
verify(mCb, times(1)).setNeighborDiscoveryOffload(true);
verify(mCb, timeout(100).times(1)).setFallbackMulticastFilter(false);
verify(mCb, never()).onProvisioningFailure(any());
- ipm.stop();
+ ipc.shutdown();
verify(mNMService, timeout(100).times(1)).disableIpv6(iface);
verify(mNMService, timeout(100).times(1)).clearInterfaceAddresses(iface);
}
@Test
public void testProvisioningWithInitialConfiguration() throws Exception {
- final String iface = "test_wlan0";
- final IpManager ipm = makeIpManager(iface);
+ final String iface = TEST_IFNAME;
+ final IpClient ipc = makeIpClient(iface);
String[] addresses = {
"fe80::a4be:f92:e1f7:22d1/64",
@@ -164,7 +217,7 @@ public class IpManagerTest {
.withInitialConfiguration(conf(links(addresses), prefixes(prefixes), ips()))
.build();
- ipm.startProvisioning(config);
+ ipc.startProvisioning(config);
verify(mCb, times(1)).setNeighborDiscoveryOffload(true);
verify(mCb, timeout(100).times(1)).setFallbackMulticastFilter(false);
verify(mCb, never()).onProvisioningFailure(any());
@@ -190,7 +243,7 @@ public class IpManagerTest {
want.setInterfaceName(iface);
verify(mCb, timeout(100).times(1)).onProvisioningSuccess(eq(want));
- ipm.stop();
+ ipc.shutdown();
verify(mNMService, timeout(100).times(1)).disableIpv6(iface);
verify(mNMService, timeout(100).times(1)).clearInterfaceAddresses(iface);
}
@@ -228,7 +281,7 @@ public class IpManagerTest {
};
for (IsProvisionedTestCase testcase : testcases) {
- if (IpManager.isProvisioned(testcase.lp, testcase.config) != testcase.isProvisioned) {
+ if (IpClient.isProvisioned(testcase.lp, testcase.config) != testcase.isProvisioned) {
fail(testcase.errorMessage());
}
}
@@ -424,11 +477,11 @@ public class IpManagerTest {
List<String> list3 = Arrays.asList("bar", "baz");
List<String> list4 = Arrays.asList("foo", "bar", "baz");
- assertTrue(IpManager.all(list1, (x) -> false));
- assertFalse(IpManager.all(list2, (x) -> false));
- assertTrue(IpManager.all(list3, (x) -> true));
- assertTrue(IpManager.all(list2, (x) -> x.charAt(0) == 'f'));
- assertFalse(IpManager.all(list4, (x) -> x.charAt(0) == 'f'));
+ assertTrue(IpClient.all(list1, (x) -> false));
+ assertFalse(IpClient.all(list2, (x) -> false));
+ assertTrue(IpClient.all(list3, (x) -> true));
+ assertTrue(IpClient.all(list2, (x) -> x.charAt(0) == 'f'));
+ assertFalse(IpClient.all(list4, (x) -> x.charAt(0) == 'f'));
}
@Test
@@ -438,11 +491,11 @@ public class IpManagerTest {
List<String> list3 = Arrays.asList("bar", "baz");
List<String> list4 = Arrays.asList("foo", "bar", "baz");
- assertFalse(IpManager.any(list1, (x) -> true));
- assertTrue(IpManager.any(list2, (x) -> true));
- assertTrue(IpManager.any(list2, (x) -> x.charAt(0) == 'f'));
- assertFalse(IpManager.any(list3, (x) -> x.charAt(0) == 'f'));
- assertTrue(IpManager.any(list4, (x) -> x.charAt(0) == 'f'));
+ assertFalse(IpClient.any(list1, (x) -> true));
+ assertTrue(IpClient.any(list2, (x) -> true));
+ assertTrue(IpClient.any(list2, (x) -> x.charAt(0) == 'f'));
+ assertFalse(IpClient.any(list3, (x) -> x.charAt(0) == 'f'));
+ assertTrue(IpClient.any(list4, (x) -> x.charAt(0) == 'f'));
}
@Test
@@ -451,9 +504,9 @@ public class IpManagerTest {
List<String> list2 = Arrays.asList("foo");
List<String> list3 = Arrays.asList("foo", "bar", "baz");
- assertEquals(list1, IpManager.findAll(list1, (x) -> true));
- assertEquals(list1, IpManager.findAll(list3, (x) -> false));
- assertEquals(list3, IpManager.findAll(list3, (x) -> true));
- assertEquals(list2, IpManager.findAll(list3, (x) -> x.charAt(0) == 'f'));
+ assertEquals(list1, IpClient.findAll(list1, (x) -> true));
+ assertEquals(list1, IpClient.findAll(list3, (x) -> false));
+ assertEquals(list3, IpClient.findAll(list3, (x) -> true));
+ assertEquals(list2, IpClient.findAll(list3, (x) -> x.charAt(0) == 'f'));
}
}