Home
last modified time | relevance | path

Searched refs:lifetime (Results 1 – 25 of 31) sorted by relevance

12

/packages/modules/NetworkStack/common/netlinkclient/src/android/net/netlink/
DStructNdOptPref64.java57 public final int lifetime; field in StructNdOptPref64
90 static short getScaledLifetimePlc(int lifetime, int prefixLengthCode) { in getScaledLifetimePlc() argument
91 return (short) ((lifetime & 0xfff8) | (prefixLengthCode & 0x7)); in getScaledLifetimePlc()
94 public StructNdOptPref64(@NonNull IpPrefix prefix, int lifetime) { in StructNdOptPref64() argument
104 if (lifetime < 0 || lifetime > 0xfff8) { in StructNdOptPref64()
105 throw new IllegalArgumentException("Invalid lifetime " + lifetime); in StructNdOptPref64()
107 this.lifetime = lifetime & 0xfff8; in StructNdOptPref64()
116 lifetime = scaledLifetimePlc & 0xfff8; in StructNdOptPref64()
152 buf.putShort(getScaledLifetimePlc(lifetime, prefixLengthToPlc(prefix.getPrefixLength()))); in writeToByteBuffer()
167 return String.format("NdOptPref64(%s, %d)", prefix, lifetime); in toString()
/packages/modules/NetworkStack/src/android/net/apf/
DApfFilter.java527 public final long lifetime; field in ApfFilter.PacketSection
529 PacketSection(int start, int length, Type type, int option, long lifetime) { in PacketSection() argument
534 this.lifetime = lifetime; in PacketSection()
539 return String.format("%s: (%d, %d) %d %d", type, start, length, option, lifetime); in toString()
642 long lifetime = getUint32(mPacket, offset + 4); in rdnssOptionToString() local
644 sb.append("DNS ").append(lifetime).append("s"); in rdnssOptionToString()
655 long lifetime = getUint32(mPacket, offset + 4); in rioOptionToString() local
662 sb.append("RIO ").append(lifetime).append("s "); in rioOptionToString()
735 private void addLifetimeSection(int length, int optionType, long lifetime) { in addLifetimeSection() argument
738 optionType, lifetime)); in addLifetimeSection()
[all …]
/packages/modules/NetworkStack/tests/unit/src/android/net/netlink/
DStructNdOptPref64Test.java59 private void assertPref64OptMatches(int lifetime, IpPrefix prefix, StructNdOptPref64 opt) { in assertPref64OptMatches() argument
62 assertEquals(lifetime, opt.lifetime); in assertPref64OptMatches()
71 private ByteBuffer makeNdOptPref64(int lifetime, byte[] prefix, int prefixLengthCode) { in makeNdOptPref64() argument
77 .putShort(getScaledLifetimePlc(lifetime, prefixLengthCode)) in makeNdOptPref64()
178 private void assertInvalidParameters(IpPrefix prefix, int lifetime) { in assertInvalidParameters() argument
179 assertThrows(IllegalArgumentException.class, () -> new StructNdOptPref64(prefix, lifetime)); in assertInvalidParameters()
190 assertEquals(600, opt.lifetime); in testToByteBuffer()
195 assertEquals(65512, opt.lifetime); in testToByteBuffer()
/packages/apps/Camera2/src/com/android/camera/one/v2/common/
DBasicCameraFactory.java78 public BasicCameraFactory(Lifetime lifetime, in BasicCameraFactory() argument
134 lifetime.add(zoomCallback); in BasicCameraFactory()
137 lifetime.add(flashCallback); in BasicCameraFactory()
140 lifetime.add(exposureCallback); in BasicCameraFactory()
143 lifetime.add(hdrCallback); in BasicCameraFactory()
148 Lifetime(lifetime), frameServer, cameraCommandExecutor, cropRegion, in BasicCameraFactory()
/packages/services/Car/service/src/com/android/car/storagemonitoring/
DWearInformationProvider.java24 default int convertLifetime(int lifetime) { in convertLifetime() argument
25 if ((lifetime <= 0) || (lifetime > 11)) return WearInformation.UNKNOWN_LIFETIME_ESTIMATE; in convertLifetime()
26 return 10 * (lifetime - 1); in convertLifetime()
DWearInformation.java74 private String lifetimeToString(int lifetime) { in lifetimeToString() argument
75 if (lifetime == UNKNOWN_LIFETIME_ESTIMATE) return UNKNOWN; in lifetimeToString()
77 return lifetime + "%"; in lifetimeToString()
/packages/apps/Camera2/src/com/android/camera/async/
DHandlerFactory.java31 public Handler create(Lifetime lifetime, String threadName) { in create() argument
35 lifetime.add(new SafeCloseable() { in create()
51 public Handler create(Lifetime lifetime, String threadName, int javaThreadPriority) { in create() argument
56 lifetime.add(new SafeCloseable() { in create()
/packages/modules/NetworkStack/src/android/net/ip/
DIpClientLinkObserver.java234 public void onInterfaceDnsServerInfo(String iface, long lifetime, String[] addresses) { in onInterfaceDnsServerInfo() argument
237 boolean changed = mDnsServerRepository.addServers(lifetime, addresses); in onInterfaceDnsServerInfo()
391 final long expiry = now + TimeUnit.SECONDS.toMillis(opt.lifetime); in processPref64Option()
497 public synchronized boolean addServers(long lifetime, String[] addresses) { in addServers() argument
499 if (lifetime != 0 && lifetime < mMinLifetime) return false; in addServers()
505 long expiry = now + 1000 * lifetime; in addServers()
/packages/services/Car/car-lib/src/android/car/storagemonitoring/
DLifetimeWriteInfo.java104 LifetimeWriteInfo lifetime = (LifetimeWriteInfo)other; in equals() local
105 return partition.equals(lifetime.partition) && in equals()
106 fstype.equals(lifetime.fstype) && in equals()
107 writtenBytes == lifetime.writtenBytes; in equals()
/packages/apps/Camera2/src/com/android/camera/one/v2/
DZslOneCameraFactory.java144 final Lifetime lifetime = new Lifetime(); in createOneCamera() local
151 lifetime.add(imageReader); in createOneCamera()
152 lifetime.add(device); in createOneCamera()
245 lifetime.add(cameraCommandExecutor); in createOneCamera()
310 lifetime.add(Observables.addThreadSafeCallback(readyObservable, in createOneCamera()
324 return new InitializedOneCameraFactory(lifetime, cameraStarter, device, in createOneCamera()
DSimpleOneCameraFactory.java111 final Lifetime lifetime = new Lifetime(); in createOneCamera() local
119 lifetime.add(imageReader); in createOneCamera()
120 lifetime.add(device); in createOneCamera()
238 lifetime.add(Observables.addThreadSafeCallback(ready, readyState)); in createOneCamera()
252 return new InitializedOneCameraFactory(lifetime, cameraStarter, device, outputSurfaces, in createOneCamera()
/packages/apps/Camera2/src/com/android/camera/one/v2/sharedimagereader/
DZslSharedImageReaderFactory.java65 public ZslSharedImageReaderFactory(Lifetime lifetime, ImageReaderProxy imageReader, in ZslSharedImageReaderFactory() argument
67 ImageDistributorFactory imageDistributorFactory = new ImageDistributorFactory(lifetime, in ZslSharedImageReaderFactory()
79 new Lifetime(lifetime), rootTicketPool, Observables.of(maxRingBufferSize)); in ZslSharedImageReaderFactory()
92 new Lifetime(lifetime), ringBufferFactory.provideTicketPool(), in ZslSharedImageReaderFactory()
DSharedImageReaderFactory.java55 public SharedImageReaderFactory(Lifetime lifetime, ImageReaderProxy imageReader, in SharedImageReaderFactory() argument
58 Lifetime(lifetime), imageReader, handlerFactory); in SharedImageReaderFactory()
65 new Lifetime(lifetime), ticketPool, imageReader.getSurface(), imageDistributor); in SharedImageReaderFactory()
DManagedImageReader.java88 public ManagedImageReader(Lifetime lifetime, TicketPool ticketPool, Surface surface, in ManagedImageReader() argument
90 mLifetime = lifetime; in ManagedImageReader()
/packages/apps/Camera2/src/com/android/camera/one/v2/initialization/
DInitializedOneCameraFactory.java72 final Lifetime lifetime, final CameraStarter cameraStarter, CameraDeviceProxy device, in InitializedOneCameraFactory() argument
79 final Handler cameraHandler = handlerFactory.create(lifetime, "CameraHandler"); in InitializedOneCameraFactory()
141 new Lifetime(lifetime), in InitializedOneCameraFactory()
152 mOneCamera = new GenericOneCameraImpl(lifetime, pictureTaker, manualAutoFocus, lensRange, in InitializedOneCameraFactory()
/packages/apps/Camera2/src/com/android/camera/device/
DCameraDeviceLifecycle.java62 public ListenableFuture<TDevice> createRequest(Lifetime lifetime) { in createRequest() argument
64 mDeviceRequest = new SingleDeviceRequest<>(lifetime); in createRequest()
65 lifetime.add(mDeviceRequest); in createRequest()
DSingleDeviceRequest.java38 public SingleDeviceRequest(Lifetime lifetime) { in SingleDeviceRequest() argument
39 mLifetime = lifetime; in SingleDeviceRequest()
DSingleDeviceLifecycle.java37 public ListenableFuture<TDevice> createRequest(Lifetime lifetime); in createRequest() argument
/packages/apps/Camera2/src/com/android/camera/one/v2/sharedimagereader/imagedistributor/
DImageDistributorFactory.java41 public ImageDistributorFactory(Lifetime lifetime, ImageReaderProxy imageReader, in ImageDistributorFactory() argument
45 lifetime.add(globalTimestampStream); in ImageDistributorFactory()
51 Handler imageReaderHandler = handlerFactory.create(lifetime, "ImageDistributor", in ImageDistributorFactory()
/packages/apps/Camera2/src/com/android/camera/one/v2/sharedimagereader/ringbuffer/
DDynamicRingBufferFactory.java45 public DynamicRingBufferFactory(Lifetime lifetime, TicketPool rootTicketPool, in DynamicRingBufferFactory() argument
48 lifetime.add(ringBuffer); in DynamicRingBufferFactory()
49 lifetime.add(maxRingBufferSize.addCallback(new Runnable() { in DynamicRingBufferFactory()
/packages/apps/Camera2/src/com/android/camera/one/v2/core/
DFrameServerFactory.java31 public FrameServerFactory(Lifetime lifetime, CameraCaptureSessionProxy cameraCaptureSession, in FrameServerFactory() argument
36 Handler cameraHandler = handlerFactory.create(lifetime, "CameraMetadataHandler", in FrameServerFactory()
/packages/apps/Camera2/src/com/android/camera/one/v2/autofocus/
DManualAutoFocusFactory.java69 public static ManualAutoFocusFactory create(Lifetime lifetime, FrameServer frameServer, in create() argument
92 lifetime.add(afHoldDelayedExecutor); in create()
/packages/modules/NetworkStack/src/com/android/server/
DNetworkObserverRegistry.java128 public void onInterfaceDnsServerInfo(String ifName, long lifetime, String[] servers) { in onInterfaceDnsServerInfo() argument
129 invokeForAllObservers(o -> o.onInterfaceDnsServerInfo(ifName, lifetime, servers)); in onInterfaceDnsServerInfo()
/packages/apps/Camera2/src/com/android/camera/burst/
DBurstCaptureCommand.java92 Lifetime lifetime, in BurstCaptureCommand() argument
101 mBurstLifetime = lifetime; in BurstCaptureCommand()
/packages/modules/NetworkStack/tests/unit/src/android/net/apf/
DApfTest.java1834 private void addRdnssOption(ByteBuffer packet, int lifetime, String... servers) in addRdnssOption() argument
1840 packet.putInt(lifetime); // Lifetime in addRdnssOption()
1846 private void addRioOption(ByteBuffer packet, int lifetime, String prefixString) in addRioOption() argument
1863 packet.putInt(lifetime); // Lifetime in addRioOption()
1941 private void verifyRaLifetime(byte[] program, ByteBuffer packet, int lifetime) { in verifyRaLifetime() argument
1943 final int ageLimit = lifetime / FRACTION_OF_LIFETIME; in verifyRaLifetime()
1949 assertPass(program, packet.array(), lifetime); in verifyRaLifetime()
1970 ByteBuffer packet, int lifetime) throws IOException, ErrnoException { in verifyRaLifetime() argument
1975 verifyRaLifetime(program, packet, lifetime); in verifyRaLifetime()

12