framework: os: Introduce IMountServiceObserver
Signed-off-by: San Mehat <san@google.com>
This commit is contained in:
@@ -112,6 +112,7 @@ LOCAL_SRC_FILES += \
|
||||
core/java/android/os/ICheckinService.aidl \
|
||||
core/java/android/os/IMessenger.aidl \
|
||||
core/java/android/os/IMountService.aidl \
|
||||
core/java/android/os/IMountServiceObserver.aidl \
|
||||
core/java/android/os/INetworkManagementService.aidl \
|
||||
core/java/android/os/INetStatService.aidl \
|
||||
core/java/android/os/IParentalControlCallback.aidl \
|
||||
|
||||
66
core/java/android/os/IMountServiceObserver.aidl
Normal file
66
core/java/android/os/IMountServiceObserver.aidl
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright (C) 2009 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 android.os;
|
||||
|
||||
/**
|
||||
* Callback class for receiving events from MountService.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
interface IMountServiceObserver {
|
||||
/**
|
||||
* A sharing method has changed availability state.
|
||||
*
|
||||
* @param method The share method which has changed.
|
||||
* @param available The share availability state.
|
||||
*/
|
||||
void shareAvailabilityChange(String method, boolean available);
|
||||
|
||||
/**
|
||||
* Media has been inserted
|
||||
*
|
||||
* @param label The volume label.
|
||||
* @param path The volume mount path.
|
||||
* @param major The backing device major number.
|
||||
* @param minor The backing device minor number.
|
||||
*/
|
||||
void mediaInserted(String label, String path, int major, int minor);
|
||||
|
||||
/**
|
||||
* Media has been removed
|
||||
*
|
||||
* @param label The volume label.
|
||||
* @param path The volume mount path.
|
||||
* @param major The backing device major number.
|
||||
* @param minor The backing device minor number.
|
||||
* @param clean Indicates if the removal was clean (unmounted first).
|
||||
*/
|
||||
void mediaRemoved(String label, String path, int major, int minor, boolean clean);
|
||||
|
||||
/**
|
||||
* Volume state has changed.
|
||||
*
|
||||
* @param label The volume label.
|
||||
* @param path The volume mount path.
|
||||
* @param oldState The old state of the volume.
|
||||
* @param newState The new state of the volume.
|
||||
*
|
||||
* Note: State is one of the values returned by Environment.getExternalStorageState()
|
||||
*/
|
||||
void volumeStateChange(String label, String path, String oldState, String newState);
|
||||
|
||||
}
|
||||
69
core/java/android/os/MountServiceObserver.java
Normal file
69
core/java/android/os/MountServiceObserver.java
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright (C) 2010 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 android.os;
|
||||
|
||||
/**
|
||||
* Callback class for receiving progress reports during a restore operation. These
|
||||
* methods will all be called on your application's main thread.
|
||||
* @hide
|
||||
*/
|
||||
public abstract class MountServiceObserver {
|
||||
/**
|
||||
* A sharing method has changed availability state.
|
||||
*
|
||||
* @param method The share method which has changed.
|
||||
* @param available The share availability state.
|
||||
*/
|
||||
void shareAvailabilityChange(String method, boolean available) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Media has been inserted
|
||||
*
|
||||
* @param label The volume label.
|
||||
* @param path The volume mount path.
|
||||
* @param major The backing device major number.
|
||||
* @param minor The backing device minor number.
|
||||
*/
|
||||
void mediaInserted(String label, String path, int major, int minor) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Media has been removed
|
||||
*
|
||||
* @param label The volume label.
|
||||
* @param path The volume mount path.
|
||||
* @param major The backing device major number.
|
||||
* @param minor The backing device minor number.
|
||||
* @param clean Indicates if the removal was clean (unmounted first).
|
||||
*/
|
||||
void mediaRemoved(String label, String path, int major, int minor, boolean clean) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Volume state has changed.
|
||||
*
|
||||
* @param label The volume label.
|
||||
* @param path The volume mount path.
|
||||
* @param oldState The old state of the volume.
|
||||
* @param newState The new state of the volume.
|
||||
*
|
||||
* Note: State is one of the values returned by Environment.getExternalStorageState()
|
||||
*/
|
||||
void volumeStateChange(String label, String path, String oldState, String newState) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user