code
stringlengths
11
173k
docstring
stringlengths
2
593k
func_name
stringlengths
2
189
language
stringclasses
1 value
repo
stringclasses
833 values
path
stringlengths
11
294
url
stringlengths
60
339
license
stringclasses
4 values
public LocalServerSocket(String name) throws IOException { impl = new LocalSocketImpl(); impl.create(LocalSocket.SOCKET_STREAM); localAddress = new LocalSocketAddress(name); impl.bind(localAddress); impl.listen(LISTEN_BACKLOG); }
Creates a new server socket listening at specified name. On the Android platform, the name is created in the Linux abstract namespace (instead of on the filesystem). @param name address for socket @throws IOException
LocalServerSocket::LocalServerSocket
java
Reginer/aosp-android-jar
android-33/src/android/net/LocalServerSocket.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/net/LocalServerSocket.java
MIT
public LocalServerSocket(FileDescriptor fd) throws IOException { impl = new LocalSocketImpl(fd); impl.listen(LISTEN_BACKLOG); localAddress = impl.getSockAddress(); }
Create a LocalServerSocket from a file descriptor that's already been created and bound. listen() will be called immediately on it. Used for cases where file descriptors are passed in via environment variables. The passed-in FileDescriptor is not managed by this class and must be closed by the caller. Calling {@link #close()} on a socket created by this method has no effect. @param fd bound file descriptor @throws IOException
LocalServerSocket::LocalServerSocket
java
Reginer/aosp-android-jar
android-33/src/android/net/LocalServerSocket.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/net/LocalServerSocket.java
MIT
public LocalSocketAddress getLocalSocketAddress() { return localAddress; }
Obtains the socket's local address @return local address
LocalServerSocket::getLocalSocketAddress
java
Reginer/aosp-android-jar
android-33/src/android/net/LocalServerSocket.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/net/LocalServerSocket.java
MIT
public LocalSocket accept() throws IOException { LocalSocketImpl acceptedImpl = new LocalSocketImpl(); impl.accept(acceptedImpl); return LocalSocket.createLocalSocketForAccept(acceptedImpl); }
Accepts a new connection to the socket. Blocks until a new connection arrives. @return a socket representing the new connection. @throws IOException
LocalServerSocket::accept
java
Reginer/aosp-android-jar
android-33/src/android/net/LocalServerSocket.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/net/LocalServerSocket.java
MIT
public FileDescriptor getFileDescriptor() { return impl.getFileDescriptor(); }
Returns file descriptor or null if not yet open/already closed @return fd or null
LocalServerSocket::getFileDescriptor
java
Reginer/aosp-android-jar
android-33/src/android/net/LocalServerSocket.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/net/LocalServerSocket.java
MIT
@Override public void close() throws IOException { impl.close(); }
Closes server socket. @throws IOException
LocalServerSocket::close
java
Reginer/aosp-android-jar
android-33/src/android/net/LocalServerSocket.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/net/LocalServerSocket.java
MIT
public ICUException(String message) { super(message); }
Constructor. @param message exception message string
ICUException::ICUException
java
Reginer/aosp-android-jar
android-34/src/android/icu/util/ICUException.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/icu/util/ICUException.java
MIT
public ICUException(Throwable cause) { super(cause); }
Constructor. @param cause original exception
ICUException::ICUException
java
Reginer/aosp-android-jar
android-34/src/android/icu/util/ICUException.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/icu/util/ICUException.java
MIT
public ICUException(String message, Throwable cause) { super(message, cause); }
Constructor. @param message exception message string @param cause original exception
ICUException::ICUException
java
Reginer/aosp-android-jar
android-34/src/android/icu/util/ICUException.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/icu/util/ICUException.java
MIT
public AppWidgetHostView(Context context) { this(context, android.R.anim.fade_in, android.R.anim.fade_out); }
Create a host view. Uses default fade animations.
AppWidgetHostView::AppWidgetHostView
java
Reginer/aosp-android-jar
android-34/src/android/appwidget/AppWidgetHostView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/appwidget/AppWidgetHostView.java
MIT
public void setInteractionHandler(InteractionHandler handler) { mInteractionHandler = getHandler(handler); }
Pass the given handler to RemoteViews when updating this widget. Unless this is done immediatly after construction, a call to {@link #updateAppWidget(RemoteViews)} should be made. @param handler @hide
AppWidgetHostView::setInteractionHandler
java
Reginer/aosp-android-jar
android-34/src/android/appwidget/AppWidgetHostView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/appwidget/AppWidgetHostView.java
MIT
public void setAppWidget(int appWidgetId, AppWidgetProviderInfo info) { mAppWidgetId = appWidgetId; mInfo = info; // We add padding to the AppWidgetHostView if necessary Rect padding = getDefaultPadding(); setPadding(padding.left, padding.top, padding.right, padding.bottom); // Sometimes the AppWidgetManager returns a null AppWidgetProviderInfo object for // a widget, eg. for some widgets in safe mode. if (info != null) { String description = info.loadLabel(getContext().getPackageManager()); if ((info.providerInfo.applicationInfo.flags & ApplicationInfo.FLAG_SUSPENDED) != 0) { description = Resources.getSystem().getString( com.android.internal.R.string.suspended_widget_accessibility, description); } setContentDescription(description); } }
Set the AppWidget that will be displayed by this view. This method also adds default padding to widgets, as described in {@link #getDefaultPaddingForWidget(Context, ComponentName, Rect)} and can be overridden in order to add custom padding.
AppWidgetHostView::setAppWidget
java
Reginer/aosp-android-jar
android-34/src/android/appwidget/AppWidgetHostView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/appwidget/AppWidgetHostView.java
MIT
public static Rect getDefaultPaddingForWidget(Context context, ComponentName component, Rect padding) { return getDefaultPaddingForWidget(context, padding); }
As of ICE_CREAM_SANDWICH we are automatically adding padding to widgets targeting ICE_CREAM_SANDWICH and higher. The new widget design guidelines strongly recommend that widget developers do not add extra padding to their widgets. This will help achieve consistency among widgets. Note: this method is only needed by developers of AppWidgetHosts. The method is provided in order for the AppWidgetHost to account for the automatic padding when computing the number of cells to allocate to a particular widget. @param context the current context @param component the component name of the widget @param padding Rect in which to place the output, if null, a new Rect will be allocated and returned @return default padding for this widget, in pixels
AppWidgetHostView::getDefaultPaddingForWidget
java
Reginer/aosp-android-jar
android-34/src/android/appwidget/AppWidgetHostView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/appwidget/AppWidgetHostView.java
MIT
private void handleViewError() { removeViewInLayout(mView); View child = getErrorView(); prepareView(child); addViewInLayout(child, 0, child.getLayoutParams()); measureChild(child, MeasureSpec.makeMeasureSpec(getMeasuredWidth(), MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(getMeasuredHeight(), MeasureSpec.EXACTLY)); child.layout(0, 0, child.getMeasuredWidth() + mPaddingLeft + mPaddingRight, child.getMeasuredHeight() + mPaddingTop + mPaddingBottom); mView = child; mViewMode = VIEW_MODE_ERROR; }
Remove bad view and replace with error message view
AppWidgetHostView::handleViewError
java
Reginer/aosp-android-jar
android-34/src/android/appwidget/AppWidgetHostView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/appwidget/AppWidgetHostView.java
MIT
public void updateAppWidgetSize(@NonNull Bundle newOptions, @NonNull List<SizeF> sizes) { AppWidgetManager widgetManager = AppWidgetManager.getInstance(mContext); Rect padding = getDefaultPadding(); float density = getResources().getDisplayMetrics().density; float xPaddingDips = (padding.left + padding.right) / density; float yPaddingDips = (padding.top + padding.bottom) / density; ArrayList<SizeF> paddedSizes = new ArrayList<>(sizes.size()); float minWidth = Float.MAX_VALUE; float maxWidth = 0; float minHeight = Float.MAX_VALUE; float maxHeight = 0; for (int i = 0; i < sizes.size(); i++) { SizeF size = sizes.get(i); SizeF paddedSize = new SizeF(Math.max(0.f, size.getWidth() - xPaddingDips), Math.max(0.f, size.getHeight() - yPaddingDips)); paddedSizes.add(paddedSize); minWidth = Math.min(minWidth, paddedSize.getWidth()); maxWidth = Math.max(maxWidth, paddedSize.getWidth()); minHeight = Math.min(minHeight, paddedSize.getHeight()); maxHeight = Math.max(maxHeight, paddedSize.getHeight()); } if (paddedSizes.equals( widgetManager.getAppWidgetOptions(mAppWidgetId).<SizeF>getParcelableArrayList( AppWidgetManager.OPTION_APPWIDGET_SIZES))) { return; } Bundle options = newOptions.deepCopy(); options.putInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH, (int) minWidth); options.putInt(AppWidgetManager.OPTION_APPWIDGET_MIN_HEIGHT, (int) minHeight); options.putInt(AppWidgetManager.OPTION_APPWIDGET_MAX_WIDTH, (int) maxWidth); options.putInt(AppWidgetManager.OPTION_APPWIDGET_MAX_HEIGHT, (int) maxHeight); options.putParcelableArrayList(AppWidgetManager.OPTION_APPWIDGET_SIZES, paddedSizes); updateAppWidgetOptions(options); }
Provide guidance about the size of this widget to the AppWidgetManager. The sizes should correspond to the full area the AppWidgetHostView is given. Padding added by the framework will be accounted for automatically. This method will update the option bundle with the list of sizes and the min/max bounds for width and height. @see AppWidgetProvider#onAppWidgetOptionsChanged(Context, AppWidgetManager, int, Bundle) @param newOptions The bundle of options, in addition to the size information. @param sizes Sizes, in dips, the widget may be displayed at without calling the provider again. Typically, this will be size of the widget in landscape and portrait. On some foldables, this might include the size on the outer and inner screens.
AppWidgetHostView::updateAppWidgetSize
java
Reginer/aosp-android-jar
android-34/src/android/appwidget/AppWidgetHostView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/appwidget/AppWidgetHostView.java
MIT
public void updateAppWidgetOptions(Bundle options) { AppWidgetManager.getInstance(mContext).updateAppWidgetOptions(mAppWidgetId, options); }
Specify some extra information for the widget provider. Causes a callback to the AppWidgetProvider. @see AppWidgetProvider#onAppWidgetOptionsChanged(Context, AppWidgetManager, int, Bundle) @param options The bundle of options information.
AppWidgetHostView::updateAppWidgetOptions
java
Reginer/aosp-android-jar
android-34/src/android/appwidget/AppWidgetHostView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/appwidget/AppWidgetHostView.java
MIT
public void setExecutor(Executor executor) { if (mLastExecutionSignal != null) { mLastExecutionSignal.cancel(); mLastExecutionSignal = null; } mAsyncExecutor = executor; }
Sets an executor which can be used for asynchronously inflating. CPU intensive tasks like view inflation or loading images will be performed on the executor. The updates will still be applied on the UI thread. @param executor the executor to use or null.
AppWidgetHostView::setExecutor
java
Reginer/aosp-android-jar
android-34/src/android/appwidget/AppWidgetHostView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/appwidget/AppWidgetHostView.java
MIT
public void setOnLightBackground(boolean onLightBackground) { mOnLightBackground = onLightBackground; }
Sets whether the widget is being displayed on a light/white background and use an alternate UI if available. @see RemoteViews#setLightBackgroundLayoutId(int)
AppWidgetHostView::setOnLightBackground
java
Reginer/aosp-android-jar
android-34/src/android/appwidget/AppWidgetHostView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/appwidget/AppWidgetHostView.java
MIT
private void reapplyLastRemoteViews() { SparseArray<Parcelable> savedState = new SparseArray<>(); saveHierarchyState(savedState); applyRemoteViews(mLastInflatedRemoteViews, true); restoreHierarchyState(savedState); }
Reapply the last inflated remote views, or the default view is none was inflated.
AppWidgetHostView::reapplyLastRemoteViews
java
Reginer/aosp-android-jar
android-34/src/android/appwidget/AppWidgetHostView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/appwidget/AppWidgetHostView.java
MIT
protected Context getRemoteContextEnsuringCorrectCachedApkPath() { try { ApplicationInfo expectedAppInfo = mInfo.providerInfo.applicationInfo; LoadedApk.checkAndUpdateApkPaths(expectedAppInfo); // Return if cloned successfully, otherwise default Context newContext = mContext.createApplicationContext( mInfo.providerInfo.applicationInfo, Context.CONTEXT_RESTRICTED); if (mColorResources != null) { mColorResources.apply(newContext); } return newContext; } catch (NameNotFoundException e) { Log.e(TAG, "Package name " + mInfo.providerInfo.packageName + " not found"); return mContext; } catch (NullPointerException e) { Log.e(TAG, "Error trying to create the remote context.", e); return mContext; } }
Build a {@link Context} cloned into another package name, usually for the purposes of reading remote resources. @hide
ViewApplyListener::getRemoteContextEnsuringCorrectCachedApkPath
java
Reginer/aosp-android-jar
android-34/src/android/appwidget/AppWidgetHostView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/appwidget/AppWidgetHostView.java
MIT
protected void prepareView(View view) { // Take requested dimensions from child, but apply default gravity. FrameLayout.LayoutParams requested = (FrameLayout.LayoutParams)view.getLayoutParams(); if (requested == null) { requested = new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); } requested.gravity = Gravity.CENTER; view.setLayoutParams(requested); }
Prepare the given view to be shown. This might include adjusting {@link FrameLayout.LayoutParams} before inserting.
ViewApplyListener::prepareView
java
Reginer/aosp-android-jar
android-34/src/android/appwidget/AppWidgetHostView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/appwidget/AppWidgetHostView.java
MIT
protected View getDefaultView() { if (LOGD) { Log.d(TAG, "getDefaultView"); } View defaultView = null; Exception exception = null; try { if (mInfo != null) { Context theirContext = getRemoteContextEnsuringCorrectCachedApkPath(); mRemoteContext = theirContext; LayoutInflater inflater = (LayoutInflater) theirContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); inflater = inflater.cloneInContext(theirContext); inflater.setFilter(INFLATER_FILTER); AppWidgetManager manager = AppWidgetManager.getInstance(mContext); Bundle options = manager.getAppWidgetOptions(mAppWidgetId); int layoutId = mInfo.initialLayout; if (options.containsKey(AppWidgetManager.OPTION_APPWIDGET_HOST_CATEGORY)) { int category = options.getInt(AppWidgetManager.OPTION_APPWIDGET_HOST_CATEGORY); if (category == AppWidgetProviderInfo.WIDGET_CATEGORY_KEYGUARD) { int kgLayoutId = mInfo.initialKeyguardLayout; // If a default keyguard layout is not specified, use the standard // default layout. layoutId = kgLayoutId == 0 ? layoutId : kgLayoutId; } } defaultView = inflater.inflate(layoutId, this, false); if (!(defaultView instanceof AdapterView)) { // AdapterView does not support onClickListener defaultView.setOnClickListener(this::onDefaultViewClicked); } } else { Log.w(TAG, "can't inflate defaultView because mInfo is missing"); } } catch (RuntimeException e) { exception = e; } if (exception != null) { Log.w(TAG, "Error inflating AppWidget " + mInfo, exception); } if (defaultView == null) { if (LOGD) Log.d(TAG, "getDefaultView couldn't find any view, so inflating error"); defaultView = getErrorView(); } return defaultView; }
Inflate and return the default layout requested by AppWidget provider.
ViewApplyListener::getDefaultView
java
Reginer/aosp-android-jar
android-34/src/android/appwidget/AppWidgetHostView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/appwidget/AppWidgetHostView.java
MIT
public EapTtlsParsingException(String message) { super(message); }
Construct an instance of EapTtlsParsingException with the specified detail message. @param message the detail message.
EapTtlsParsingException::EapTtlsParsingException
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/net/eap/exceptions/ttls/EapTtlsParsingException.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/net/eap/exceptions/ttls/EapTtlsParsingException.java
MIT
public EapTtlsParsingException(String message, Throwable cause) { super(message, cause); }
Construct an instance of EapTtlsParsingException with the specified message and cause. @param message the detail message. @param cause the cause.
EapTtlsParsingException::EapTtlsParsingException
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/net/eap/exceptions/ttls/EapTtlsParsingException.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/net/eap/exceptions/ttls/EapTtlsParsingException.java
MIT
public SQLiteDatabase getWritableDatabaseSafe() throws EncryptionDbException { try { return super.getWritableDatabase(); } catch (SQLiteException e) { throw new EncryptionDbException(e); } }
Calls {@link #getWritableDatabase()}, but catches the unchecked {@link SQLiteException} and rethrows {@link EncryptionDbException}.
BackupEncryptionDbHelper::getWritableDatabaseSafe
java
Reginer/aosp-android-jar
android-32/src/com/android/server/backup/encryption/storage/BackupEncryptionDbHelper.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/server/backup/encryption/storage/BackupEncryptionDbHelper.java
MIT
public SQLiteDatabase getReadableDatabaseSafe() throws EncryptionDbException { try { return super.getReadableDatabase(); } catch (SQLiteException e) { throw new EncryptionDbException(e); } }
Calls {@link #getReadableDatabase()}, but catches the unchecked {@link SQLiteException} and rethrows {@link EncryptionDbException}.
BackupEncryptionDbHelper::getReadableDatabaseSafe
java
Reginer/aosp-android-jar
android-32/src/com/android/server/backup/encryption/storage/BackupEncryptionDbHelper.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/server/backup/encryption/storage/BackupEncryptionDbHelper.java
MIT
private static Long getSystemSeed() { Long seed = null; try { // note that Long.valueOf(null) also throws a // NumberFormatException so if the property is undefined this // will still work correctly seed = Long.valueOf(System.getProperty("seed")); } catch (NumberFormatException e) { // do nothing: seed is still null } return seed; }
Attempt to obtain the seed from the value of the "seed" property. @return The seed or {@code null} if the "seed" property was not set or could not be parsed.
RandomFactory::getSystemSeed
java
Reginer/aosp-android-jar
android-32/src/jdk/testlibrary/RandomFactory.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/jdk/testlibrary/RandomFactory.java
MIT
private static long getRandomSeed() { return new Random().nextLong(); }
Obtain a seed from an independent PRNG. @return A random seed.
RandomFactory::getRandomSeed
java
Reginer/aosp-android-jar
android-32/src/jdk/testlibrary/RandomFactory.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/jdk/testlibrary/RandomFactory.java
MIT
public static long getSeed() { Long seed = getSystemSeed(); if (seed == null) { seed = getRandomSeed(); } System.out.println("Seed from RandomFactory = "+seed+"L"); return seed; }
Obtain and print to STDOUT a seed appropriate for initializing a PRNG. If the system property "seed" is set and has value which may be correctly parsed it is used, otherwise a seed is generated using an independent PRNG. @return The seed.
RandomFactory::getSeed
java
Reginer/aosp-android-jar
android-32/src/jdk/testlibrary/RandomFactory.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/jdk/testlibrary/RandomFactory.java
MIT
public static Random getRandom() { return new Random(getSeed()); }
Obtain and print to STDOUT a seed and use it to initialize a new {@code Random} instance which is returned. If the system property "seed" is set and has value which may be correctly parsed it is used, otherwise a seed is generated using an independent PRNG. @return The {@code Random} instance.
RandomFactory::getRandom
java
Reginer/aosp-android-jar
android-32/src/jdk/testlibrary/RandomFactory.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/jdk/testlibrary/RandomFactory.java
MIT
public static SplittableRandom getSplittableRandom() { return new SplittableRandom(getSeed()); }
Obtain and print to STDOUT a seed and use it to initialize a new {@code SplittableRandom} instance which is returned. If the system property "seed" is set and has value which may be correctly parsed it is used, otherwise a seed is generated using an independent PRNG. @return The {@code SplittableRandom} instance.
RandomFactory::getSplittableRandom
java
Reginer/aosp-android-jar
android-32/src/jdk/testlibrary/RandomFactory.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/jdk/testlibrary/RandomFactory.java
MIT
public VirtualCamera( @NonNull IVirtualDevice virtualDevice, @NonNull String cameraId, @NonNull VirtualCameraConfig config) { mVirtualDevice = Objects.requireNonNull(virtualDevice); mCameraId = Objects.requireNonNull(cameraId); mConfig = Objects.requireNonNull(config); }
VirtualCamera device constructor. @param virtualDevice The Binder object representing this camera in the server. @param config Configuration for the new virtual camera @hide
VirtualCamera::VirtualCamera
java
Reginer/aosp-android-jar
android-35/src/android/companion/virtual/camera/VirtualCamera.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/companion/virtual/camera/VirtualCamera.java
MIT
public ContentLanguageList () { super(ContentLanguage.class, ContentLanguageHeader.NAME); }
Default constructor
ContentLanguageList::ContentLanguageList
java
Reginer/aosp-android-jar
android-34/src/gov/nist/javax/sip/header/ContentLanguageList.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/gov/nist/javax/sip/header/ContentLanguageList.java
MIT
public IllegalBlockSizeException() { super(); }
Constructs an IllegalBlockSizeException with no detail message. A detail message is a String that describes this particular exception.
IllegalBlockSizeException::IllegalBlockSizeException
java
Reginer/aosp-android-jar
android-31/src/javax/crypto/IllegalBlockSizeException.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/javax/crypto/IllegalBlockSizeException.java
MIT
public IllegalBlockSizeException(String msg) { super(msg); }
Constructs an IllegalBlockSizeException with the specified detail message. @param msg the detail message.
IllegalBlockSizeException::IllegalBlockSizeException
java
Reginer/aosp-android-jar
android-31/src/javax/crypto/IllegalBlockSizeException.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/javax/crypto/IllegalBlockSizeException.java
MIT
default void getTouchInitiationRegion(Region region) { }
Returns the region the touch handler is interested in. By default, no region is specified, indicating the entire screen should be considered. @param region A {@link Region} that is passed in to the target entry touch region.
getTouchInitiationRegion
java
Reginer/aosp-android-jar
android-33/src/com/android/systemui/dreams/touch/DreamTouchHandler.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/dreams/touch/DreamTouchHandler.java
MIT
public Segment pop() { Segment result = next != this ? next : null; prev.next = next; next.prev = prev; next = null; prev = null; return result; }
Removes this segment of a circularly-linked list and returns its successor. Returns null if the list is now empty.
Segment::pop
java
Reginer/aosp-android-jar
android-35/src/com/android/okhttp/okio/Segment.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/okhttp/okio/Segment.java
MIT
public Segment push(Segment segment) { segment.prev = this; segment.next = next; next.prev = segment; next = segment; return segment; }
Appends {@code segment} after this segment in the circularly-linked list. Returns the pushed segment.
Segment::push
java
Reginer/aosp-android-jar
android-35/src/com/android/okhttp/okio/Segment.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/okhttp/okio/Segment.java
MIT
public Segment split(int byteCount) { if (byteCount <= 0 || byteCount > limit - pos) throw new IllegalArgumentException(); Segment prefix = new Segment(this); prefix.limit = prefix.pos + byteCount; pos += byteCount; prev.push(prefix); return prefix; }
Splits this head of a circularly-linked list into two segments. The first segment contains the data in {@code [pos..pos+byteCount)}. The second segment contains the data in {@code [pos+byteCount..limit)}. This can be useful when moving partial segments from one buffer to another. <p>Returns the new head of the circularly-linked list.
Segment::split
java
Reginer/aosp-android-jar
android-35/src/com/android/okhttp/okio/Segment.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/okhttp/okio/Segment.java
MIT
public void compact() { if (prev == this) throw new IllegalStateException(); if (!prev.owner) return; // Cannot compact: prev isn't writable. int byteCount = limit - pos; int availableByteCount = SIZE - prev.limit + (prev.shared ? 0 : prev.pos); if (byteCount > availableByteCount) return; // Cannot compact: not enough writable space. writeTo(prev, byteCount); pop(); SegmentPool.recycle(this); }
Call this when the tail and its predecessor may both be less than half full. This will copy data so that segments can be recycled.
Segment::compact
java
Reginer/aosp-android-jar
android-35/src/com/android/okhttp/okio/Segment.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/okhttp/okio/Segment.java
MIT
public void writeTo(Segment sink, int byteCount) { if (!sink.owner) throw new IllegalArgumentException(); if (sink.limit + byteCount > SIZE) { // We can't fit byteCount bytes at the sink's current position. Shift sink first. if (sink.shared) throw new IllegalArgumentException(); if (sink.limit + byteCount - sink.pos > SIZE) throw new IllegalArgumentException(); System.arraycopy(sink.data, sink.pos, sink.data, 0, sink.limit - sink.pos); sink.limit -= sink.pos; sink.pos = 0; } System.arraycopy(data, pos, sink.data, sink.limit, byteCount); sink.limit += byteCount; pos += byteCount; }
Call this when the tail and its predecessor may both be less than half full. This will copy data so that segments can be recycled. public void compact() { if (prev == this) throw new IllegalStateException(); if (!prev.owner) return; // Cannot compact: prev isn't writable. int byteCount = limit - pos; int availableByteCount = SIZE - prev.limit + (prev.shared ? 0 : prev.pos); if (byteCount > availableByteCount) return; // Cannot compact: not enough writable space. writeTo(prev, byteCount); pop(); SegmentPool.recycle(this); } /** Moves {@code byteCount} bytes from this segment to {@code sink}.
Segment::writeTo
java
Reginer/aosp-android-jar
android-35/src/com/android/okhttp/okio/Segment.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/okhttp/okio/Segment.java
MIT
public int id() { return mHandle.id(); }
Get the system unique patch ID.
AudioPatch::id
java
Reginer/aosp-android-jar
android-35/src/android/media/AudioPatch.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/media/AudioPatch.java
MIT
default void onDeviceProvisionedChanged() { }
Call when the device changes from not provisioned to provisioned
onDeviceProvisionedChanged
java
Reginer/aosp-android-jar
android-33/src/com/android/systemui/statusbar/policy/DeviceProvisionedController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/policy/DeviceProvisionedController.java
MIT
default void onUserSwitched() { onUserSetupChanged(); }
Call on user switched
onUserSwitched
java
Reginer/aosp-android-jar
android-33/src/com/android/systemui/statusbar/policy/DeviceProvisionedController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/policy/DeviceProvisionedController.java
MIT
default void onUserSetupChanged() { }
Call when some user changes from not provisioned to provisioned
onUserSetupChanged
java
Reginer/aosp-android-jar
android-33/src/com/android/systemui/statusbar/policy/DeviceProvisionedController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/policy/DeviceProvisionedController.java
MIT
public RemoteComposeBuffer(RemoteComposeState remoteComposeState) { this.mRemoteComposeState = remoteComposeState; }
Provides an abstract buffer to encode/decode RemoteCompose operations @param remoteComposeState the state used while encoding on the buffer
RemoteComposeBuffer::RemoteComposeBuffer
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void reset(int expectedSize) { mBuffer.reset(expectedSize); mRemoteComposeState.reset(); }
Reset the internal buffers @param expectedSize provided hint for the main buffer size
RemoteComposeBuffer::reset
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void header(int width, int height, String contentDescription, long capabilities) { Header.COMPANION.apply(mBuffer, width, height, capabilities); int contentDescriptionId = 0; if (contentDescription != null) { contentDescriptionId = addText(contentDescription); RootContentDescription.COMPANION.apply(mBuffer, contentDescriptionId); } }
Insert a header @param width the width of the document in pixels @param height the height of the document in pixels @param contentDescription content description of the document @param capabilities bitmask indicating needed capabilities (unused for now)
RemoteComposeBuffer::header
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void header(int width, int height, String contentDescription) { header(width, height, contentDescription, 0); }
Insert a header @param width the width of the document in pixels @param height the height of the document in pixels @param contentDescription content description of the document
RemoteComposeBuffer::header
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void drawBitmap(Object image, int imageWidth, int imageHeight, int srcLeft, int srcTop, int srcRight, int srcBottom, int dstLeft, int dstTop, int dstRight, int dstBottom, String contentDescription) { int imageId = mRemoteComposeState.dataGetId(image); if (imageId == -1) { imageId = mRemoteComposeState.cache(image); byte[] data = mPlatform.imageToByteArray(image); BitmapData.COMPANION.apply(mBuffer, imageId, imageWidth, imageHeight, data); } int contentDescriptionId = 0; if (contentDescription != null) { contentDescriptionId = addText(contentDescription); } DrawBitmapInt.COMPANION.apply( mBuffer, imageId, srcLeft, srcTop, srcRight, srcBottom, dstLeft, dstTop, dstRight, dstBottom, contentDescriptionId ); }
Insert a bitmap @param image an opaque image that we'll add to the buffer @param imageWidth the width of the image @param imageHeight the height of the image @param srcLeft left coordinate of the source area @param srcTop top coordinate of the source area @param srcRight right coordinate of the source area @param srcBottom bottom coordinate of the source area @param dstLeft left coordinate of the destination area @param dstTop top coordinate of the destination area @param dstRight right coordinate of the destination area @param dstBottom bottom coordinate of the destination area
RemoteComposeBuffer::drawBitmap
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
int addText(String text) { int id = mRemoteComposeState.dataGetId(text); if (id == -1) { id = mRemoteComposeState.cache(text); TextData.COMPANION.apply(mBuffer, id, text); } return id; }
Adds a text string data to the stream and returns its id Will be used to insert string with bitmaps etc. @param text the string to inject in the buffer
RemoteComposeBuffer::addText
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void addClickArea( int id, String contentDescription, float left, float top, float right, float bottom, String metadata ) { int contentDescriptionId = 0; if (contentDescription != null) { contentDescriptionId = addText(contentDescription); } int metadataId = 0; if (metadata != null) { metadataId = addText(metadata); } ClickArea.COMPANION.apply(mBuffer, id, contentDescriptionId, left, top, right, bottom, metadataId); }
Add a click area to the document @param id the id of the click area, reported in the click listener callback @param contentDescription the content description of that click area (accessibility) @param left left coordinate of the area bounds @param top top coordinate of the area bounds @param right right coordinate of the area bounds @param bottom bottom coordinate of the area bounds @param metadata associated metadata, user-provided
RemoteComposeBuffer::addClickArea
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void setRootContentBehavior(int scroll, int alignment, int sizing, int mode) { RootContentBehavior.COMPANION.apply(mBuffer, scroll, alignment, sizing, mode); }
Sets the way the player handles the content @param scroll set the horizontal behavior (NONE|SCROLL_HORIZONTAL|SCROLL_VERTICAL) @param alignment set the alignment of the content (TOP|CENTER|BOTTOM|START|END) @param sizing set the type of sizing for the content (NONE|SIZING_LAYOUT|SIZING_SCALE) @param mode set the mode of sizing, either LAYOUT modes or SCALE modes the LAYOUT modes are: - LAYOUT_MATCH_PARENT - LAYOUT_WRAP_CONTENT or adding an horizontal mode and a vertical mode: - LAYOUT_HORIZONTAL_MATCH_PARENT - LAYOUT_HORIZONTAL_WRAP_CONTENT - LAYOUT_HORIZONTAL_FIXED - LAYOUT_VERTICAL_MATCH_PARENT - LAYOUT_VERTICAL_WRAP_CONTENT - LAYOUT_VERTICAL_FIXED The LAYOUT_*_FIXED modes will use the intrinsic document size
RemoteComposeBuffer::setRootContentBehavior
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void addDrawArc(float left, float top, float right, float bottom, float startAngle, float sweepAngle) { DrawArc.COMPANION.apply(mBuffer, left, top, right, bottom, startAngle, sweepAngle); }
add Drawing the specified arc, which will be scaled to fit inside the specified oval. <br> If the start angle is negative or >= 360, the start angle is treated as start angle modulo 360. <br> If the sweep angle is >= 360, then the oval is drawn completely. Note that this differs slightly from SkPath::arcTo, which treats the sweep angle modulo 360. If the sweep angle is negative, the sweep angle is treated as sweep angle modulo 360 <br> The arc is drawn clockwise. An angle of 0 degrees correspond to the geometric angle of 0 degrees (3 o'clock on a watch.) <br> @param left left coordinate of oval used to define the shape and size of the arc @param top top coordinate of oval used to define the shape and size of the arc @param right right coordinate of oval used to define the shape and size of the arc @param bottom bottom coordinate of oval used to define the shape and size of the arc @param startAngle Starting angle (in degrees) where the arc begins @param sweepAngle Sweep angle (in degrees) measured clockwise
RemoteComposeBuffer::addDrawArc
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void addDrawBitmap(Object image, float left, float top, float right, float bottom, String contentDescription) { int imageId = mRemoteComposeState.dataGetId(image); if (imageId == -1) { imageId = mRemoteComposeState.cache(image); byte[] data = mPlatform.imageToByteArray(image); int imageWidth = mPlatform.getImageWidth(image); int imageHeight = mPlatform.getImageHeight(image); BitmapData.COMPANION.apply(mBuffer, imageId, imageWidth, imageHeight, data); } int contentDescriptionId = 0; if (contentDescription != null) { contentDescriptionId = addText(contentDescription); } DrawBitmap.COMPANION.apply( mBuffer, imageId, left, top, right, bottom, contentDescriptionId ); }
@param image The bitmap to be drawn @param left left coordinate of rectangle that the bitmap will be to fit into @param top top coordinate of rectangle that the bitmap will be to fit into @param right right coordinate of rectangle that the bitmap will be to fit into @param bottom bottom coordinate of rectangle that the bitmap will be to fit into @param contentDescription content description of the image
RemoteComposeBuffer::addDrawBitmap
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void addDrawCircle(float centerX, float centerY, float radius) { DrawCircle.COMPANION.apply(mBuffer, centerX, centerY, radius); }
Draw the specified circle using the specified paint. If radius is <= 0, then nothing will be drawn. @param centerX The x-coordinate of the center of the circle to be drawn @param centerY The y-coordinate of the center of the circle to be drawn @param radius The radius of the circle to be drawn
RemoteComposeBuffer::addDrawCircle
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void addDrawLine(float x1, float y1, float x2, float y2) { DrawLine.COMPANION.apply(mBuffer, x1, y1, x2, y2); }
Draw a line segment with the specified start and stop x,y coordinates, using the specified paint. @param x1 The x-coordinate of the start point of the line @param y1 The y-coordinate of the start point of the line @param x2 The x-coordinate of the end point of the line @param y2 The y-coordinate of the end point of the line
RemoteComposeBuffer::addDrawLine
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void addDrawOval(float left, float top, float right, float bottom) { DrawOval.COMPANION.apply(mBuffer, left, top, right, bottom); }
Draw the specified oval using the specified paint. @param left left coordinate of oval @param top top coordinate of oval @param right right coordinate of oval @param bottom bottom coordinate of oval
RemoteComposeBuffer::addDrawOval
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void addDrawPath(Object path) { int id = mRemoteComposeState.dataGetId(path); if (id == -1) { // never been seen before id = addPathData(path); } addDrawPath(id); }
Draw the specified path <p> Note: path objects are not immutable modifying them and calling this will not change the drawing @param path The path to be drawn
RemoteComposeBuffer::addDrawPath
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void addDrawPath(int pathId) { DrawPath.COMPANION.apply(mBuffer, pathId); }
Draw the specified path @param pathId
RemoteComposeBuffer::addDrawPath
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void addDrawRect(float left, float top, float right, float bottom) { DrawRect.COMPANION.apply(mBuffer, left, top, right, bottom); }
Draw the specified Rect @param left left coordinate of rectangle to be drawn @param top top coordinate of rectangle to be drawn @param right right coordinate of rectangle to be drawn @param bottom bottom coordinate of rectangle to be drawn
RemoteComposeBuffer::addDrawRect
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void addDrawRoundRect(float left, float top, float right, float bottom, float radiusX, float radiusY) { DrawRoundRect.COMPANION.apply(mBuffer, left, top, right, bottom, radiusX, radiusY); }
Draw the specified round-rect @param left left coordinate of rectangle to be drawn @param top left coordinate of rectangle to be drawn @param right left coordinate of rectangle to be drawn @param bottom left coordinate of rectangle to be drawn @param radiusX The x-radius of the oval used to round the corners @param radiusY The y-radius of the oval used to round the corners
RemoteComposeBuffer::addDrawRoundRect
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void addDrawTextOnPath(String text, Object path, float hOffset, float vOffset) { int pathId = mRemoteComposeState.dataGetId(path); if (pathId == -1) { // never been seen before pathId = addPathData(path); } int textId = addText(text); DrawTextOnPath.COMPANION.apply(mBuffer, textId, pathId, hOffset, vOffset); }
Draw the text, with origin at (x,y) along the specified path. @param text The text to be drawn @param path The path the text should follow for its baseline @param hOffset The distance along the path to add to the text's starting position @param vOffset The distance above(-) or below(+) the path to position the text
RemoteComposeBuffer::addDrawTextOnPath
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void addDrawTextRun(String text, int start, int end, int contextStart, int contextEnd, float x, float y, boolean rtl) { int textId = addText(text); DrawTextRun.COMPANION.apply( mBuffer, textId, start, end, contextStart, contextEnd, x, y, rtl); }
Draw the text, with origin at (x,y). The origin is interpreted based on the Align setting in the paint. @param text The text to be drawn @param start The index of the first character in text to draw @param end (end - 1) is the index of the last character in text to draw @param contextStart @param contextEnd @param x The x-coordinate of the origin of the text being drawn @param y The y-coordinate of the baseline of the text being drawn @param rtl Draw RTTL
RemoteComposeBuffer::addDrawTextRun
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void addDrawTweenPath(Object path1, Object path2, float tween, float start, float stop) { int path1Id = mRemoteComposeState.dataGetId(path1); if (path1Id == -1) { // never been seen before path1Id = addPathData(path1); } int path2Id = mRemoteComposeState.dataGetId(path2); if (path2Id == -1) { // never been seen before path2Id = addPathData(path2); } addDrawTweenPath(path1Id, path2Id, tween, start, stop); }
draw an interpolation between two paths that have the same pattern <p> Warning paths objects are not immutable and this is not taken into consideration @param path1 The path1 to be drawn between @param path2 The path2 to be drawn between @param tween The ratio of path1 and path2 to 0 = all path 1, 1 = all path2 @param start The start of the subrange of paths to draw 0 = start form start 0.5 is half way @param stop The end of the subrange of paths to draw 1 = end at the end 0.5 is end half way
RemoteComposeBuffer::addDrawTweenPath
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void addDrawTweenPath(int path1Id, int path2Id, float tween, float start, float stop) { DrawTweenPath.COMPANION.apply( mBuffer, path1Id, path2Id, tween, start, stop); }
draw an interpolation between two paths that have the same pattern @param path1Id The path1 to be drawn between @param path2Id The path2 to be drawn between @param tween The ratio of path1 and path2 to 0 = all path 1, 1 = all path2 @param start The start of the subrange of paths to draw 0 = start form start .5 is 1/2 way @param stop The end of the subrange of paths to draw 1 = end at the end .5 is end 1/2 way
RemoteComposeBuffer::addDrawTweenPath
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public int addPathData(Object path) { float[] pathData = mPlatform.pathToFloatArray(path); int id = mRemoteComposeState.cache(path); PathData.COMPANION.apply(mBuffer, id, pathData); return id; }
Add a path object @param path @return the id of the path on the wire
RemoteComposeBuffer::addPathData
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void addMatrixSkew(float skewX, float skewY) { MatrixSkew.COMPANION.apply(mBuffer, skewX, skewY); }
add a Pre-concat the current matrix with the specified skew. @param skewX The amount to skew in X @param skewY The amount to skew in Y
RemoteComposeBuffer::addMatrixSkew
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void addMatrixRestore() { MatrixRestore.COMPANION.apply(mBuffer); }
This call balances a previous call to save(), and is used to remove all modifications to the matrix/clip state since the last save call. Do not call restore() more times than save() was called.
RemoteComposeBuffer::addMatrixRestore
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void addMatrixSave() { MatrixSave.COMPANION.apply(mBuffer); }
Add a saves the current matrix and clip onto a private stack. <p> Subsequent calls to translate,scale,rotate,skew,concat or clipRect, clipPath will all operate as usual, but when the balancing call to restore() is made, those calls will be forgotten, and the settings that existed before the save() will be reinstated.
RemoteComposeBuffer::addMatrixSave
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void addMatrixRotate(float angle, float centerX, float centerY) { MatrixRotate.COMPANION.apply(mBuffer, angle, centerX, centerY); }
add a pre-concat the current matrix with the specified rotation. @param angle The amount to rotate, in degrees @param centerX The x-coord for the pivot point (unchanged by the rotation) @param centerY The y-coord for the pivot point (unchanged by the rotation)
RemoteComposeBuffer::addMatrixRotate
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void addMatrixTranslate(float dx, float dy) { MatrixTranslate.COMPANION.apply(mBuffer, dx, dy); }
add a Pre-concat to the current matrix with the specified translation @param dx The distance to translate in X @param dy The distance to translate in Y
RemoteComposeBuffer::addMatrixTranslate
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void addMatrixScale(float scaleX, float scaleY) { MatrixScale.COMPANION.apply(mBuffer, scaleX, scaleY, Float.NaN, Float.NaN); }
Add a pre-concat of the current matrix with the specified scale. @param scaleX The amount to scale in X @param scaleY The amount to scale in Y
RemoteComposeBuffer::addMatrixScale
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
public void addMatrixScale(float scaleX, float scaleY, float centerX, float centerY) { MatrixScale.COMPANION.apply(mBuffer, scaleX, scaleY, centerX, centerY); }
Add a pre-concat of the current matrix with the specified scale. @param scaleX The amount to scale in X @param scaleY The amount to scale in Y @param centerX The x-coord for the pivot point (unchanged by the scale) @param centerY The y-coord for the pivot point (unchanged by the scale)
RemoteComposeBuffer::addMatrixScale
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java
MIT
private IsoChronology() { }
Restricted constructor.
IsoChronology::IsoChronology
java
Reginer/aosp-android-jar
android-34/src/java/time/chrono/IsoChronology.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/java/time/chrono/IsoChronology.java
MIT
private int numberOfDaysOfMonth(int year, int month) { int dom; switch (month) { case 2: dom = (IsoChronology.INSTANCE.isLeapYear(year) ? 29 : 28); break; case 4: case 6: case 9: case 11: dom = 30; break; default: dom = 31; break; } return dom; }
Gets the number of days for the given month in the given year. @param year the year to represent, from MIN_YEAR to MAX_YEAR @param month the month-of-year to represent, from 1 to 12 @return the number of days for the given month in the given year
IsoChronology::numberOfDaysOfMonth
java
Reginer/aosp-android-jar
android-34/src/java/time/chrono/IsoChronology.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/java/time/chrono/IsoChronology.java
MIT
public int getNumDisplays() { return mNumDisplays; }
Returns the number built in displays on the device as defined in the power_profile.xml.
CpuClusterKey::getNumDisplays
java
Reginer/aosp-android-jar
android-33/src/com/android/internal/os/PowerProfile.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/internal/os/PowerProfile.java
MIT
public int getNumElements(String key) { if (sPowerItemMap.containsKey(key)) { return 1; } else if (sPowerArrayMap.containsKey(key)) { return sPowerArrayMap.get(key).length; } return 0; }
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.
CpuClusterKey::getNumElements
java
Reginer/aosp-android-jar
android-33/src/com/android/internal/os/PowerProfile.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/internal/os/PowerProfile.java
MIT
public double getAveragePowerOrDefault(String type, double defaultValue) { if (sPowerItemMap.containsKey(type)) { return sPowerItemMap.get(type); } else if (sPowerArrayMap.containsKey(type)) { return sPowerArrayMap.get(type)[0]; } else { return defaultValue; } }
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 defaultValue the value to return if the subsystem has no recorded value. @return the average current in milliAmps.
CpuClusterKey::getAveragePowerOrDefault
java
Reginer/aosp-android-jar
android-33/src/com/android/internal/os/PowerProfile.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/internal/os/PowerProfile.java
MIT
public double getAverageBatteryDrainOrDefaultMa(long key, double defaultValue) { final long subsystemType = key & SUBSYSTEM_MASK; final int subsystemFields = (int) (key & SUBSYSTEM_FIELDS_MASK); final double value; if (subsystemType == SUBSYSTEM_MODEM) { value = sModemPowerProfile.getAverageBatteryDrainMa(subsystemFields); } else { value = Double.NaN; } if (Double.isNaN(value)) return defaultValue; return value; }
Returns the average current in mA consumed by a subsystem's specified operation, or the given default value if the subsystem has no recorded value. @param key that describes a subsystem's battery draining operation The key is built from multiple constant, see {@link Subsystem} and {@link ModemPowerProfile}. @param defaultValue the value to return if the subsystem has no recorded value. @return the average current in milliAmps.
CpuClusterKey::getAverageBatteryDrainOrDefaultMa
java
Reginer/aosp-android-jar
android-33/src/com/android/internal/os/PowerProfile.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/internal/os/PowerProfile.java
MIT
public double getAverageBatteryDrainMa(long key) { return getAverageBatteryDrainOrDefaultMa(key, 0); }
Returns the average current in mA consumed by a subsystem's specified operation. @param key that describes a subsystem's battery draining operation The key is built from multiple constant, see {@link Subsystem} and {@link ModemPowerProfile}. @return the average current in milliAmps.
CpuClusterKey::getAverageBatteryDrainMa
java
Reginer/aosp-android-jar
android-33/src/com/android/internal/os/PowerProfile.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/internal/os/PowerProfile.java
MIT
public double getAveragePowerForOrdinal(@PowerGroup String group, int ordinal, double defaultValue) { final String type = getOrdinalPowerType(group, ordinal); return getAveragePowerOrDefault(type, defaultValue); }
Returns the average current in mA consumed by an ordinaled subsystem, or the given default value if the subsystem has no recorded value. @param group the subsystem {@link PowerGroup}. @param ordinal which entity in the {@link PowerGroup}. @param defaultValue the value to return if the subsystem has no recorded value. @return the average current in milliAmps.
CpuClusterKey::getAveragePowerForOrdinal
java
Reginer/aosp-android-jar
android-33/src/com/android/internal/os/PowerProfile.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/internal/os/PowerProfile.java
MIT
public double getAveragePowerForOrdinal(@PowerGroup String group, int ordinal) { return getAveragePowerForOrdinal(group, ordinal, 0); }
Returns the average current in mA consumed by an ordinaled subsystem. @param group the subsystem {@link PowerGroup}. @param ordinal which entity in the {@link PowerGroup}. @return the average current in milliAmps.
CpuClusterKey::getAveragePowerForOrdinal
java
Reginer/aosp-android-jar
android-33/src/com/android/internal/os/PowerProfile.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/internal/os/PowerProfile.java
MIT
public void dumpDebug(ProtoOutputStream proto) { // cpu.suspend writePowerConstantToProto(proto, POWER_CPU_SUSPEND, PowerProfileProto.CPU_SUSPEND); // cpu.idle writePowerConstantToProto(proto, POWER_CPU_IDLE, PowerProfileProto.CPU_IDLE); // cpu.active writePowerConstantToProto(proto, POWER_CPU_ACTIVE, PowerProfileProto.CPU_ACTIVE); // cpu.clusters.cores // cpu.cluster_power.cluster // cpu.core_speeds.cluster // cpu.core_power.cluster for (int cluster = 0; cluster < mCpuClusters.length; cluster++) { final long token = proto.start(PowerProfileProto.CPU_CLUSTER); proto.write(PowerProfileProto.CpuCluster.ID, cluster); proto.write(PowerProfileProto.CpuCluster.CLUSTER_POWER, sPowerItemMap.get(mCpuClusters[cluster].clusterPowerKey)); proto.write(PowerProfileProto.CpuCluster.CORES, mCpuClusters[cluster].numCpus); for (Double speed : sPowerArrayMap.get(mCpuClusters[cluster].freqKey)) { proto.write(PowerProfileProto.CpuCluster.SPEED, speed); } for (Double corePower : sPowerArrayMap.get(mCpuClusters[cluster].corePowerKey)) { proto.write(PowerProfileProto.CpuCluster.CORE_POWER, corePower); } proto.end(token); } // wifi.scan writePowerConstantToProto(proto, POWER_WIFI_SCAN, PowerProfileProto.WIFI_SCAN); // wifi.on writePowerConstantToProto(proto, POWER_WIFI_ON, PowerProfileProto.WIFI_ON); // wifi.active writePowerConstantToProto(proto, POWER_WIFI_ACTIVE, PowerProfileProto.WIFI_ACTIVE); // wifi.controller.idle writePowerConstantToProto(proto, POWER_WIFI_CONTROLLER_IDLE, PowerProfileProto.WIFI_CONTROLLER_IDLE); // wifi.controller.rx writePowerConstantToProto(proto, POWER_WIFI_CONTROLLER_RX, PowerProfileProto.WIFI_CONTROLLER_RX); // wifi.controller.tx writePowerConstantToProto(proto, POWER_WIFI_CONTROLLER_TX, PowerProfileProto.WIFI_CONTROLLER_TX); // wifi.controller.tx_levels writePowerConstantArrayToProto(proto, POWER_WIFI_CONTROLLER_TX_LEVELS, PowerProfileProto.WIFI_CONTROLLER_TX_LEVELS); // wifi.controller.voltage writePowerConstantToProto(proto, POWER_WIFI_CONTROLLER_OPERATING_VOLTAGE, PowerProfileProto.WIFI_CONTROLLER_OPERATING_VOLTAGE); // bluetooth.controller.idle writePowerConstantToProto(proto, POWER_BLUETOOTH_CONTROLLER_IDLE, PowerProfileProto.BLUETOOTH_CONTROLLER_IDLE); // bluetooth.controller.rx writePowerConstantToProto(proto, POWER_BLUETOOTH_CONTROLLER_RX, PowerProfileProto.BLUETOOTH_CONTROLLER_RX); // bluetooth.controller.tx writePowerConstantToProto(proto, POWER_BLUETOOTH_CONTROLLER_TX, PowerProfileProto.BLUETOOTH_CONTROLLER_TX); // bluetooth.controller.voltage writePowerConstantToProto(proto, POWER_BLUETOOTH_CONTROLLER_OPERATING_VOLTAGE, PowerProfileProto.BLUETOOTH_CONTROLLER_OPERATING_VOLTAGE); // modem.controller.sleep writePowerConstantToProto(proto, POWER_MODEM_CONTROLLER_SLEEP, PowerProfileProto.MODEM_CONTROLLER_SLEEP); // modem.controller.idle writePowerConstantToProto(proto, POWER_MODEM_CONTROLLER_IDLE, PowerProfileProto.MODEM_CONTROLLER_IDLE); // modem.controller.rx writePowerConstantToProto(proto, POWER_MODEM_CONTROLLER_RX, PowerProfileProto.MODEM_CONTROLLER_RX); // modem.controller.tx writePowerConstantArrayToProto(proto, POWER_MODEM_CONTROLLER_TX, PowerProfileProto.MODEM_CONTROLLER_TX); // modem.controller.voltage writePowerConstantToProto(proto, POWER_MODEM_CONTROLLER_OPERATING_VOLTAGE, PowerProfileProto.MODEM_CONTROLLER_OPERATING_VOLTAGE); // gps.on writePowerConstantToProto(proto, POWER_GPS_ON, PowerProfileProto.GPS_ON); // gps.signalqualitybased writePowerConstantArrayToProto(proto, POWER_GPS_SIGNAL_QUALITY_BASED, PowerProfileProto.GPS_SIGNAL_QUALITY_BASED); // gps.voltage writePowerConstantToProto(proto, POWER_GPS_OPERATING_VOLTAGE, PowerProfileProto.GPS_OPERATING_VOLTAGE); // bluetooth.on writePowerConstantToProto(proto, POWER_BLUETOOTH_ON, PowerProfileProto.BLUETOOTH_ON); // bluetooth.active writePowerConstantToProto(proto, POWER_BLUETOOTH_ACTIVE, PowerProfileProto.BLUETOOTH_ACTIVE); // bluetooth.at writePowerConstantToProto(proto, POWER_BLUETOOTH_AT_CMD, PowerProfileProto.BLUETOOTH_AT_CMD); // ambient.on writePowerConstantToProto(proto, POWER_AMBIENT_DISPLAY, PowerProfileProto.AMBIENT_DISPLAY); // screen.on writePowerConstantToProto(proto, POWER_SCREEN_ON, PowerProfileProto.SCREEN_ON); // radio.on writePowerConstantToProto(proto, POWER_RADIO_ON, PowerProfileProto.RADIO_ON); // radio.scanning writePowerConstantToProto(proto, POWER_RADIO_SCANNING, PowerProfileProto.RADIO_SCANNING); // radio.active writePowerConstantToProto(proto, POWER_RADIO_ACTIVE, PowerProfileProto.RADIO_ACTIVE); // screen.full writePowerConstantToProto(proto, POWER_SCREEN_FULL, PowerProfileProto.SCREEN_FULL); // audio writePowerConstantToProto(proto, POWER_AUDIO, PowerProfileProto.AUDIO); // video writePowerConstantToProto(proto, POWER_VIDEO, PowerProfileProto.VIDEO); // camera.flashlight writePowerConstantToProto(proto, POWER_FLASHLIGHT, PowerProfileProto.FLASHLIGHT); // memory.bandwidths writePowerConstantToProto(proto, POWER_MEMORY, PowerProfileProto.MEMORY); // camera.avg writePowerConstantToProto(proto, POWER_CAMERA, PowerProfileProto.CAMERA); // wifi.batchedscan writePowerConstantToProto(proto, POWER_WIFI_BATCHED_SCAN, PowerProfileProto.WIFI_BATCHED_SCAN); // battery.capacity writePowerConstantToProto(proto, POWER_BATTERY_CAPACITY, PowerProfileProto.BATTERY_CAPACITY); }
Dump power constants into PowerProfileProto
CpuClusterKey::dumpDebug
java
Reginer/aosp-android-jar
android-33/src/com/android/internal/os/PowerProfile.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/internal/os/PowerProfile.java
MIT
public void dump(PrintWriter pw) { final IndentingPrintWriter ipw = new IndentingPrintWriter(pw); sPowerItemMap.forEach((key, value) -> { ipw.print(key, value); ipw.println(); }); sPowerArrayMap.forEach((key, value) -> { ipw.print(key, Arrays.toString(value)); ipw.println(); }); ipw.println("Modem values:"); ipw.increaseIndent(); sModemPowerProfile.dump(ipw); ipw.decreaseIndent(); }
Dump the PowerProfile values.
CpuClusterKey::dump
java
Reginer/aosp-android-jar
android-33/src/com/android/internal/os/PowerProfile.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/internal/os/PowerProfile.java
MIT
public void updateIndication(@IndicationType int type, KeyguardIndication newIndication, boolean updateImmediately) { if (type == INDICATION_TYPE_NOW_PLAYING || type == INDICATION_TYPE_REVERSE_CHARGING) { // temporarily don't show here, instead use AmbientContainer b/181049781 return; } final boolean hasPreviousIndication = mIndicationMessages.get(type) != null; final boolean hasNewIndication = newIndication != null; if (!hasNewIndication) { mIndicationMessages.remove(type); mIndicationQueue.removeIf(x -> x == type); } else { if (!hasPreviousIndication) { mIndicationQueue.add(type); } mIndicationMessages.put(type, newIndication); } if (mIsDozing) { return; } final boolean showNow = updateImmediately || mCurrIndicationType == INDICATION_TYPE_NONE || mCurrIndicationType == type; if (hasNewIndication) { if (showNow) { showIndication(type); } else if (!isNextIndicationScheduled()) { scheduleShowNextIndication(); } return; } if (mCurrIndicationType == type && !hasNewIndication && updateImmediately) { if (mShowNextIndicationRunnable != null) { mShowNextIndicationRunnable.runImmediately(); } else { showIndication(INDICATION_TYPE_NONE); } } }
Update the indication type with the given String. @param type of indication @param newIndication message to associate with this indication type @param showImmediately if true: shows this indication message immediately. Else, the text associated with this type is updated and will show when its turn in the IndicationQueue comes around.
KeyguardIndicationRotateTextViewController::updateIndication
java
Reginer/aosp-android-jar
android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
MIT
public void hideIndication(@IndicationType int type) { if (!mIndicationMessages.containsKey(type) || TextUtils.isEmpty(mIndicationMessages.get(type).getMessage())) { return; } updateIndication(type, null, true); }
Stop showing the following indication type. If the current indication is of this type, immediately stops showing the message.
KeyguardIndicationRotateTextViewController::hideIndication
java
Reginer/aosp-android-jar
android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
MIT
public void showTransient(CharSequence newIndication) { final long inAnimationDuration = 600L; // see KeyguardIndicationTextView.getYInDuration updateIndication(INDICATION_TYPE_TRANSIENT, new KeyguardIndication.Builder() .setMessage(newIndication) .setMinVisibilityMillis(2000L + inAnimationDuration) .setTextColor(mInitialTextColorState) .build(), /* showImmediately */true); }
Show a transient message. Transient messages: - show immediately - will continue to be in the rotation of messages shown until hideTransient is called.
KeyguardIndicationRotateTextViewController::showTransient
java
Reginer/aosp-android-jar
android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
MIT
public void hideTransient() { hideIndication(INDICATION_TYPE_TRANSIENT); }
Hide a transient message immediately.
KeyguardIndicationRotateTextViewController::hideTransient
java
Reginer/aosp-android-jar
android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
MIT
public boolean hasIndications() { return mIndicationMessages.keySet().size() > 0; }
@return true if there are available indications to show
KeyguardIndicationRotateTextViewController::hasIndications
java
Reginer/aosp-android-jar
android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
MIT
private void showIndication(@IndicationType int type) { cancelScheduledIndication(); mCurrIndicationType = type; mIndicationQueue.removeIf(x -> x == type); if (mCurrIndicationType != INDICATION_TYPE_NONE) { mIndicationQueue.add(type); // re-add to show later } mView.switchIndication(mIndicationMessages.get(type)); // only schedule next indication if there's more than just this indication in the queue if (mCurrIndicationType != INDICATION_TYPE_NONE && mIndicationQueue.size() > 1) { scheduleShowNextIndication(); } }
Immediately show the passed indication type and schedule the next indication to show. Will re-add this indication to be re-shown after all other indications have been rotated through.
KeyguardIndicationRotateTextViewController::showIndication
java
Reginer/aosp-android-jar
android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
MIT
public void setEdgeEffectColor(@ColorInt int color) { setTopEdgeEffectColor(color); setBottomEdgeEffectColor(color); }
Sets the edge effect color for both top and bottom edge effects. @param color The color for the edge effects. @see #setTopEdgeEffectColor(int) @see #setBottomEdgeEffectColor(int) @see #getTopEdgeEffectColor() @see #getBottomEdgeEffectColor()
ScrollView::setEdgeEffectColor
java
Reginer/aosp-android-jar
android-35/src/android/widget/ScrollView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/widget/ScrollView.java
MIT
public void setBottomEdgeEffectColor(@ColorInt int color) { mEdgeGlowBottom.setColor(color); }
Sets the bottom edge effect color. @param color The color for the bottom edge effect. @see #setTopEdgeEffectColor(int) @see #setEdgeEffectColor(int) @see #getTopEdgeEffectColor() @see #getBottomEdgeEffectColor()
ScrollView::setBottomEdgeEffectColor
java
Reginer/aosp-android-jar
android-35/src/android/widget/ScrollView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/widget/ScrollView.java
MIT
public void setTopEdgeEffectColor(@ColorInt int color) { mEdgeGlowTop.setColor(color); }
Sets the top edge effect color. @param color The color for the top edge effect. @see #setBottomEdgeEffectColor(int) @see #setEdgeEffectColor(int) @see #getTopEdgeEffectColor() @see #getBottomEdgeEffectColor()
ScrollView::setTopEdgeEffectColor
java
Reginer/aosp-android-jar
android-35/src/android/widget/ScrollView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/widget/ScrollView.java
MIT
public int getMaxScrollAmount() { return (int) (MAX_SCROLL_FACTOR * (mBottom - mTop)); }
@return The maximum amount this scroll view will scroll in response to an arrow event.
ScrollView::getMaxScrollAmount
java
Reginer/aosp-android-jar
android-35/src/android/widget/ScrollView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/widget/ScrollView.java
MIT
public void setFillViewport(boolean fillViewport) { if (fillViewport != mFillViewport) { mFillViewport = fillViewport; requestLayout(); } }
Indicates this ScrollView whether it should stretch its content height to fill the viewport or not. @param fillViewport True to stretch the content's height to the viewport's boundaries, false otherwise. @attr ref android.R.styleable#ScrollView_fillViewport
ScrollView::setFillViewport
java
Reginer/aosp-android-jar
android-35/src/android/widget/ScrollView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/widget/ScrollView.java
MIT
public boolean isSmoothScrollingEnabled() { return mSmoothScrollingEnabled; }
@return Whether arrow scrolling will animate its transition.
ScrollView::isSmoothScrollingEnabled
java
Reginer/aosp-android-jar
android-35/src/android/widget/ScrollView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/widget/ScrollView.java
MIT
public void setSmoothScrollingEnabled(boolean smoothScrollingEnabled) { mSmoothScrollingEnabled = smoothScrollingEnabled; }
Set whether arrow scrolling will animate its transition. @param smoothScrollingEnabled whether arrow scrolling will animate its transition
ScrollView::setSmoothScrollingEnabled
java
Reginer/aosp-android-jar
android-35/src/android/widget/ScrollView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/widget/ScrollView.java
MIT
public boolean executeKeyEvent(KeyEvent event) { mTempRect.setEmpty(); if (!canScroll()) { if (isFocused() && event.getKeyCode() != KeyEvent.KEYCODE_BACK && event.getKeyCode() != KeyEvent.KEYCODE_ESCAPE) { View currentFocused = findFocus(); if (currentFocused == this) currentFocused = null; View nextFocused = FocusFinder.getInstance().findNextFocus(this, currentFocused, View.FOCUS_DOWN); return nextFocused != null && nextFocused != this && nextFocused.requestFocus(View.FOCUS_DOWN); } return false; } boolean handled = false; if (event.getAction() == KeyEvent.ACTION_DOWN) { switch (event.getKeyCode()) { case KeyEvent.KEYCODE_DPAD_UP: if (!event.isAltPressed()) { handled = arrowScroll(View.FOCUS_UP); } else { handled = fullScroll(View.FOCUS_UP); } break; case KeyEvent.KEYCODE_DPAD_DOWN: if (!event.isAltPressed()) { handled = arrowScroll(View.FOCUS_DOWN); } else { handled = fullScroll(View.FOCUS_DOWN); } break; case KeyEvent.KEYCODE_MOVE_HOME: handled = fullScroll(View.FOCUS_UP); break; case KeyEvent.KEYCODE_MOVE_END: handled = fullScroll(View.FOCUS_DOWN); break; case KeyEvent.KEYCODE_PAGE_UP: handled = pageScroll(View.FOCUS_UP); break; case KeyEvent.KEYCODE_PAGE_DOWN: handled = pageScroll(View.FOCUS_DOWN); break; case KeyEvent.KEYCODE_SPACE: handled = pageScroll(event.isShiftPressed() ? View.FOCUS_UP : View.FOCUS_DOWN); break; } } return handled; }
You can call this function yourself to have the scroll view perform scrolling from a key event, just as if the event had been dispatched to it by the view hierarchy. @param event The key event to execute. @return Return true if the event was handled, else false.
ScrollView::executeKeyEvent
java
Reginer/aosp-android-jar
android-35/src/android/widget/ScrollView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/widget/ScrollView.java
MIT
protected void writeToParcel(@NonNull Parcel dest, int flags, int type) { dest.writeInt(type); }
Used by child classes for parceling. @hide
VopsSupportInfo::writeToParcel
java
Reginer/aosp-android-jar
android-33/src/android/telephony/VopsSupportInfo.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/telephony/VopsSupportInfo.java
MIT