[Thread] move createRandomDataset to ThreadNetworkController
This commit renames `createRandomDataset` to `createRandomizedDataset` and moves this method to ThreadNetworkController class. The reason for moving this method is that we rely on the service side to know which channels are currently supported by this device and there is no safe way for ActiveOperationalDataset to created a randomized full dataset by its own. Moving this method to ThreadNetworkController also allows us to support future platform-dependend configurations. Bug: 308117328 Bug: 307939803 Change-Id: I0b0b7b727c3b326ab59bb1299ace15df1ff1ad5e
This commit is contained in:
parent
b1c75dbe8c
commit
af4f1f576c
1 changed files with 362 additions and 284 deletions
|
|
@ -418,7 +418,6 @@ package android.net.nsd {
|
|||
package android.net.thread {
|
||||
|
||||
@FlaggedApi("com.android.net.thread.flags.thread_enabled") public final class ActiveOperationalDataset implements android.os.Parcelable {
|
||||
method @NonNull public static android.net.thread.ActiveOperationalDataset createRandomDataset();
|
||||
method public int describeContents();
|
||||
method @NonNull public static android.net.thread.ActiveOperationalDataset fromThreadTlvs(@NonNull byte[]);
|
||||
method @NonNull public android.net.thread.OperationalDatasetTimestamp getActiveTimestamp();
|
||||
|
|
@ -493,6 +492,7 @@ package android.net.thread {
|
|||
}
|
||||
|
||||
@FlaggedApi("com.android.net.thread.flags.thread_enabled") public final class ThreadNetworkController {
|
||||
method public void createRandomizedDataset(@NonNull String, @NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<android.net.thread.ActiveOperationalDataset,android.net.thread.ThreadNetworkException>);
|
||||
method public int getThreadVersion();
|
||||
method public static boolean isAttached(int);
|
||||
method @RequiresPermission("android.permission.THREAD_NETWORK_PRIVILEGED") public void join(@NonNull android.net.thread.ActiveOperationalDataset, @NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<java.lang.Void,android.net.thread.ThreadNetworkException>);
|
||||
|
|
|
|||
Loading…
Reference in a new issue