Loading services/backup/java/com/android/server/backup/restore/RestoreDeleteObserver.java +16 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.server.backup.restore; import android.content.pm.IPackageDeleteObserver; Loading services/backup/java/com/android/server/backup/restore/RestoreFileRunnable.java +16 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.server.backup.restore; import android.app.IBackupAgent; Loading services/backup/java/com/android/server/backup/restore/RestoreInstallObserver.java +16 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.server.backup.restore; import android.app.PackageInstallObserver; Loading services/backup/java/com/android/server/backup/utils/AppBackupUtils.java +16 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.server.backup.utils; import android.content.pm.ApplicationInfo; Loading services/backup/java/com/android/server/backup/utils/BackupManagerMonitorUtils.java +43 −8 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.server.backup.utils; import static android.app.backup.BackupManagerMonitor.EXTRA_LOG_EVENT_PACKAGE_NAME; Loading Loading @@ -54,6 +70,15 @@ public class BackupManagerMonitorUtils { return null; } /** * Adds given key-value pair in the bundle and returns the bundle. If bundle was null it will * be created. * * @param extras - bundle where to add key-value to, if null a new bundle will be created. * @param key - key. * @param value - value. * @return extras if it was not null and new bundle otherwise. */ public static Bundle putMonitoringExtra(Bundle extras, String key, String value) { if (extras == null) { extras = new Bundle(); Loading @@ -62,14 +87,15 @@ public class BackupManagerMonitorUtils { return extras; } private static Bundle putMonitoringExtra(Bundle extras, String key, int value) { if (extras == null) { extras = new Bundle(); } extras.putInt(key, value); return extras; } /** * Adds given key-value pair in the bundle and returns the bundle. If bundle was null it will * be created. * * @param extras - bundle where to add key-value to, if null a new bundle will be created. * @param key - key. * @param value - value. * @return extras if it was not null and new bundle otherwise. */ public static Bundle putMonitoringExtra(Bundle extras, String key, long value) { if (extras == null) { extras = new Bundle(); Loading @@ -78,6 +104,15 @@ public class BackupManagerMonitorUtils { return extras; } /** * Adds given key-value pair in the bundle and returns the bundle. If bundle was null it will * be created. * * @param extras - bundle where to add key-value to, if null a new bundle will be created. * @param key - key. * @param value - value. * @return extras if it was not null and new bundle otherwise. */ public static Bundle putMonitoringExtra(Bundle extras, String key, boolean value) { if (extras == null) { extras = new Bundle(); Loading Loading
services/backup/java/com/android/server/backup/restore/RestoreDeleteObserver.java +16 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.server.backup.restore; import android.content.pm.IPackageDeleteObserver; Loading
services/backup/java/com/android/server/backup/restore/RestoreFileRunnable.java +16 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.server.backup.restore; import android.app.IBackupAgent; Loading
services/backup/java/com/android/server/backup/restore/RestoreInstallObserver.java +16 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.server.backup.restore; import android.app.PackageInstallObserver; Loading
services/backup/java/com/android/server/backup/utils/AppBackupUtils.java +16 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.server.backup.utils; import android.content.pm.ApplicationInfo; Loading
services/backup/java/com/android/server/backup/utils/BackupManagerMonitorUtils.java +43 −8 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.server.backup.utils; import static android.app.backup.BackupManagerMonitor.EXTRA_LOG_EVENT_PACKAGE_NAME; Loading Loading @@ -54,6 +70,15 @@ public class BackupManagerMonitorUtils { return null; } /** * Adds given key-value pair in the bundle and returns the bundle. If bundle was null it will * be created. * * @param extras - bundle where to add key-value to, if null a new bundle will be created. * @param key - key. * @param value - value. * @return extras if it was not null and new bundle otherwise. */ public static Bundle putMonitoringExtra(Bundle extras, String key, String value) { if (extras == null) { extras = new Bundle(); Loading @@ -62,14 +87,15 @@ public class BackupManagerMonitorUtils { return extras; } private static Bundle putMonitoringExtra(Bundle extras, String key, int value) { if (extras == null) { extras = new Bundle(); } extras.putInt(key, value); return extras; } /** * Adds given key-value pair in the bundle and returns the bundle. If bundle was null it will * be created. * * @param extras - bundle where to add key-value to, if null a new bundle will be created. * @param key - key. * @param value - value. * @return extras if it was not null and new bundle otherwise. */ public static Bundle putMonitoringExtra(Bundle extras, String key, long value) { if (extras == null) { extras = new Bundle(); Loading @@ -78,6 +104,15 @@ public class BackupManagerMonitorUtils { return extras; } /** * Adds given key-value pair in the bundle and returns the bundle. If bundle was null it will * be created. * * @param extras - bundle where to add key-value to, if null a new bundle will be created. * @param key - key. * @param value - value. * @return extras if it was not null and new bundle otherwise. */ public static Bundle putMonitoringExtra(Bundle extras, String key, boolean value) { if (extras == null) { extras = new Bundle(); Loading